Boot or Logon Autostart Execution T1547

Tactics: Persistence, Privilege Escalation

Adversaries may configure system settings to automatically execute a program during system boot or logon to maintain persistence or gain higher-level privileges on compromised systems. Operating systems may have mechanisms for automatically running a program on system boot or account logon. These mechanisms may include automatically executing programs that are placed in specially designated directories or are referenced by repositories that store configuration information, such as the Windows Registry. An adversary may achieve the same goal by modifying or extending features of the kernel.

Events covered

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

ProviderEventTitle
SysmonEvent ID 1Process creation
SysmonEvent ID 5Process terminated
SysmonEvent ID 7Image loaded
SysmonEvent ID 11FileCreate
SysmonEvent ID 12RegistryEvent (Object create and delete)
SysmonEvent ID 13RegistryEvent (Value Set)
SysmonEvent ID 14RegistryEvent (Key and Value Rename)
SysmonEvent ID 23FileDelete (File Delete archived)
Security-AuditingEvent ID 4622A security package has been loaded by the Local Security Authority.
Security-AuditingEvent ID 4648A logon was attempted using explicit credentials.
Security-AuditingEvent ID 4656A handle to an object was requested.
Security-AuditingEvent ID 4657A registry value was modified.
Security-AuditingEvent ID 4663An attempt was made to access an object.
Security-AuditingEvent ID 4664An attempt was made to create a hard link.
Security-AuditingEvent ID 4688A new process has been created.
Security-AuditingEvent ID 4689A process has exited.
Security-AuditingEvent ID 5136A directory service object was modified.
Security-AuditingEvent ID 5145A network share object was checked to see whether client can be granted desired access.
Security-AuditingEvent ID 6416A new external device was recognized by the system.
Defender-DeviceRegistryEventsanyRegistry activity
Defender-DeviceRegistryEventsRegistryKeyDeletedRegistry key deleted
Defender-DeviceRegistryEventsRegistryValueSetRegistry value set
Defender-DeviceRegistryEventsRegistryValueDeletedRegistry value deleted
Defender-DeviceRegistryEventsRegistryKeyRenamedRegistry key renamed
ESFexecProcess Execution
ESFforkProcess Fork
ESFwriteFile Write
ESFkextloadKernel Extension Load
ESFkextunloadKernel Extension Unload
Linux-AuditdEvent ID 1300SYSCALL
Linux-AuditdEvent ID 1309EXECVE
Linux-AuditdEvent ID 1327PROCTITLE
PowerShellEvent ID 4103Payload Context: ContextInfo User Data: UserData.
PowerShellEvent ID 4104Creating Scriptblock text (MessageNumber of MessageTotal).
PrintServiceEvent ID 316Printer driver param1 for param2 param3 was added or updated.
PrintServiceEvent ID 808The print spooler failed to load a plug-in module PluginDllName, error code ErrorCode.
PrintServiceEvent ID 4909Print Service event 4909 (manifest stub).
PowerShellEvent ID 800Event ID 800
Service-Control-ManagerEvent ID 7045A service was installed in the system.
Sysmon-for-LinuxEvent ID 1Process Create
Sysmon-for-LinuxEvent ID 11File created

Authoring guide

These 252 rules share fields, values, and exclusions.

