{"id":23413172,"url":"https://github.com/revengai/reait","last_synced_at":"2025-07-15T12:10:46.146Z","repository":{"id":63077057,"uuid":"564834683","full_name":"RevEngAI/reait","owner":"RevEngAI","description":"RevEng.AI Toolkit and Python API","archived":false,"fork":false,"pushed_at":"2025-04-09T14:37:38.000Z","size":5913,"stargazers_count":25,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T15:43:24.710Z","etag":null,"topics":["artificial-intelligence","binary-analysis","defensive-security","exploit-development","offensive-security","python3","reverse-engineering","vulnerability-research"],"latest_commit_sha":null,"homepage":"https://reveng.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RevEngAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-11T15:58:42.000Z","updated_at":"2025-04-09T14:37:42.000Z","dependencies_parsed_at":"2023-10-13T20:38:57.249Z","dependency_job_id":"97791c64-8904-4059-ac3d-0360abbd6471","html_url":"https://github.com/RevEngAI/reait","commit_stats":{"total_commits":30,"total_committers":3,"mean_commits":10.0,"dds":0.2666666666666667,"last_synced_commit":"17f7ad6aa9608a39f8c7b01774e92cfe58ad599e"},"previous_names":["reveng-ai/reait"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevEngAI%2Freait","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevEngAI%2Freait/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevEngAI%2Freait/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevEngAI%2Freait/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RevEngAI","download_url":"https://codeload.github.com/RevEngAI/reait/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519545,"owners_count":21117761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","binary-analysis","defensive-security","exploit-development","offensive-security","python3","reverse-engineering","vulnerability-research"],"created_at":"2024-12-22T19:25:53.113Z","updated_at":"2025-04-12T05:11:49.939Z","avatar_url":"https://github.com/RevEngAI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reait\n\n[![Python package](https://github.com/RevEngAI/reait/actions/workflows/python-package.yml/badge.svg)](https://github.com/RevEngAI/reait/actions/workflows/python-package.yml)\n\n## \u003cins\u003eR\u003c/ins\u003eev\u003cins\u003eE\u003c/ins\u003eng.\u003cins\u003eAI\u003c/ins\u003e \u003cins\u003eT\u003c/ins\u003eoolkit\n\nAnalyse compiled executable binaries using the RevEng.AI API. This tool allows you to search for similar components across different compiled executable programs, identify known vulnerabilities in stripped executables, and generate \"YARA++\" **REAI** signatures for entire binary files. More details about the API can be found at [docs.reveng.ai](https://docs.reveng.ai).\n\nNB: 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. \n\n## Installation\nInstall the latest stable version using `pip3`.\n\n```shell\npip3 install reait\n```\n\n### Latest development version\n```shell\npip3 install -e .\n```\n\nor \n\n```shell\npython3 -m build .\npip3 install -U dist/reait-*.whl\n```\n\n## Using reait\n\n### Analysing binaries\nTo submit a binary for analysis, run `reait` with the `-a` flag:\n\n```shell\nreait -b /usr/bin/true -a\n```\n\nThis 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`.\n\n### Extract symbol embeddings\nSymbol 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.\nOnce an analysis is complete, you may access RevEng.AI's BinNet embeddings for all symbols extracted with the `-x` flag. \n\n```shell\nreait -b /usr/bin/true -x \u003e embeddings.json\n```\n\n### Search for similar symbols using an embedding\nTo 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 symbols with their names, distance (similarity), RevEng.AI collection set, source code filename, source code line number, and file creation timestamp is returned. \n\n```shell\nreait --embedding embedding.json -n\n```\n\nThe following command searches for the top 10 most similar symbols found in md5sum.gcc.og.dynamic to the symbol starting at _0x33E6_ in md5sum.clang.og.dynamic. You may need to pass `--image-base` to ensure virtual addresses are mapped correctly.\n\n```shell\nreait -b md5sum.gcc.og.dynamic -n --start-vaddr 0x33E6 --found-in md5sum.gcc.o2.dynamic --nns 10 --base-address 0x100000\n```\n\nSearch NN by symbol name.\n```shell\nreait -b md5sum.gcc.og.dynamic -n --symbol md5_buffer --found-in md5sum.gcc.o2.dynamic --nns 5\n```\n\nNB: A smaller distance indicates a higher degree of similarity.\n\n#### Specific Search\nTo search for the most similar symbols found in a specific binary, use the `--found-in` option with a path to the executable to search from.\n\n```shell\nreait -n --embedding /tmp/sha256_init.json --found-in ~/malware.exe --nns 5\n``` \n\nThis 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).\n\nThe `--from-file` option may also be used to limit the search to a custom file containing a JSON list of embeddings.\n\n\n#### Limited Search\nTo search for most similar symbols from a set of RevEng.AI collections, use the `--collections` options with a RegEx to match collection names. For example:\n\n```shell\nreait -n --embedding my_func.json --collections \"(libc.*|lib.*crypt.*)\"\n```\n\nRevEng.AI collections are sets of pre-analysed executable objects. To create custom collection sets e.g., malware collections, please create a RevEng.AI account.\n\n\n### Unstripping binaries\n\nFind common components between binaries, RevEng.AI collections, or global search, by using `-M, --match`.\n\nExample usage: \n\n```shell\nreait -M -b 05ff897f430fec0ac17f14c89181c76961993506e5875f2987e9ead13bec58c2.exe --from-file 755a4b2ec15da6bb01248b2dfbad206c340ba937eae9c35f04f6cedfe5e99d63.embeddings.json --confidence high\n```\n\n### RevEng.AI embedding models\nTo use specific RevEng.AI AI models, or for training custom models, use `-m` to specify the model. The default option is to use the latest development model. Available models are `binnet-0.1` and `dexter`.\n\n```shell\nreait -b /usr/bin/true -m dexter -a\n```\n\n### Software Composition Analysis\nTo identify known open source software components embedded inside a binary, use the `-C` flag.\n\n\n### Binary ANN Search\nTo perform binary ANN search, pass in `-n` and `-s` flag at the same time. For example:\n\n```shell\nreait -b /usr/bin/true -s -n\nFound /usr/bin/true:elf-x86_64\n[\n  {\n    \"distance\": 0.0,\n    \"sha_256_hash\": \"1d20d8b1bbc861a2e9e0216efb7945fba664a5e6ba5f6a93febd6612a92551a8\"\n  },\n  {\n    \"distance\": 0.04410748228394201,\n    \"sha_256_hash\": \"265cb456cf5a09ad82380cb98118fb9255a9c9407085677d597abd828a5f4b11\"\n  },\n  {\n    \"distance\": 0.04710724400903421,\n    \"sha_256_hash\": \"1de9c70e46b17a96ee15e88e52da260de4f2d70e167c5172c29416d16f907482\"\n  },\n  {\n    \"distance\": 0.047961843853272956,\n    \"sha_256_hash\": \"01bf5e0f03dfaf6324f7e00942fed88ca52845c190a7392b0d0eb5c3a91091df\"\n  },\n  {\n    \"distance\": 0.05086539098571474,\n    \"sha_256_hash\": \"62dd31307316ee0e910eb845f35bf548b7fd79dc9f407ef917efdf14d143842e\"\n  }\n]\n```\n\n\n## Configuration\n`reait` reads the config file stored at `~/.reait.toml`. An example config file looks like:\n\n```shell\napikey = \"l1br3\"\nhost = \"https://api.reveng.ai\"\nmodel = \"binnet-0.3-x86\"\n```\n\n## Contact\nConnect with us by filling out the contact form at [RevEng.AI](https://reveng.ai).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevengai%2Freait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevengai%2Freait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevengai%2Freait/lists"}