Dawn
Last updated
Last updated
On port 445 we are able to list shares without credentials. We see the share ITDEPT is open to us.
Connecting then directly to the ITDEPT share.
I then used curl
to test for file upload on the share and confirmed was able to upload a PHP reverse shell which might come in handy for later.
Running dirsearch.py
on port 80 reveals two interesting directories.
Moving into logs shows the a list of logs where management.log is the only one we have permission to access
When reading the log file we have the lines below appearing frequently.
Knowing that we have write access to the ITDEPT share we can upload a reverse shell call it web-control and in theory this should execute.
Firstly I created a file called web-control and inserted a netcat
reverse shell into it
This was then uploaded to the SMB share.
After doing so I soon receive a shell back on my netcat
listener.
Then we can upgrade the shell to something nicer.
After doing so I then transferred over linpeas
from my attacking machine by uploading to SMB. After running linpeas we identify the binary zsh
as having the SUID bit set.
As zsh
is a shell binary all we need to do is execute the full path of zsh
to gain a root shell.