Detect packet capture libraries loaded outside a capture install
A socket filter backdoor on Windows has to obtain raw packet visibility before it can watch for its trigger packet, and the libpcap route to that is loading the user-mode capture libraries MITRE names in the analytic's CaptureLibIndicators knob. This rule matches Module Load events for wpcap.dll or packet.dll and subtracts only processes running from a standard capture install directory. The exclusion is anchored on the install path rather than on the file name because a name-only allowlist is defeated by `copy implant.exe C:\Users\Public\tshark.exe` and, worse, publishes the exact names an attacker should use; anchoring on the directory also picks up nping.exe and ncat.exe, which ship beside nmap.exe and load the same library. Two gaps to be plain about. The raw-socket route (SIO_RCVALL on an AF_INET SOCK_RAW, or a WFP callout) acquires the same capability with no capture DLL and produces no event here, and the driver arm of the same knob — npcap.sys and npf.sys on Sysmon EID 6 — is a different logsource and is not expressed in this rule. Nothing at this layer touches the BPF filter that defines the sub-technique, so every alert is a sniffing event (T1040) of which a socket filter backdoor is a subset; the trigger-to-callback correlation that would separate them needs a join and a timer that Sigma has no construct for. UNVERIFIED — derived from MITRE ATT&CK DET0162 and never executed against logs.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 ((FolderPath endswith "\\wpcap.dll" or FolderPath endswith "\\packet.dll") and not ((InitiatingProcessFolderPath startswith "C:\\Program Files\\Wireshark\\" or InitiatingProcessFolderPath startswith "C:\\Program Files (x86)\\Wireshark\\" or InitiatingProcessFolderPath startswith "C:\\Program Files\\Npcap\\" or InitiatingProcessFolderPath startswith "C:\\Program Files (x86)\\Npcap\\" or InitiatingProcessFolderPath startswith "C:\\Program Files\\Nmap\\" or InitiatingProcessFolderPath startswith "C:\\Program Files (x86)\\Nmap\\" or InitiatingProcessFolderPath startswith "C:\\Windows\\System32\\Npcap\\")))
Splunk · SPL
Run this as a search.
index=* ((ImageLoaded="*\\wpcap.dll" OR ImageLoaded="*\\packet.dll") AND NOT ((Image="C:\\Program Files\\Wireshark\\*" OR Image="C:\\Program Files (x86)\\Wireshark\\*" OR Image="C:\\Program Files\\Npcap\\*" OR Image="C:\\Program Files (x86)\\Npcap\\*" OR Image="C:\\Program Files\\Nmap\\*" OR Image="C:\\Program Files (x86)\\Nmap\\*" OR Image="C:\\Windows\\System32\\Npcap\\*")))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((TO_LOWER(file.path) LIKE "*\\\\wpcap.dll" OR TO_LOWER(file.path) LIKE "*\\\\packet.dll") AND NOT ((TO_LOWER(process.executable) LIKE "c:\\\\program files\\\\wireshark\\\\*" OR TO_LOWER(process.executable) LIKE "c:\\\\program files (x86)\\\\wireshark\\\\*" OR TO_LOWER(process.executable) LIKE "c:\\\\program files\\\\npcap\\\\*" OR TO_LOWER(process.executable) LIKE "c:\\\\program files (x86)\\\\npcap\\\\*" OR TO_LOWER(process.executable) LIKE "c:\\\\program files\\\\nmap\\\\*" OR TO_LOWER(process.executable) LIKE "c:\\\\program files (x86)\\\\nmap\\\\*" OR TO_LOWER(process.executable) LIKE "c:\\\\windows\\\\system32\\\\npcap\\\\*")))
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="ImageLoaded" type="pcre2">(?i)(\\wpcap\.dll$|\\packet\.dll$)</field> <field name="Image" negate="yes" type="pcre2">(?i)(^C:\\Program Files\\Wireshark\\|^C:\\Program Files \(x86\)\\Wireshark\\|^C:\\Program Files\\Npcap\\|^C:\\Program Files \(x86\)\\Npcap\\|^C:\\Program Files\\Nmap\\|^C:\\Program Files \(x86\)\\Nmap\\|^C:\\Windows\\System32\\Npcap\\)</field> <description>Detect packet capture libraries loaded outside a capture install</description> <mitre> <id>T1205.002</id> <id>T1040</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.