# uzankhan/phantom_strike_c2 architecture

> Architecture diagram of the GitHub repository uzankhan/phantom_strike_c2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/uzankhan/phantom_strike_c2
- Repository: https://github.com/uzankhan/phantom_strike_c2

## Overview

This repository contains a Windows remote-control agent and an operator panel, with a separate backup copy and a USB/HID deployment script. The principal workflow is the panel accepting an agent connection, exchanging fingerprint and command data, and displaying responses. The agent also implements host collection and remote actions, including webcam access and Wi-Fi-related operations. Excerpts show selected socket, command, and email relationships; other feature links are omitted where their dispatch paths were not shown.

Main entry points: [`attacker_panel.py`](https://github.com/uzankhan/phantom_strike_c2/blob/main/attacker_panel.py) (C2 Panel), [`WinUpdate.py`](https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py) (Command Dispatch), [`email_alert.py`](https://github.com/uzankhan/phantom_strike_c2/blob/main/email_alert.py) (Photo Email), [`backup/attacker_panel.py`](https://github.com/uzankhan/phantom_strike_c2/blob/main/backup/attacker_panel.py) (Backup Panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_operator["Operator Console"]
  node_panel["C2 Panel<br/>[attacker_panel.py]"]
  node_panel_stream["Stream Receiver<br/>[attacker_panel.py]"]
  node_backup_panel["Backup Panel<br/>[attacker_panel.py]"]
end

subgraph group_agent["Windows Agent"]
  node_agent["Agent Runtime<br/>[WinUpdate.py]"]
  node_dispatcher["Command Dispatch<br/>[WinUpdate.py]"]
  node_fingerprint["Host Fingerprint<br/>[WinUpdate.py]"]
  node_wifi["Wi-Fi Operations<br/>[WinUpdate.py]"]
  node_shell["Remote Shell<br/>[WinUpdate.py]"]
  node_webcam["Webcam Capture<br/>[WinUpdate.py]"]
  node_stream["Webcam Stream<br/>[WinUpdate.py]"]
  node_backup_agent["Backup Agent<br/>[WinUpdate.py]"]
end

subgraph group_support["Deployment and Support"]
  node_email["Photo Email<br/>[email_alert.py]"]
  node_hid_script["HID Deployment<br/>[code.py]"]
  node_permission_restore["Permission Restore<br/>[cleanup.py]"]
end

node_operator_user(("Operator"))
node_agent_host(("Compromised Host"))
node_smtp["SMTP Service"]

node_operator_user -->|"operates"| node_panel
node_panel -->|"sends commands"| node_agent
node_agent -->|"connects and reports"| node_panel
node_panel -->|"requests fingerprint"| node_fingerprint
node_dispatcher -->|"returns fingerprint"| node_fingerprint
node_dispatcher -->|"dispatches scans"| node_wifi
node_dispatcher -->|"dispatches shell"| node_shell
node_dispatcher -->|"captures photo"| node_webcam
node_webcam -->|"sends photo"| node_email
node_email -->|"sends email"| node_smtp
node_agent_host -->|"runs on"| node_agent
node_agent -->|"serves frames"| node_stream
node_panel_stream -->|"receives frames"| node_stream
node_panel -->|"starts receiver"| node_panel_stream
node_hid_script -->|"deploys payload"| node_agent_host
node_permission_restore -->|"restores webcam access"| node_agent_host
node_backup_panel -.->|"controls"| node_backup_agent

click node_panel "https://github.com/uzankhan/phantom_strike_c2/blob/main/attacker_panel.py"
click node_agent "https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py"
click node_dispatcher "https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py"
click node_fingerprint "https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py"
click node_wifi "https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py"
click node_shell "https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py"
click node_webcam "https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py"
click node_stream "https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py"
click node_email "https://github.com/uzankhan/phantom_strike_c2/blob/main/email_alert.py"
click node_panel_stream "https://github.com/uzankhan/phantom_strike_c2/blob/main/attacker_panel.py"
click node_hid_script "https://github.com/uzankhan/phantom_strike_c2/blob/main/backup/code.py"
click node_permission_restore "https://github.com/uzankhan/phantom_strike_c2/blob/main/cleanup.py"
click node_backup_agent "https://github.com/uzankhan/phantom_strike_c2/blob/main/backup/WinUpdate.py"
click node_backup_panel "https://github.com/uzankhan/phantom_strike_c2/blob/main/backup/attacker_panel.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_panel,node_panel_stream,node_backup_panel toneBlue
class node_agent,node_dispatcher,node_fingerprint,node_wifi,node_shell,node_webcam,node_stream,node_backup_agent toneAmber
class node_email,node_hid_script,node_permission_restore toneMint
class node_operator_user,node_agent_host,node_smtp toneIndigo
```

## Components

### Operator Console

- [C2 Panel](https://github.com/uzankhan/phantom_strike_c2/blob/main/attacker_panel.py): `attacker_panel.py`
- [Stream Receiver](https://github.com/uzankhan/phantom_strike_c2/blob/main/attacker_panel.py): `attacker_panel.py`
- [Backup Panel](https://github.com/uzankhan/phantom_strike_c2/blob/main/backup/attacker_panel.py): `backup/attacker_panel.py`

### Windows Agent

- [Agent Runtime](https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py): `WinUpdate.py`
- [Command Dispatch](https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py): `WinUpdate.py`
- [Host Fingerprint](https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py): `WinUpdate.py`
- [Wi-Fi Operations](https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py): `WinUpdate.py`
- [Remote Shell](https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py): `WinUpdate.py`
- [Webcam Capture](https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py): `WinUpdate.py`
- [Webcam Stream](https://github.com/uzankhan/phantom_strike_c2/blob/main/WinUpdate.py): `WinUpdate.py`
- [Backup Agent](https://github.com/uzankhan/phantom_strike_c2/blob/main/backup/WinUpdate.py): `backup/WinUpdate.py`

### Deployment and Support

- [Photo Email](https://github.com/uzankhan/phantom_strike_c2/blob/main/email_alert.py): `email_alert.py`
- [HID Deployment](https://github.com/uzankhan/phantom_strike_c2/blob/main/backup/code.py): `backup/code.py`
- [Permission Restore](https://github.com/uzankhan/phantom_strike_c2/blob/main/cleanup.py): `cleanup.py`

### Other components

- **Operator**
- **Compromised Host**
- **SMTP Service**

## Connections

- Operator → C2 Panel: operates (evidence: `attacker_panel.py`)
- C2 Panel → Agent Runtime: sends commands (evidence: `attacker_panel.py`)
- Agent Runtime → C2 Panel: connects and reports (evidence: `WinUpdate.py`)
- C2 Panel → Host Fingerprint: requests fingerprint (evidence: `attacker_panel.py`)
- Command Dispatch → Host Fingerprint: returns fingerprint (evidence: `WinUpdate.py`)
- Command Dispatch → Wi-Fi Operations: dispatches scans (evidence: `WinUpdate.py`)
- Command Dispatch → Remote Shell: dispatches shell (evidence: `WinUpdate.py`)
- Command Dispatch → Webcam Capture: captures photo (evidence: `WinUpdate.py`)
- Webcam Capture → Photo Email: sends photo (evidence: `WinUpdate.py`)
- Photo Email → SMTP Service: sends email (evidence: `email_alert.py`)
- Compromised Host → Agent Runtime: runs on (evidence: `WinUpdate.py`)
- Agent Runtime → Webcam Stream: serves frames (evidence: `WinUpdate.py`)
- Stream Receiver → Webcam Stream: receives frames (evidence: `attacker_panel.py`)
- C2 Panel → Stream Receiver: starts receiver (evidence: `attacker_panel.py`)
- HID Deployment → Compromised Host: deploys payload (evidence: `backup/code.py`)
- Permission Restore → Compromised Host: restores webcam access (evidence: `cleanup.py`)
- Backup Panel → Backup Agent: controls
