BinaryChat  by Protosec-Research

CLI tool for binary analysis, aiding CTF Pwners

created 2 years ago
363 stars

Top 78.5% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides an AI-powered tool for analyzing binary files, specifically targeting Capture The Flag (CTF) participants in the "Pwn" category. It aims to streamline binary analysis and vulnerability detection by leveraging OpenAI's API and LangChain, allowing users to query binary file structures and potential exploits.

How It Works

The tool utilizes LangChain to process binary files, breaking them into manageable chunks for efficient analysis by OpenAI's GPT models. It employs a retrieval-augmented generation (RAG) approach, storing embeddings of the file chunks in a Chroma vector store. A carefully crafted few-shot prompt guides the AI to identify vulnerabilities, explain their causes, and suggest mitigations, mimicking an experienced CTF analyst.

Quick Start & Requirements

  • Installation: pip install --index-url=https://pypi.org/simple/ Ret2GPT
  • Prerequisites:
    • Python 3.x
    • OpenAI API Key (export OPENAI_API_KEY="Enter your api_key here")
    • Optional: retdec (from avast/retdec)
  • Usage: ret2gpt [FILE_PATH]
  • Documentation: 中文文档 📖 English README 📖

Highlighted Details

  • Leverages LangChain for efficient document splitting and QA chain creation.
  • Features a detailed, few-shot prompt designed for CTF Pwn analysis.
  • Provides built-in commands for code analysis, exploit template generation, and help.
  • Supports interactive querying of binary file contents and potential vulnerabilities.

Maintenance & Community

The project is maintained by Protosec-Research. Further community engagement details are not explicitly provided in the README.

Licensing & Compatibility

The project's licensing is not explicitly stated in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The tool relies heavily on the OpenAI API, incurring costs and requiring an API key. The effectiveness of the analysis is dependent on the quality of the provided binary file, the decompiled output, and the prompt engineering. The project is described as a "re-maintenance" starting September 1st, suggesting potential ongoing development and changes.

Health Check
Last commit

9 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
11 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.