Detect PE malicious file with Multi-Axis Vision Transformer (MaxViT model)
git clone https://github.com/prozip/malware-detection_MaxViT-Transformer
- Modify location path in config/train_config.yml
- Dataset contains folders with name as label
python3 train.py -t S
python3 train.py -t S -b 64
- edit para in config/*.yml
python2 bin2rgb.py
- PE file -> entropy (Shannon)
- entropy -> rgb color (Binvis)
- rgb color -> image (Hilbert curve)
- MaxT-0 (31M): S1 hidden_size 64; num_blocks [2, 2, 5, 2]
- MaxT-1 (69M): S1 hidden_size 96; num_blocks [2, 2, 5, 2]
- MaxT-2 (119M): S1 hidden_size 96; num_blocks [2, 6, 14, 2]
- MaxT-3 (212M): S1 hidden_size 128; num_blocks [2, 6, 14, 2]
- MaxT-4 (476M): S1 hidden_size 192; num_blocks [2, 6, 14, 2]
-
Benign: 982 samples
-
Malware: 8970 samples
Benign | Malicious |
---|---|
![]() |
![]() |
-
Best accuracy: 99.6%
-
Epochs: 200
-
Time: 6 hours