Boot or Logon Autostart Execution (T1547)
MITRE ATT&CK - T1547: Boot or Logon Autostart Execution
MITRE ATT&CK's technique "T1547 - Boot or Logon Autostart Execution" encompasses methods adversaries use to execute malicious code automatically during the system's boot-up or logon process. Here’s a technical history of notable incidents, timelines, people, and groups associated with this technique:
Notable Attacks and Groups
1. APT28 (Fancy Bear)
Timeline: Ongoing since at least the mid-2000s.
Details: Associated with Russian intelligence services, APT28 has used registry run keys and startup folders to ensure their malware runs upon system start.
Notable Incidents: In 2016, APT28 used this technique in their campaign targeting the Democratic National Committee (DNC).
2. FIN7 (Carbanak Group)
Timeline: Active since at least 2013.
Details: FIN7 leverages boot or logon autostart techniques, frequently using registry keys to maintain persistence on victim systems.
Notable Incidents: April 2017: FIN7 used these techniques in intrusions targeting the hospitality and retail sectors.
3. Lazarus Group
Timeline: Active since at least 2009.
Details: Linked to North Korea, the Lazarus Group uses boot or logon autostart execution to deploy destructive payloads, often modifying Windows autostart extensibility points.
Notable Incidents: In 2017, the WannaCry ransomware attack demonstrated this technique to ensure malware execution upon boot.
4. Turla (Waterbug, Venomous Bear)
Timeline: Active since at least 2004.
Details: Turla uses various forms of this technique, including new services and registry modifications.
Notable Incidents: In 2018, operations against European government agencies involved autostart registry keys to maintain and recover access.
Techniques and Tools
Registry Run Keys / Startup Folder: Use of Windows registry (e.g., HKCU\Software\Microsoft\Windows\CurrentVersion\Run) and startup folders to execute payloads at boot or logon.
Scheduled Tasks: Creation of scheduled tasks to execute payloads at specified times or during specific system events.
Service Creation: Creating or modifying system services to run malicious code at boot time.
Group Policies: Leveraging group policy objects to deploy malicious scripts or binaries during startup.
Publicly Available Tools
AutoRuns (Sysinternals): A legitimate tool often repurposed by adversaries to manage autoruns on Windows systems.
Persistence Sniper: Open-source tool used for detecting common persistence mechanisms in Windows.
Windows Environments
Identify Autostart Program Locations:
Check Registry: `HKCU\Software\Microsoft\Windows\CurrentVersion\Run`, `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run`
Use Task Manager or Autoruns for Windows.
Analyze and Review Entries:
Compare against known software and standards.
Use VirusTotal for unknown entries.
Remove Unauthorized Entries:
Use `regedit` for registry changes.
Use Autoruns to manage entries.
Use Group Policy for Restrictions:
Configure policies like `Do not process the legacy run list` and `Run only allowed Windows applications`.
MacOSX
Identify Autostart Items:
Check `System Preferences` -> `Users & Groups` -> `Login Items`.
Inspect `/Library/LaunchAgents`, `/Library/LaunchDaemons`, `~/Library/LaunchAgents`.
Review and Vet Autostart Items:
Validate items against approved applications.
Use `launchctl list` for active agents/daemons.
Remove Unauthorized Items:
Use `launchctl remove ` to stop agents/daemons.
Delete corresponding `.plist` files.
Implement Configuration Profiles:
Manage startup programs via Configuration Profiles.
Linux
Inspect Startup Scripts and Services:
Check initialization directories: `/etc/init.d/`, `/etc/systemd/system/`, `/etc/rc.local`, `~/.config/autostart/`.
Validate and Investigate Entries:
Ensure entries are trusted.
Check file ownership and integrity with `ls -l` and `stat`.
Remove Suspicious Entries:
Disable services: `systemctl disable ` & `systemctl stop `.
Remove unauthorized scripts; edit user crontabs.
Configure Security Policies:
Enforce policies with SELinux or AppArmor.
Amazon AWS
Audit IAM Roles and Policies:
Review permissions for instance profiles.
Inspect User Data and Initialization Scripts:
Check for suspicious commands/scripts in EC2 instances.
Remove or Restrict Unauthorized Configurations:
Modify/delete suspicious user data scripts with AWS CLI.
Use AWS Config and CloudTrail:
Monitor changes with AWS Config rules and CloudTrail.
Google Cloud Platform
Examine VM Metadata:
Review `startup-script` and `startup-script-url` metadata.
Verify and Vet Scripts:
Ensure metadata scripts are approved.
Remove Malicious Metadata Entries:
Use `gcloud` commands to update or remove metadata entries.
Leverage Security Command Center:
Enable the Security Command Center to monitor VM configurations.
Microsoft Azure
Review VM Extensions and Scripts:
Check VM extensions and custom scripts via Azure portal or CLI.
Analyze and Authorize Extensions:
Cross-reference with approved configurations using `az vm extension list`.
Disable or Remove Unauthorized Extensions:
Remove unauthorized extensions/scripts with Azure portal or CLI.
Monitor with Azure Security Center:
Detect configuration drifts using Azure Security Center.