mirror of
https://github.com/mukul975/Anthropic-Cybersecurity-Skills.git
synced 2026-06-15 15:34:56 +03:00
3.8 KiB
3.8 KiB
Malware Eradication - Detailed Workflow
Pre-Eradication Checklist
- Forensic images collected from all compromised systems
- All IOCs identified and documented
- All persistence mechanisms mapped
- Root cause (initial access vector) identified
- Containment verified and holding
- Eradication plan approved by Incident Commander
- Rollback plan prepared in case eradication fails
Eradication Phases
Phase 1: Artifact Inventory
- Compile list of all malware files with paths and hashes
- Map all persistence mechanisms per system
- List all compromised accounts (user, service, admin)
- Identify all backdoor access methods
- Document network-level indicators (C2 IPs, domains)
- Note any configuration changes made by attacker
Phase 2: Coordinated Removal
Execute removal across ALL compromised systems simultaneously to prevent attacker from detecting cleanup on one system and acting on another.
Simultaneous Actions:
- Remove malware files from all systems
- Delete persistence mechanisms (registry, tasks, services, WMI)
- Disable compromised accounts
- Block all C2 infrastructure at network level
- Remove unauthorized SSH keys and certificates
- Clean up web shells from all web servers
Phase 3: Credential Reset
Priority Order:
- KRBTGT password (reset twice, 12+ hours apart)
- Domain admin accounts
- Service accounts
- All accounts that logged into compromised systems
- Application credentials and API keys
- Machine account passwords (if targeted)
Phase 4: Vulnerability Remediation
- Patch the vulnerability used for initial access
- Patch any additional vulnerabilities discovered during investigation
- Harden configurations that were exploited
- Update security tool signatures and rules
- Close unnecessary ports and services
Phase 5: Validation
- Full AV/EDR scan on all previously compromised systems
- YARA scan for specific malware family artifacts
- Check all persistence locations are clean
- Verify no unauthorized processes running
- Confirm no unauthorized network connections
- Validate all credentials were successfully rotated
- Test that patches are properly applied
Decision: Clean vs. Re-Image
When to Clean (In-Place Remediation)
- Limited number of artifacts
- Well-understood malware family
- No rootkit or bootkit components
- Time pressure requires faster recovery
- System configuration is complex to rebuild
When to Re-Image (Full Rebuild)
- Rootkit or bootkit detected
- Kernel-level compromise
- Domain controller compromise
- Inability to confirm complete eradication
- Simpler to rebuild than to clean
- Legal requirements demand clean systems
Common Persistence Locations Reference
Windows
Registry:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon (Shell, Userinit)
HKLM\SYSTEM\CurrentControlSet\Services
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
Filesystem:
%AppData%\Microsoft\Windows\Start Menu\Programs\Startup
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
C:\Windows\System32\Tasks\
C:\Windows\System32\drivers\
WMI:
root\Subscription\__EventFilter
root\Subscription\CommandLineEventConsumer
root\Subscription\__FilterToConsumerBinding
Linux
Cron:
/etc/crontab
/etc/cron.d/*
/etc/cron.daily/*
/var/spool/cron/crontabs/*
Services:
/etc/systemd/system/*.service
/etc/init.d/*
/etc/rc.local
Shell:
~/.bashrc, ~/.profile, ~/.bash_profile
/etc/profile.d/*
/etc/environment
SSH:
~/.ssh/authorized_keys
/etc/ssh/sshd_config
Other:
/etc/ld.so.preload
Kernel modules: /lib/modules/