Skip to main content

No project description provided

Project description

reait

RevEng.AI Toolkit

Analyse compiled executable binaries using the RevEng.AI API. This tool allows you to search for similar components across different compiled executable programs. More details about the API can be found at docs.reveng.ai.

NB: We are in Alpha. We support GNU/Linux ELF and Windows PE executables for x86_64, and focus our support for x86_64 Linux ELF executables.

Installation

Install the latest stable version using pip.

pip install reait

Latest development version

pip install -e .

Using reait

Analysing binaries

To submit a binary for analysis, run reait with the -a flag:

reait -b /usr/bin/true -a

This uploads the binary specified by -b to RevEng.AI servers for analysis. Depending on the size of the binary, it may take several hours. You may check an analysis jobs progress with the -l flag e.g. reait -b /usr/bin/true -l.

Extract symbol embeddings

Symbol embeddings are numerical vector representations of each component that capture their semantic understanding. Similar functions should be similar to each other in our embedded vector space. They can be thought of as advanced AI-based IDA FLIRT signatures or Radare2 Zignatures. Once an analysis is complete, you may access RevEng.AI's BinNet embeddings for all symbols extracted with the -x flag.

reait -b /usr/bin/true -x > embeddings.json

Extract embedding for symbol at vaddr 0x19f0

reait -b /usr/bin/true -x | jq ".[] | select(.vaddr==$((0x19f0))).embedding" > embedding.json

Search for similar symbols based on JSON embedding file

To query our database of similar symbols based on an embedding, use -n to search using Approximate Nearest Neighbours. The --nns allows you to specify the number of results returned. A list of symbol names and the distance between each vector is returned.

reait -e embedding.json -n

NB: A smaller distance indicates a higher degree of similarity.

Limited Search

To search for the most similar symbols found in a binary to a specific embedding, use the --found-in option with a path to the executable.

reait -n --embedding /tmp/sha256_init.json --found-in ~/malware.exe --nns 5

This downloads embeddings from malware.exe and computes the cosine similarity between all symbols and sha256_init.json. The returned results lists the most similar symbol locations by cosine similarity score (1.0 most similar, -1.0 dissimilar).

Binary embedding

Produce a smart fingerprint for the whole binary by calculating the arithmetic mean of all symbol embeddings.

reait -b /usr/bin/true -s

Configuration

reait reads the config file stored at ~/.reait.toml. An example config file looks like:

apikey = "l1br3"
host = "https://api.reveng.ai"

Contact

Connect with us by filling out the contact form at RevEng.AI.

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

reait-0.0.14.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reait-0.0.14-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file reait-0.0.14.tar.gz.

File metadata

  • Download URL: reait-0.0.14.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for reait-0.0.14.tar.gz
Algorithm Hash digest
SHA256 7b48379db6f1a16eaaaca9494aa5816fcdd926e481ff6f2871204fcabff595b9
MD5 ea6a1bd01cef58f229e658b9f5112b2a
BLAKE2b-256 2c7a157a4e197195921ccefc952514d588e89ddddd0c36c83158cda06b9882a2

See more details on using hashes here.

File details

Details for the file reait-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: reait-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for reait-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 28309c11d0b3d3b7d83386462bba6f1b380f592679d5e0ca044bf38ebdc4dbb5
MD5 1a92bbc2daef4f1adfe4a459c3945f01
BLAKE2b-256 6b28683b37a688300176ba12b33ad28ad1caafd748bcb26cc2dde45ff723f480

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