Dockerfile for custom Red Team container
By technese - Last updated: Monday, November 11, 2024 - Save & Share - Leave a Comment
To update and install the best Kali Linux tools for a complete penetration testing (Red Team) attack cycle in a Docker container, you can follow these steps. This setup ensures the tools are installed for each phase: reconnaissance, scanning, exploitation, post-exploitation, and reporting.
- Create a Dockerfile for a custom Kali image:
# Start with the official Kali Linux Docker image
FROM kalilinux/kali-rolling
# Update and upgrade Kali packages
RUN apt update && apt -y upgrade
# Install general utilities
RUN apt -y install curl wget vim git net-tools
# Install reconnaissance tools
RUN apt -y install nmap enum4linux dnsenum theharvester dirb gobuster ffuf smbclient nbtscan
# Install vulnerability scanners
RUN apt -y install nikto metasploit-framework openvas sqlmap lynis
# Install exploitation tools
RUN apt -y install sqlmap hydra john exploitdb metasploit-framework msfpc seclists patator
# Install post-exploitation tools
RUN apt -y install crackmapexec mimikatz powershell-empire responder impacket-scripts
# Install privilege escalation tools
RUN apt -y install linpeas linux-exploit-suggester windows-exploit-suggester-2 enum4linux
# Install reporting and documentation tools
RUN apt -y install eyewitness dradis faraday
# Clean up cached files
RUN apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
- Build the Docker Image with the following command:
docker build -t kali-red-team .
- Run the Docker Container:
docker run -it kali-red-team /bin/bash
This Dockerfile installs essential tools across each phase of the attack cycle and prepares a Kali Linux environment ready for penetration testing. You can add or modify tools as needed based on specific objectives or targets.
Source: ChatGPT
Posted in General • • Top Of Page