of experiments. Specifically, we performed different
port scanning attempts for different types of scanning
(TCP SYN Scan, TCP Connect Scan, TCP NULL
Scan, TCP FIN Scan, and TCP XMAS Tree Scan).
For each of the above port scanning attempts, the net-
work traffic was captured, through the use of wire-
shark
3
.
We trained a number of classifiers (DT, RF, MLP,
kNN, NB) according to the analysis presented in Sec-
tion 3. To make the experiment more realistic, we
trained those classifiers with multiple combinations of
real-world background traffic and traffic chunks pro-
duced by a number of port scanning tools, such as
nmap
4
, zmap
5
, masscan
6
, and hping
7
.
The covert scanning tool was used to conduct a
number of reconnaissance attempts with various tech-
niques. The activity of the covert scanning tool was
not detected in any of the scenarios. For all combina-
tions of the (a) classification algorithm, (b) scanning
tool that has been used for training the classifier and
(c) scanning technique used by the covert tool, the ac-
tivity of the latter remained undetected.
7 CONCLUSIONS
In this paper, the detection of reconnaissance activ-
ity through the use of ML classifiers has been stud-
ied. Literature was analyzed and both efficient algo-
rithms and use-full network packet fields to the pro-
cess were identified. The extracted information was
used to train a number of classifiers in order to detect
port scans with high accuracy. This has confirmed
that it is feasible to detect port scanning activity with
this approach.
Consequently, the most significant packet fields
that enable high accuracy ratio metrics for most of
the algorithms were identified a genetic algorithm ap-
proach was used to heuristically decide the optimal
values for such fields that would enable port scan-
ning activity while remaining undetected by classi-
fiers. Based on those findings, a covert port scanning
tool was developed and made publicly available for
the network security research community. The tool
was tested under various circumstances and it has al-
ways evaded detection.
As future work plans, we foresee that we can
add dynamic updates of the evasion capabilities
of the proposed tool, according to novel scanning
3
https://www.wireshark.org/
4
https://nmap.org/
5
https://github.com/zmap/zmap
6
https://github.com/robertdavidgraham/masscan
7
https://www.kali.org/tools/hping3/
tools/algorithms. Re-defining the significant fields
and the proper values for those may be done centrally
and then updating the configuration parameters of all
instances of the covert scanning tool through an over-
the-air update.
REFERENCES
Algaolahi, A. Q., Hasan, A. A., Sallam, A., Sharaf, A. M.,
Abdu, A. A., and Alqadi, A. A. (2021). Port-scanning
attack detection using supervised machine learning
classifiers. In 2021 1st International Conference on
Emerging Smart Technologies and Applications (eS-
marTA), pages 1–5. IEEE.
Andropov, S., Guirik, A., Budko, M., and Budko, M.
(2017). Network anomaly detection using artificial
neural networks. In 2017 20th Conference of Open In-
novations Association (FRUCT), pages 26–31. IEEE.
Balram, S. and Wiscy, M. (2008). Detection of tcp syn scan-
ning using packet counts and neural network. In 2008
IEEE International Conference on Signal Image Tech-
nology and Internet Based Systems, pages 646–649.
IEEE.
Bertoli, G. D. C., J
´
unior, L. A. P., Saotome, O., Dos Santos,
A. L., Verri, F. A. N., Marcondes, C. A. C., Barbieri,
S., Rodrigues, M. S., and De Oliveira, J. M. P. (2021).
An end-to-end framework for machine learning-based
network intrusion detection system. IEEE Access,
9:106790–106805.
De Vivo, M., Carrasco, E., Isern, G., and De Vivo,
G. O. (1999). A review of port scanning techniques.
ACM SIGCOMM Computer Communication Review,
29(2):41–48.
Fontugne, R., Borgnat, P., Abry, P., and Fukuda, K. (2010).
Mawilab: Combining diverse anomaly detectors for
automated anomaly labeling and performance bench-
marking. In Proceedings of the 6th International
COnference, Co-NEXT ’10, New York, NY, USA. As-
sociation for Computing Machinery.
Jirapummin, C. and Kanthamanon, P. (2002). Hybrid neural
networks for intrusion detection system. In Proceed-
ings of the IEEK Conference, pages 928–931. The In-
stitute of Electronics and Information Engineers.
Kanika, U. (2013). Security of network using ids and fire-
wall. International Journal of Scientific and Research
Publications, 3(6):1–4.
Kaur, H. and Tiwari, R. (2021). Endpoint detection and re-
sponse using machine learning. In Journal of Physics:
Conference Series, volume 2062, page 012013. IOP
Publishing.
Kotsiantis, S. B. (2013). Decision trees: a recent overview.
Artificial Intelligence Review, 39(4):261–283.
Li, B., Friedman, J., Olshen, R., and Stone, C. (1984).
Classification and regression trees (cart). Biometrics,
40(3):358–361.
Marin, G. A. (2005). Network security basics. IEEE Secu-
rity & privacy, 3(6):68–72.
Evading Detection During Network Reconnaissance
533