Detection rules › Sigma

Extracting Information with PowerShell

Severity
medium
Author
frack113
Source
upstream

Adversaries may search local file systems and remote file shares for files containing insecurely stored credentials. These can be files created by users to store their own credentials, shared credential stores for a group of individuals, configuration files containing passwords for a system or service, or source code/binary files containing embedded passwords.

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1552.001 Unsecured Credentials: Credentials In Files

Event coverage

ProviderEvent IDTitle
PowerShell4104Creating Scriptblock text (MessageNumber of MessageTotal).

Stages and Predicates

Stage 1: selection

ScriptBlockText|contains: ' -R'
ScriptBlockText|contains: '-Pattern '
ScriptBlockText|contains: ls
ScriptBlockText|contains: 'select-string '

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
ScriptBlockTextmatch
  • -R
  • -Pattern
  • ls corpus 2 (sigma 2)
  • select-string

Neighbors

Broader alternatives (more inclusive than this rule)

These rules match a superset of what this rule catches. They cover the same events plus more. Use them if you want wider coverage and can absorb more false positives.