https://github.com/cloneofsimo/binclone_python
https://github.com/cloneofsimo/binclone_python
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cloneofsimo/binclone_python
- Owner: cloneofsimo
- Created: 2021-05-24T22:38:22.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-28T18:42:13.000Z (about 5 years ago)
- Last Synced: 2025-10-07T19:45:21.618Z (10 months ago)
- Language: Python
- Size: 5.97 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Binclone python
Original implementation by the authors in c++ can be found [here](https://github.com/BinSigma/BinClone).
Paper for this code can be found [here](https://ieeexplore.ieee.org/document/6895418).
# How to use
Put the query asm file in `query.S` in the following format
```
00000000 :
4087ed: c9 leave // the query must start from here (8th line)
4087ee: c2 24 00 ret 0x24
4087f1: 55 push ebp
...
```
Put the asm files that you wish to make database into some folder, such as `/data`. Run the following script (or, in case of this folder, running `region_detector_function_wise` will create database with `malware.txt` & run query.)
```python
from region_detector_fuction_wise import *
from glob import glob
assign_median_boundary(glob("./data/*"))
create_features_per_window(glob("./data/*"))
finding_matchings('query.S')
```
Normalizing conditions should be recored in `norm.json`, median boundaries will be automatically generated to `med_bounds.json` on calling `assing_median_boundary`.