By Tam Nguyen Van
Malware detection using Convolutional Neural Networks.
- Python >=3
- Keras (>=2.0.8)
- Tensorflow (>=1.15)
- Clone the repository to your local.
git clone https://github.com/tamnguyenvan/malnet
- Install all requirements (virtualenv is recommneded).
pip install tensorflow==1.15
(CPU only) orpip install tensorflow-gpu==1.15
(GPU)pip install -r requirements.txt
- Download Ember dataset here. You can go to their home page for more details. Extract to wherever you like.
- Extract features by running:
python create_data.py --data_dir PATH_TO_DATA_DIR
. Seecreate_data.py
for the details. After that, some.dat
file should be created in the same directory.
Almost done, just run python train.py --data_dir PATH_TO_DATA_DIR
for training. Show help to see additional options.
In case you want to regenerate validation result, run python eval.py --data_dir PATH_TO_DATA_DIR--model_path MODEL_PATH --scaler_path SCALER_PATH
. Again, show help to see options.
Let's have some fun. We will try the pretrained model on real PE files. Download your PE file then run python test.py --input_file INPUT_FILE --model_path MODEL_PATH
.
Tam Nguyen Van ([email protected]) Any questions can be left as issues in this repository. You're are welcome all.