heroui logo

Potential PowerShell Obfuscation via String Concatenation

Elastic Detection Rules

View Source
Summary
The detection rule identifies PowerShell scripts that utilize string concatenation as a method of obfuscation. This technique is often employed by attackers to evade static analysis tools and bypass security measures, particularly the Antimalware Scan Interface (AMSI). The rule operates by scanning logs from PowerShell operational events and filtering for scripts that exceed 500 characters in length, which contain patterns indicative of obfuscation. Specifically, it looks for sequences of strings that concatenate multiple segments, which could suggest an intent to hide malicious intent or behavior. If at least two obfuscation patterns are detected, an alert is triggered. To effectively utilize this rule, it is essential to have PowerShell Script Block Logging enabled on the system. This is crucial for capturing the necessary data to facilitate the identification of potential threats through obfuscation methods.
Categories
  • Endpoint
  • Windows
Data Sources
  • Process
  • Application Log
  • Script
  • Logon Session
ATT&CK Techniques
  • T1027
  • T1140
  • T1059
  • T1059.001
Created: 2025-04-14