Development and architecture
Internal Framework Architecture
Repository Overview
core/ | Framework: module loading, sessions, workspaces, agent, Guardian, campaigns. |
interfaces/ | Console, API (kittyapi.py), RPC (kittyrpc.py), MCP. |
modules/ | Offensive surface: executable module families. |
lib/ | Reusable protocols (HTTP, SMB, LDAP, SAMR, scanner detectors). |
plugins/ | Command extensions such as metasploit.py, ngrok.py, and osint.py. |
apps/KittyProxy | HTTP proxy application and marketplace extension. |
data/ | Embedded wordlists, signatures, vendors. |
static/ | Static assets used by local tools. |
Console Command Flow
User -> kittyconsole.py -> CommandRegistry
-> BaseCommand.execute() -> Framework services
-> ModuleLoader / SessionManager / WorkspaceDB
-> Module.run() -> ModuleResult
-> host/vuln DB, agent, campaign, portal
Key files:
interfaces/command_system/command_registry.py--- 65+ builtin commands.interfaces/command_system/builtin/run_command.py--- Guardian pre-flight, jobs.core/framework/module_executor.py--- parallel execution, result coercion.core/framework/base_module.py--- base class,ModuleResult.
The Module Loader
ModuleLoader parses .py files without heavy initial import:
- Static extraction of
__info__andOpt*options. - SQL index via
syncforsearch. use <path>instantiates theModuleclass.runcallsmodule.run()with option validation.
Categories (TYPE_MODULE): exploit, auxiliary, scanner, payload, post, listener,
encoder, transformer, workflow, browser_auxiliary, browser_exploit, docker_environment, etc.
Sessions and Listeners
SessionManager unifies:
- reverse shells (
SessionType.SHELL); - meterpreter (
SessionType.METERPRETER); - SSH, browser hooks (
SessionType.BROWSER);
Listeners (listeners/multi/) run as jobs; payloads connect
on LHOST:LPORT. Transformers synchronized between listener and payload.
Workspaces and Mission Data
Local persistence (SQLite / JSON depending on version):
scope,host,vuln--- campaign graph.- Command history (
history). - Agent state (
agent --resume). - Portal config (
/.kittysploit/portal_config.json).
Autonomous Agent
Components under interfaces/command_system/builtin/agent/:
workflow_core.py--- scan/analyze/reason/exploit/report phases.http_intelligence.py--- KittyProxy flow import.- Mission profiles, JSON policies, LLM budgets.
Guardian
core/guardian_manager.py --- hook on network operations, host profiles,
AD identities. Called from run and honeytoken_hunt modules.
Generators and Pipelines
DetectionPackGenerator | Sigma, YARA, Suricata from offensive module |
CampaignGraphBuilder | Attack graph from workspace |
Attack mapping | MITRE Navigator/STIX exports |
External Interfaces
- REST API ---
kittyapi.pyandinterfaces/api_server.py. - RPC ---
kittyrpc.pyandinterfaces/rpc_server.py. - MCP ---
kittymcp_server.py,interfaces/mcp_kittysploit_server.py, andinterfaces/mcp_kittysploit_bridge.py. - Collaboration ---
kittycollab.py,core/collab_server_simple.py, andinterfaces/kittycollab/.
Browser Server and KittyProxy
core/browser_server.py--- browser HTTP polling C2.core/framework/browser_auxiliary.py---send_js().- KittyProxy --- interception, agent replay,
api_importtraffic.
Where to Add What?
| New console command | interfaces/command_system/builtin/ + registry |
| Third-party plugin | plugins/ + plugin load |
| Usage isolated test environment | labs/*.json + docker_environments/ |
| Protocol detector | lib/scanner/<proto>/detectors/ |
| Marketplace extension | extension.toml + market install |