Giter Site home page Giter Site logo

pwnbox's Introduction

Pwnbox

htb screenshot

Want to replicate Hack the Box very own Pwnbox? Follow the guide below! This should give you the "look and feel" of pwnbox used by Hack The Box. Everything shown here can be done in your own Parrot OS, whether it is VM or main OS. However, I suggest you look into what each command does, where it goes, and how you can go about customizing it to your own taste. For me, whenever I ssh into my Parrot machine, it gives me fun hackthebox logo. Go on, make it your own!

  █  █         ▐▌     ▄█▄ █          ▄▄▄▄
  █▄▄█ ▀▀█ █▀▀ ▐▌▄▀    █  █▀█ █▀█    █▌▄█ ▄▀▀▄ ▀▄▀
  █  █ █▄█ █▄▄ ▐█▀▄    █  █ █ █▄▄    █▌▄█ ▀▄▄▀ █▀█

  P  E  N   -   T  E  S  T  I  N  G     L  A  B  S

  what the box?

Setup

Clone this repo, then run setup.sh file to install pwnbox

Setup OpenVPN

We also need to add your vpn file to your /etc/openvpn location:

sudo cp [your VPN FILE].ovpn /etc/openvpn/

sudo mv /etc/openvpn/[your VPN file].ovpn /etc/openvpn/[your VPN file].conf

Make sure you rename your file to .conf. Then you can start your VPN like you would normally do.

Update theme

Go to the top menu bar and choose:

System -> Preferences -> Look and Feel -> Appearance

You should now see a theme called "HackTheBox". Select it and select "Apply Background".

At this point, you should have most of the Pwnbox 'look and feel'. However, if you want to further customize it, keep following allong.

Customizing panels

On the top panel, right click one of the three system monitors graphs (the ones showing your 'process', 'memory', and 'network'). Select "Remove from Panel".

Next, on the top panel, right click the "shell" icon (the one that looks like a bash prompt). Select "Properties".

NOTE : You will see the "Launcher Properties" pop up. This is where you can really customize your ParrotOS. You don't need to follow what Hack the Box did. You can add ANY script you want, any command, icon, etc, to your OS! This is how you can truly personalize it.

Click on the bash icon to the left, and a window should pop up asking you to select an icon. Navigate to /usr/share/icons/htb/ and choose bash.svg.

  • To get the 'ping panel'

    Right click on a blank space on the top panel and choose "Add to Panel". In the search bar, type "command", select "command" then click "add". The current time should populate on the top panel. Right click on it, and in the command section, paste in /opt/vpnpanel.sh, with an interval of "5" seconds. It should show "HTB VPN: Disconnected" unless you are on the vpn.

  • To get the "processor" menu

    Right click on a blank space on the top panel and search for "System monitor". Select it and add it. Right click on the little black box that appeared, select "preferences" and under "System monitor width", update it to "135" pixels, and updated the field below it to "100" milliseconds.

  • 'Plank', the MacOS bar on the bottom

    Start by deleting the bottom panel by right clicking and selecting delete this panel.

    sudo apt install plank -y

    Once Plank is installed, on the top bar, go to "System -> Preferences -> Personal -> Startup Application". Right hand side, select "Add" and fill in the values:

    • Name: Plank
    • Command: plank
    • Delay: 0

    Plank will now startup whenever you reboot your machine.

Conclusion

This should be it for the setup! The actual pwnbox has some extra icons on the desktop such as a shortcut to "bloodhound", "burpsuite", and others. There's even a MacOS launcher bar on the bottom. I'm going to leave that up to you to add.

I highly suggest adding VNC support if needed. I am currently running tigerVNC on my Parrot machine and it works great!

Otherwise, that finishes that for this tutorial.

pwnbox's People

Contributors

71xn avatar alexanderajju avatar an4kein avatar diedb avatar palinurosec avatar theguildhall avatar xrce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pwnbox's Issues

Solution for tmux

So after hours of searching and trying different thinks I found that if type this
On your . tmux.conf
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then tmux attach -t default || tmux new -s default fi

