Detection rules › Splunk

LocalAccountTokenFilterPolicy Registry Value Modified (Sysmon)

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

The HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicy key is responsible for controlling how local accounts are filtered when they are used to access a Windows system remotely. By setting the key to value '1', it effectively disables Remote UAC filtering for local accounts, allowing local admin accounts to use elevated tokens (with full admin rights when connecting remotely). This may leave a system vulnerable to Pass the Hash attacks. This use case detects registry modification events or process executions with registry modification commands targeting LocalAccountTokenFilterPolicy.

MITRE ATT&CK coverage

References

Event coverage

Rule body yaml

id: '40510.73996'
title: LocalAccountTokenFilterPolicy Registry Value Modified
description: The HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicy
  key is responsible for controlling how local accounts are filtered when they are
  used to access a Windows system remotely. By setting the key to value '1', it effectively
  disables Remote UAC filtering for local accounts, allowing local admin accounts
  to use elevated tokens (with full admin rights when connecting remotely). This may
  leave a system vulnerable to Pass the Hash attacks. This use case detects registry
  modification events or process executions with registry modification commands targeting
  LocalAccountTokenFilterPolicy.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (((TERM(EventCode=1) OR "<EventID>1<")
  "Set-ItemProperty" OR "sp " OR "ADD") OR (TERM(EventCode=12) OR "<EventID>12<")
  OR TERM(EventCode=13) OR "<EventID>13<") "\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System"
  "LocalAccountTokenFilterPolicy" | table _time, host, user user, process, process_*,
  parent_* | bin span=1s | stats values(*) as * by _time, host '
techniques:
- defense-evasion:modify registry
- defense-evasion:use alternate authentication material:pass the hash
technique_id:
- T1112
- T1550.002
data_category:
- Windows Sysmon
references:
- https://www.security.com/threat-intelligence/china-southeast-asia-espionage
- https://posts.specterops.io/pass-the-hash-is-dead-long-live-localaccounttokenfilterpolicy-506c25a7c167
- https://kb.cybertecsecurity.com/knowledge/localaccounttokenfilterpolicy

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_sysmon` (((TERM(EventCode=1) OR "<EventID>1<") "Set-ItemProperty" OR "sp " OR "ADD") OR (TERM(EventCode=12) OR "<EventID>12<") OR TERM(EventCode=13) OR "<EventID>13<") "\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System" "LocalAccountTokenFilterPolicy"

Stage 2: table

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

Stage 3: bucket

| bin span=1s

Stage 4: stats

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

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
EventCodeeq
  • 1 corpus 237 (splunk 224, kusto 13)
  • 12 corpus 9 (splunk 9)
  • 13 corpus 22 (splunk 18, kusto 4)

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1"<EventID>1<"
1"Set-ItemProperty"
1"sp "
1"ADD"
1TERM
1"<EventID>12<"
1TERM
1"<EventID>13<"
1"\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System"
1"LocalAccountTokenFilterPolicy"