# Cron Jobs

`ps -aux | grep cron`

or

`cat /etc/crontab`

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

```
* * * * * comando_a_ejecutar
- - - - -
| | | | |
| | | | +--- Día de la semana (0 - 7, donde 0 y 7 son domingo)
| | | +----- Mes (1 - 12)
| | +------- Día del mes (1 - 31)
| +--------- Hora (0 - 23)
+----------- Minuto (0 - 59)
```

Ejemplo de explotación:

El script backup.sh fue configurado para ejecutarse cada minuto (en la captura). Vemos su contenido:

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

Podemos modificar el contenido y dar **permiso +x**

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

<figure><img src="/files/aqFuCheausgbhZk18tFx" 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://eldeim.gitbook.io/brain_fuck/notes/linux-hardening/privilege-escalation-linux/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.
