HackMyVM
Enumeration
FTP
Connect to FTP using the default creds anonymous
and blank password
Get index.php, we can see it’s a LFI.
Log Poisoning
Testing the LFI, we have access to vsftpd logs /index.php?fil3=/var/log/vsftpd.log
We can poison this log with a malicious payload and get RCE
LFI → RCE
Go back to FTP
Go back to webserver and use the cmd
parameter to do a reverse shell
Reverse shell
Note:
If you having trouble with reverse shell, send this payload above to burp and encode with URL-Encode
User
On /opt
directory have a C script
This code it’s vulnerable to Buffer Overflow. Buffer the name
variable, we can overwrite the ls
variable and inject whatever command we want.
Sending 64 characters to name
we can start to overwrite ls
variable and send nc command to our machine
Root