Application binary rewritten outside a package installer
Matches an executable or DLL under Program Files being created or overwritten by a process other than a recognised installer or servicing component — the file-write half of AN1097's "application binaries used to display data" behaviour. AN1097 also asks for API-hooking detection and hash-baseline comparison, but neither produces a discrete Sigma-expressible event, so only the write itself is captured. This is deliberately not the parent T1565's shape, which watches a *data* file (database, ledger) written by a script host; T1565.003 targets the rendering application's own binary, which is what separates Runtime from Stored Data Manipulation. Written in the Sysmon EventID 11 vocabulary (`TargetFilename`, `Image`) rather than AN1097's Security EventID 4657 or Sysmon EventID 15 alternatives, which carry the same fact through different fields this rule does not map. MITRE's `MonitoredPaths` knob is approximated here as Program Files; the installer allowlist is authored, not sourced, and MITRE's `HashBaseline` knob — a binary-integrity comparison — has no Sigma equivalent, so a match means "written by an unexpected process," not "content diverged from baseline." UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0391, 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.
DeviceFileEvents| where (((FolderPath contains "\\Program Files\\" or FolderPath contains "\\Program Files (x86)\\") and (FolderPath endswith ".exe" or FolderPath endswith ".dll")) and not ((InitiatingProcessFolderPath endswith "\\msiexec.exe" or InitiatingProcessFolderPath endswith "\\TrustedInstaller.exe" or InitiatingProcessFolderPath endswith "\\TiWorker.exe" or InitiatingProcessFolderPath endswith "\\wusa.exe" or InitiatingProcessFolderPath endswith "\\setup.exe")))
Splunk · SPL
Run this as a search.
index=* (((TargetFilename="*\\Program Files\\*" OR TargetFilename="*\\Program Files (x86)\\*") AND (TargetFilename="*.exe" OR TargetFilename="*.dll")) AND NOT ((Image="*\\msiexec.exe" OR Image="*\\TrustedInstaller.exe" OR Image="*\\TiWorker.exe" OR Image="*\\wusa.exe" OR Image="*\\setup.exe")))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE (((TO_LOWER(file.path) LIKE "*\\\\program files\\\\*" OR TO_LOWER(file.path) LIKE "*\\\\program files (x86)\\\\*") AND (TO_LOWER(file.path) LIKE "*.exe" OR TO_LOWER(file.path) LIKE "*.dll")) AND NOT ((TO_LOWER(process.executable) LIKE "*\\\\msiexec.exe" OR TO_LOWER(process.executable) LIKE "*\\\\trustedinstaller.exe" OR TO_LOWER(process.executable) LIKE "*\\\\tiworker.exe" OR TO_LOWER(process.executable) LIKE "*\\\\wusa.exe" OR TO_LOWER(process.executable) LIKE "*\\\\setup.exe")))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,file_event,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <rule id="100000" level="7"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="TargetFilename" type="pcre2">(?i)(\\Program Files\\|\\Program Files \(x86\)\\)</field> <field name="TargetFilename" type="pcre2">(?i)(\.exe$|\.dll$)</field> <field name="Image" negate="yes" type="pcre2">(?i)(\\msiexec\.exe$|\\TrustedInstaller\.exe$|\\TiWorker\.exe$|\\wusa\.exe$|\\setup\.exe$)</field> <description>Application binary rewritten outside a package installer</description> <mitre> <id>T1565.003</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.