← 开源
amruth-sn

kong

The world's first agentic reverse engineer.

AI EngineeringGive agent toolsBuild agent workflow (SDK)Python
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
1.23k
Star
135
Fork
+10
本周
1
贡献者
创建于 2026-02-23 · 更新于 2026-10-14 · 今日第 11066 名
主要开发者

amruth-sn/kong 排名第 11,066,有 1,227 个星标。

同类别比较

amruth-sn/kong 排名第 11,066,此处有 8 个同类条目;NyxTides/ppt-image-first 排名第 11,065。

同类别比较
名称排名指标
google-gemini/deprecated-generative-ai-js11,037
语言:
TypeScript
星标数:
1,234
分叉数:
323
简介:
This SDK is now deprecated, use the new unified Google GenAI SDK.
uezo/ChatdollKit11,043
语言:
C#
星标数:
1,231
分叉数:
127
简介:
ChatdollKit enables you to make your 3D model into a chatbot
srush/MiniChain11,056
语言:
Python
星标数:
1,229
分叉数:
73
简介:
A tiny library for coding with large language models.
NyxTides/ppt-image-first11,065
语言:
Python
星标数:
1,227
分叉数:
90
简介:
PPT image-first skill for Codex/Claude Code/Opencode CLI
metoro-io/mcp-golang11,068
语言:
Go
星标数:
1,227
分叉数:
120
简介:
Write Model Context Protocol servers in few lines of go code. Docs at https://mcpgolang.com . Created by https://metoro.io
Azure/azure-mcp11,072
语言:
C#
星标数:
1,225
分叉数:
354
简介:
The Azure MCP Server, bringing the power of Azure to your agents.
mem9-ai/mem911,076
语言:
TypeScript
星标数:
1,225
分叉数:
126
简介:
Unlimited memory for OpenClaw
GPTomics/bioSkills11,081
语言:
Python
星标数:
1,223
分叉数:
264
简介:
a set of SKILLS.md for doing bioinformatics with agents like claude code
关键参数与规格
关键参数与规格
参数值
语言Python
类别AI Engineering
子类别Give agent tools,Build agent workflow (SDK)
关键词Agent-ready APIs, Context engineering, Security, Tool use
星标数1,227
分叉数135
贡献者1
创建日期2026-02-23
更新日期2026-10-14
1 天星标数0
7 天星标数10
排名11,066
上次排名11,020
排名变化-46
7 天星标排名4,023
上次 7 天星标排名3,249
7 天星标排名变化-774
总星标排名9,523
上次总星标排名9,516
总星标排名变化-7
README 摘录

Kong: The Agentic Reverse Engineer **LLM orchestration for reverse engineering binaries** What is Kong? Most tasks follow a linear relationship: the more difficult a task, the longer it usually takes. Reverse engineering (and binary analysis) is a task in which the actual difficulty is somewhat trivial, but the time-to-execute can be on the order of hours (and days! ), even for a binary with a couple hundred functions. Kong automates the mechanical layer, using an NSA-grade reverse engineering

framework. Kong can take a fully obfuscated, stripped binary and run a full analysis pipeline: triaging functions, building call-graph context, recovering types and symbols through LLM-guided decompilation, and writing the results back into Ghidra's program database. The output is a binary where some is now , with recovered structs, parameter names, and calling conventions. **Why this exists** Stripped binaries lose all the context that makes code readable: function names, type information, variable names, struct layouts. Recovering that context is

the bulk of the work in most RE tasks, and it's largely pattern matching: recognizing standard library functions, inferring types from usage, propagating names through call graphs. LLMs are good at exactly this kind of pattern matching. But pointing an LLM at raw decompiler output and asking "what does this do? The model lacks calling context, cross-reference information, and the broader picture of how the binary is structured. In addition, most obfuscated binaries introduce extreme techniques in order to

prevent reverse engineering. Kong solves this by building rich context windows from Ghidra's program analysis (call graphs, cross-references, string references, data flow) before ever touching the LLM, then orchestrating the analysis in dependency order so each function benefits from its callees already being named. Additionally, Kong introduces its own, first-of-its-kind, agentic deobfuscation pipeline. In Action Features **Fully Autonomous Pipeline**: A single command runs the complete analysis. Triage, function analysis, cleanup, semantic synthesis, and export. **In-Process

