Unofficial implementation of asm2vec
using pytorch ( with GPU acceleration )
The details of the model can be found in the original paper: (sp'19) Asm2Vec: Boosting Static Representation Robustness for Binary Clone Search against Code Obfuscation and Compiler Optimization
- python >= 3.10
- radare2
- Packages listed in
requirements.txt
pip install -r requirements.txt &&
python setup.py install
An implementation already exists here: Lancern/asm2vec
Following is the benchmark of training 1000 functions in 1 epoch.
Implementation | Time (s) |
---|---|
Lancern/asm2vec | 202.23 |
oalieno/asm2vec-pytorch (with CPU) | 9.11 |
oalieno/asm2vec-pytorch (with GPU) | 0.97 |
-
Run all tests:
python -m unittest discover -v
-
Run a certain module's tests:
python -m unittest -v test.test_binary_to_asm
-
Run a certain test class:
python -m unittest -v test.test_binary_to_asm.TestBinaryToAsm
-
Run a certain test method:
python -m unittest -v test.test_binary_to_asm.TestBinaryToAsm.test_sha3
- Create report:
coverage run -m unittest discover -v
- Read report:
coverage report -m