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 253 rules share fields, values, and exclusions.

Fields filtered most (90 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
TargetObject79contains 39, wildcard 28, ends_with 19, regex_match 3, eq 1H*\Software\Microsoft\Windows\CurrentVersion\Policies\Exp..., H*\Software\Microsoft\Windows\CurrentVersion\Run\*, H*\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\..., HKEY_USERS\*\Environment\UserInitMprLogonScript, HKEY_USERS\*\SOFTWARE\Microsoft\Command Processor\Autorun
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
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, ?:\*, C:\Program Files (x86)\Microsoft..., ?:\Windows\*
TargetFilename56wildcard 33, contains 14, ends_with 7, starts_with 6, eq 3, in 2, regex_match 1?:\*\Microsoft\Windows\Start Menu\Programs\Startup\*, ?:\Users\*\AppData\Roaming\Microsoft\Windows\Start..., ?:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\*, C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\*, C:\Users\*\AppData\Roaming\Microsoft\Windows\Start...
process_basename46eq 37, in 7, wildcard 3, starts_with 2, is_not_null 1bash, kmod, EQNEDT32.EXE, EXCEL.EXE, chmod
event.type40eq 30, ne 7, in 4start, change, deletion, creation, process_started
EventID39eq 38, in 14104, 4688, 4103, 13, 1
CommandLine30contains 24, wildcard 4, regex_match 2, ends_with 1, in 1 add , Execute, RegRead, /cfg, /configure
file.name17is_not_null 11, eq 4, wildcard 2, contains 1, length_compare 1, ne 1, *.*, *.*., *:*, *com.adobe*.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*
OriginalFileName10eq 9, in 1reg.exe, mshta.exe, powershell.exe, InstallUtil.exe, MSBuild.exe
file.extension9eq 7, in 2cmd, bat, lnk, ahk, com
parent_process_basename9eq 6, in 2, wildcard 1EQNEDT32.EXE, EXCEL.EXE, MSACCESS.EXE, explorer.exe, *.elf

Top indicator values (2459 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
Detailsis_not_null
2289
event.typeeq
start
181036
event.typeeq
change
989
Detailseq
(Empty)
142
EventTypene
deletion
1390
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
file.nameis_not_null
1112
EventIDeq
4104
10269
EventIDeq
4688
8284
EventTypeeq
start
10388
EventTypeeq
modification
972
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
Detailsis_null
8

Exclusions (1471 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
Detailseq
(Empty)
14
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
Detailsis_null
8
user.ideq
S-1-5-18
8
process_basenameeq
rundll32.exe
6
process_basenameeq
cscript.exe
5
process_basenameeq
powershell.exe
5
Imageends_with
\OfficeClickToRun.exe
5
Imagestarts_with
C:\Program Files\Common Files\Microsoft Shared\ClickToRun\
5
Detailswildcard
*:\Program Files (x86)\*
4
Detailswildcard
*:\Program Files\*
4

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Sigma 74 rules

Elastic 93 rules

Splunk 68 rules

Kusto 9 rules

YARA-L 9 rules