Hello,
We are going to exploit one of OffSec Proving Grounds Medium machines which called HAwordy
and this post is not a fully detailed walkthrough, I will just go through the important points during the exploit process.
Enumeration:
Nmap:
Using
wpscan
against wordpress running on port80
, path/wordpress
:The Exploit:
phtml file to upload:
- RCE:
Privilege Escalation:
the wget binary on the system has the SUID bit:
we can add our root user to the system by overwriting
/etc/passwd
file using wget:copying
/etc/passwd
file to our attack machine.creating new user named
bingo
with passwordpwned
usingopenssl
:adding the new user to the downloaded
passwd
file:uploading the new
passwd
file to the target machine and overwriting the remote/etc/passwd
using wget:
Happy Hacking!
Comments powered by Disqus.