FIN7 Use of WMIC for XSL Script Execution
The FIN7 threat group utilizes the Windows Management Instrumentation Command-line (WMIC) utility to execute arbitrary code by loading XSL files to bypass application whitelisting.
FIN7 has been observed leveraging the Windows Management Instrumentation Command-line (WMIC) utility as a mechanism for defense evasion and arbitrary code execution. By abusing the WMIC /format switch, an attacker can specify a malicious XSL (eXtensible Stylesheet Language) file to be processed. This technique allows for the execution of scripts or system commands embedded within the stylesheet, effectively bypassing traditional application whitelisting controls that may not scrutinize script processing initiated by legitimate system binaries like wmic.exe. This activity is a known component of the FIN7 toolkit and signifies a pivot point where an attacker transitions from initial delivery to host-based code execution. Defenders must monitor process creation events for command-line arguments that combine WMIC parameters with references to .xsl files.
Attack Chain
- Attacker gains initial access to a target system via a secondary vector such as phishing.
- Attacker drops a malicious XSL file onto the local disk or identifies a remote URL hosting the stylesheet.
- Attacker executes wmic.exe with the "os get" command or similar WMI query functionality.
- Attacker includes the "/format:" parameter pointing to the malicious XSL file path.
- The WMIC process interprets the XSL stylesheet, triggering the execution of embedded malicious commands or scripts.
- The system executes the payload within the context of the spawned wmic.exe or associated child processes.
- Attacker achieves command execution to facilitate persistence, discovery, or lateral movement.
Impact
Successful exploitation allows for arbitrary code execution, granting attackers the ability to bypass security controls, maintain persistence, and execute further stages of an intrusion. This technique has been historically linked to the FIN7 group in global criminal operations targeting financial and retail sectors, leading to significant system compromise and unauthorized data exfiltration.
Recommendation
Deploy the provided Sigma rule to identify WMIC process executions involving XSL file loading and monitor high-risk command-line patterns.
- Deploy the Sigma rule below to your SIEM to detect command-line arguments involving WMIC and .xsl files.
- Enable Sysmon Event ID 1 (Process Creation) or Windows Event ID 4688 to capture the full command-line arguments of all executed processes.
- Audit legitimate administrative uses of WMIC /format to distinguish between benign system maintenance and malicious script execution.
- Restrict the ability of standard users to execute wmic.exe if not required for daily business operations.
Immediate actions
Deploy the Sigma detection rule to production environment
Threat Hunt
Search historic process creation logs for wmic.exe /format
Data: Process creation events with command-line parameters
Detection coverage 1
Detect XSL Script Execution With WMIC
highDetects the execution of an XSL script using the WMIC process which is often indicative of malicious activity.
Detection queries are available on the platform. Get full rules →