Detection rules › Splunk

MS Scripting Process Loading WMI Module

Author
Teoderick Contreras, Splunk
Source
upstream

The following analytic detects the loading of WMI modules by Microsoft scripting processes like wscript.exe or cscript.exe. It leverages Sysmon EventCode 7 to identify instances where these scripting engines load specific WMI-related DLLs. This activity is significant because it can indicate the presence of malware, such as the FIN7 implant, which uses JavaScript to execute WMI queries for gathering host information to send to a C2 server. If confirmed malicious, this behavior could allow attackers to collect sensitive system information and maintain persistence within the environment.

MITRE ATT&CK coverage

TacticTechniques
ExecutionT1059.007 Command and Scripting Interpreter: JavaScript

Event coverage

ProviderEvent IDTitle
Sysmon7Image loaded

Stages and Predicates

Stage 1: search

search EventCode=7 Image IN ("*\\cscript.exe", "*\\wscript.exe") ImageLoaded IN ("*\\fastprox.dll", "*\\wbemcomn.dll", "*\\wbemdisp.dll", "*\\wbemprox.dll", "*\\wbemsvc.dll", "*\\wmiutils.dll")

Stage 2: fillnull

fillnull

Stage 3: stats

stats BY Image, ImageLoaded, dest, loaded_file, loaded_file_path, original_file_name, process_exec, process_guid, process_hash, process_id, process_name, process_path, service_dll_signature_exists, service_dll_signature_verified, signature, signature_id, user_id, vendor_product

Stage 4: search

search

Stage 5: search

search

Stage 6: search

search `macro`

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
EventCodeeq
  • 7 corpus 35 (splunk 35)
Imagein
  • "*\\cscript.exe" corpus 2 (splunk 2)
  • "*\\wscript.exe" corpus 2 (splunk 2)
ImageLoadedin
  • "*\\fastprox.dll" corpus 2 (splunk 2)
  • "*\\wbemcomn.dll" corpus 2 (splunk 2)
  • "*\\wbemdisp.dll"
  • "*\\wbemprox.dll" corpus 2 (splunk 2)
  • "*\\wbemsvc.dll"
  • "*\\wmiutils.dll"

Neighbors

Broader alternatives (more inclusive than this rule)

These rules match a superset of what this rule catches. They cover the same events plus more. Use them if you want wider coverage and can absorb more false positives.