# kevinpratama102/autoroot architecture

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

- Interactive diagram: https://gitdiagram.com/kevinpratama102/autoroot
- Repository: https://github.com/kevinpratama102/autoroot

## Overview

AutoRoot is an authorized LPE research toolkit: it combines a local CVE/PoC archive, target-side read-only enumeration and matching, and archive-side PoC kit assembly. The main workflow is prepare and transfer a scanner, collect a JSON report, then select matching PoCs into a reviewable ZIP. A separate autopwn path automates web-shell delivery and execution, unlike the read-only scanner/buildkit flow. The README documents bash and PowerShell scanner ports and dataset assets not present in the supplied tree; those are represented at their supported enclosing paths, without inferring unsampled internals.

Main entry points: [`lpescan/autopwn.py`](https://github.com/kevinpratama102/autoroot/blob/main/lpescan/autopwn.py) (Autopwn orchestrator), [`lpescan/lpescan.py`](https://github.com/kevinpratama102/autoroot/blob/main/lpescan/lpescan.py) (CVE matching), [`cve-lpe`](https://github.com/kevinpratama102/autoroot/tree/main/cve-lpe) (CVE dataset), [`lpescan/buildkit.py`](https://github.com/kevinpratama102/autoroot/blob/main/lpescan/buildkit.py) (PoC kit builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_archive["Research archive"]
  node_cvedata[("CVE dataset")]
  node_pocarchive[("PoC archive")]
  node_builder["Scanner builder<br/>[build-scanner.py]"]
  node_tables["Mapping tables<br/>[tables.py]"]
end

subgraph group_scan["Target scanning"]
  node_scanner["Python scanner<br/>[lpescan.py]"]
  node_ports["Bash and PS ports"]
  node_enumeration["System enumeration<br/>[lpescan.py]"]
  node_matching["CVE matching<br/>[lpescan.py]"]
  node_report["Scan report"]
end

subgraph group_kit["Kit assembly"]
  node_kitbuilder["PoC kit builder<br/>[buildkit.py]"]
  node_kit["Reviewable ZIP kit"]
end

subgraph group_automation["Autopwn"]
  node_autopwn["Autopwn orchestrator<br/>[autopwn.py]"]
  node_execution["PoC execution"]
end

node_researcher(("Researcher"))
node_nvd(("NVD and CISA KEV"))
node_target(("Target system"))
node_webshell(("Target web shell"))

node_nvd -->|"feeds archive"| node_cvedata
node_cvedata -->|"generates scanner data"| node_builder
node_builder -->|"packages scanner"| node_scanner
node_researcher -->|"transfers scanner"| node_target
node_target -->|"runs checks"| node_enumeration
node_enumeration -->|"passes findings"| node_matching
node_tables -->|"supplies mappings"| node_matching
node_cvedata -->|"matches versions"| node_matching
node_matching -->|"writes report"| node_report
node_target -->|"runs native port"| node_ports
node_report -->|"provides matches"| node_kitbuilder
node_pocarchive -->|"supplies PoCs"| node_kitbuilder
node_kitbuilder -->|"copies and zips"| node_kit
node_researcher -->|"starts automation"| node_autopwn
node_autopwn -->|"deploys scanner"| node_webshell
node_webshell -->|"returns report"| node_autopwn
node_autopwn -->|"selects binaries"| node_pocarchive
node_autopwn -->|"uploads and runs"| node_execution
node_execution -->|"verifies privilege"| node_target

click node_cvedata "https://github.com/kevinpratama102/autoroot/tree/main/cve-lpe"
click node_pocarchive "https://github.com/kevinpratama102/autoroot/tree/main/cve-lpe/pocs"
click node_builder "https://github.com/kevinpratama102/autoroot/blob/main/lpescan/build-scanner.py"
click node_tables "https://github.com/kevinpratama102/autoroot/blob/main/lpescan/tables.py"
click node_scanner "https://github.com/kevinpratama102/autoroot/blob/main/lpescan/lpescan.py"
click node_ports "https://github.com/kevinpratama102/autoroot/tree/main/lpescan"
click node_enumeration "https://github.com/kevinpratama102/autoroot/blob/main/lpescan/lpescan.py"
click node_matching "https://github.com/kevinpratama102/autoroot/blob/main/lpescan/lpescan.py"
click node_kitbuilder "https://github.com/kevinpratama102/autoroot/blob/main/lpescan/buildkit.py"
click node_autopwn "https://github.com/kevinpratama102/autoroot/blob/main/lpescan/autopwn.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_cvedata,node_pocarchive,node_builder,node_tables toneBlue
class node_scanner,node_ports,node_enumeration,node_matching,node_report toneAmber
class node_kitbuilder,node_kit toneMint
class node_autopwn,node_execution toneRose
class node_researcher,node_nvd,node_target,node_webshell toneIndigo
```

## Components

### Research archive

- [CVE dataset](https://github.com/kevinpratama102/autoroot/tree/main/cve-lpe): `cve-lpe`
- [PoC archive](https://github.com/kevinpratama102/autoroot/tree/main/cve-lpe/pocs): `cve-lpe/pocs`
- [Scanner builder](https://github.com/kevinpratama102/autoroot/blob/main/lpescan/build-scanner.py): `lpescan/build-scanner.py`
- [Mapping tables](https://github.com/kevinpratama102/autoroot/blob/main/lpescan/tables.py): `lpescan/tables.py`

### Target scanning

- [Python scanner](https://github.com/kevinpratama102/autoroot/blob/main/lpescan/lpescan.py): `lpescan/lpescan.py`
- [Bash and PS ports](https://github.com/kevinpratama102/autoroot/tree/main/lpescan): `lpescan`
- [System enumeration](https://github.com/kevinpratama102/autoroot/blob/main/lpescan/lpescan.py): `lpescan/lpescan.py`
- [CVE matching](https://github.com/kevinpratama102/autoroot/blob/main/lpescan/lpescan.py): `lpescan/lpescan.py`
- **Scan report**

### Kit assembly

- [PoC kit builder](https://github.com/kevinpratama102/autoroot/blob/main/lpescan/buildkit.py): `lpescan/buildkit.py`
- **Reviewable ZIP kit**

### Autopwn

- [Autopwn orchestrator](https://github.com/kevinpratama102/autoroot/blob/main/lpescan/autopwn.py): `lpescan/autopwn.py`
- **PoC execution**

### Other components

- **Researcher**
- **NVD and CISA KEV**
- **Target system**
- **Target web shell**

## Connections

- NVD and CISA KEV → CVE dataset: feeds archive (evidence: `README.md`)
- CVE dataset → Scanner builder: generates scanner data (evidence: `README.md`)
- Scanner builder → Python scanner: packages scanner (evidence: `README.md`)
- Researcher → Target system: transfers scanner (evidence: `README.md`)
- Target system → System enumeration: runs checks (evidence: `README.md`)
- System enumeration → CVE matching: passes findings (evidence: `README.md`)
- Mapping tables → CVE matching: supplies mappings (evidence: `lpescan/lpescan.py`)
- CVE dataset → CVE matching: matches versions (evidence: `README.md`)
- CVE matching → Scan report: writes report (evidence: `README.md`)
- Target system → Bash and PS ports: runs native port (evidence: `README.md`)
- Scan report → PoC kit builder: provides matches (evidence: `README.md`)
- PoC archive → PoC kit builder: supplies PoCs (evidence: `README.md`)
- PoC kit builder → Reviewable ZIP kit: copies and zips (evidence: `README.md`)
- Researcher → Autopwn orchestrator: starts automation (evidence: `README.md`)
- Autopwn orchestrator → Target web shell: deploys scanner (evidence: `README.md`)
- Target web shell → Autopwn orchestrator: returns report (evidence: `README.md`)
- Autopwn orchestrator → PoC archive: selects binaries (evidence: `README.md`)
- Autopwn orchestrator → PoC execution: uploads and runs (evidence: `README.md`)
- PoC execution → Target system: verifies privilege (evidence: `README.md`)
