Executable or script written to a user-facing network share
Matches the file-drop half of AN1298 on the server side: a detailed file-share access check in which the requested access includes write or append and the target file inside the share carries an executable, script or shortcut extension. The rule is written in the native Security 5145 vocabulary (`ShareName`, `RelativeTargetName`, `AccessList`), not the Sysmon-shaped `file_event` vocabulary the brief also offers, because Sysmon EventID 11 records the path as the writing host sees it — a drive letter on the client, a local path on the file server — so a share-path gate on `TargetFilename` is unreliable in both places; using that feed instead would need a field mapping first. Administrative, IPC and printer-driver shares are excluded so the rule stays on shares users actually browse, and the logon-script shares are excluded because tampering there is T1037. Two honest limits: 5145 records the access the client *requested* at the share check, not a completed write, and the extension list only sees whole files dropped in — a macro appended to an existing .xlsm on the share produces the same 5145 record as any other write. The access check is written twice over because collectors disagree on the value: the raw event data carries the unresolved message-table codes `%%4417`/`%%4418`, while any collector that resolves message strings writes the same access as `WriteData (or AddFile)` / `AppendData (or AddSubdirectory)` — matching only the codes would silently miss every estate on the resolved form. Confirm which form your pipeline stores, and that it names the field `AccessList` at all, before trusting the result. The MITRE `SharedPathPrefix` knob is deliberately left unpopulated here so the rule is not silently scoped to one site's share names; adding a positive `ShareName` gate is the first tuning step. Security 5145 requires the *Audit Detailed File Share* subcategory, which is off by default and absent from the Microsoft and CIS baselines — with it off this rule returns zero rows, and zero rows here means blind, not quiet. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0471, 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 4 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
Sentinel · KQL
Run this as a search.
SecurityEvent| where ((EventID == 5145 and (AccessList contains "%%4417" or AccessList contains "%%4418" or AccessList contains "WriteData" or AccessList contains "AppendData") and (RelativeTargetName endswith ".lnk" or RelativeTargetName endswith ".url" or RelativeTargetName endswith ".exe" or RelativeTargetName endswith ".dll" or RelativeTargetName endswith ".scr" or RelativeTargetName endswith ".msi" or RelativeTargetName endswith ".bat" or RelativeTargetName endswith ".cmd" or RelativeTargetName endswith ".ps1" or RelativeTargetName endswith ".vbs" or RelativeTargetName endswith ".vbe" or RelativeTargetName endswith ".js" or RelativeTargetName endswith ".jse" or RelativeTargetName endswith ".wsf" or RelativeTargetName endswith ".hta" or RelativeTargetName endswith ".jar" or RelativeTargetName endswith ".chm" or RelativeTargetName endswith ".iso")) and not ((ShareName endswith "\\ADMIN$" or ShareName endswith "\\IPC$" or ShareName endswith "\\C$" or ShareName endswith "\\D$" or ShareName endswith "\\E$" or ShareName endswith "\\print$" or ShareName endswith "\\NETLOGON" or ShareName endswith "\\SYSVOL")))
Splunk · SPL
Run this as a search.
index=* ((EventID="5145" AND (AccessList="*%%4417*" OR AccessList="*%%4418*" OR AccessList="*WriteData*" OR AccessList="*AppendData*") AND (RelativeTargetName="*.lnk" OR RelativeTargetName="*.url" OR RelativeTargetName="*.exe" OR RelativeTargetName="*.dll" OR RelativeTargetName="*.scr" OR RelativeTargetName="*.msi" OR RelativeTargetName="*.bat" OR RelativeTargetName="*.cmd" OR RelativeTargetName="*.ps1" OR RelativeTargetName="*.vbs" OR RelativeTargetName="*.vbe" OR RelativeTargetName="*.js" OR RelativeTargetName="*.jse" OR RelativeTargetName="*.wsf" OR RelativeTargetName="*.hta" OR RelativeTargetName="*.jar" OR RelativeTargetName="*.chm" OR RelativeTargetName="*.iso")) AND NOT ((ShareName="*\\ADMIN$" OR ShareName="*\\IPC$" OR ShareName="*\\C$" OR ShareName="*\\D$" OR ShareName="*\\E$" OR ShareName="*\\print$" OR ShareName="*\\NETLOGON" OR ShareName="*\\SYSVOL")))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((event.code == 5145 AND (TO_LOWER(AccessList) LIKE "*%%4417*" OR TO_LOWER(AccessList) LIKE "*%%4418*" OR TO_LOWER(AccessList) LIKE "*writedata*" OR TO_LOWER(AccessList) LIKE "*appenddata*") AND (TO_LOWER(RelativeTargetName) LIKE "*.lnk" OR TO_LOWER(RelativeTargetName) LIKE "*.url" OR TO_LOWER(RelativeTargetName) LIKE "*.exe" OR TO_LOWER(RelativeTargetName) LIKE "*.dll" OR TO_LOWER(RelativeTargetName) LIKE "*.scr" OR TO_LOWER(RelativeTargetName) LIKE "*.msi" OR TO_LOWER(RelativeTargetName) LIKE "*.bat" OR TO_LOWER(RelativeTargetName) LIKE "*.cmd" OR TO_LOWER(RelativeTargetName) LIKE "*.ps1" OR TO_LOWER(RelativeTargetName) LIKE "*.vbs" OR TO_LOWER(RelativeTargetName) LIKE "*.vbe" OR TO_LOWER(RelativeTargetName) LIKE "*.js" OR TO_LOWER(RelativeTargetName) LIKE "*.jse" OR TO_LOWER(RelativeTargetName) LIKE "*.wsf" OR TO_LOWER(RelativeTargetName) LIKE "*.hta" OR TO_LOWER(RelativeTargetName) LIKE "*.jar" OR TO_LOWER(RelativeTargetName) LIKE "*.chm" OR TO_LOWER(RelativeTargetName) LIKE "*.iso")) AND NOT ((TO_LOWER(ShareName) LIKE "*\\\\admin$" OR TO_LOWER(ShareName) LIKE "*\\\\ipc$" OR TO_LOWER(ShareName) LIKE "*\\\\c$" OR TO_LOWER(ShareName) LIKE "*\\\\d$" OR TO_LOWER(ShareName) LIKE "*\\\\e$" OR TO_LOWER(ShareName) LIKE "*\\\\print$" OR TO_LOWER(ShareName) LIKE "*\\\\netlogon" OR TO_LOWER(ShareName) LIKE "*\\\\sysvol")))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,"> <!-- 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 windows so this only evaluates relevant events. --> <field name="EventID" type="pcre2">(?i)^5145$</field> <field name="AccessList" type="pcre2">(?i)(%%4417|%%4418|WriteData|AppendData)</field> <field name="RelativeTargetName" type="pcre2">(?i)(\.lnk$|\.url$|\.exe$|\.dll$|\.scr$|\.msi$|\.bat$|\.cmd$|\.ps1$|\.vbs$|\.vbe$|\.js$|\.jse$|\.wsf$|\.hta$|\.jar$|\.chm$|\.iso$)</field> <field name="ShareName" negate="yes" type="pcre2">(?i)(\\ADMIN\$$|\\IPC\$$|\\C\$$|\\D\$$|\\E\$$|\\print\$$|\\NETLOGON$|\\SYSVOL$)</field> <description>Executable or script written to a user-facing network share</description> <mitre> <id>T1080</id> </mitre> </rule></group>
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.