A comprehensive bash automation script to set up a full-fledged penetration testing environment on Ubuntu/Debian systems. The script installs and configures 70+ essential security tools, organized under /opt/ and symlinked for easy CLI usage.
This script automates the installation of tools for:
- 🔍 Network reconnaissance & enumeration
- 🌐 Web application testing
- 🧠 Active Directory attacks & analysis
- 🔑 Password cracking & credential recovery
- 🧰 Post-exploitation (Linux & Windows)
- 🕳️ Tunneling and pivoting
- 🧱 Containerized frameworks (Docker-based)
- OS: Ubuntu 20.04+ or Debian 11+
- User: Non-root user with
sudopermissions - Internet: Stable connection for downloading packages
- Disk space: ~10 GB free recommended
- Estimated time: 30–60 minutes (depends on connection & CPU)
# Download the script
wget https://raw.githubusercontent.com/Heisenbergg4/pentest-setup/refs/heads/main/ubuntu_pentest_setup.sh
# Make it executable
chmod +x ubuntu_pentest_setup.sh
# Run it
./ubuntu_pentest_setup.sh- Network Tools:
nmap,wireshark,fping - Remote Access:
freerdp2-x11,rdesktop,smbclient - Password Cracking:
hashcat,john(John the Ripper Jumbo) - Utilities:
curl,git,rlwrap,tree,bat,plocate,libimage-exiftool-perl - Time Sync:
ntpsec-ntpdate,rdate - Kerberos:
krb5-user,libkrb5-dev - Dev libraries:
python3-dev,build-essential,autoconf,automake,libtool,pkg-config,yasm,libgmp-dev,libpcap-dev,libffi-dev,libssl-dev,zlib1g-dev,libbz2-dev - LDAP:
libldap2-dev,libsasl2-dev,ldap-utils,samba-common-bin - Certificates & security utils:
ca-certificates,gnupg
- Go (
golang-go) - Ruby (
ruby-full) - Rust (installed via
rustup) - Python UV (modern Python package manager used in script)
ffuf— Fast web fuzzergobuster— Directory & DNS brute-forcingkerbrute— Kerberos username enumeration
evil-winrm— Windows Remote Management shellwpscan— WordPress vulnerability scanner
rusthound-ce— AD data collector (community edition)
NetExec(formerly CrackMapExec) — Network service exploitationImpacket— Python classes for network protocolsevil-winrm-py— Python implementation of evil-winrmBloodHound.py— AD reconnaissance (CE)bloodyAD— AD privilege escalation helpersCertipy— AD certificate abuse toolkitpowerview.py— PowerView (Python port)smbclient-ng— Enhanced SMB clientghauri— SQL injection tooladidnsdump— AD DNS dump tooldnsrecon— DNS enumerationpypykatz— Mimikatz implementation in Pythonntdissector— NT structure parserResponder— LLMNR/NBT-NS/MDNS poisonerwindapsearch— LDAP enumeration utilityPcredz— Network credential snifferXSStrike— XSS detection suite
Metasploit Frameworksqlmap— Automatic SQL injection tool
feroxbuster— Fast content discoveryffuf,gobuster(from Go tools) also available
ligolo-ng— Proxy + Linux/Windows agents for tunneling and pivoting
Docker CE— Container platformBloodHound CE— Active Directory visualization (runs via Docker Compose on port 8088)
rockyou.txtdirectory-list-2.3-small.txtdirectory-list-lowercase-2.3-medium.txtweb-extensions.txtsubdomains-top1million-5000.txtsubdomains-top1million-20000.txtburp-parameter-names.txtraft-medium-directories.txtraft-large-directories.txtcommon.txtbig.txt
linpeas.sh— Linux privilege escalation checkerpspy(small & static) — Process snooper without rootligolo-linux-agent— Ligolo agent for pivotingLaZagne(Linux port) — Credential recovery
adPEAS.ps1/adPEAS-Light.ps1— AD enumerationLaZagne.exe— Windows credential dumperwinpeas.exe— Windows privilege escalation enumeratorSharpHound.exe— BloodHound data collectorligolo-win-agent.exe— Ligolo Windows agentsyslifters(compiled C# tools) — assorted offensive helpers
/opt/
├── john-jumbo/
├── bloodhound/
├── sqlmap/
├── XSStrike/
├── Responder/
├── windapsearch/
├── wordlist/
│ ├── rockyou.txt
│ ├── directory-list-*.txt
│ ├── subdomains-*.txt
│ └── ...
├── linux/
│ ├── linpeas.sh
│ ├── pspy-static
│ ├── pspysmall
│ ├── ligolo-linux-agent
│ └── lazagne/
└── windows/
├── winpeas.exe
├── LaZagne.exe
├── SharpHound.exe
├── adPEAS.ps1
├── ligolo-win-agent.exe
└── syslifters-compiled-tools/
/usr/local/bin/ # symlinked executables
├── john
├── sqlmap
├── responder
├── windapsearch
├── Pcredz
├── xsstrike
├── proxy (ligolo-ng)
└── feroxbuster
- Apply group changes (Docker):
# log out & back in, or run:
newgrp docker-
Restart your terminal to apply PATH changes (Go, Rust, Python UV).
-
Verify installations (examples):
uv tool list
nmap --version
john --version
ffuf -V
impacket-secretsdump -h
docker --version- Start BloodHound CE (example):
cd /opt/bloodhound
docker compose up -d
# then open: http://127.0.0.1:8088/ui/login- Initialize Metasploit database:
msfdb init
msfconsoleAll wordlists are installed under /opt/wordlist/. Files included (representative list):
rockyou.txtdirectory-list-2.3-small.txtdirectory-list-lowercase-2.3-medium.txtweb-extensions.txtsubdomains-top1million-5000.txtsubdomains-top1million-20000.txtburp-parameter-names.txtraft-medium-directories.txtraft-large-directories.txtcommon.txtbig.txt