Access Token Manipulation T1134

Tactics: Stealth, Privilege Escalation

Adversaries may modify access tokens to operate under a different user or system security context to perform actions and bypass access controls. Windows uses access tokens to determine the ownership of a running process. A user can manipulate access tokens to make a running process appear as though it is the child of a different process or belongs to someone other than the user that started the process. When this occurs, the process also takes on the security context associated with the new token.

Events covered

24 catalog events are tagged with this technique by at least one rule.

ProviderEventTitle
SysmonEvent ID 1Process creation
SysmonEvent ID 10ProcessAccess
SysmonEvent ID 17PipeEvent (Pipe Created)
SysmonEvent ID 18PipeEvent (Pipe Connected)
Security-AuditingEvent ID 4624An account was successfully logged on.
Security-AuditingEvent ID 4648A logon was attempted using explicit credentials.
Security-AuditingEvent ID 4674An operation was attempted on a privileged object.
Security-AuditingEvent ID 4688A new process has been created.
Security-AuditingEvent ID 4697A service was installed in the system.
Security-AuditingEvent ID 4703A user right was adjusted.
Security-AuditingEvent ID 4704A user right was assigned.
Security-AuditingEvent ID 4717System security access was granted to an account.
Security-AuditingEvent ID 4738A user account was changed.
Security-AuditingEvent ID 4742A computer account was changed.
Security-AuditingEvent ID 4765SID History was added to an account.
Security-AuditingEvent ID 4766An attempt to add SID History to an account failed.
Security-AuditingEvent ID 5136A directory service object was modified.
Security-AuditingEvent ID 5447A Windows Filtering Platform filter has been changed.
Security-AuditingEvent ID 5449A Windows Filtering Platform provider context has been changed.
1Password-ServiceAccountTokenanyService account token (catch-all)
Defender-DeviceLogonEventsanyLogon activity
Defender-DeviceProcessEventsanyProcess activity
Defender-DeviceProcessEventsProcessCreatedProcess created
Service-Control-ManagerEvent ID 7045A service was installed in the system.

Authoring guide

These 99 rules share fields, values, and exclusions.

Fields filtered most (105 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
EventType29eq 29start, log_on, end, token_manipulation_event, token_protection_event
Image22ends_with 9, is_not_null 4, starts_with 4, in 2, wildcard 2, contains 1, eq 1, C:\*, *\ProgramData\*, *\Temp\*, *\Users\*
CommandLine16contains 13, ends_with 3, match 1, regex_match 1, wildcard 1 -NoP , -W Hidden , -decode , -spawnto , /CommandLine
EventID15eq 14, in 110, 4738, 4742, 5136, 1
user.id15eq 8, starts_with 6, ne 3, is_not_null 1S-1-5-18, S-1-12-*, S-1-5-21*, S-1-12-1-*, S-1-5-21-*
ParentImage13is_not_null 6, ends_with 3, in 2, contains 1, regex_match 1, starts_with 1, *\ProgramData\*, *\Temp\*, *\Users\*, (c:\\windows\\system32\\[a-z0-9\-\_\.]+\.exe|c:\\windows\...
process.parent.Ext.real.pid11gt 10, is_null 10,
process_basename9eq 6, in 3cmd.exe, certutil.exe, msbuild.exe, Cmd.Exe, LogonUI.exe
OriginalFileName8eq 5, in 2, contains 1Cmd.Exe, PowerShell.EXE, AdvancedRun.exe, PPID-spoof, SharpDPAPI.exe
event.category7eq 7iam, authentication, process
IntegrityLevel6eq 6, in 2System, S-1-16-16384, high, low, medium
Hashes5contains 2, ne 2, is_not_null 1, 8ba8760bcb924e1e7943c3008a80006b29737808cc41a93cabcfeaaec9785276, 9e23e07e042943e1862b86d8c9dc05483a118938f5b19f359cb8f9aa6a14a452, IMPHASH=04D974875BD225F00902B4CAD9AF3FBC, IMPHASH=0A358FFC1697B7A07D0E817AC740DF62
LogonProcessName5starts_with 3, eq 2Advapi*, Advapi, seclogo, seclogo*
LogonType5eq 52, 3, 9, Interactive, NewCredentials
parent_process_basename5eq 3, is_not_null 2, in 1, SearchProtocolHost.exe, WerMgr.exe, autochk.exe, cscript.exe

Top indicator values (965 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
EventTypeeq
start
19388
EventTypeeq
log_on
48
EventTypeeq
end
27
EventTypeeq
token_manipulation_event
22
EventTypeeq
token_protection_event
22
EventTypeeq
token_right_adjusted
22
process.parent.Ext.real.pidgt
0
1011
IntegrityLeveleq
S-1-16-16384
631
ParentImageis_not_null
693
Imageis_not_null
4155
event.kindeq
alert
435
event.moduleeq
endgame
415
event.typeeq
start
41036
user.ideq
S-1-5-18
46
user.ideq
S-1-5-18
413
user.idstarts_with
S-1-12-*
421
user.idstarts_with
S-1-5-21*
421
EventIDeq
10
316
EventIDeq
4738
24
EventIDeq
4742
26
EventIDeq
5136
220
Imagestarts_with
C:\*
316
Signaturestarts_with
Microsoft*
319
usercontains
AUTHORI
314
usercontains
AUTORI
314
user.effective.idstarts_with
S-1-12-*
34
user.effective.idstarts_with
S-1-5-21*
34
CommandLinecontains
*/user:*
26
EnabledPrivilegeListeq
SeDebugPrivilege
22
GrantedAccesseq
0x1040
22

Exclusions (927 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
process.code_signature.trustedeq
true
17
Imageeq
?:\Windows\System32\WerFault.exe
8
Imageeq
?:\Windows\SysWOW64\WerFault.exe
7
Imageeq
?:\Windows\System32\WerFaultSecure.exe
6
Imageeq
?:\Windows\System32\Wermgr.exe
6
Imageeq
?:\WINDOWS\SysWOW64\WerFaultSecure.exe
4
Imageeq
?:\Windows\SoftwareDistribution\Download\Install\securityhealthsetup.exe
4
Imageeq
?:\Windows\System32\MpSigStub.exe
3
Imageeq
?:\Windows\System32\svchost.exe
3
process_basenameeq
PowerShell.EXE
8
process_basenameeq
rundll32.exe
7
ParentImageeq
?:\WINDOWS\System32\svchost.exe
6
ParentImageeq
?:\Windows\System32\Utilman.exe
4
Imagewildcard
?:\Program Files (x86)\*.exe
5
Imagewildcard
?:\Program Files\*.exe
5

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Sigma 22 rules

Elastic 41 rules

Splunk 15 rules

Kusto 16 rules

Panther 5 rules