Note: Please do not clone this repository separately. Use the following command to clone the entire Akiba project:
git clone https://github.com/IoTS-P/Akiba.git
cd Akiba
git submodule update --init --recursiveThe Akiba Runtime Framework is the runtime entry point for the Akiba tool.
- Download Ghidra 12.1 from here: Link
- Extract Ghidra.zip
- (Optional but may be required by some modules) Extract some Ghidra official extensions (zip files) to
/Ghidra/Features, so that Ghidra can package these extensions intoghidra.jarwhen building the JAR (by default, theMachineLearningextension is packaged) - Go to the
/supportdirectory and run thebuildGhidraJarscript file (runbuildGhidraJar.baton Windows) - If everything goes well, you can find the
ghidra.jarfile in/support. This is one of the dependencies Akiba needs. Copy it to/path/to/Akiba/lib
Note: Akiba has so far only been verified on x64. If you need to run Ghidra and Akiba on a non-x64 processor, first go to the support/gradle subdirectory under the Ghidra root and run:
gradle buildNativesOn macOS Apple Silicon, the command above may not succeed out of the box. The workarounds below are provided for reference:
The GnuDisassembler extension needs the GNU binutils source code in order to compile gdis. This archive is not shipped with the Ghidra release and must be downloaded manually.
Workaround: download it from https://ftp.gnu.org/pub/gnu/binutils/binutils-2.41.tar.bz2 and place it under Ghidra/Extensions/GnuDisassembler/.
In the zlib bundled with binutils 2.41, zutil.h defines #define fdopen(fd,mode) NULL whenever TARGET_OS_MAC is detected. This collides with the fdopen function declaration in _stdio.h shipped by recent macOS SDKs (Xcode / Command Line Tools).
Workaround: edit build/binutils-2.41/zlib/zutil.h and guard that macro definition with !defined(__APPLE__) so the broken macro is not introduced under modern Apple toolchains.
Building binutils' documentation requires makeinfo (from the texinfo package), which is not installed on macOS by default.
Workaround: install it via brew install texinfo.
Build the Akiba Database Daemon, Akiba Framework, and Akiba Modules with a single command:
# Run from the Akiba root directory
./gradlew assemble # On Windows, use gradlew.batcd build/distributions
unzip Akiba-<version>.zip
cd Akiba-<version>
# Copy the modules you need to use into the modules directory and write configuration files (Important!)
./bin/Akiba # In Windows, use .\bin\Akiba.bat-c/--main-config <path>: Set the main configuration file path. Format is<file path>@<JSON path>, e.g.,configs/config.json@/main. Default value isconfigs/config.yaml@main--venv <dir>: Set the global Python virtual environment root directory, default isakiba-venv-h/--help: Show help message and exit-V/--version: Output version number and exit
Akiba supports three runtime modes, which are mutually exclusive. Only one mode can be selected per run:
When no mode option is specified, Akiba will analyze the binary files in the database according to the task configuration in the main configuration file.
-i/--import <config path>: Import task mode. When this option is specified, Akiba will only perform file import tasks without any analysis work. An import configuration file path must be provided.
-r/--restore <'latest'/timestamp>: Restore mode. When a task is interrupted due to bugs or other reasons, this mode can be used to continue the unfinished task.- The parameter can be
latest(continue the latest task) or a timestamp (e.g.,20250201140000) - Note: After specifying
-r, the-coption will be ignored. Akiba will use the original configuration of the interrupted task (this configuration is copied to thelogdirectory when the task first runs) - Warning: Unless you know exactly what you're doing, do not modify the configuration files in the
logdirectory
- The parameter can be
Restore mode also supports the following additional options (used with -r, mutually exclusive):
-f/--fail-only: Only reprocess programs marked as failed-e/--error-only: Only reprocess programs marked with errors
Akiba also provides the following subcommands for managing database instances:
./bin/Akiba instance-create -n <name> -u <user> [other options]Required Parameters:
-n/--name <name>: Instance name-u/--user <username>: Akiba database username
Optional Parameters:
-P/--password: Akiba user password. If not specified, will be prompted interactively-H/--host <host>: Database daemon host address, default is127.0.0.1-p/--port <port>: Database daemon port, default is31777-h/--help: Show help message and exit
Examples:
# Create an instance named test_instance with user admin, using default host and port
./bin/Akiba instance-create -n test_instance -u admin
# Specify host and port
./bin/Akiba instance-create -n my_instance -u admin -H 192.168.1.100 -p 31777./bin/Akiba instance-backup -i <instance> -t <type> -u <user> [other options]Required Parameters:
-i/--instance <instance>: Name of the instance to backup-t/--type <type>: Backup type, must befull(full backup) orincr(incremental backup)-u/--user <username>: Akiba database username
Optional Parameters:
-a/--alias <alias>: Alias of the backup (for referencing in configuration files)-d/--description <description>: Description of the backup-P/--password: Akiba user password. If not specified, will be prompted interactively-H/--host <host>: Database daemon host address, default is127.0.0.1-p/--port <port>: Database daemon port, default is31777-h/--help: Show help message and exit
Examples:
# Perform a full backup on test_instance with alias backup_2025
./bin/Akiba instance-backup -i test_instance -t full -u admin -a backup_2025
# Perform an incremental backup on my_instance with description
./bin/Akiba instance-backup -i my_instance -t incr -u admin-d "Daily incremental backup"./bin/Akiba instance-restore -n <name> -l <label> -u <user> [other options]Required Parameters:
-n/--name <name>: Name of the restoration target instance to create-l/--label <label>: Label or alias of the backup (from instance-backup's-aparameter)-u/--user <username>: Akiba database username
Optional Parameters:
-P/--password: Akiba user password. If not specified, will be prompted interactively-H/--host <host>: Database daemon host address, default is127.0.0.1-p/--port <port>: Database daemon port, default is31777-h/--help: Show help message and exit
Examples:
# Restore from backup_2025 to a new instance restored_instance
./bin/Akiba instance-restore -n restored_instance -l backup_2025 -u admin
# Restore from a specific host
./bin/Akiba instance-restore -n new_instance -l daily_backup -u admin -H 192.168.1.100./bin/Akiba instance-start -i <instance> -u <user> [other options]Required Parameters:
-i/--instance <instance>: Name of the instance to start-u/--user <username>: Akiba database username
Optional Parameters:
-P/--password: Akiba user password. If not specified, will be prompted interactively-H/--host <host>: Database daemon host address, default is127.0.0.1-p/--port <port>: Database daemon port, default is31777-h/--help: Show help message and exit
Examples:
# Start an instance named test_instance with user admin
./bin/Akiba instance-start -i test_instance -u admin
# Start an instance with specified host and port
./bin/Akiba instance-start -i my_instance -u admin -H 192.168.1.100 -p 31777./bin/Akiba instance-shutdown -i <instance> -u <user> [other options]Required Parameters:
-i/--instance <instance>: Name of the instance to shut down-u/--user <username>: Akiba database username
Optional Parameters:
-P/--password: Akiba user password. If not specified, will be prompted interactively-H/--host <host>: Database daemon host address, default is127.0.0.1-p/--port <port>: Database daemon port, default is31777-h/--help: Show help message and exit
Examples:
# Shut down an instance named test_instance
./bin/Akiba instance-shutdown -i test_instance -u admin
# Shut down an instance on a specific host
./bin/Akiba instance-shutdown -i my_instance -u admin -H 192.168.1.100./bin/Akiba instance-delete -i <instance> -u <user> [other options]Required Parameters:
-i/--instance <instance>: Name of the instance to delete-u/--user <username>: Akiba database username
Optional Parameters:
-P/--password: Akiba user password. If not specified, will be prompted interactively-H/--host <host>: Database daemon host address, default is127.0.0.1-p/--port <port>: Database daemon port, default is31777-h/--help: Show help message and exit
Examples:
# Delete an instance named test_instance
./bin/Akiba instance-delete -i test_instance -u admin
# Delete an instance on a specific host and port
./bin/Akiba instance-delete -i my_instance -u admin -H 192.168.1.100 -p 31777./bin/Akiba server [options]Description: Starts an HTTP server that provides REST API endpoints for interacting with Akiba. Supports JWT authentication and user management.
Optional Parameters:
-p/--port <port>: Server port, default is8080--host <host>: Server host, default is0.0.0.0--bin-root <path>: Root directory for binary files, default is~/.akiba--jwt-secret <secret>: JWT secret key, default is a placeholder string (change in production!)--db-host <host>: PostgreSQL host for user management, default is127.0.0.1--db-port <port>: PostgreSQL port for user management, default is5432--db-name <name>: Database name for user management, default isakiba_users--db-user <user>: PostgreSQL user, default isakiba--db-password <password>: PostgreSQL password, default isakiba--daemon-host <host>: Akiba DB daemon host, default is127.0.0.1--daemon-port <port>: Akiba DB daemon port, default is31777-h/--help: Show help message and exit
Examples:
# Start server with default settings
./bin/Akiba server
# Start server on custom port with custom JWT secret
./bin/Akiba server -p 9000 --jwt-secret "my-secure-random-string"./bin/Akiba meltdown [-f|--force]Description: Emergency kill switch that immediately terminates ALL running Akiba framework processes. Use when an LLM agent is executing dangerous operations or when you need to halt all Akiba activity immediately.
Optional Parameters:
-f/--force: Skip the confirmation prompt and kill processes immediately
Examples:
# Show confirmation prompt before killing
./bin/Akiba meltdown
# Kill immediately without confirmation
./bin/Akiba meltdown --forceAkiba provides a built-in LLM agent infrastructure for intelligent binary analysis. The agent system supports:
- ReAct Strategy (default): Explicit Thought → Action → Observation cycle for step-by-step reasoning
- Plan-Execute Strategy: Plan first, then execute each step, with reflection phase
When using AgentModule, the following built-in tools are automatically available:
run_module— Delegate work to another AkibaModulerun_sub_agent— Spawn a child LLM agentquery_module_data— Query analysis results from the databasequery_session_history— Review past agent sessionsquery_memories— Search the long-term memory store
Akiba supports the following LLM providers:
| Provider | Display Name | OpenAI-Compatible |
|---|---|---|
OPEN_AI |
OpenAI | No |
ANTHROPIC |
Anthropic | No |
GOOGLE_GEMINI |
Google Gemini | No |
MISTRAL |
Mistral AI | No |
OLLAMA |
Ollama | No |
AZURE_OPEN_AI |
Azure OpenAI | No |
DEEP_SEEK |
DeepSeek | Yes |
MOONSHOT |
Moonshot / Kimi | Yes |
ZHIPU |
Zhipu AI / ChatGLM | Yes |
QWEN |
Qwen / DashScope | Yes |
OPEN_AI_COMPATIBLE |
OpenAI-Compatible | Yes |
{
"llm": {
"provider": "DEEP_SEEK",
"modelName": "deepseek-v4-flash",
"apiKeyEnv": "DEEPSEEK_API_KEY"
}
}Extend AgentModule to create an agent-driven analysis module:
@WithAgentSystemPrompt("You are a binary analysis assistant.")
@WithAgentMaxIterations(15)
@WithTableColumn("analysis", "TEXT")
class BinaryAnalyst(configPath: String? = null, id: Int, program: Program?)
: AgentModule(configPath, id, program) {
override fun defineTools(): List<Tool> = listOf(
tool("list_functions") {
description = "List all functions in the binary"
execute { args ->
program?.functionManager?.getFunctions(true)
?.take(50)?.joinToString("\n") { "${it.name} @ ${it.entryPoint}" }
?: "No program loaded"
}
}
)
override fun taskPrompt(): String =
"Analyze this binary and identify its purpose, entry point, and key functions."
}Other configuration files need to be saved in src/main/resources/configs. For details, see Usage_guide_en.md