Ghidra Integration**: Runs Ghidra's analysis engine in-process via PyGhidra and JPype. No server, no RPC, no subprocess overhead. **Call-Graph-Ordered Analysis**: Functions are analyzed bottom-up from the call graph. Leaf functions are named first, so callers benefit from already-resolved context in their decompilation. **Rich Context Windows**: Each LLM prompt includes the target function's decompilation plus cross-references, string references, caller/callee signatures, and neighboring data; not just raw decompiler output in isolation. **Semantic Synthesis**: A post

-analysis pass that unifies naming conventions across the binary, synthesizes struct definitions from field access patterns, and resolves inconsistencies between independently analyzed functions. **Signature Matching**: Known standard library and cryptographic functions are identified by pattern before LLM analysis, skipping expensive inference for functions with known identities. **Syntactic Normalization**: Decompiler output is cleaned up (modulo recovery, negative literal reconstruction, dead assignment removal) before reaching the LLM, reducing noise and token waste. **Agentic Deobfuscation**: Kong uses an agentic deobfuscation pipeline which can

identify and remove obfuscation techniques (Control flow flattening, bogus control flow, instruction substitution, string encryption, VM protection, etc. **Eval Framework

常见问题

记录了多少星标和分叉?

amruth-sn/kong 有 1,227 个星标和 135 个分叉。

仓库排名是多少?

amruth-sn/kong 排名第 11,066。

记录的语言和类别是什么?

amruth-sn/kong 有 1,227 个星标,语言为 Python,类别为 AI Engineering。

哪个仓库排名最接近?

amruth-sn/kong 与 NyxTides/ppt-image-first 比较,后者排名第 11,065,有 1,227 个星标。

README

Kong: The Agentic Reverse Engineer

LLM orchestration for reverse engineering binaries

What is Kong?

Most tasks follow a linear relationship: the more difficult a task, the longer it usually takes. Reverse engineering (and binary analysis) is a task in which the actual difficulty is somewhat trivial, but the time-to-execute can be on the order of hours (and days!), even for a binary with a couple hundred functions.

Kong automates the mechanical layer, using an NSA-grade reverse engineering framework. Kong can take a fully obfuscated, stripped binary and run a full analysis pipeline: triaging functions, building call-graph context, recovering types and symbols through LLM-guided decompilation, and writing the results back into Ghidra's program database. The output is a binary where some FUN_00401a30 is now parse_http_header, with recovered structs, parameter names, and calling conventions.

Why this exists

Stripped binaries lose all the context that makes code readable: function names, type information, variable names, struct layouts. Recovering that context is the bulk of the work in most RE tasks, and it's largely pattern matching: recognizing standard library functions, inferring types from usage, propagating names through call graphs.

LLMs are good at exactly this kind of pattern matching. But pointing an LLM at raw decompiler output and asking "what does this do?" gives you mediocre results. The model lacks calling context, cross-reference information, and the broader picture of how the binary is structured. In addition, most obfuscated binaries introduce extreme techniques in order to prevent reverse engineering.

Kong solves this by building rich context windows from Ghidra's program analysis (call graphs, cross-references, string references, data flow) before ever touching the LLM, then orchestrating the analysis in dependency order so each function benefits from its callees already being named. Additionally, Kong introduces its own, first-of-its-kind, agentic deobfuscation pipeline.

In Action

Features

  • Fully Autonomous Pipeline: A single command runs the complete analysis. Triage, function analysis, cleanup, semantic synthesis, and export. No manual intervention required.
  • In-Process Ghidra Integration: Runs Ghidra's analysis engine in-process via PyGhidra and JPype. No server, no RPC, no subprocess overhead. Direct access to the program database.
  • Call-Graph-Ordered Analysis: Functions are analyzed bottom-up from the call graph. Leaf functions are named first, so callers benefit from already-resolved context in their decompilation.
  • Rich Context Windows: Each LLM prompt includes the target function's decompilation plus cross-references, string references, caller/callee signatures, and neighboring data; not just raw decompiler output in isolation.
  • Semantic Synthesis: A post-analysis pass that unifies naming conventions across the binary, synthesizes struct definitions from field access patterns, and resolves inconsistencies between independently analyzed functions.
  • Signature Matching: Known standard library and cryptographic functions are identified by pattern before LLM analysis, skipping expensive inference for functions with known identities.
  • Syntactic Normalization: Decompiler output is cleaned up (modulo recovery, negative literal reconstruction, dead assignment removal) before reaching the LLM, reducing noise and token waste.
  • Agentic Deobfuscation: Kong uses an agentic deobfuscation pipeline which can identify and remove obfuscation techniques (Control flow flattening, bogus control flow, instruction substitution, string encryption, VM protection, etc.) from the decompiler output.
  • Eval Framework: Built-in evaluation harness that scores analysis output against ground-truth source code, measuring symbol accuracy (word-based Jaccard) and type accuracy (signature component scoring).
  • Multi-Provider LLM Support: Works with Anthropic (Claude) and OpenAI (GPT-4o) out of the box. An interactive setup wizard configures providers and smart routing auto-selects whichever has a valid key.
  • Cost-Tracking: Tracks token usage and costs per model across providers, with provider-aware pricing.

Supported Architectures

Kong works with most Ghidra-decompilable binaries (for now, more to come).

Confidence

C C++ Go Rust
x86 High High Medium Medium
x86-64 High High Medium Medium
ARM (32-bit) High High Medium Low
AArch64 High High Medium Low
MIPS Medium Medium Low Low
PowerPC Medium Medium Low Low

High: Kong reliably decompiles, deobfuscates, and recovers names, types, and structure.

Medium: Decompilation is usable but noisier. Expect partial recovery and lower confidence scores.

Low: Decompilation has significant gaps and results will stay incomplete, noisy, or unreadable.

Note: Binary size scales positively with function count, LLM cost, and time to completion. However, binary size also scales negatively with confidence, so keep this in mind when analyzing larger binaries.

Architecture

Kong uses a five-phase pipeline orchestrated by a supervisor that coordinates triage, parallel analysis, and post-processing:

                    ┌──────────────────────┐
                    │       Triage         │
                    │  enumerate, classify,│
                    │  build call graph,   │
                    │  match signatures    │
                    └──────────┬───────────┘
                               │
                               ▼
              ┌────────────────┼────────────────┐
              │                │                │
              ▼                ▼                ▼
     ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
     │   Analyze    │ │   Analyze    │ │     ...      │
     │  (leaf fns)  │ │ (next tier)  │ │              │
     └──────┬───────┘ └──────┬───────┘ └──────┬───────┘
            │                │                │
            └────────┬───────┴────────────────┘
                     │
                     ▼
            ┌──────────────────────┐
            │      Cleanup         │
            │  normalize, dedupe   │
            └──────────┬───────────┘
                       │
                       ▼
            ┌──────────────────────┐
            │     Synthesis        │
            │  unify names, build  │
            │  structs, deobfuscate│
            └──────────┬───────────┘
                       │
                       ▼
            ┌──────────────────────┐
            │       Export         │
            │  analysis.json +     │
            │  Ghidra writeback    │
            └──────────────────────┘

How it works

Triage enumerates all functions in the binary, classifies them by size (trivial / small / medium / large), builds the call graph, detects the source language, and runs signature matching against known standard library and crypto functions. Functions matched by signature are marked as resolved and skip LLM analysis entirely.

Analysis processes functions in bottom-up order from the call graph using a work queue. For each function, Kong builds a context window from Ghidra's program database — decompilation, cross-references, string references, and the signatures of already-analyzed callees — normalizes the decompiler output, and sends it to the LLM for name, type, and parameter recovery. If obfuscation is detected in a function's decompilation, Kong runs an agentic deobfuscation pass with symbolic tool access before producing the analysis. Results are written back to Ghidra immediately so downstream callers see updated names.

Cleanup unifies struct types from proposals accumulated during analysis and retries any function signatures that failed to apply during the analysis pass.

Synthesis takes a global view across all analyzed functions. A single LLM call reviews the most-connected functions, unifies naming conventions, synthesizes struct definitions from field access patterns, and refines names that look inconsistent in the broader context.

Export writes the final analysis.json and applies all recovered names, types, and signatures back to the Ghidra program database.

Stack

Setup

Prerequisites

  • Python 3.11+ — (python.org or your system package manager)
  • uv — Python package manager (Install uv)
  • Ghidra — The National Security Agency's reverse engineering framework (Install Ghidra)
  • JDK 21+ — Required by Ghidra (Adoptium)
  • LLM API key — At least one of:

Quick Start

# 1. Install Kong
uv pip install kong-re

# 2. Set your API key(s)
export ANTHROPIC_API_KEY="sk-ant-..."
# and/or
export OPENAI_API_KEY="sk-..."

# 3. Run the setup wizard (first time only)
kong setup

# 4. Analyze a binary
kong analyze ./path/to/stripped_binary

The setup wizard lets you pick which LLM providers to use and sets a default. Kong auto-detects your Ghidra and JDK installations, loads the binary into an in-process Ghidra instance, and runs the full pipeline.

From source

git clone https://github.com/amruth-sn/kong.git
cd kong
uv sync
uv run kong setup
uv run kong analyze ./path/to/stripped_binary

Environment Variables

Variable Required Description
ANTHROPIC_API_KEY At least one Anthropic API key (Claude)
OPENAI_API_KEY At least one OpenAI API key (GPT-4o)
GHIDRA_INSTALL_DIR No Path to Ghidra installation (auto-detected if not set)
JAVA_HOME No Path to JDK (auto-detected if not set)
KONG_CONFIG_DIR No Override config directory (default: ~/.config/kong)

Usage

# Run the setup wizard
kong setup

# Analyze a stripped binary (uses your configured default provider)
kong analyze ./binary

# Analyze with a specific provider
kong analyze ./binary --provider openai

# Override the model
kong analyze ./binary --provider openai --model gpt-4o-mini

# Show binary metadata without running analysis
kong info ./binary

# Evaluate analysis output against ground-truth source
kong eval ./analysis.json ./source.c

Output

Results are written to the output directory (default: ./kong_output_{binary_name}/):

kong_output_{binary_name}/
├── analysis.json         # All recovered function names, types, parameters
└── events.log            # Pipeline execution trace

Benchmarks

Kong autonomously reconstructed the full XZ backdoor (CVE-2024-3094) kill chain from a stripped liblzma.so.5.4.1 — identifying all five core implant functions at 90-95% confidence in 15 minutes for $6.63.

See BENCHMARKS.md for the full case study and reproduction instructions.

Project Layout

kong/
├── __main__.py           # CLI entry point (click)
├── config.py             # KongConfig, LLMProvider, LLMConfig
├── db.py                 # SQLite config store (~/.config/kong/)
├── banner.py             # ASCII banner, API key helpers
├── agent/
│   ├── supervisor.py     # Pipeline orchestrator
│   ├── triage.py         # Function enumeration + classification
│   ├── analyzer.py       # LLM-guided function analysis
│   ├── queue.py          # BFS work queue from call graph
│   ├── signatures.py     # Known function signature matching
│   ├── prompts.py        # System prompt + output schema
│   ├── events.py         # Phase/event types for pipeline tracing
│   └── models.py         # FunctionResult dataclass
├── ghidra/
│   ├── client.py         # In-process GhidraClient (PyGhidra/JPype)
│   ├── types.py          # FunctionInfo, BinaryInfo, XRef, etc.
│   └── environment.py    # Ghidra/JDK auto-detection
├── llm/
│   ├── client.py         # AnthropicClient
│   ├── openai_client.py  # OpenAIClient
│   ├── usage.py          # TokenUsage, cost tracking, pricing registry
│   └── limits.py         # Model-specific limits + rate limiter
├── normalizer/
│   └── syntactic.py      # Decompiler output normalization
├── synthesis/
│   └── semantic.py       # Global name unification + struct synthesis
├── evals/
│   ├── harness.py        # Ground-truth extraction + scoring
│   └── metrics.py        # symbol_accuracy, type_accuracy
├── export/
│   └── source.py         # analysis.json + Ghidra writeback
├── signatures/
│   ├── stdlib.json       # C standard library signatures
│   └── crypto.json       # Cryptographic function signatures
└── tui/
    └── app.py            # Textual TUI

License

APACHE

Kong is licensed under the Apache License 2.0. Kong is a free and open source project.

This license is compatible with the Ghidra license, and allows for commercial use.

Contributing

Issues and feature requests are welcome via GitHub Issues.

Also, don't hesitate to reach out to me on X or LinkedIn!

Acknowledgments

A big shoutout to KeygraphHQ's Shannon project, which provided the inspiration for this project. My motivation was driven by replicating the same kind of pipeline that Shannon uses for its web-based pentesting tool, and adapting it for binary analysis and decompilation.


Fear the monkey.


Kong: The world's first AI reverse engineer

排名相邻
同类项目