Fields filtered most (107 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
TargetObject80contains 40, wildcard 28, ends_with 20, regex_match 3, eq 1h*\software\microsoft\windows\currentversion\policies\exp..., h*\software\microsoft\windows\currentversion\run\*, h*\software\wow6432node\microsoft\windows\currentversion\..., \software\microsoft\windows\currentversion\policies\explorer\run\, \software\microsoft\windows\currentversion\run
Details64is_not_null 22, eq 20, contains 13, ends_with 11, is_null 8, starts_with 6, length_compare 2, regex_match 2, wildcard 2(empty), .dll, -encodedcommand , -noni , -noninteractive
EventType63eq 47, ne 13, in 10start, deletion, exec, modification, load_module
Image58ends_with 28, eq 17, starts_with 16, is_not_null 7, contains 4, wildcard 4, is_null 2, regex_match 2\reg.exe, ?:\, ?:\windows\, \appdata\roaming\spotify\spotify.exe, \device\mup
TargetFilename56wildcard 33, contains 14, ends_with 7, starts_with 6, eq 3, in 2, regex_match 1?:\*\microsoft\windows\start menu\programs\startup\*, ?:\programdata\microsoft\windows\start menu\programs\startup\*, ?:\users\*\appdata\roaming\microsoft\windows\start..., \start menu\programs\startup\, c:\programdata\microsoft\windows\start menu\programs\startup\*
process_name49eq 38, in 7, wildcard 3, regex_match 2, starts_with 2, is_not_null 1bash, cscript.exe, kmod, chmod, cmd.exe
host.os.type48eq 48
EventID39eq 38, in 14104, 4688, 4103, 13, 1
event.type39eq 29, ne 7, in 4start, change, deletion, creation, process_started
CommandLine30contains 24, wildcard 4, regex_match 2, ends_with 1, in 1 add , /cfg, /configure, /db, execute
file.name17is_not_null 11, eq 4, wildcard 2, contains 1, length_compare 1, ne 1*.*., *:*, *Microsoft*, *com.adobe*.plist, *com.apple*.plist
event.category16eq 13, in 3file, registry, driver, process
process.args15eq 7, wildcard 6, in 5, starts_with 5, contains 2*.EndpointSecurity, .ko, EndpointSecurity.kext, */bin/base64*-d*, */bin/chmod +x*
parent_process_name14eq 6, regex_match 4, in 3, wildcard 1excel.exe, (?i)\QMicrosoft\Windows\Start Menu\Programs\StartUp\E, (?i)winlogon\.exe, eqnedt32.exe, explorer.exe
OriginalFileName10eq 9, in 1reg.exe, cscript.exe, mshta.exe, powershell.exe, installutil.exe

Top indicator values (2439 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
171078
event.typeeq
change
994
Detailseq
(empty)
142
EventTypene
deletion
1386
EventTypeeq
start
12391
EventTypeeq
modification
972
TargetObjectwildcard
hkey_users\*\environment\userinitmprlogonscript
1212
TargetObjectwildcard
hkey_users\*\software\microsoft\windows nt\currentversion\windows\load
1212
TargetObjectwildcard
hkey_users\*\software\microsoft\windows nt\currentversion\winlogon\shell
1212
TargetObjectwildcard
h*\software\microsoft\windows\currentversion\policies\explorer\run\*
1111
TargetObjectwildcard
h*\software\microsoft\windows\currentversion\run\*
1112
TargetObjectwildcard
h*\software\wow6432node\microsoft\windows\currentversion\policies\explorer\run\*
1111
TargetObjectwildcard
h*\software\wow6432node\microsoft\windows\currentversion\run\*
1111
TargetObjectwildcard
hkey_users\*\software\microsoft\command processor\autorun
1111
TargetObjectwildcard
hkey_users\*\software\microsoft\ctf\langbaraddin\*\filepath
1111
TargetObjectwildcard
hkey_users\*\software\microsoft\internet explorer\extensions\*\exec
1111
TargetObjectwildcard
hkey_users\*\software\microsoft\windows\currentversion\policies\system\shell
1111
TargetObjectwildcard
hkey_users\*\software\policies\microsoft\windows\system\scripts\logoff\script
1111
TargetObjectwildcard
hkey_users\*\software\policies\microsoft\windows\system\scripts\logon\script
1111
TargetObjectwildcard
hkey_users\*\software\policies\microsoft\windows\system\scripts\shutdown\script
1111
TargetObjectwildcard
hkey_users\*\software\policies\microsoft\windows\system\scripts\startup\script
1111
TargetObjectwildcard
hklm\software\microsoft\windows nt\currentversion\winlogon\shell
88
TargetObjectwildcard
hklm\software\microsoft\windows nt\currentversion\winlogon\userinit
88
event.categoryeq
file
1143
event.categoryeq
registry
814
EventIDeq
4104
10269
EventIDeq
4688
10317
TargetFilenamewildcard
?:\programdata\microsoft\windows\start menu\programs\startup\*
1012
TargetFilenamewildcard
?:\users\*\appdata\roaming\microsoft\windows\start menu\programs\startup\*
1013
TargetFilenamewildcard
?:\*\microsoft\windows\start menu\programs\startup\*
99

Exclusions (1456 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
Detailseq
(empty)
15
process.code_signature.trustedeq
true
13
Imagewildcard
?:\program files (x86)\*.exe
9
Imagewildcard
?:\program files\*.exe
9
Imagewildcard
?:\windows\system32\msiexec.exe
7
Imagewildcard
?:\windows\syswow64\msiexec.exe
5
user.ideq
s-1-5-18
8
process_nameeq
rundll32.exe
6
process_nameeq
cscript.exe
5
process_nameeq
powershell.exe
5
Imageends_with
\officeclicktorun.exe
5
Imagestarts_with
c:\program files\common files\microsoft shared\clicktorun\
5
SignatureStatuswildcard
errorCode_endpoint*
5
SignatureStatuswildcard
errorExpired
5
Detailswildcard
*:\Program Files (x86)\*
4

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Sigma 74 rules

Elastic 92 rules

Splunk 68 rules

Kusto 9 rules

YARA-L 9 rules