Whitespace Padding in Process Command Line
editWhitespace Padding in Process Command Line
editIdentifies process execution events where the command line value contains a long sequence of whitespace characters or multiple occurrences of contiguous whitespace. Attackers may attempt to evade signature-based detections by padding their malicious command with unnecessary whitespace characters. These observations should be investigated for malicious behavior.
Rule type: eql
Rule indices:
- winlogbeat-*
- logs-endpoint.events.*
- logs-windows.*
Severity: medium
Risk score: 47
Runs every: 5 minutes
Searches indices from: now-9m (Date Math format, see also Additional look-back time
)
Maximum alerts per execution: 100
References:
Tags:
- Elastic
- Host
- Windows
- Threat Detection
- Defense Evasion
Version: 2 (version history)
Added (Elastic Stack release): 7.15.0
Last modified (Elastic Stack release): 7.16.0
Rule authors: Elastic
Rule license: Elastic License v2
Investigation guide
edit## Triage and analysis - Analyze the command line of the process in question for evidence of malicious code execution. - Review the ancestor and child processes spawned by the process in question for indicators of further malicious code execution.
Rule query
editprocess where event.type in ("start", "process_started") and process.command_line regex ".*[ ]{20,}.*" or /* this will match on 3 or more separate occurrences of 5+ contiguous whitespace characters */ process.command_line regex ".*(.*[ ]{5,}[^ ]*){3,}.*"
Threat mapping
editFramework: MITRE ATT&CKTM
-
Tactic:
- Name: Defense Evasion
- ID: TA0005
- Reference URL: https://attack.mitre.org/tactics/TA0005/
Rule version history
edit- Version 2 (7.16.0 release)
-
- Formatting only