heroui logo

PowerShell Script With File Hostname Resolving Capabilities

Sigma Rules

View Source
Summary
This detection rule is designed to identify PowerShell scripts that exhibit behaviors commonly associated with DNS enumeration and file handling. The rule specifically looks for scripts that utilize the cmdlets 'Get-Content' to read files, along with 'foreach' looping constructs to process those files. Critical to this rule is the detection of the .NET method '[System.Net.Dns]::GetHostEntry' which resolves hostnames to IP addresses, suggesting potential exfiltration or reconnaissance activities. The rule also monitors for the 'Out-File' cmdlet, indicating that the script may output data, further highlighting its potential malicious use case. Given the rule’s focus on these specific cmdlets, it is intended to catch scripts that may be used in attacks that exfiltrate information or probe network resources.
Categories
  • Endpoint
  • Windows
Data Sources
  • Script
  • Process
Created: 2023-05-05