Techniques › T1037 › T1037.004
T1037.004 RC Scripts
persistence · privilege escalation — macOS, Linux, Network Devices, ESXi · attack.mitre.org · JSON
1
MITRE detection strategy
4
analytics
0
Sigma rules tagged attack.t1037.004
0
KEV CVEs mapped here
<p>Adversaries may establish persistence by modifying RC scripts, which are executed during a Unix-like system’s startup. These files allow system administrators to map and start custom services at startup for different run levels. RC scripts require root privileges to modify.</p><p>Adversaries may establish persistence by adding a malicious binary path or shell commands to <code>rc.local</code>, <code>rc.common</code>, and other RC scripts specific to the Unix-like distribution. Upon reboot, the system executes the script's contents as root, resulting in persistence.</p><p>Adversary abuse of RC scripts is especially effective for lightweight Unix-like distributions using the root user as default, such as ESXi hypervisors, IoT, or embedded systems. As ESXi servers store most system files in memory and therefore discard changes on shutdown, leveraging
/etc/rc.local.d/local.sh is one of the few mechanisms for enabling persistence across reboots.</p><p>Several Unix-like systems have moved to Systemd and deprecated the use of RC scripts. This is now a deprecated mechanism in macOS in favor of Launchd. This technique can be used on Mac OS X Panther v10.3 and earlier versions which still execute the RC scripts. To maintain backwards compatibility some systems, such as Ubuntu, will execute the RC scripts if they exist with the correct file permissions.</p>KEV CVEs mapped to this technique · CTID Mappings Explorer
None. No KEV entry in the public mapping names this technique. Given that 74.7% of KEV has no mapping at all, this says more about the mapping than about the technique.
Detection strategy · ATT&CK Enterprise v19.2
- DET0237 Detection Strategy for Boot or Logon Initialization Scripts: RC Scripts v1.0
AN0658 LinuxDetection of modified or newly created /etc/rc.local or /etc/init.d scripts followed by suspicious execution during system startup.Tunable:
script_pathuser_contexttime_windowAN0659 macOSDetection of edits or additions to /etc/rc.common, /Library/StartupItems, or /System/Library/StartupItems and associated script execution during login or reboot.Tunable:script_nameevent_intervalfile_permissionAN0660 ESXiDetection of changes to /etc/rc.local.d/local.sh or rc.local during post-boot script execution with abnormal commands or additions.Tunable:script_sectioncommand_typeexecution_triggerAN0661 Network DevicesDetection of modified boot-time configuration scripts that persist malicious CLI commands across reboots.Tunable:firmware_familyconfig_line_patternreboot_time_window
Sigma rules · SigmaHQ da9bb07d64, tag attack.t1037.004
No Sigma rule carries this tag. MITRE publishes a detection strategy above, so the behaviour is specified; what is missing is public detection content.