Docs / Development and architecture / Internal Framework Architecture
GitHub

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/KittyProxyHTTP 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:
  1. Static extraction of __info__ and Opt* options.
  2. SQL index via sync for search.
  3. use <path> instantiates the Module class.
  4. run calls module.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

DetectionPackGeneratorSigma, YARA, Suricata from offensive module
CampaignGraphBuilderAttack graph from workspace
Attack mappingMITRE Navigator/STIX exports

External Interfaces

  • REST API --- kittyapi.py and interfaces/api_server.py.
  • RPC --- kittyrpc.py and interfaces/rpc_server.py.
  • MCP --- kittymcp_server.py, interfaces/mcp_kittysploit_server.py, and interfaces/mcp_kittysploit_bridge.py.
  • Collaboration --- kittycollab.py, core/collab_server_simple.py, and interfaces/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_import traffic.

Where to Add What?

New console commandinterfaces/command_system/builtin/ + registry
Third-party pluginplugins/ + plugin load
Usage isolated test environmentlabs/*.json + docker_environments/
Protocol detectorlib/scanner/<proto>/detectors/
Marketplace extensionextension.toml + market install