Code Monkey home page Code Monkey logo

htb_docker's Introduction

HackTheBox Docker ready-to-use.

Motivation

I've recently started practicing on HackTheBox. Setting up a VM on my Macbook seemed like an overkill to me, so I decided to use Docker instead. However, I couldn't find any ready-to-use Dockerfiles, so I decided to compile my own, which I am excited to share with the community.

It uses a Kali Linux image and runs an OpenVPN inside the container. With this setup, you can conveniently access the lab server directly from within the container.


Installation

Follow these simple steps to get set up:

  1. Place htb.dockerfile and {file_name}.ovpn in the same directory.
  2. Execute the build command(takes around 8 min to complete):
    docker build -f htb.dockerfile -t htb:v0 .
    
  3. Replace {file_name}.ovpn with your OpenVPN file name and start the container with the run command:
    docker run -d --cap-add SYS_ADMIN -d --privileged \
    --sysctl net.ipv6.conf.all.disable_ipv6=0 --rm -it htb:v0 /etc/openvpn/client/{file_name}.ovpn
    

Usage

At this point your container is already in internal Lab's VPN. Open new terminal tab and access container bash:

docker exec -it {container_name} bash

Let's go!

ping 10.129.19.37

PS

  • Don't forget to stop container after you're done.

  • Some of the packages might be missing from my build. I'll keep adding them as I progress in learning about the platform. For details, check the Dockerfile.

htb_docker's People

Contributors

a3agalyan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.