Adversarial Machine Learning Attacks and Defense Mechanisms in Intelligent Cybersecurity Systems

Waqar Qais

AI Automation Engineer, BS Computer Science, Bahauddin Zakariya University, Pakistan

Keywords: Adversarial Machine Learning, Adversarial Training, Data Poisoning, Deep Learning, Evasion Attacks, Intrusion Detection, Network Security, Robustness, TRADES


Abstract

While deep learning is a fundamental part of intelligent cyber security systems including network intrusion detection systems (NIDS), deep learning models can be adversarially manipulated during the training and inference phases. In this paper, a holistic, reproducible assessment of adversarial machine learning (AML) attacks and defenses of a deep neural network (DNN) based NIDS is presented. We formalize a threat model that distinguishes unconstrained feature-space attackers from domain-constrained ones who only tweak 14 traffic features without compromising the malicious payload, and assess evasion (FGSM, PGD-20, Carlini-Wagner L2), black-box transfer using a query-trained substitute, and label-flipping data poisoning across three random seeds on the NSL-KDD benchmark. In the KDDTest+ split, the baseline DNN achieves a 79.0% accuracy and a 90.7% AUC, while an unconstrained PGD attack with ε = 0.2 causes the attack detection rate of the DNN to drop from 67.9% to 13.4%, with 75.9% of the correctly detected attacks being undetected by the C&W-L2 attack. The threat is less affected by domain constraints (detection 42.4% at ε = 0.2). In five defenses, PGD adversarial training and TRADES provide the greatest robustness, with 55.3% and 59.0% detection at ε = 0.2 on a clean-accuracy cost of 1.0 and 3.2 points, respectively, and Gaussian augmentation and a feature-squeezing detector provide only partial protection. At a poisoning rate of 20%, the k-nearest-neighbor sanitizer successfully removes more than 97% of the flipped labels, and restores the vast majority of the lost detection rate for the random forest. We synthesize the results into guidance for building strong, smart cyber defense pipelines.