Detect COM registration utility running a user-writable assembly
Matches process creation of the .NET COM registration utilities where the command line points at an assembly under a user-writable directory or a UNC share — MITRE's AssemblyPathRegex knob from AN1028 made concrete. AN1028 describes a four-stage chain (assembly dropped, regsvcs/regasm executed, HKCR CLSID/ProgID writes during registration, then a child process or egress) correlated inside a 5–10 minute window; Sigma expresses no join and no timeframe, so this rule is stage two alone, narrowed by path so that it is not merely "a signed Microsoft binary ran". The last path entry is a literal double backslash, which matches a UNC source anywhere in the command line. The SuspiciousFlags knob (/u, /codebase, /regfile) is deliberately not ORed in: uninstallers use /u routinely, and a flag match would swamp the path match. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0361, 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
title: Detect COM registration utility running a user-writable assemblyid: a57469e6-4a78-4179-9b84-7f46a42ee664status: experimentaldescription: | Matches process creation of the .NET COM registration utilities where the command line points at an assembly under a user-writable directory or a UNC share — MITRE's AssemblyPathRegex knob from AN1028 made concrete. AN1028 describes a four-stage chain (assembly dropped, regsvcs/regasm executed, HKCR CLSID/ProgID writes during registration, then a child process or egress) correlated inside a 5–10 minute window; Sigma expresses no join and no timeframe, so this rule is stage two alone, narrowed by path so that it is not merely "a signed Microsoft binary ran". The last path entry is a literal double backslash, which matches a UNC source anywhere in the command line. The SuspiciousFlags knob (/u, /codebase, /regfile) is deliberately not ORed in: uninstallers use /u routinely, and a flag match would swamp the path match. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0361, not hand-written and not tested by its author. Any lab result is on this rule's own page.references: - https://attack.mitre.org/techniques/T1218/009 - https://attack.mitre.org/detectionstrategies/DET0361author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags: - attack.defense-evasion - attack.t1218.009logsource: category: process_creation product: windowsdetection: registration_utility: Image|endswith: - '\regsvcs.exe' - '\regasm.exe' untrusted_assembly_path: CommandLine|contains: - '\AppData\Local\Temp\' - '\AppData\Roaming\' - '\Downloads\' - '\Users\Public\' - '\Windows\Temp\' - '\ProgramData\' - '\\\\' condition: registration_utility and untrusted_assembly_pathfalsepositives: - "Software installers and MSI custom actions that stage a .NET assembly in %TEMP% or %ProgramData% and register it there. This is the exact shape the rule looks for; MITRE's ParentProcessAllowList knob is the discriminator, so add ParentImage exclusions for msiexec.exe and your packaging tooling rather than removing the path entries." - "Developer build and test loops. Visual Studio post-build steps and CI agents invoke regasm against assemblies in a working directory that frequently sits under %TEMP% or a mapped UNC build share, matching both selections dozens of times a day on engineering hosts." - "Deployment from a file server. Line-of-business applications installed straight off `\\server\\share` produce the UNC match, which is why MITRE pairs AssemblyPathRegex with KnownGoodAssemblies — pin the approved publisher or hash before this rule is usable in an estate that deploys over SMB."level: highSentinel · KQL
Run this as a search.
DeviceProcessEvents| where ((FolderPath endswith "\\regsvcs.exe" or FolderPath endswith "\\regasm.exe") and (ProcessCommandLine contains "\\AppData\\Local\\Temp\\" or ProcessCommandLine contains "\\AppData\\Roaming\\" or ProcessCommandLine contains "\\Downloads\\" or ProcessCommandLine contains "\\Users\\Public\\" or ProcessCommandLine contains "\\Windows\\Temp\\" or ProcessCommandLine contains "\\ProgramData\\" or ProcessCommandLine contains "\\\\"))
Splunk · SPL
Run this as a search.
index=* ((Image="*\\regsvcs.exe" OR Image="*\\regasm.exe") AND (CommandLine="*\\AppData\\Local\\Temp\\*" OR CommandLine="*\\AppData\\Roaming\\*" OR CommandLine="*\\Downloads\\*" OR CommandLine="*\\Users\\Public\\*" OR CommandLine="*\\Windows\\Temp\\*" OR CommandLine="*\\ProgramData\\*" OR CommandLine="*\\\\*"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((TO_LOWER(process.executable) LIKE "*\\\\regsvcs.exe" OR TO_LOWER(process.executable) LIKE "*\\\\regasm.exe") AND (TO_LOWER(process.command_line) LIKE "*\\\\appdata\\\\local\\\\temp\\\\*" OR TO_LOWER(process.command_line) LIKE "*\\\\appdata\\\\roaming\\\\*" OR TO_LOWER(process.command_line) LIKE "*\\\\downloads\\\\*" OR TO_LOWER(process.command_line) LIKE "*\\\\users\\\\public\\\\*" OR TO_LOWER(process.command_line) LIKE "*\\\\windows\\\\temp\\\\*" OR TO_LOWER(process.command_line) LIKE "*\\\\programdata\\\\*" OR TO_LOWER(process.command_line) LIKE "*\\\\\\\\*"))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,process_creation,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <rule id="100000" level="12"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="Image" type="pcre2">(?i)(\\regsvcs\.exe$|\\regasm\.exe$)</field> <field name="CommandLine" type="pcre2">(?i)(\\AppData\\Local\\Temp\\|\\AppData\\Roaming\\|\\Downloads\\|\\Users\\Public\\|\\Windows\\Temp\\|\\ProgramData\\|\\\\)</field> <description>Detect COM registration utility running a user-writable assembly</description> <mitre> <id>T1218.009</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.