loading…
Search for a command to run...
loading…
Enables AI agents to safely execute OSINT and reconnaissance tools from Kali Linux through a typed job API with bearer authentication, job validation, and allow
Enables AI agents to safely execute OSINT and reconnaissance tools from Kali Linux through a typed job API with bearer authentication, job validation, and allowlisted Docker execution.
Safer host-local control plane for AI agents that need access to Kali Linux OSINT tooling.
This package mirrors the GPU Factory shape — typed job submission with bearer auth, queued worker execution, allowlisted Docker image runs — but applied to a different problem: distributing access to Kali's reconnaissance and traffic-analysis tooling without giving agents an unauthenticated shell.
Kali ships hundreds of tools, many of which are useful for legitimate competitive intelligence and security research, and some of which are not appropriate for agent-driven automation. The naïve approach — drop an agent into a Kali shell and let it figure things out — produces three problems:
metasploit, sqlmap, hashcat, john, aircrack-ng, exploitdb) that should never be reachable from an automation context.This package solves all three by exposing Kali through a typed-job API where every callable tool is declared in a manifest, every argument is validated by Pydantic, every container run is allowlisted by image prefix, and every call requires a bearer token.
shell=Truekali_probeosint_runtraffic_capturemitmdump for a bounded duration, returns a capture filejs_analysislinkfinder / secretfinder / arjun against a JavaScript URLleak_scantrufflehog against a GitHub org / repo for committed credentialssubdomain_enumamass enum (passive sources only) against a target domainweb_fingerprintwhatweb to identify a target's tech stacknuclei_exposuresnuclei against a target with the exposures/ template subset onlycves/, vulnerabilities/, default-logins/, fuzzing/ template directories are explicitly blockedcp .env.example .env
./scripts/bootstrap-secrets.sh
.secrets/api_token
and .env points at it through KALI_FACTORY_API_TOKEN_FILE.
docker compose up -d redis
docker build -t kali-factory/recon:latest runtimes/kali/
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
./scripts/start-api.sh
./scripts/start-worker.sh
./scripts/start-mcp.sh
Health:
curl http://localhost:8081/health
Kali probe:
curl -X POST http://localhost:8081/jobs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"kali_probe"}'
Subdomain enumeration:
curl -X POST http://localhost:8081/jobs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type":"subdomain_enum",
"domain":"example.com",
"max_runtime_sec": 300
}'
Web fingerprint:
curl -X POST http://localhost:8081/jobs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type":"web_fingerprint",
"url":"https://example.com"
}'
GitHub leak scan:
curl -X POST http://localhost:8081/jobs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type":"leak_scan",
"github_org":"example-org"
}'
START_HERE_FOR_AGENTS.md — single-entrypoint guide for agents using this control planeruntimes/kali/Dockerfile — Kali container image with the allowlisted tools installedruntimes/kali/tools.json — declarative tool manifest (allowlist + arg templates)scripts/bootstrap-secrets.sh — create and permission-lock the API token filescripts/start-api.sh — launch wrapper for the APIscripts/start-worker.sh — launch wrapper for the workerscripts/start-mcp.sh — launch wrapper for the local MCP serverscripts/install-user-services.sh — install user-level systemd unitssrc/kali_factory/api/ — API server (FastAPI)src/kali_factory/worker/ — RQ-based job executionsrc/kali_factory/models/ — Pydantic job schemassrc/kali_factory/jobs/ — per-job-type handlerssrc/kali_factory/policy/ — auth, allowlist enforcement, rate limitingsrc/kali_factory/mcp/server.py — stdio MCP adapter over the local Kali Factory APIcompose.yaml — Redis (and optional ChromaDB) sidecarsDockerfile — app container for API/worker.env.example — required settingsDEPLOYMENT.md — host-specific run and service guidancekali-factory-api.service should run persistentlykali-factory-worker.service should run persistentlyscripts/start-mcp.sh on demand over stdio| Factory | Distributes | Job examples |
|---|---|---|
| GPU Factory | CUDA / GPU compute | gpu_probe, run_container --gpus all, python_probe |
| Kali Factory | OSINT / recon tooling | subdomain_enum, web_fingerprint, leak_scan, nuclei_exposures |
The two packages share the same architectural shape (FastAPI + Redis + RQ + bearer auth + typed jobs + allowlisted Docker exec) and are designed to coexist on the same host with non-overlapping ports (8080 for GPU Factory, 8081 for Kali Factory).
A future parallel-OS orchestrator can route agent requests to whichever Factory matches the runtime they need.
nuclei is included but limited to exposures/ templates. CVE / exploit / default-login / fuzzing templates are explicitly blocked.Apache 2.0 (see LICENSE).
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"kali-factory-mcp-server": {
"command": "npx",
"args": []
}
}
}