# vulnace/dark-embargo-htb-exploit architecture

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

- Interactive diagram: https://gitdiagram.com/vulnace/dark-embargo-htb-exploit
- Repository: https://github.com/vulnace/dark-embargo-htb-exploit

## Overview

This repository is a standalone Python exploit for the HTB Dark Embargo target, not the target web application. Its principal workflow is to connect to the target, optionally pin Apache workers, leak address bases, trigger the session/OOM state, send a forged-value spray, then retrieve command output. The README documents the vulnerability chain and target behavior; the source excerpt shows the exploit stages and HTTP helpers, but omitted code limits evidence for some internal calls.

Main entry points: [`dark_embargo_htb.py`](https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py) (Exploit CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_transport["HTTP Transport"]
  node_target["Target Connection"]
  node_http["HTTP Requests"]
  node_proof["Proof Retrieval"]
end

subgraph group_exploit["Exploit Stages"]
  node_cli["Exploit CLI"]
  node_saturation["Worker Saturation"]
  node_leak["Address Leak"]
  node_arm["UAF Arming"]
  node_fire["Forged Spray"]
end

subgraph group_execution["Command Execution"]
  node_phpchain["PHP Vulnerability Chain"]
  node_command["Injected Command"]
end

node_operator(("Operator"))
node_apache["Apache mod_php"]

node_operator -->|"configures"| node_cli
node_cli -->|"creates"| node_target
node_target -->|"sends requests"| node_http
node_http -->|"targets"| node_apache
node_cli -->|"runs"| node_saturation
node_saturation -->|"pins workers"| node_apache
node_cli -->|"runs"| node_leak
node_leak -->|"posts payloads"| node_http
node_cli -->|"runs"| node_arm
node_arm -->|"posts multipart"| node_http
node_cli -->|"runs"| node_fire
node_fire -->|"posts spray"| node_http
node_http -->|"triggers"| node_phpchain
node_phpchain -->|"calls destructor"| node_command
node_command -->|"runs as www-data"| node_apache
node_cli -->|"requests proof"| node_proof
node_proof -->|"fetches output"| node_http

click node_cli "https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py"
click node_target "https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py"
click node_http "https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py"
click node_saturation "https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py"
click node_leak "https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py"
click node_arm "https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py"
click node_fire "https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py"
click node_command "https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py"
click node_proof "https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.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_target,node_http,node_proof toneBlue
class node_cli,node_saturation,node_leak,node_arm,node_fire toneAmber
class node_phpchain,node_command toneMint
class node_operator,node_apache toneIndigo
```

## Components

### HTTP Transport

- [Target Connection](https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py): `dark_embargo_htb.py`
- [HTTP Requests](https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py): `dark_embargo_htb.py`
- [Proof Retrieval](https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py): `dark_embargo_htb.py`

### Exploit Stages

- [Exploit CLI](https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py): `dark_embargo_htb.py`
- [Worker Saturation](https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py): `dark_embargo_htb.py`
- [Address Leak](https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py): `dark_embargo_htb.py`
- [UAF Arming](https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py): `dark_embargo_htb.py`
- [Forged Spray](https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py): `dark_embargo_htb.py`

### Command Execution

- **PHP Vulnerability Chain**
- [Injected Command](https://github.com/vulnace/dark-embargo-htb-exploit/blob/main/dark_embargo_htb.py): `dark_embargo_htb.py`

### Other components

- **Operator**
- **Apache mod_php**

## Connections

- Operator → Exploit CLI: configures (evidence: `dark_embargo_htb.py`)
- Exploit CLI → Target Connection: creates (evidence: `dark_embargo_htb.py`)
- Target Connection → HTTP Requests: sends requests (evidence: `dark_embargo_htb.py`)
- HTTP Requests → Apache mod_php: targets (evidence: `README.md`)
- Exploit CLI → Worker Saturation: runs (evidence: `README.md`)
- Worker Saturation → Apache mod_php: pins workers (evidence: `README.md`)
- Exploit CLI → Address Leak: runs (evidence: `dark_embargo_htb.py`)
- Address Leak → HTTP Requests: posts payloads (evidence: `dark_embargo_htb.py`)
- Exploit CLI → UAF Arming: runs (evidence: `README.md`)
- UAF Arming → HTTP Requests: posts multipart (evidence: `dark_embargo_htb.py`)
- Exploit CLI → Forged Spray: runs (evidence: `README.md`)
- Forged Spray → HTTP Requests: posts spray (evidence: `dark_embargo_htb.py`)
- HTTP Requests → PHP Vulnerability Chain: triggers (evidence: `README.md`)
- PHP Vulnerability Chain → Injected Command: calls destructor (evidence: `README.md`)
- Injected Command → Apache mod_php: runs as www-data (evidence: `README.md`)
- Exploit CLI → Proof Retrieval: requests proof (evidence: `dark_embargo_htb.py`)
- Proof Retrieval → HTTP Requests: fetches output (evidence: `dark_embargo_htb.py`)
