How heisenbergg4/pentest-setup works
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 Provisioning workflow · README.md Operational guide
Components 17
Provisioned Host
Ubuntu/Debian workstation state managed by the script.
- APT foundation · Network, directory, Kerberos, cracking, remote-access, and build dependencies.
ubuntu_pentest_setup.sh - Source builds · Builds selected projects such as John Jumbo using the host foundation.
ubuntu_pentest_setup.sh - Docker CE host · Requires a new session after Docker group membership changes.
ubuntu_pentest_setup.sh - BloodHound CE · Long-running local web service on port 8088.
ubuntu_pentest_setup.sh - Metasploit database · Requires msfdb init after installation.
ubuntu_pentest_setup.sh
Tool Ecosystems
Installation channels with distinct executable locations.
- Go tools · Includes ffuf, gobuster, and kerbrute.
ubuntu_pentest_setup.sh - Ruby CLI tools · Includes Evil-WinRM and WPScan.
ubuntu_pentest_setup.sh - Rust tools · Installs RustHound CE.
ubuntu_pentest_setup.sh - Python CLI 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 · Holds Linux, Windows, wordlist, source, build, and service content.
ubuntu_pentest_setup.sh - /usr/local/bin commands · Stable operator-facing commands for tools outside PATH.
ubuntu_pentest_setup.sh - Operator toolchain · Recon, AD, password, web, tunneling, and post-exploitation tools.
ubuntu_pentest_setup.sh - Target payloads · Linux and Windows tools intended for assessed hosts.
ubuntu_pentest_setup.sh
Other components
- Sudo-capable operator
- Provisioning workflow · Central control plane for privileged setup.
ubuntu_pentest_setup.sh - Operational guide · Documents service access and post-install steps.
README.md - Internet sources · APT repositories, language registries, Git sources, releases, and container images.
Connections 25
- 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