# heisenbergg4/pentest-setup architecture

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

- Interactive diagram: https://gitdiagram.com/heisenbergg4/pentest-setup
- Repository: https://github.com/heisenbergg4/pentest-setup

## Overview

#### Purpose and Entry Point
This repository is a single-host provisioning project for Ubuntu 20.04+ / Debian 11+ penetration-testing workstations. Its only executable entry point, `ubuntu_pentest_setup.sh`, is run by a sudo-capable non-root user and automates installation, build, download, and configuration of a broad offensive-security toolchain. Repository paths: `ubuntu_pentest_setup.sh`, `README.md`.

#### Orchestration Model
`ubuntu_pentest_setup.sh` is the central control plane: a Bash workflow expected to perform privileged system changes, install dependencies, fetch third-party projects/releases, build selected tools, and expose commands. It is not an application service; its durable outputs are OS packages, language tool installations, Docker resources, `/opt` content, and `/usr/local/bin` symlinks. Path: `ubuntu_pentest_setup.sh`.

#### Base OS and Build Foundation
The initial provisioning stage establishes apt-managed network, directory-service, Kerberos, cracking, remote-access, and build dependencies. This foundation enables later source builds and language-package installs, including John Jumbo and tooling needing compiler, SSL, LDAP, Python, or packet-capture libraries. It targets Debian-family package management and requires sudo plus internet access. Path: `ubuntu_pentest_setup.sh`.

#### Language Ecosystems and Tool Installation
The script combines multiple distribution channels:
- OS packages for baseline utilities and frameworks.
- Go installs for tools such as ffuf, gobuster, and kerbrute.
- RubyGems for Evil-WinRM and WPScan.
- Rust via rustup for RustHound CE.
- UV-managed Python CLI tools for AD, SMB, DNS, credential, and web-testing utilities.

This makes PATH initialization and package-manager-specific executable locations important runtime boundaries. Path: `ubuntu_pentest_setup.sh`.

#### `/opt` Payload Layout and CLI Exposure
Downloaded repositories, compiled tools, target-platform payloads, and wordlists are organized under `/opt`, notably `/opt/linux`, `/opt/windows`, and `/opt/wordlist`. The installer creates stable operator-facing command names through `/usr/local/bin` symlinks for tools whose native checkout/build locations are not normally on PATH. This separates stored artifacts from interactive CLI access. Path: `ubuntu_pentest_setup.sh`.

#### Containerized BloodHound Service
Docker CE is installed as host infrastructure, and BloodHound CE is deployed as a Docker Compose workload under `/opt/bloodhound`. Its web UI is expected on local port 8088; Docker group membership requires a new login/session before non-sudo Docker use. This is the primary long-running service boundary, unlike the otherwise CLI-oriented toolset. Paths: `ubuntu_pentest_setup.sh`, `README.md`.

#### Operational Outputs and External Dependencies
Provisioning depends on apt repositories, language registries, Git-hosted sources/releases, and Docker image registries. It installs operator tools spanning reconnaissance, AD assessment, password recovery, web testing, tunneling, and Linux/Windows post-exploitation; several outputs are intended to be transferred to assessed hosts rather than run only locally. Metasploit additionally requires post-install database initialization (`msfdb init`). Paths: `ubuntu_pentest_setup.sh`, `README.md`.

