Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pentadock

Modern Container-Based Pentesting Lab Manager

License Shell Docker Distrobox


🔥 Overview

Pentadock is a modern penetration-testing lab manager that creates isolated, fast, and reproducible security environments using Docker and Distrobox.

Pentadock can provision labs based on:

  • Kali Linux
  • Parrot Security OS
  • BlackArch Linux

Each lab is a containerized environment, making it:

  • 🔒 Isolated from your host
  • ♻️ Reproducible and disposable
  • 🧹 Clean (no clutter on your host system)
  • ⚡ Quick to create, reset, or remove

Pentadock is designed for:

  • Cybersecurity learners
  • Ethical hackers and bug bounty hunters
  • Red teamers and blue teamers
  • Home-lab builders

🛠 Requirements

Before installing Pentadock, make sure:

  • You are on a Linux host system (Ubuntu, Debian, Kali (host), Fedora, Arch, etc.)
  • You are not running inside another VM such as Kali in VirtualBox or VMware
  • You have:
    • bash
    • curl or wget
    • docker installed and working

⚠️ Pentadock must run on your host Linux system, not inside a nested VM.
Example: Install Docker + Pentadock on Ubuntu (host), then use Pentadock to create Kali/Parrot/BlackArch labs as containers.


🐳 Install Docker (If You Don't Have It)

If Docker is already installed and working (docker run hello-world succeeds), you can skip this section.

Example commands for Debian / Ubuntu / Linux Mint:

# (Optional) Only if you want a clean reinstall of Docker:
sudo apt remove docker docker-engine docker.io containerd runc 2>/dev/null || true

# Install dependencies
sudo apt update
sudo apt install -y ca-certificates curl gnupg

# Add Docker’s official GPG key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg \
  | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add the Docker repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") stable" \
  | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Install Docker Engine
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# Allow your user to run Docker without sudo
sudo usermod -aG docker "$USER"

echo ">>> Log out and log back in (or reboot) so the docker group is applied."

Verify Docker:

docker run hello-world

🚀 Pentadock Installation (Step-by-Step)

1️⃣ Clone the repository

git clone https://github.com/faysalferdous/Pentadock
cd Pentadock

2️⃣ Make the installer executable

chmod +x install.sh

3️⃣ Run the installer

sudo ./install.sh

This will:

  • Install the pentadock CLI into /usr/local/bin/pentadock
  • Make it available globally on your system (in your PATH)

4️⃣ Confirm installation

pentadock help

You should see the Pentadock help menu.


🧪 Using Pentadock (Step-by-Step)

1️⃣ Create or Enter a Lab

pentadock kali        # Create or enter a Kali Linux lab
pentadock parrot      # Create or enter a Parrot Security lab
pentadock blackarch   # Create or enter a BlackArch lab
  • On first run, Pentadock will:
    • Ensure Distrobox is installed
    • Ensure Docker is available
    • Create a new named environment (e.g. pentadock-kali)
  • On later runs, it will simply enter the existing environment.

2️⃣ List Existing Labs

pentadock list

Shows all Pentadock-managed environments.

3️⃣ Remove a Lab

pentadock remove
  • Shows a list of labs
  • Lets you select which one to delete
  • Useful when you want a clean environment or to free disk space

4️⃣ Update Pentadock

pentadock update
  • Downloads the latest pentadock script from your GitHub repository
  • Replaces the existing binary/script

🔧 Post-Installation (Inside Labs)

Once you are inside a specific lab (e.g., Kali / Parrot / BlackArch), you can run optional post-install scripts to install tools.

These scripts live in the scripts/ directory:

  • scripts/kali-postinstall.sh
  • scripts/parrot-postinstall.sh
  • scripts/blackarch-postinstall.sh

🟦 Kali Post-Install

Inside the Kali lab:

cd /path/to/Pentadock
sudo ./scripts/kali-postinstall.sh

🟩 Parrot Post-Install

Inside the Parrot lab:

cd /path/to/Pentadock
sudo ./scripts/parrot-postinstall.sh

🟥 BlackArch Post-Install

Inside the BlackArch lab:

cd /path/to/Pentadock
sudo ./scripts/blackarch-postinstall.sh

You can customize these post-install scripts to match your own toolset or your organization's standards.


📂 Project Structure

Pentadock/
 ├── pentadock                  # Main CLI script
 ├── install.sh                 # Installer script
 ├── README.md                  # This documentation
 ├── LICENSE                    # MIT License
 └── scripts/
     ├── kali-postinstall.sh
     ├── parrot-postinstall.sh
     └── blackarch-postinstall.sh

🧹 Uninstallation

To completely remove Pentadock and its environments:

1️⃣ Remove the Pentadock CLI

sudo rm -f /usr/local/bin/pentadock

2️⃣ Remove Pentadock labs (Distrobox containers)

distrobox rm pentadock-kali || true
distrobox rm pentadock-parrot || true
distrobox rm pentadock-blackarch || true

3️⃣ Optionally remove the project directory

rm -rf ~/Pentadock

4️⃣ Optionally remove associated Docker images

docker rmi kalilinux/kali-rolling || true
docker rmi parrotsec/security || true
docker rmi blackarchlinux/blackarch || true

🧯 Troubleshooting

  • docker: permission denied

    sudo usermod -aG docker "$USER"
    echo ">>> Log out and log back in (or reboot) and try again."
  • Distrobox not found or failing

    Pentadock will try to install Distrobox automatically.
    You can also install it manually from the official repository.

  • Running inside a VM

    If you see errors related to systemd, Docker daemon, or container nesting,
    make sure you are running Pentadock on a host OS, not as a guest VM OS.


📜 License

Pentadock is released under the MIT License.

© Faysal Ferdous

About

Pentadock is a modern penetration-testing lab framework that uses Docker and Distrobox to provide stable, isolated, and fast pentesting workspaces.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages