> For the complete documentation index, see [llms.txt](https://malfav.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malfav.gitbook.io/home/malware-technique/persistence-mechanism/startup-folder.md).

# Startup Folder

The Startup folder is a specific location in Windows where programs and shortcuts can be placed to automatically run when a user logs into the system. Malware can exploit this folder for persistence, ensuring that it runs every time the user starts their session. Here's a detailed overview:

#### **Location of Startup Folders**

1. **For All Users:**
   * **Path:** `%ProgramData%\Microsoft\Windows\Start Menu\Programs\StartUp`
   * **Location:** This folder affects all users on the system. Any shortcut or executable placed here will run for every user who logs in.
2. **For Current User:**
   * **Path:** `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup`
   * **Location:** This folder is specific to the currently logged-in user. Programs or shortcuts placed here will only run when this particular user logs in.

#### **How Malware Uses the Startup Folder**

* **Placing Shortcuts:** Malware often creates a shortcut to its executable in one of these Startup folders. This method ensures that the malware executable is launched automatically each time the user logs in.
* **Creating Executables:** Less common but more direct, malware might drop an executable directly into the Startup folder. While this method is less discreet, it is sometimes used to ensure execution.

#### **Detection and Mitigation**

1. **Detection:**
   * **Manually Checking the Startup Folder:**
     * Open File Explorer and navigate to the respective Startup folder paths.
     * Look for any unfamiliar or suspicious shortcuts or executables.
   * **Using Tools:**
     * **Task Manager**: Go to the `Startup` tab to view and manage startup applications.
     * **Autoruns**: Sysinternals' Autoruns tool provides a comprehensive view of all startup locations, including Startup folders, and allows for easy management of startup entries.
2. **Mitigation:**
   * **Regular Audits**: Periodically review the contents of both Startup folders for any unauthorized or suspicious items.
   * **Restrict Permissions**: Limit user permissions to prevent unauthorized modification of the Startup folders.
   * **Use Antivirus/Antimalware**: Ensure that you have up-to-date antivirus or antimalware solutions that can detect and remove malicious entries from Startup folders.

The Startup folder is a straightforward yet effective method for malware to achieve persistence, and regular monitoring and management are crucial for maintaining system security.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://malfav.gitbook.io/home/malware-technique/persistence-mechanism/startup-folder.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
