How terminalkid09/phantom works
Phantom is an offensive-security framework combining an operator shell, pentest modules, an autonomous engagement engine, and a cross-platform C2 system, with an Electron campaign-management app. The documented workflow is target and scope selection, reconnaissance and adaptive planning, execution, beacon handoff, persistence, and reporting. The graph preserves additional documented subsystems such as social engineering, swarm runs, learning, and desktop controls. Some implementation paths are directory-level because their source was not sampled; relationships are shown only where the README or indexed excerpts support them.
Main entry points: automode.py Auto Mode · main.py CLI Shell · server.py Local API · agent.py Autonomous Agent
Components 22
Operator Experience
- CLI Shell
phantom/main.py - Desktop App
electron/src - Local API
phantom/api/server.py
Engagement Engine
- Pentest Modules
phantom/modules - Auto Mode
phantom/core/automode.py - Target Guidance
phantom/automation/guidance/targets.py - Social Recon
phantom/automation/social/recon.py - Social Campaigns
phantom/automation/social/engine.py - Autonomous Agent
phantom/automation/agent.py - Swarm Runs
phantom/automation/swarm - Command Execution
phantom/core/executor.py - Toolchain
phantom/automation/runtime/toolchain.py - Post-Exploitation
phantom/automation/post
C2 Operations
- Beacon Payload
phantom/payloads/beacon/src/main.cpp - C2 Server
phantom/core/c2_server.py - C2 Daemon
c2d/server.go
State and Intelligence
- Scope and Session
phantom/core/scope.py - Reporting
phantom/automation/reporting.py - Session Bundles
phantom/utils/session_bundle.py - Learning Memory
phantom/automation/brain/experience - LLM Advisor
phantom/automation/llm_advisor.py
Other components
- Operator
Connections 26
- Operator → CLI Shell: starts
README.md - Operator → Desktop App: manages campaigns
README.md - Desktop App → Local API: uses local bridge
phantom/api/server.py - CLI Shell → Auto Mode: launches
phantom/main.py - CLI Shell → Pentest Modules: offers manual mode
README.md - CLI Shell → Scope and Session: sets target and scope
README.md - Local API → Auto Mode: starts runs
phantom/api/server.py - Local API → Scope and Session: uses engagement state
phantom/api/server.py - Auto Mode → Target Guidance: uses target guidance
phantom/core/automode.py - Auto Mode → Autonomous Agent: runs agent
phantom/core/automode.py - Auto Mode → Swarm Runs: supports swarm engine
phantom/core/automode.py - Target Guidance → Social Recon: guides reconnaissance
phantom/automation/social/recon.py - Autonomous Agent → Command Execution: executes actions
- Command Execution → Toolchain: uses toolchain
phantom/core/executor.py - Command Execution → Beacon Payload: deploys beacon
README.md - Beacon Payload → C2 Server: checks in
phantom/payloads/beacon/src/main.cpp - C2 Server → Post-Exploitation: supports follow-on
README.md - Auto Mode → Reporting: produces reports
README.md - Auto Mode → Session Bundles: exports handoff
README.md - CLI Shell → Session Bundles: imports and exports
phantom/main.py - Social Campaigns → Social Recon: calls deep recon
phantom/automation/social/engine.py - Auto Mode → Social Campaigns: supports social capabilities
- Auto Mode → Learning Memory: uses experience memory
- Autonomous Agent → LLM Advisor: consults optionally
- Local API → C2 Server: delegates C2 controls
phantom/api/server.py - C2 Daemon → Beacon Payload: serves C2 role