T1547.013 XDG Autostart Entries
Adversaries may add or modify XDG Autostart Entries to execute malicious programs or commands when a user’s desktop environment is loaded at login. XDG Autostart entries are available for any XDG-compliant Linux system. XDG Autostart entries use Desktop Entry files (.desktop) to configure the user’s desktop environment upon user login. These configuration files determine what applications launch upon user login, define associated applications to open specific file types, and define applications used to open removable media.12
Adversaries may abuse this feature to establish persistence by adding a path to a malicious binary or command to the Exec directive in the .desktop configuration file. When the user’s desktop environment is loaded at user login, the .desktop files located in the XDG Autostart directories are automatically executed. System-wide Autostart entries are located in the /etc/xdg/autostart directory while the user entries are located in the ~/.config/autostart directory.
Adversaries may combine this technique with Masquerading to blend malicious Autostart entries with legitimate programs.3
| Item | Value |
|---|---|
| ID | T1547.013 |
| Sub-techniques | T1547.001, T1547.002, T1547.003, T1547.004, T1547.005, T1547.006, T1547.007, T1547.008, T1547.009, T1547.010, T1547.012, T1547.013, T1547.014, T1547.015 |
| Tactics | TA0003, TA0004 |
| Platforms | Linux |
| Version | 1.2 |
| Created | 10 September 2019 |
| Last Modified | 24 October 2025 |
Procedure Examples
| ID | Name | Description |
|---|---|---|
| G1052 | Contagious Interview | Contagious Interview has established persistence using InvisibleFerret malware to create a .desktop entry to run on startup on GNOME-based Linux devices.5 |
| S0235 | CrossRAT | CrossRAT can use an XDG Autostart to establish persistence.3 |
| S0410 | Fysbis | If executing without root privileges, Fysbis adds a .desktop configuration file to the user’s ~/.config/autostart directory.37 |
| S1245 | InvisibleFerret | InvisibleFerret has established persistence within GNOME-based Linux environments by placing entries within .desktop that run on Startup.5 |
| S0198 | NETWIRE | NETWIRE can use XDG Autostart Entries to establish persistence on Linux systems.4 |
| S0192 | Pupy | Pupy can use an XDG Autostart to establish persistence.3 |
| S1078 | RotaJakiro | When executing with user-level permissions, RotaJakiro can install persistence using a .desktop file under the $HOME/.config/autostart/ folder.6 |
Mitigations
| ID | Mitigation | Description |
|---|---|---|
| M1033 | Limit Software Installation | Restrict software installation to trusted repositories only and be cautious of orphaned software packages. |
| M1022 | Restrict File and Directory Permissions | Restrict write access to XDG autostart entries to only select privileged users. |
| M1018 | User Account Management | Limit privileges of user accounts so only authorized privileged users can create and modify XDG autostart entries. |
References
-
Free Desktop. (2006, February 13). Desktop Application Autostart Specification. Retrieved September 12, 2019. ↩
-
Free Desktop. (2017, December 24). Recognized Desktop Entry Keys. Retrieved November 17, 2024. ↩
-
TONY LAMBERT. (2022, June 7). Trapping the Netwire RAT on Linux. Retrieved September 28, 2023. ↩↩↩↩
-
Lambert, T. (2020, January 29). Intro to Netwire. Retrieved January 7, 2021. ↩
-
Seongsu Park. (2024, November 4). From Pyongyang to Your Payroll: The Rise of North Korean Remote Workers in the West. Retrieved October 17, 2025. ↩↩
-
Alex Turing, Hui Wang. (2021, April 28). RotaJakiro: A long live secret backdoor with 0 VT detection. Retrieved June 14, 2023. ↩
-
Doctor Web. (2014, November 21). Linux.BackDoor.Fysbis.1. Retrieved December 7, 2017. ↩