# Startup Apps

### Overview

**Startup Applications** are programs or scripts configured to **automatically execute when Windows starts or when a user logs in**.

Privilege escalation becomes possible when:

* A **startup entry runs in a higher-privileged context** (Administrator or SYSTEM)
* And the **startup executable or script is writable** by a low-privileged user

### Common Startup Locations

```bash
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
C:\Windows\SYSVOL\domain\scripts
```

### Prerequisites

1. Local Low-Privileged Access
2. Startup Item Runs with Elevated Privileges
3. One of These Weaknesses
   * Writable startup executable
   * Writable startup directory
   * Writable registry startup key

### Steps

1. Identify startup entry:

   ```
   wmic startup get Caption,Command,User
   ```
2. Check File Permissions:

   ```
   icacls C:\ProgramData\App\update.exe
   ```
3. Replace Executable Payload
4. Wait for Restart / Logon


---

# 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://gokulkarthik.gitbook.io/pentesting-checklist/windows-and-active-directory/windows-privilege-escalation/startup-apps.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.