Main entry points: [`ubuntu_pentest_setup.sh`](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh) (Provisioning workflow), [`README.md`](https://github.com/heisenbergg4/pentest-setup/blob/main/README.md) (Operational guide)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["Provisioned Host"]
  node_apt[("APT foundation<br/>OS packages")]
  node_build["Source builds<br/>compiled tools"]
  node_docker["Docker CE host<br/>container runtime"]
  node_bloodhound["BloodHound CE<br/>Docker Compose service"]
  node_msfdb[("Metasploit database<br/>post-install initialization")]
end

subgraph group_ecosystems["Tool Ecosystems"]
  node_go["Go tools<br/>Go installs"]
  node_ruby["Ruby CLI tools<br/>RubyGems"]
  node_rust["Rust tools<br/>rustup installs"]
  node_python["Python CLI tools<br/>UV-managed tools"]
end

subgraph group_payloads["Operator Artifacts"]
  node_opt[("/opt artifact layout<br/>tool storage")]
  node_symlinks["/usr/local/bin commands<br/>CLI symlinks"]
  node_operator_tools["Operator toolchain<br/>security CLIs"]
  node_transfer_payloads["Target payloads<br/>transferable artifacts"]
end

node_operator(("Sudo-capable operator<br/>user"))
node_setup{{"Provisioning workflow<br/>Bash installer"}}
node_readme["Operational guide<br/>documentation<br/>[README.md]"]
node_external(("Internet sources<br/>external registries"))

node_operator -->|"runs with sudo"| node_setup
node_readme -->|"documents operation"| node_operator
node_setup -->|"downloads from"| node_external
node_external -->|"package sources"| node_apt
node_setup -->|"installs"| node_apt
node_apt -->|"provides build dependencies"| node_build
node_setup -->|"builds"| node_build
node_setup -->|"installs"| node_go
node_setup -->|"installs"| node_ruby
node_setup -->|"installs"| node_rust
node_setup -->|"installs"| node_python
node_setup -->|"installs"| node_docker
node_docker -->|"runs Compose workload"| node_bloodhound
node_setup -->|"deploys under /opt/bloodhound"| node_bloodhound
node_setup -->|"populates"| node_opt
node_build -->|"stores outputs"| node_opt
node_opt -->|"exposes selected tools"| node_symlinks
node_apt -->|"provides baseline CLIs"| node_operator_tools
node_go -->|"adds commands"| node_operator_tools
node_ruby -->|"adds commands"| node_operator_tools
node_rust -->|"adds commands"| node_operator_tools
node_python -->|"adds commands"| node_operator_tools
node_symlinks -->|"provides stable PATH access"| node_operator_tools
node_opt -->|"stores"| node_transfer_payloads
node_setup -.->|"installs Metasploit; initialize separately"| node_msfdb

click node_setup "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_readme "https://github.com/heisenbergg4/pentest-setup/blob/main/README.md"
click node_apt "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_build "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_go "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_ruby "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_rust "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_python "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_docker "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_bloodhound "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_opt "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_symlinks "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_operator_tools "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_transfer_payloads "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"
click node_msfdb "https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh"

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_apt,node_build,node_docker,node_bloodhound,node_msfdb toneBlue
class node_go,node_ruby,node_rust,node_python toneAmber
class node_opt,node_symlinks,node_operator_tools,node_transfer_payloads toneMint
class node_operator,node_setup,node_readme,node_external toneNeutral
```

## Components

### Provisioned Host

Ubuntu/Debian workstation state managed by the script.

- [APT foundation](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): OS packages · Network, directory, Kerberos, cracking, remote-access, and build dependencies. · `ubuntu_pentest_setup.sh`
- [Source builds](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): compiled tools · Builds selected projects such as John Jumbo using the host foundation. · `ubuntu_pentest_setup.sh`
- [Docker CE host](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): container runtime · Requires a new session after Docker group membership changes. · `ubuntu_pentest_setup.sh`
- [BloodHound CE](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): Docker Compose service · Long-running local web service on port 8088. · `ubuntu_pentest_setup.sh`
- [Metasploit database](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): post-install initialization · Requires msfdb init after installation. · `ubuntu_pentest_setup.sh`

### Tool Ecosystems

Installation channels with distinct executable locations.

- [Go tools](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): Go installs · Includes ffuf, gobuster, and kerbrute. · `ubuntu_pentest_setup.sh`
- [Ruby CLI tools](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): RubyGems · Includes Evil-WinRM and WPScan. · `ubuntu_pentest_setup.sh`
- [Rust tools](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): rustup installs · Installs RustHound CE. · `ubuntu_pentest_setup.sh`
- [Python CLI tools](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): UV-managed tools · AD, SMB, DNS, credential, and web-testing utilities. · `ubuntu_pentest_setup.sh`

### Operator Artifacts

Local storage and command exposure for installed tools.

- [/opt artifact layout](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): tool storage · Holds Linux, Windows, wordlist, source, build, and service content. · `ubuntu_pentest_setup.sh`
- [/usr/local/bin commands](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): CLI symlinks · Stable operator-facing commands for tools outside PATH. · `ubuntu_pentest_setup.sh`
- [Operator toolchain](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): security CLIs · Recon, AD, password, web, tunneling, and post-exploitation tools. · `ubuntu_pentest_setup.sh`
- [Target payloads](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): transferable artifacts · Linux and Windows tools intended for assessed hosts. · `ubuntu_pentest_setup.sh`

### Other components

- **Sudo-capable operator**: user
- [Provisioning workflow](https://github.com/heisenbergg4/pentest-setup/blob/main/ubuntu_pentest_setup.sh): Bash installer · Central control plane for privileged setup. · `ubuntu_pentest_setup.sh`
- [Operational guide](https://github.com/heisenbergg4/pentest-setup/blob/main/README.md): documentation · Documents service access and post-install steps. · `README.md`
- **Internet sources**: external registries · APT repositories, language registries, Git sources, releases, and container images.

## Connections

- Sudo-capable operator → Provisioning workflow: runs with sudo
- Operational guide → Sudo-capable operator: documents operation
- Provisioning workflow → Internet sources: downloads from
- Internet sources → APT foundation: package sources
- Provisioning workflow → APT foundation: installs
- APT foundation → Source builds: provides build dependencies
- Provisioning workflow → Source builds: builds
- Provisioning workflow → Go tools: installs
- Provisioning workflow → Ruby CLI tools: installs
- Provisioning workflow → Rust tools: installs
- Provisioning workflow → Python CLI tools: installs
- Provisioning workflow → Docker CE host: installs
- Docker CE host → BloodHound CE: runs Compose workload
- Provisioning workflow → BloodHound CE: deploys under /opt/bloodhound
- Provisioning workflow → /opt artifact layout: populates
- Source builds → /opt artifact layout: stores outputs
- /opt artifact layout → /usr/local/bin commands: exposes selected tools
- APT foundation → Operator toolchain: provides baseline CLIs
- Go tools → Operator toolchain: adds commands
- Ruby CLI tools → Operator toolchain: adds commands
- Rust tools → Operator toolchain: adds commands
- Python CLI tools → Operator toolchain: adds commands
- /usr/local/bin commands → Operator toolchain: provides stable PATH access
- /opt artifact layout → Target payloads: stores
- Provisioning workflow → Metasploit database: installs Metasploit; initialize separately
