T1059 CrowdStrike LogScale · LogScale

Detect Command and Scripting Interpreter in CrowdStrike LogScale

Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries. These interfaces and languages provide ways of interacting with computer systems and are a common feature across many different platforms. Most systems come with some built-in command-line interface and scripting capabilities, for example, macOS and Linux distributions include some flavor of Unix Shell while Windows installations include the Windows Command Shell and PowerShell. There are also cross-platform interpreters such as Python, as well as those commonly associated with client applications such as JavaScript and Visual Basic. Adversaries may abuse these technologies in various ways as a means of executing arbitrary commands.

MITRE ATT&CK

Tactic
Execution
Technique
T1059 Command and Scripting Interpreter
Canonical reference
https://attack.mitre.org/techniques/T1059/

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
#event_simpleName=ProcessRollup2
| FileName = /(?i)^(powershell\.exe|pwsh\.exe|cmd\.exe|wscript\.exe|cscript\.exe|mshta\.exe|python\.exe|python3\.exe|perl\.exe|ruby\.exe|lua\.exe|node\.exe|AutoHotkey\.exe|AutoIt3\.exe)$/
| ParentBaseFileName = /(?i)^(winword\.exe|excel\.exe|powerpnt\.exe|outlook\.exe|msaccess\.exe|mspub\.exe|visio\.exe|onenote\.exe|explorer\.exe|wmiprvse\.exe|svchost\.exe)$/
| IsOfficeParent := if(ParentBaseFileName = /(?i)(winword|excel|powerpnt|outlook)\.exe/, "true", "false")
| IsWMI := if(ParentBaseFileName = /(?i)wmiprvse\.exe/, "true", "false")
| IsSvchost := if(ParentBaseFileName = /(?i)svchost\.exe/, "true", "false")
| table([_timeparsed, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, ParentCommandLine, IsOfficeParent, IsWMI, IsSvchost])
| sort(field=_timeparsed, order=desc)
high severity high confidence

CrowdStrike LogScale (Falcon) query using ProcessRollup2 events to detect scripting interpreters (PowerShell, cmd, WScript, Python, Node.js, AutoHotkey, etc.) spawned from suspicious parent processes including Microsoft Office applications, WMI provider host, and svchost. Classifies events by parent type (Office, WMI, svchost) for analyst triage prioritization aligned with T1059 detection.

Data Sources

CrowdStrike Falcon EDR (ProcessRollup2 events)Falcon Data Replicator (FDR) streamed to LogScale

Required Tables

ProcessRollup2

False Positives & Tuning

  • Falcon sensor-approved scripts executed through svchost for Windows Defender update processes or telemetry collection routines
  • Licensed Office 365 integrations with Power Automate or Power Platform that spawn PowerShell child processes from Outlook or Excel for approved workflow automation
  • Developer tools like VS Code extensions that route terminal sessions through explorer.exe parent context when launching embedded scripting interpreters
Download portable Sigma rule (.yml)

Other platforms for T1059


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Office Macro Simulation — Word spawns PowerShell

    Expected signal: Sysmon Event ID 1: Process Create for cmd.exe spawning powershell.exe. Security Event ID 4688 with command line details showing the full chain.

  2. Test 2WScript Execution of VBScript File

    Expected signal: Sysmon Event ID 1: Process Create with Image=wscript.exe and CommandLine containing the .vbs file path. Sysmon Event ID 11: File Create for the .vbs file in the temp directory.

  3. Test 3MSHTA Executing Inline VBScript

    Expected signal: Sysmon Event ID 1: Process Create with Image=mshta.exe and CommandLine containing 'vbscript:Execute'. Child process creation event for calc.exe spawned by mshta.exe.

Unlock Pro Content

Get the full detection package for T1059 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections