Compression library loaded by a script host or LOLBin
Takes the module-load leg of MITRE's AN0747 — a compression or archiving library mapped into a script interpreter or a signed LOLBin host — which is what separates archiving via library from archiving via utility, and therefore what separates this rule from the published T1560.001 rule: that one matches process_creation on an archiver binary and a verb, this one never looks at a command line and never matches an archiver at all. The library list is authored here rather than taken from MITRE, whose MonitoredLibraries and LibraryAllowlist knobs name the tuning point but no values, and it includes the Python extension modules on purpose, because CPython compiles zlib into the interpreter's own DLL so the most common Python archiving path — zipfile over zlib — produces no separate module load and is invisible here, while bz2 and lzma still surface as _bz2.pyd and _lzma.pyd. A module load says a library was mapped, not what it was used for, so decompression and archive extraction are indistinguishable from archive creation on this event, and the file-creation leg of the analytic that would settle it is a separate log source. Sysmon EventID 7 is off in the configuration Sysmon ships and is filtered down hard in the common community configurations, so without an explicit include for these DLLs the rule returns zero rows regardless of what ran. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0268, 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.
DeviceImageLoadEvents| where ((InitiatingProcessFolderPath endswith "\\powershell.exe" or InitiatingProcessFolderPath endswith "\\pwsh.exe" or InitiatingProcessFolderPath endswith "\\python.exe" or InitiatingProcessFolderPath endswith "\\pythonw.exe" or InitiatingProcessFolderPath endswith "\\wscript.exe" or InitiatingProcessFolderPath endswith "\\cscript.exe" or InitiatingProcessFolderPath endswith "\\mshta.exe" or InitiatingProcessFolderPath endswith "\\rundll32.exe" or InitiatingProcessFolderPath endswith "\\regsvr32.exe") and (FolderPath endswith "\\zlib1.dll" or FolderPath endswith "\\zlibwapi.dll" or FolderPath endswith "\\libzip.dll" or FolderPath endswith "\\libbz2.dll" or FolderPath endswith "\\bz2.dll" or FolderPath endswith "\\7z.dll" or FolderPath endswith "\\7za.dll" or FolderPath endswith "\\Ionic.Zip.dll" or FolderPath endswith "\\SharpCompress.dll" or FolderPath endswith "\\System.IO.Compression.dll" or FolderPath endswith "\\System.IO.Compression.Native.dll" or FolderPath endswith "\\clrcompression.dll" or FolderPath endswith "\\_bz2.pyd" or FolderPath endswith "\\_lzma.pyd"))
Splunk · SPL
Run this as a search.
index=* ((Image="*\\powershell.exe" OR Image="*\\pwsh.exe" OR Image="*\\python.exe" OR Image="*\\pythonw.exe" OR Image="*\\wscript.exe" OR Image="*\\cscript.exe" OR Image="*\\mshta.exe" OR Image="*\\rundll32.exe" OR Image="*\\regsvr32.exe") AND (ImageLoaded="*\\zlib1.dll" OR ImageLoaded="*\\zlibwapi.dll" OR ImageLoaded="*\\libzip.dll" OR ImageLoaded="*\\libbz2.dll" OR ImageLoaded="*\\bz2.dll" OR ImageLoaded="*\\7z.dll" OR ImageLoaded="*\\7za.dll" OR ImageLoaded="*\\Ionic.Zip.dll" OR ImageLoaded="*\\SharpCompress.dll" OR ImageLoaded="*\\System.IO.Compression.dll" OR ImageLoaded="*\\System.IO.Compression.Native.dll" OR ImageLoaded="*\\clrcompression.dll" OR ImageLoaded="*\\_bz2.pyd" OR ImageLoaded="*\\_lzma.pyd"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((TO_LOWER(process.executable) LIKE "*\\\\powershell.exe" OR TO_LOWER(process.executable) LIKE "*\\\\pwsh.exe" OR TO_LOWER(process.executable) LIKE "*\\\\python.exe" OR TO_LOWER(process.executable) LIKE "*\\\\pythonw.exe" OR TO_LOWER(process.executable) LIKE "*\\\\wscript.exe" OR TO_LOWER(process.executable) LIKE "*\\\\cscript.exe" OR TO_LOWER(process.executable) LIKE "*\\\\mshta.exe" OR TO_LOWER(process.executable) LIKE "*\\\\rundll32.exe" OR TO_LOWER(process.executable) LIKE "*\\\\regsvr32.exe") AND (TO_LOWER(file.path) LIKE "*\\\\zlib1.dll" OR TO_LOWER(file.path) LIKE "*\\\\zlibwapi.dll" OR TO_LOWER(file.path) LIKE "*\\\\libzip.dll" OR TO_LOWER(file.path) LIKE "*\\\\libbz2.dll" OR TO_LOWER(file.path) LIKE "*\\\\bz2.dll" OR TO_LOWER(file.path) LIKE "*\\\\7z.dll" OR TO_LOWER(file.path) LIKE "*\\\\7za.dll" OR TO_LOWER(file.path) LIKE "*\\\\ionic.zip.dll" OR TO_LOWER(file.path) LIKE "*\\\\sharpcompress.dll" OR TO_LOWER(file.path) LIKE "*\\\\system.io.compression.dll" OR TO_LOWER(file.path) LIKE "*\\\\system.io.compression.native.dll" OR TO_LOWER(file.path) LIKE "*\\\\clrcompression.dll" OR TO_LOWER(file.path) LIKE "*\\\\_bz2.pyd" OR TO_LOWER(file.path) LIKE "*\\\\_lzma.pyd"))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,image_load,"> <!-- 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="Image" type="pcre2">(?i)(\\powershell\.exe$|\\pwsh\.exe$|\\python\.exe$|\\pythonw\.exe$|\\wscript\.exe$|\\cscript\.exe$|\\mshta\.exe$|\\rundll32\.exe$|\\regsvr32\.exe$)</field> <field name="ImageLoaded" type="pcre2">(?i)(\\zlib1\.dll$|\\zlibwapi\.dll$|\\libzip\.dll$|\\libbz2\.dll$|\\bz2\.dll$|\\7z\.dll$|\\7za\.dll$|\\Ionic\.Zip\.dll$|\\SharpCompress\.dll$|\\System\.IO\.Compression\.dll$|\\System\.IO\.Compression\.Native\.dll$|\\clrcompression\.dll$|\\_bz2\.pyd$|\\_lzma\.pyd$)</field> <description>Compression library loaded by a script host or LOLBin</description> <mitre> <id>T1560.002</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.