> For the complete documentation index, see [llms.txt](https://notes.m4lwhere.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.m4lwhere.org/offensive/post-exploitation.md).

# Post Exploitation

Kill shell without saving history file

```bash
kill -9 $$        # The $$ var always returns the PID of running shell
HISTSIZE=0        # Prevent system from storing any entered commands
PATH=$PATH:/root/newhackingtool    # Adds new folder to path, preserves existing path
shred -f -n 10 /var/log/auth.log.*    # shread all auth logs ten times :)
service rsyslog stop    # disable all system logging
```
