The Pentester Docker container is a comprehensive penetration testing environment built on Kali Linux Rolling. It provides a complete toolkit for security professionals, ethical hackers, and cybersecurity students. The container includes both command-line tools and a full desktop environment accessible via VNC.
# Pull the container
docker pull docker.io/h4shelldocker/pentester:latest
# Run with basic configuration
docker run -d --name pentester-lab \
-p 8444:8444 \
-p 2222:22 \
docker.io/h4shelldocker/pentester:latest
# Run with VNC access
docker run -d --name pentester-desktop \
-p 8444:8444 \
-p 2222:22 \
--privileged \
--cap-add=NET_ADMIN \
--cap-add=SYS_ADMIN \
docker.io/h4shelldocker/pentester:latest
Access the desktop via web browser at: https://localhost:8444
# Connect via SSH
ssh root@localhost -p 2222
# Password: password
# Run with custom volumes and network access
docker run -d --name pentester-advanced \
-p 8444:8444 \
-p 2222:22 \
-v /host/projects:/root/projects \
-v /host/wordlists:/root/wordlists \
--privileged \
--cap-add=NET_ADMIN \
--cap-add=SYS_ADMIN \
--network=host \
docker.io/h4shelldocker/pentester:latest
| Port | Service | Description |
|---|---|---|
| 8444 | KasmVNC | Web-based VNC desktop access |
| 22 | SSH | Secure Shell access |
rootpassword# Enter the container
docker exec -it pentester-lab bash
# Network discovery
nmap -sn 192.168.1.0/24
# Port scanning
nmap -sV -sC target.com
# Web application enumeration
whatweb target.com
nikto -h target.com
# Start Burp Suite (in desktop environment)
# Access via VNC at https://localhost:8444
# WordPress scanning
wpscan --url http://target.com --enumerate u,p,t
# Directory brute forcing
nuclei -u http://target.com -t /root/nuclei-templates/
# Generate custom wordlists
cupp -i
# Hydra brute force
hydra -l admin -P passwords.txt ssh://target.com
# Hashcat password cracking
hashcat -m 0 hashes.txt wordlist.txt
# Start Tor service
service tor start
# Use proxychains
proxychains4 nmap target.com
# Check external IP
myip # Custom alias for curl api.ipify.org
# Mount common directories
docker run -d --name pentester-volumes \
-p 8444:8444 \
-p 2222:22 \
-v $(pwd)/projects:/root/projects \
-v $(pwd)/wordlists:/root/wordlists \
-v $(pwd)/results:/root/results \
-v $(pwd)/scripts:/root/scripts \
--privileged \
docker.io/h4shelldocker/pentester:latest
# Preserve SSH keys and configurations
docker run -d --name pentester-persistent \
-p 8444:8444 \
-p 2222:22 \
-v pentester-ssh:/root/.ssh \
-v pentester-config:/root/.config \
-v pentester-vnc:/root/.vnc \
--privileged \
docker.io/h4shelldocker/pentester:latest
The container supports several environment variables for customization:
# Example with environment variables
docker run -d --name pentester-custom \
-p 8444:8444 \
-p 2222:22 \
-e VNC_RESOLUTION=1920x1080 \
-e VNC_PASSWORD=newpassword \
--privileged \
docker.io/h4shelldocker/pentester:latest
version: '3.8'
services:
pentester:
image: pentester:latest
container_name: pentester-lab
ports:
- "8444:8444"
- "2222:22"
volumes:
- ./projects:/root/projects
- ./wordlists:/root/wordlists
- ./results:/root/results
privileged: true
cap_add:
- NET_ADMIN
- SYS_ADMIN
restart: unless-stopped
version: '3.8'
services:
pentester:
image: docker.io/h4shelldocker/pentester:latest
container_name: pentester-main
ports:
- "8444:8444"
- "2222:22"
volumes:
- pentester-projects:/root/projects
- pentester-wordlists:/root/wordlists
- pentester-results:/root/results
- pentester-config:/root/.config
privileged: true
cap_add:
- NET_ADMIN
- SYS_ADMIN
networks:
- pentest-network
restart: unless-stopped
target-app:
image: dvwa/dvwa
container_name: test-target
ports:
- "8080:80"
networks:
- pentest-network
networks:
pentest-network:
driver: bridge
volumes:
pentester-projects:
pentester-wordlists:
pentester-results:
pentester-config:
This container requires elevated privileges for networking tools:
# Minimal required privileges
docker run -d --name pentester-minimal \
--cap-add=NET_ADMIN \
--cap-add=NET_RAW \
--cap-add=SYS_ADMIN \
docker.io/h4shelldocker/pentester:latest
# Isolated network testing
docker network create pentest-isolated
docker run -d --name pentester-isolated \
--network pentest-isolated \
-p 8444:8444 \
docker.io/h4shelldocker/pentester:latest
VNC Connection Issues
# Check VNC service status
docker exec pentester-lab ps aux | grep vnc
# Restart VNC service
docker exec pentester-lab /entrypoint.sh
SSH Connection Refused
# Check SSH service
docker exec pentester-lab service ssh status
# Start SSH service
docker exec pentester-lab service ssh start
Permission Issues
# Fix volume permissions
docker exec pentester-lab chown -R root:root /root/projects
# Container logs
docker logs pentester-lab
# Interactive debugging
docker exec -it pentester-lab bash
# Service status check
docker exec pentester-lab systemctl status ssh
# Run with resource limits
docker run -d --name pentester-limited \
-p 8444:8444 \
-p 2222:22 \
--memory=4g \
--cpus=2 \
--privileged \
docker.io/h4shelldocker/pentester:latest
# Use tmpfs for temporary files
docker run -d --name pentester-optimized \
-p 8444:8444 \
-p 2222:22 \
--tmpfs /tmp:rw,size=1g \
--tmpfs /var/tmp:rw,size=1g \
--privileged \
docker.io/h4shelldocker/pentester:latest
To extend or modify the container:
# Build custom image
docker build -t pentester-custom .
# Tag and push
docker tag pentester-custom your-registry/pentester-custom
docker push your-registry/pentester-custom
This container is intended for educational purposes and authorized penetration testing only. Users are responsible for complying with all applicable laws and regulations. Unauthorized use against systems you do not own or have explicit permission to test is illegal and unethical.
EXPORT container
docker tag docker-pentester-pentester h4shelldocker/pentester:$(date +%d%m%Y)
docker push h4shelldocker/pentester:$(date +%d%m%Y)
GITEA PROJECT
https://gitea.h4sh.it/h4shell/docker-Pentester
Content type
Image
Digest
sha256:6a323bea3…
Size
2.5 GB
Last updated
3 months ago
docker pull h4shelldocker/pentester