HackersVsHackers
Deep Enumeration - pkill Privilege Escalation
Initial Access
Only two ports were open -
HTTP
andSSH
Bruteforcing the Directory on port 80 gives us ->
/upload.php
,/cvs
,/icons
,/dist
The
upload.php
has a filtering code in the backendWhen we try to upload a
.php
file, it restricts us with the!strpos
function which filters the file name should end with.pdf
Even when we try to upload a shell using
.pdf
extension, it doesn't work -> Enumeration Required !Reading the php filtering code, we get to know all the file uploaded will be stored in
/cvs
directoryBruteforcing that directory with extensions like
.pdf.php
,.php.pdf
gives us ->/shell.pdf.php
Visiting that, returns a page with
boom !
Appending
?cmd=
to that url gives us a RCENavigating through home directory gives us the
user flag
Privilege Escalation
Diggin more into the home directory gives us the SSH credentials
The cronjob tells us that the
pkill
program runs asroot
Modify the
pkill
file and set back a listener to get the root shell
Last updated