Detection rules › Splunk

Potential LSA password filter (PowerShell)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

Adversaries may register malicious password filter dynamic link libraries (DLLs) into the authentication process to acquire user credentials as they are validated. Windows password filters are password policy enforcement mechanisms for both domain and local accounts. This use case looks for values added to LSA registry with reg.exe

MITRE ATT&CK coverage

References

Telemetry coverage

Rule body

id: '8154.34953'
title: Potential LSA password filter
description: 'Adversaries may register malicious password filter dynamic link libraries
  (DLLs) into the authentication process to acquire user credentials as they are validated.
  Windows password filters are password policy enforcement mechanisms for both domain
  and local accounts. This use case looks for values added to LSA registry with reg.exe
  - Software Association: Cactus, Vice Society - Atomics T1556.002 Test #1'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_powershell` (TERM(EventCode=4103) OR
  "<EventID>4103<" OR TERM(EventCode=4104) OR "<EventID>4104<") ((TERM(Set-ItemProperty)
  OR TERM(sp) OR (TERM(reg) TERM(add)))) ("HKLM" OR "HKEY_LOCAL_MACHINE") ("lsa" "control")
  | table _time, host, user process, process_*, signature_id, parent_* | bin span=1s
  | stats values(*) as * by _time, host '
techniques:
- defense-evasion:modify authentication process:password filter dll
- privilege-escalation:boot or logon autostart execution:authentication package
- persistence:boot or logon autostart execution:authentication package
- persistence:modify authentication process:password filter dll
- credential-access:modify authentication process:password filter dll
technique_id:
- T1556.002
- T1547.002
data_category:
- PowerShell logs
- Process command-line parameters
references:
- https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2018/03/07190154/The-ProjectSauron-APT_research_KL.pdf

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_powershell` (TERM(EventCode=4103) OR "<EventID>4103<" OR TERM(EventCode=4104) OR "<EventID>4104<") ((TERM(Set-ItemProperty) OR TERM(sp) OR (TERM(reg) TERM(add)))) ("HKLM" OR "HKEY_LOCAL_MACHINE") ("lsa" "control")

Stage 2: table

| table _time, host, user process, process_*, signature_id, parent_*

Stage 3: bucket

| bin span=1s

Stage 4: stats

| stats values(*) as * by _time, host

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 4103 corpus 105 (splunk 105)
  • 4104 corpus 269 (splunk 269)
field:"EventID" kind:eq

Search terms

These SPL tokens match against raw event text.

StageTerm
1"<EventID>4103<"
1"<EventID>4104<"
1"Set-ItemProperty"
1sp
1reg
1add
1"HKLM"
1"HKEY_LOCAL_MACHINE"
1"lsa"
1"control"