Reference tables / ATT&CK techniques / T1037.004
T1037.004 RC Scripts
- Tactics
- Persistence, Privilege Escalation
- Reports citing the ID, 90 days
- 1
- KEV CVEs mapped
- 0
- SigmaHQ rules
- 0
- Elastic, Splunk
- 11
- thrunt rules
- 0
- MITRE
- https://attack.mitre.org/techniques/T1037/004
Groups using it
Ransomware groups whose hunt package lists this technique, busiest first.
Rules
Elastic and Splunk rules
- GenAI Process Accessing Sensitive Files (elastic)
- Potential Persistence via File Modification (elastic)
- Suspicious Network Activity to the Internet by Previously Unknown Executable (elastic)
- Pod or Container Creation with Suspicious Command-Line (elastic)
- System V Init Script Created (elastic)
- Executable Bit Set for Potential Persistence Script (elastic)
- Suspicious rc.local Error Message (elastic)
- Potential Execution of rc.local Script (elastic)
- rc.local/rc.common File Creation (elastic)
- Potential Suspicious File Edit (elastic)
- Linux File Creation In Init Boot Directory (splunk)
MITRE description
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. 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. 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. 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.
Research citing this technique
Reports and advisories from the last 90 days that cite this technique.