-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty /etc/passwd after auto escalation #173
Comments
Issue seems to be that LinuxWriter doesn't respect the payloads encoding type.
This fails since it will try to send the plaintext file to the stdin of the command |
@WesVleuten thanks for the live-action The developers are out of the metaphorical office for the time being. It may be a few days for them to get back and be recharged to resolve this. |
That's no problem! I already looked into it and created #176 which resolves this. So when they get back, they would only need to review the changes! |
This is very unfortunate, and I'm sorry that this happened during a stream D: hahaha Thanks for reporting, and hopefully we can get that fix or a similar fix sorted in the next couple days. As @trevorbryant mentioned, we've been at DEFCON the past week, but hopefully getting back into the swing of things soon. |
I've created a new branch to work on this. I'm working to remove all remnants of the |
Bug Description
Pwncat cleared the /etc/passwd file
pwncat version
Target System (aka "victim")
Peak Hill
Steps to Reproduce
Using
gASVLQAAAAAAAACMBXBvc2l4lIwGc3lzdGVtlJOUjBJjaG1vZCArcyAvYmluL2Jhc2iUhZRSlC4=
as payload for the privesc located at /opt/peak_hill_farm/peak_hill_farm we make the bash file a suid.Then we run on local shell
run enumerate.gather clear=True
to clear our local cache to enable auto escalation.Afterwards we run
run enumerate.gather
to try and get the suid file in pwncat's cacheRunning
escalate list
gives the following:This would suggest we are able to get a root shell. Thus we run
escalate run
resulting in an empty /etc/passwdExpected Behavior
For it to give me root bash shell and not clear out the /etc/passwd file
I think adding a priority to a route to root would be helpful. I think it goes down the list in order, however getting a shell through bash would be much easier and less noisy than getting it through a new user via writing to /etc/passwd. Thus "shell as root via /bin/bash" should be higher priority than "add user using file write as root"
Screenshot
Don't have a screenshot but I did this live on twitch vod is here:
https://www.twitch.tv/videos/1109027911?t=03h33m34s
The text was updated successfully, but these errors were encountered: