Source code for the paper 'Generative Adversarial Attacks Against Intrusion Detection Systems Using Active Learning'.
The code is written and tested in Python 3.6 and PyTorch 1.2.0.
Requires the network traffic flow data file 'MachineLearningCSV.zip' from the CICIDS 2017 dataset (available for free at https://www.unb.ca/cic/datasets/ids-2017.html).
To generate the adversarial attack using the Gen-AAL algorithm:
- Run 'data_preprocessing.py' to generate the data files 'NBx.npy' and 'NBy.npy'.
- Run 'pretrain_vae.py' to train the IDS model (Optional).
- Run 'pretrain_vae.py' to initialize the VAE model (Optional).
- Run 'attack_Gen-AAL.py' to generate adversarial attacks using the Gen-AAL algorithm and see the attack success rate.
- For performance comparison, run 'attack_DFAL.py' to generate adversarial attacks using the DFAL algorithm.
The Gen-AAL algorithm will be improved in the future updates.