A tool for large-scale malware similarity analysis and clustering
Project description
PyBitShred
PyBitShred is a Python reimplementation of BitShred, a tool for large-scale malware similarity analysis and clustering.
This is my semester project of fall 2023 at EURECOM, France. The project is supervised by Antonino Vitale and Prof. Simone Aonzo. We implemented the tool in Python to make it more accessible and easier to use. We also added two new modes to the tool: the "all section" mode and the "raw file" mode.
Check the presentation slides here.
Getting Started
Installation
pip install pybitshred
Usage
Use the following command to see the available options:
pybitshred -h
There are three stages in the BitShred pipeline: update, compare, and cluster. The update stage is used to update the database with new samples. The compare stage is used to compare the samples in the database. The cluster stage is used to cluster the samples in the database.
Check the original paper for more details.
Running Original BitShred
@im-overlord04 wrote a Dockerfile to run the original BitShred tool in a container. This is useful as a reference to compare the results of the original tool with the results of the reimplemented tool.
FROM ubuntu:14.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install --no-install-recommends -y \
wget git automake libtool make cmake gcc g++ pkg-config libmagic-dev \
tar unzip libglib2.0-0 libssl-dev libdb-dev
RUN ld -v
ARG GIT_SSL_NO_VERIFY=1
RUN apt-get install -y automake1.11 binutils-dev
COPY bitshred/bitshred_single_steps bitshred_single_steps
RUN cd bitshred_single_steps/ && ./configure && make
COPY bitshred/bitshred_single bitshred_single
RUN cd bitshred_single/ && ./configure && make
COPY bitshred/bitshred_openmp bitshred_openmp
RUN cd bitshred_openmp/ && make
WORKDIR /
Build
docker build . -t nino:bitshred
Usage
docker run --rm --volume <input_folder>:/input:ro --volume <output_folder>:/db --entrypoint <entrypoint>/src/bitshred nino:bitshred <options>
- input_folder: folder containing the samples
- output_folder: folder where the results of the tool will be placed in
- entrypoint: version of the tool to run: only supported either
bitshred_singleorbitshred_single_stepsorbitshred_openmp - options: command line options required by the tool, specified between double quotes. NB: if you have to specify the input folder, you must use
/input(any other path is not valid) and it corresponds to the value specified ininput_folder. Same reasoning for the output folder, whose path to use is/db
Example:
docker run --rm --volume "/home/nino/samples/":/input:ro --volume "/home/nino/output":/db --entrypoint /bitshred_single/src/bitshred nino:bitshred "-b" "/input/" "-t" "0.60"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybitshred-0.1.2.tar.gz.
File metadata
- Download URL: pybitshred-0.1.2.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07038fb6165ea8b95e2adc67a559f9c20d05a5bb01da476792c44e2c6696851a
|
|
| MD5 |
5c9cdf0c8fe67deec96f878842dc86a6
|
|
| BLAKE2b-256 |
38b0b059c515f2927bc4bb295bcc4f361d69a062e96153a381c8ea429717eb79
|
File details
Details for the file pybitshred-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pybitshred-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d124eeff42e126c96a33db6efcc85f8d4aa7d0d23778447aefcf184dee49605a
|
|
| MD5 |
9568a31044c6c7eb140e32577b7598dc
|
|
| BLAKE2b-256 |
0072c200e2ddc2b2a0363e5789415186512e06b85a4c9e20accfb9badd860610
|