Given administrative access to impacted systems, the operator will enumerate and remove all attacker-installed persistence mechanisms. These include scheduled tasks, services, startup items, registry entries, scripts, user profiles, and other footholds left to maintain access.
Operator Note: Persistence can be stealthy and layered. Operators must carefully search, validate, and remove ALL unauthorized persistence mechanisms to prevent re-compromise.
All attacker persistence mechanisms have been removed and validated. Systems are free of unauthorized tasks, services, registry keys, startup items, and other persistence artifacts.
Get-ScheduledTask | Select-Object TaskName, State, Actions
schtasks /query /fo LIST /v
crontab -l
ls -alh /etc/cron.*
systemctl list-timers
launchctl list
crontab -l
Get-Service | Where-Object {$_.Status -eq "Running"} | Format-Table Name, DisplayName, PathName
systemctl list-units --type=service
chkconfig --list
launchctl list
Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run"
Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run"
Operator Note: Also review
HKLM\SYSTEM\CurrentControlSet\Services
for driver-level persistence.
Get-WmiObject -Namespace root\subscription -Class __EventFilter
Operator Note: WMI persistence is common for fileless malware and advanced actors.
Get-ChildItem "C:\Users" -Force
ls -la /home
ls -la /Users
Operator Note: Review
.bash_profile
,.bashrc
,.zshrc
,.login
files for script-based persistence.
Indicators of malicious persistence:
Coordinate with IR lead and system owner for validation prior to removal.
Unregister-ScheduledTask -TaskName "MaliciousTask" -Confirm:$false
Stop-Service -Name "MaliciousService"
sc.exe delete "MaliciousService"
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "BadStartupEntry"
Get-WmiObject -Namespace root\subscription -Class __EventFilter | Remove-WmiObject
crontab -r -u malicioususer
rm /etc/cron.d/maliciouscron
rm ~/.bash_profile
rm /Library/LaunchDaemons/malicious.plist
launchctl bootout system /Library/LaunchDaemons/malicious.plist
Get-ScheduledTask | Select-Object TaskName, Description, State, Actions | Export-Csv ScheduledTasks.csv -NoTypeInformation
Operator Note: Retain before/after audit records for incident documentation.
Tool | Platform | Installation | Usage |
---|---|---|---|
Autoruns (Sysinternals) | Windows | Download from Microsoft Sysinternals | Visualize and remove autorun and startup entries |
PowerShell | Windows | Built-in | Enumerate and remove tasks, services, WMI |
EDR/XDR Platforms (e.g., Crowdstrike, SentinelOne) | Cross-platform | Enterprise deployment | Detect and alert on unauthorized persistence |
systemctl + crontab | Linux | Built-in | Manage services and scheduled tasks |
KnockKnock | macOS | Download from Objective-See | GUI analysis of persistent login items |
Operator Note: Always prefer using trusted enterprise tooling (EDR/XDR) to supplement manual detection and removal.
Sysinternals Autoruns
WMI Persistence (MITRE ATT&CK T1546.003)
Launchd and launchctl on macOS
Date | Version | Description | Author |
---|---|---|---|
2025-05-02 | 1.0 | Fully generated operator guide for attacker persistence removal with platform techniques and tools | Leo |