Skip to content

Commit

Permalink
Update linux-privesc.md
Browse files Browse the repository at this point in the history
  • Loading branch information
740i authored Jun 1, 2019
1 parent 6219d88 commit fc210be
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions linux-privesc.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
A checklist for linux privesc. Might be missing lots of things. Is mostly taken from https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/

Do you have an actual shell? To do tab completion check Ippsec videos for a quick reminder.
https://www.youtube.com/channel/UCa6eh7gCkpPo5XXUDfygQQA
Do you have a decent shell?
```
python -c 'import pty;pty.spawn("/bin/bash")'
python3 -c 'import pty;pty.spawn("/bin/bash")'
echo os.system('/bin/bash')
/bin/sh -i
```
Then do ctrl+z to background it, type ```stty raw -echo``` and fg it for a real working shell.
To get tab completion working
```
ctrl+z
echo $TERM && tput lines && tput cols
stty raw -echo
fg
reset
export SHELL=bash (screen when running tmux)
export TERM=xterm-256color
stty rows <num> columns <cols>
```
or use Socat for a full reverse tty
```
socat file:`tty`,raw,echo=0 tcp-listen:12345
```


### Initial Recon
Start by checking the version and distro of the machine for possible kernel exploits, and also the sudo permissions of whatever account you have if possible.
Expand Down

0 comments on commit fc210be

Please sign in to comment.