eradicating-malware-from-infected-systems▌
mukul975/Anthropic-Cybersecurity-Skills · updated May 25, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Systematically remove malware, backdoors, and attacker persistence mechanisms from infected systems while ensuring complete eradication and preventing re-infection.
| name | eradicating-malware-from-infected-systems |
| description | Systematically remove malware, backdoors, and attacker persistence mechanisms from infected systems while ensuring complete eradication and preventing re-infection. |
| domain | cybersecurity |
| subdomain | incident-response |
| tags | - incident-response - eradication - malware-removal - persistence - dfir |
| mitre_attack | - T1547 - T1053 - T1543 - T1574 |
| version | '1.0' |
| author | mahipal |
| license | Apache-2.0 |
| nist_csf | - RS.MA-01 - RS.MA-02 - RS.AN-03 - RC.RP-01 |
Eradicating Malware from Infected Systems
When to Use
- Malware infection confirmed and containment is in place
- Forensic investigation has identified all persistence mechanisms
- All compromised systems have been identified and scoped
- Ready to remove attacker artifacts and restore clean state
- Post-containment phase requires systematic cleanup
Prerequisites
- Completed forensic analysis identifying all malware artifacts
- List of all compromised systems and accounts
- EDR/AV with updated signatures deployed
- YARA rules for the specific malware family
- Clean system images or verified backups for restoration
- Network isolation still in effect during eradication
Workflow
Step 1: Map All Persistence Mechanisms
# Windows - Check all known persistence locations
# Autoruns (Sysinternals) - comprehensive autostart enumeration
autorunsc.exe -accepteula -a * -c -h -s -v > autoruns_report.csv
# Registry Run keys
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /s
reg query "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /s
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /s
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run" /s
# Scheduled tasks
schtasks /query /fo CSV /v > schtasks_all.csv
# WMI event subscriptions
Get-WMIObject -Namespace root\Subscription -Class __EventFilter
Get-WMIObject -Namespace root\Subscription -Class CommandLineEventConsumer
Get-WMIObject -Namespace root\Subscription -Class __FilterToConsumerBinding
# Services
Get-Service | Where-Object {$_.Status -eq 'Running'} | Select-Object Name, DisplayName, BinaryPathName
# Linux persistence
cat /etc/crontab
ls -la /etc/cron.*/
ls -la /etc/init.d/
systemctl list-unit-files --type=service | grep enabled
cat /etc/rc.local
ls -la ~/.bashrc ~/.profile ~/.bash_profile
Step 2: Identify All Malware Artifacts
# Scan with YARA rules specific to the malware family
yara -r -s malware_rules/specific_family.yar C:\ 2>/dev/null
# Scan with multiple AV engines
# ClamAV scan
clamscan -r --infected --remove=no /mnt/infected_disk/
# Check for known malicious file hashes
find / -type f -newer /tmp/baseline_timestamp -exec sha256sum {} \; 2>/dev/null | \
while read hash file; do
grep -q "$hash" known_malicious_hashes.txt && echo "MALICIOUS: $file ($hash)"
done
# Check for web shells
find /var/www/ -name "*.php" -newer /tmp/baseline -exec grep -l "eval\|base64_decode\|system\|passthru\|shell_exec" {} \;
# Check for unauthorized SSH keys
find / -name "authorized_keys" -exec cat {} \; 2>/dev/null
Step 3: Remove Malware Files and Artifacts
# Remove identified malicious files (after forensic imaging)
# Windows
Remove-Item -Path "C:\Windows\Temp\malware.exe" -Force
Remove-Item -Path "C:\Users\Public\backdoor.dll" -Force
# Remove malicious scheduled tasks
schtasks /delete /tn "MaliciousTaskName" /f
# Remove WMI persistence
Get-WMIObject -Namespace root\Subscription -Class __EventFilter -Filter "Name='MalFilter'" | Remove-WMIObject
Get-WMIObject -Namespace root\Subscription -Class CommandLineEventConsumer -Filter "Name='MalConsumer'" | Remove-WMIObject
# Remove malicious registry entries
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "MalEntry" /f
# Remove malicious services
sc stop "MalService" && sc delete "MalService"
# Linux - Remove malicious cron entries, binaries, SSH keys
crontab -r # Remove entire crontab (or edit specific entries)
rm -f /tmp/.hidden_backdoor
sed -i '/malicious_key/d' ~/.ssh/authorized_keys
systemctl disable malicious-service && rm /etc/systemd/system/malicious-service.service
Step 4: Reset Compromised Credentials
# Reset all compromised user passwords
Import-Module ActiveDirectory
Get-ADUser -Filter * -SearchBase "OU=CompromisedUsers,DC=domain,DC=com" |
Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString "TempP@ss!$(Get-Random)" -AsPlainText -Force)
# Reset KRBTGT password (twice, 12+ hours apart for Kerberos golden ticket attack)
Reset-KrbtgtPassword -DomainController DC01
# Wait 12+ hours, then reset again
Reset-KrbtgtPassword -DomainController DC01
# Rotate service account passwords
Get-ADServiceAccount -Filter * | ForEach-Object {
Reset-ADServiceAccountPassword -Identity $_.Name
}
# Revoke all Azure AD tokens
Get-AzureADUser -All $true | ForEach-Object {
Revoke-AzureADUserAllRefreshToken -ObjectId $_.ObjectId
}
# Rotate API keys and secrets
# Application-specific credential rotation
Step 5: Patch Vulnerability Used for Initial Access
# Identify and patch the entry point vulnerability
# Windows Update
Install-WindowsUpdate -KBArticleID "KB5001234" -AcceptAll -AutoReboot
# Linux patching
apt update && apt upgrade -y # Debian/Ubuntu
yum update -y # RHEL/CentOS
# Application-specific patches
# Update web application frameworks, CMS, etc.
# Verify patch was applied
Get-HotFix -Id "KB5001234"
Step 6: Validate Eradication
# Full system scan with updated signatures
# CrowdStrike Falcon - On-demand scan
curl -X POST "https://api.crowdstrike.com/scanner/entities/scans/v1" \
-H "Authorization: Bearer $FALCON_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ids": ["device_id"]}'
# Verify no persistence mechanisms remain
autorunsc.exe -accepteula -a * -c -h -s -v | findstr /i "unknown verified"
# Check for any remaining suspicious processes
Get-Process | Where-Object {$_.Path -notlike "C:\Windows\*" -and $_.Path -notlike "C:\Program Files*"}
# Verify no unauthorized network connections
Get-NetTCPConnection -State Established |
Where-Object {$_.RemoteAddress -notlike "10.*" -and $_.RemoteAddress -notlike "172.16.*"} |
Select-Object LocalPort, RemoteAddress, RemotePort, OwningProcess
# Run YARA rules again to confirm no artifacts remain
yara -r malware_rules/specific_family.yar C:\ 2>/dev/null
Key Concepts
| Concept | Description |
|---|---|
| Persistence Mechanism | Method attacker uses to maintain access across reboots |
| Root Cause Remediation | Fixing the vulnerability that enabled initial compromise |
| Credential Rotation | Resetting all potentially compromised passwords and tokens |
| KRBTGT Reset | Invalidating Kerberos tickets after golden ticket attack |
| Indicator Sweep | Scanning all systems for known malicious artifacts |
| Validation Scan | Confirming eradication was successful before recovery |
| Re-imaging | Rebuilding systems from clean images rather than cleaning |
Tools & Systems
| Tool | Purpose |
|---|---|
| Sysinternals Autoruns | Enumerate all Windows autostart locations |
| YARA | Custom rule-based malware scanning |
| CrowdStrike/SentinelOne | EDR-based scanning and remediation |
| ClamAV | Open-source antivirus scanning |
| PowerShell | Scripted cleanup and validation |
| Velociraptor | Remote artifact collection and remediation |
Common Scenarios
- RAT with Multiple Persistence: Remote access trojan using registry, scheduled task, and WMI subscription. Must remove all three persistence mechanisms.
- Web Shell on IIS/Apache: PHP/ASPX web shell in web root. Remove shell, audit all web files, patch application vulnerability.
- Rootkit Infection: Kernel-level rootkit that survives cleanup. Requires full re-image from known-good media.
- Fileless Malware: PowerShell-based attack living in memory and registry. Remove registry entries, clear WMI subscriptions, restart system.
- Active Directory Compromise: Attacker created backdoor accounts and golden tickets. Reset KRBTGT, remove rogue accounts, audit group memberships.
Output Format
- Eradication action log with all removed artifacts
- Credential rotation confirmation report
- Vulnerability patching verification
- Post-eradication validation scan results
- Systems cleared for recovery phase
How to use eradicating-malware-from-infected-systems on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add eradicating-malware-from-infected-systems
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches eradicating-malware-from-infected-systems from GitHub repository mukul975/Anthropic-Cybersecurity-Skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate eradicating-malware-from-infected-systems. Access the skill through slash commands (e.g., /eradicating-malware-from-infected-systems) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★55 reviews- ★★★★★Shikha Mishra· Dec 16, 2024
Registry listing for eradicating-malware-from-infected-systems matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Liam Sanchez· Dec 12, 2024
eradicating-malware-from-infected-systems reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Kiara Harris· Dec 12, 2024
Useful defaults in eradicating-malware-from-infected-systems — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Aarav Dixit· Dec 12, 2024
Registry listing for eradicating-malware-from-infected-systems matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Liam Torres· Dec 12, 2024
Keeps context tight: eradicating-malware-from-infected-systems is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Rahul Santra· Nov 7, 2024
Keeps context tight: eradicating-malware-from-infected-systems is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Charlotte Sethi· Nov 3, 2024
eradicating-malware-from-infected-systems has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Liam White· Nov 3, 2024
I recommend eradicating-malware-from-infected-systems for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Charlotte Park· Nov 3, 2024
Keeps context tight: eradicating-malware-from-infected-systems is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Charlotte Rao· Nov 3, 2024
Registry listing for eradicating-malware-from-infected-systems matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 55