XDG autostart desktop entry created or modified on Linux
Matches the file half of AN1096: an auditd PATH record naming a `.desktop` file inside one of the XDG autostart directories, which is where this technique plants the `Exec=` line the desktop session runs at every login. Both conditions are required in one selection — the directory alone matches icon caches and thumbnails a desktop environment writes beside its entries, and the `.desktop` suffix alone matches every application menu entry any package installs. The two directory values are the ones MITRE names, /etc/xdg/autostart for system-wide entries and the per-user ~/.config/autostart, and the user path is matched as a fragment because the home directory differs per account; MITRE's `AutostartDirectory` knob is the warning that $XDG_CONFIG_HOME can relocate that second directory entirely, in which case this selection has to be extended with the actual value in use. Four limits are structural. auditd records the file, never its content, so MITRE's `ExecCommandPattern` knob cannot be applied here at all — a hit says an autostart entry was written, not that it points anywhere suspicious. The second half of the analytic, execution of that Exec path shortly after logon within the `TimeWindow` knob, is a cross-event correlation and lib/sigma models no timeframe and no join. The writing process's `uid` and `auid` live on the SYSCALL record rather than the PATH record, so the `UserContext` knob cannot narrow this to interactive users inside the selection. And auditd records `name=` exactly as it was handed to the syscall, so an editor run from inside the autostart directory itself logs a bare filename with no directory to match on. Prerequisite: no distribution audits these paths by default, so the rule returns zero rows until watches are loaded — `-w /etc/xdg/autostart -p wa` and a per-user `-w /home/<user>/.config/autostart -p wa`, since a home-relative path cannot be watched generically — and zero rows reads as quiet when it actually means blind. The brief's linux/osquery and linux/auth sources are not attempted, because neither has standardised Sigma field names. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0390, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 3 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
Splunk · SPL
Run this as a search.
index=* (type="PATH" AND (name="*/etc/xdg/autostart/*" OR name="*/.config/autostart/*") AND name="*.desktop")Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE (TO_LOWER(type) == "path" AND (TO_LOWER(name) LIKE "*/etc/xdg/autostart/*" OR TO_LOWER(name) LIKE "*/.config/autostart/*") AND TO_LOWER(name) LIKE "*.desktop")
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,linux,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <rule id="100000" level="5"> <!-- Set <if_sid> to the decoder/base rule for linux so this only evaluates relevant events. --> <field name="type" type="pcre2">(?i)^PATH$</field> <field name="name" type="pcre2">(?i)(/etc/xdg/autostart/|/\.config/autostart/)</field> <field name="name" type="pcre2">(?i)\.desktop$</field> <description>XDG autostart desktop entry created or modified on Linux</description> <mitre> <id>T1547.013</id> </mitre> </rule></group>
Sentinel · KQL
Run this as a search.
Sentinel cannot express this construct. No Sentinel table is modelled for this logsource ({"product":"linux","service":"auditd"}), so there is nothing honest to query. Pick a logsource this translator maps, or write the KQL by hand. The Sigma source is on the first tab, unchanged.
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.