Skip to main content

Analysis tool for estimating the likelihood that a binary contains compressed or encrypted bytes

Project description

PyPi Build Status Python Versions Requirements Status Known Vulnerabilities License

Introduction

This tool is the implementation in Python of Bintropy, presented in this paper. It implements both modes of operation, either on the entire binary or per section. It uses the entropy values mentioned in the paper for deciding whether the binary contains compressed/encrypted bytes.

Setup

This tool is available as a package from PyPi.

$ pip install bintropy

Usage

The help message explains every option.

$ bintropy --help

Per-section operation mode

For this mode, do not use the -f/--full option. Moreover, you can use the --dot-not-decide option to prevent the tool from returning the boolen but the entropy values instead.

$ bintropy binary
<<< boolean >>>

$ bintropy binary --dot-not-decide
<<< highest block entropy, average block entropy >>>

Full-binary operation mode

For this mode, use the -f/--full option. Moreover, you can use the --dot-not-decide option to prevent the tool from returning the boolen but the entropy values instead.

$ bintropy binary -f
<<< boolean >>>

$ bintropy binary -f --do-not-decide
<<< highest block entropy, average block entropy >>>

Benchmarking

Use the -b/--benchmark option to get one more value, the processing time in seconds.

$ bintropy binary
<<< boolean, processing time >>>

$ bintropy binary -f --do-not-decide
<<< highest block entropy, average block entropy, processing time >>>

Overriding default entropy values

The reference paper uses 6.677 for the average block entropy and 7.199 for the highest block entropy. These values can be overriden with the dedicated options.

$ bintropy binary --threshold-average-entropy 5.678 --threshold-highest-entropy 6.789
[...]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bintropy-1.0.2.tar.gz (19.4 kB view details)

Uploaded Source

File details

Details for the file bintropy-1.0.2.tar.gz.

File metadata

  • Download URL: bintropy-1.0.2.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for bintropy-1.0.2.tar.gz
Algorithm Hash digest
SHA256 89268f34ab27675059c3189d05b5fbf4657c807b454728c395b61e56ef8474e4
MD5 d17bbc3080d6fe814dd59435c65e7aa9
BLAKE2b-256 1ab989eed5887901f327b1074493e5c809780730db9ab859b091c56f5d421d7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page