Hackme1
Hackme 1 Vulnhub Walkthrough
Enumeration
nmap
Dirb
Let's put the IP to the web browser
Got a login form
Then I click sign up now
After making an account and log in
Exploitation
SQL injection
I tried few tries of SQL injection and successfully got 1 injection using this command
Then I open up Burp and intercept the welcome.php page and send it to repeater.
Then I tried using UNION SELECT and test how many tables are available
The query make a response to us and it has 3 databases
Then I use this query to extract all the database name
We got few here to see what inside.
After extracting every databases, I found out that database that have interesting tables is webapphacking by usinig this query
2 table has been found which is books
and users
After that, I extract both tables together using this query
Got a lot of things, let's copy it and put it inside a file
Then we can use sed
to replace the comma to newline which the command looks like this
Then we can extract each of the columns name, found out the most interesting one is user
and password
Then we got a very long result from the query, copy it to a file and use sed
command to separate it properly
John
As we can see it is all md5 hash so we can put it to this website to crack cause john is cracking way too slow!
Then we can log in with the superadmin
account
Got a website that leads us to upload a file
Reverse Shell
We can go to this website and grab the php reverse shell file
Then, we need to change the IP and the port inside the file
After that, upload to the server
Then, we go to the /upload
directory that we discovered using dirb
just now
First, we need to set up a listener at our machine
Our machine
As we can see here we got a file, click the reverseShell file
Privilege Escalation
Go to the /home/legacy directory and we can see a file called touchmenot
run the file and you will get root !
Congratulation !
Last updated