You'll have htb terminal ♥️

The bashrc file needs a new line character

[\033[1;32m]\342\224\214\342\224\200$([[ $(/opt/vpnbash.sh)? == "10." ]] && echo "[[\033[1;34m]$(/opt/vpnserver.sh)[\033[1;32m]]\342\224\200[[\033[1;37m]$(/opt/vpnbash.sh)[\033[1;32m]]\342\224\200")[[\033[1;37m]\u[\033[01;32m]@[\033[01;34m]\h[\033[1;32m]]\342\224\200[[\033[1;37m]\w[\033[1;32m]]\n[\033[1;32m]\342\224\224\342\224\200\342\224\200\342\225\274 [\033[0m][\e[1;32m]\$[\e[0m]

vpnserver.sh wrong systemctl call

Hello, I followed a guide to set up my openVPN connection as a daemon at the start of the box:

Here is how i called the service:
image

How should I change the vpnserver.sh file?

Things I tried:
-editing the commands in the file from openvpn@ to openvpn-client@ with no result

Terminal issues when connected to VPN

When I connect to the VPN for HTB, I open a new terminal. It'll show as a blank terminal until I press ctrl+c, then I'm able to start using the terminal. However when I do this, it doesn't continue using the prompt colours set in .bashrc either.
Terminal colours:
image

Terminal after ctrl+c once connected to VPN:
image

Tmux misinterpret special characters

I tried this customization on latest version of parrot os. It works fine on bash shell. But when I open the tmux session ┌── this is misinterpreted as ____(4 dashes).

~/.config/ ?

Hi dude,
Suggest you to add instruction for Plank (the lower launcher) and add the ~/.config/ files and directories being used.

Thanks!
Dvir

Terminal issues

Hey there, first of all, thanks for this!

However, if I follow the guide I have this issue now, did I make some mistakes?

image

take care.

Terminal not working

Hi, I just intalled a new Parrot Os Mate and then I followed this tutorial, but I don't get the terminal to work, it only works one terminal at the time, with tmux I can only use one pane at the time. If I close that first terminal or the tmux session I don't get it to work again

Powershell Prompt

The powershell prompt is not customized like the bash prompt, I think this is a simple fix, Just take the following code and add it to root/tmp/powershell/Microsoft.PowerShell_profile.ps1 like in PwnBox

image

Here is what It should look like:
image

Here is the contents of the config file:

function vpnStats
{
    $htbip = (/opt/vpnbash.sh)
    if ($htbip -like '*10.*') {
        $vpnserver = (Get-Content /opt/vpnserver -First 1)
        return "`e[32m[`e[34m$vpnserver`e[32m]─[`e[37m$htbip`e[32m]─"
    } else {
        return ""
    }
}

function prompt
{
    Write-Host ("`e[1;32m┌─" + (vpnStats) + "`e[32m[`e[37m" + [Environment]::UserName + "`e[32m@`e[34m" + (hostname) + "`e[32m]─[`e[37m" + (Get-Location) + "`e[32m]")
    Write-Host ("`e[32m└──╼ [`e[34mPS`e[32m]>") -nonewline
    return " "
}

Hope this helps

Weird bash prompt

when i start the terminal without connecting to vpn my prompt look like this
local
and when i connected to vpn using systemctl start openvpn then my prompt looks like this
vpn
and my tmux looks more weirder
tmux

Pwnbox issue with theme

Hello , i just installed pwnbox , everything worked fine expect some thinks ... As you can see below missing lines on terminal and its not blue ,PS i have tried again to copy paste the bashrc

ParrotSec-2020-07-03-17-12-21

Updates

I enjoy this repo. Any updates ?

No Zsh Shell in kali

I followed the steps as mentioned int the readme.txt, I'm not getting the shell working once the openvpn is started
image

Openvpn .conf not found

When connected over a vpn the following error appears before by bash prompt, cat: '/etc/openvpn/*.conf': No such file or directory
image

To replicate the error I just followed all the instruction in the repo's readme

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.