Home

Awesome

<!-- markdownlint-disable MD033 MD041 --> <p align="center"> <a href="https://hub.docker.com/r/aaaguirrep/offensive-docker"> <img alt="Offensive Docker" src="https://github.com/aaaguirrep/offensive-docker/blob/master/img/banner.jpg" width="600" /> </a> </p> <br/> <p align="center"> <a href="https://github.com/aaaguirrep/offensive-docker"><img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/aaaguirrep/offensive-docker"></a> <a href="https://github.com/aaaguirrep/offensive-docker"><img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/aaaguirrep/offensive-docker"></a> <a href="https://github.com/aaaguirrep/offensive-docker"><img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/aaaguirrep/offensive-docker"></a> <a href="https://github.com/aaaguirrep/offensive-docker"><img alt="GitHub issues" src="https://img.shields.io/github/issues/aaaguirrep/offensive-docker"></a> <a href="https://github.com/aaaguirrep/offensive-docker/graphs/contributors"><img alt="GitHub contributors" src="https://img.shields.io/github/contributors/aaaguirrep/offensive-docker"> <a href="https://github.com/aaaguirrep/offensive-docker/blob/master/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/aaaguirrep/offensive-docker"></a> </p> <p align="center"> <a href="https://hub.docker.com/r/aaaguirrep/offensive-docker"><img alt="Docker Cloud Build Status" src="https://img.shields.io/docker/cloud/build/aaaguirrep/offensive-docker"></a> <a href="https://hub.docker.com/r/aaaguirrep/offensive-docker"><img alt="Docker Automated build" src="https://img.shields.io/docker/automated/aaaguirrep/offensive-docker"></a> <a href="https://hub.docker.com/r/aaaguirrep/offensive-docker"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/aaaguirrep/offensive-docker"></a> <a href="https://hub.docker.com/r/aaaguirrep/offensive-docker"><img alt="Docker Image Size (latest by date)" src="https://img.shields.io/docker/image-size/aaaguirrep/offensive-docker"></a> <a href="https://hub.docker.com/r/aaaguirrep/offensive-docker"><img alt="Docker Image Version (latest by date)" src="https://img.shields.io/docker/v/aaaguirrep/offensive-docker"></a> <a href="https://hub.docker.com/r/aaaguirrep/offensive-docker"><img alt="Docker Stars" src="https://img.shields.io/docker/stars/aaaguirrep/offensive-docker"></a> </p> <p align="center"> <a href="https://discord.gg/2uBfu8E"><img alt="Discord" src="https://img.shields.io/discord/749093790676942888"></a> </p>

Offensive Docker is an image with the more used tools to create an pentest environment easily and quickly.

:arrow_right: Note: Check out the next repo to know how to launch offensive docker in a VPS in Google Cloud Platform or Digital Ocean (free credit included). Offensive Docker VPS

Table of Contents

Links

Features

Requirements

Tools installed

Operative system tools

Network tools

Developer tools

:hocho: Offensive tools

Port scanning

:mag: Recon

Subdomains
Subdomain takeover
DNS Lookups
:camera: Screenshot
:spider_web: Crawler
:file_folder: Search directories
Fuzzer
Web Scanning
CMS
Search JS

Wordlist

Git repositories

OWASP

:iphone: Mobile

Brute force

Cracking

OS Enumeration

Exploits

Windows

Reverse shell

Other resources

Forensic

Custom functions

Other services

Reporting tools

:memo: Documentation

See the project's wiki for documentation.

:hammer_and_wrench: Usage

You can use the docker image by the next two options:

Option 1 - Use the github repository

git clone --depth 1 https://github.com/aaaguirrep/offensive-docker.git
cd offensive-docker
docker build -t offensive-docker .
docker run --rm -it --name my-offensive-docker offensive-docker /bin/zsh

Option 2 - Use the image from docker hub

Use image from docker hub: aaaguirrep/offensive-docker

docker pull aaaguirrep/offensive-docker
docker run --rm -it --name my-offensive-docker aaaguirrep/offensive-docker /bin/zsh

Considerations to run the container

There are differents use cases for use the image and you should know how to run the container properly.

  1. Use the container to access HTB (Hack the Box) machines by HTB vpn.

     docker run --rm -it --cap-add=NET_ADMIN --device=/dev/net/tun --sysctl net.ipv6.conf.all.disable_ipv6=0 --name my-offensive-docker aaaguirrep/offensive-docker /bin/zsh
    
  2. Share information from your local directory to container directory and save information on your local directory. You should save information under /offensive directory.

     docker run --rm -it -v /path/to/local/directory:/offensive --name my-offensive-docker aaaguirrep/offensive-docker /bin/zsh
    
  3. Expose internal container services (apache, squid) for your local environment.

     docker run --rm -it --name my-offensive-docker -p 80:80 -p 3128:3128 aaaguirrep/offensive-docker /bin/zsh
    

    Inside the container start apache2 and squid services by the aliases.

     apacheUp
     squidUp
    
  4. Mount directories by umount command.

     docker run --rm -it --privileged --name my-offensive-docker aaaguirrep/offensive-docker /bin/zsh
    
  5. Tools are downloaded in /tools directory.

:gear: Nice configurations

You can set up the docker image with nice configurations like as:

1. Configure credentials in the docker

To use access keys, tokens or API Keys in the docker review the next repo Offensive Docker Custom

2. Alias to connect to HTB (Hack the Box) VPN

To use both options you should use -v option to map local directoty with /offensive container directory.

Option 1 - HTB VPN using github repository

Add the next line in step "Create shorcuts" in Dockerfile, build a new image and run a new container with the -v option.

RUN echo "alias vpnhtb=\"openvpn /offensive/path/to/ovpn/file\"" >> /root/.zshrc

Option 2 - HTB VPN using docker hub image

Create a new Dockerfile with the next steps, build a new image and run a new container with -v option.

FROM aaaguirrep/offensive-docker

# Create a shortcut and load the ovpn file from workstation
RUN echo "alias vpnhtb=\"openvpn /offensive/path/to/ovpn/file\"" >> /root/.zshrc

3. Save and load command history in your local environment

When you delete a container all information is deleted incluide command history. The next configuration provides you an option for save the command history in your local environment and load it when you run a new container. So, you wont lose your command history when run a new container.

To use both options you should use -v option to map local directoty with /offensive container directory.

Option 1 - Command history using github repository

Add the next line in step "Create shorcuts" in Dockerfile, build a new image and run a new container.

# Save and load command history in your local environment
RUN sed -i '1i export HISTFILE="/history/.zsh_history"' /root/.zshrc

Option 2 - Command history using docker hub image

Create a new Dockerfile with the next steps, build a new image and run a new container.

FROM aaaguirrep/offensive-docker

# Save and load command history in your local environment
RUN sed -i '1i export HISTFILE="/history/.zsh_history"' /root/.zshrc

:white_check_mark: Environment tested

The image was tested in the following environments:

:warning: Warning

:coffee: Donations

Thanks for your donations, are always appreciated.

While I drink the coffee I check more tools to add in the docker image.

Buy me a coffee

Contributors

Thank you to all our contributors!

Contributing

Contributing Guide

:chart_with_upwards_trend: Stargazers over time

Stargazers over time

License

MIT

Copyright (c) 2020, Arsenio Aguirre