Post

Sar

Description ⤵️

💡 Sar is an OSCP-Like VM with the intent of gaining experience in the world of penetration testing.

Let’s find the IP Address first »

Untitled

1
IP : 10.0.2.11

Port Scan Results ➡️

Untitled

1
2
OPEN PORTS ->
80  HTTP

Rustscan Results ⤵️

Untitled


Web Enumeration ⤵️

It is an Apache Server : →

After Directory / File Traversal I got this →

Untitled

Untitled


Now lets see if I can have an exploit about this page →

Untitled

Lets try this one →

Untitled

Now its time to upload reverse shell code as a command injection →

Untitled

Now in response I got the shell →

Untitled

Now lets dig deeper into the Local Privilege Escalation →

Untitled

user.txt → 427a7e47deb4a8649c7cab38df232b52

Now after some recon I got these files with different permissions →

Untitled

Lets check finally.sh file which is basically executing the write.sh file .

Untitled

Lets see write.sh file and lets upload a reverse shell code into this so that It can execute with the root permissions and I can have root shell !

Untitled

Now I have to wait for 2-3 or 5 min for the cronjob to execute this file finally.sh as root →

And At last I got it what I wanted →

Untitled

Lets check root.txt file in /root →

Untitled

root.txt → 66f93d6b2ca96c9ad78a8a9ba0008e99


If you have any questions or suggestions, please leave a comment below. Thank You !

This post is licensed under CC BY 4.0 by the author.