# Insecure Scheduled Tasks

## Theory

In Windows, the [Task Scheduler](https://learn.microsoft.com/en-us/windows/win32/taskschd/about-the-task-scheduler) service allows to run automated tasks on a chosen computer. The tasks are used to run programms when a specific trigger occurs. Triggers work like conditions, triggering the execution of one or more actions when they are met. For example, a trigger can be temporal, linked to a particular date, launched when the system starts up, when the user logs on or in response to a Windows event.

If its misconfigured, it can be an interesting vector for privilege escalation.

## Practice

### Enumerate

{% content-ref url="/pages/uvpowoWsdqO5DZKWYIqG" %}
[Scheduled Tasks](/redteam/discovery/windows/scheduled-tasks.md)
{% endcontent-ref %}

### Exploit

{% content-ref url="/pages/qAcIv4W0MScGT988s5ZO" %}
[Weak File/Folder Permissions](/redteam/privilege-escalation/windows/insecure-scheduled-tasks/weak-file-folder-permissions.md)
{% endcontent-ref %}


---

# 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://red.infiltr8.io/redteam/privilege-escalation/windows/insecure-scheduled-tasks.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.
