Gallery

Room Link: https://tryhackme.com/room/gallery666

Initial Scan

Kali

nmap -A $VICTIM

Scan all ports

No other ports found

Kali

TCP/80 - HTTP

Kali

TCP/8080 - HTTP

Kali

TCP/80 - HTTP

SQL Injection

SQL injection worked on username field

We found two databases

Kali

Get tables

Kali

Get fields for table users

Kali

Get values of the username and password fields. I couldn't crack the hash.

Kali

Initial Shell

I was able to upload a php reverse shell instead of an image

Kali

revshell.php code

Get autocomplete

We found a list of passwords from mike in a file called accounts and another password in history

Victim

Privilege Escalation

Exploit: https://gtfobins.github.io/gtfobins/nano/

mike is able to run a script with NOPASSWD, looking at the script it, there are a few options to select. One option is to run nano which we can use to get sudo. I also noticed my terminal would not open nano so I exported xterm

Victim

Victim

Last updated