Skip to content
Back to skills

Eradicating Malware From Infected Systems

FSecurity

Systematically remove malware, backdoors, and attacker persistence mechanisms from infected systems while ensuring complete eradication and preventing re-infection.

  • 4 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
securitygophpshellbashazuregitapisecurity

Works with

  • api

Security analysis

F35/100
  • criticalAccesses sensitive system or user directories
  • highCreates or modifies cron jobs for persistent execution
  • highCreates or modifies cron jobs for persistent execution
  • criticalModifies startup scripts or system services for persistence
  • criticalModifies startup scripts or system services for persistence
  • criticalModifies startup scripts or system services for persistence

Pro shows the line behind each finding and how to fix it

Scanned September 8, 2026

npx -y skills add MustafaKemal0146/fetih --skill eradicating-malware-from-infected-systems --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Eradicating Malware From Infected Systems?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Eradicating Malware From Infected Systems
[![Security: F — Skills Directory](https://www.skillsdirectory.com/api/skills/mustafakemal0146-eradicating-malware-from-infected-systems/badge)](https://www.skillsdirectory.com/skills/mustafakemal0146-eradicating-malware-from-infected-systems)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.
tags:
- malware-removal
- incident-response
- persistence
- fetih
- dfir
- cybersecurity
- siber-güvenlik
- eradication
triggers:
- IR
- api
- breach
- eradicating
- forensic
- güvenlik olayı
- hash
- http
- incident response
- infected
- log
- malware
category: incident-response
source_subdomain: incident-response
mitre_attack:
- T1547
- T1053
- T1543
- T1574
nist_csf:
- RS.MA-01
- RS.MA-02
- RS.AN-03
- RC.RP-01
adapted_for: fetih
---

# Eradicating Malware from Infected Systems


## Ne Zaman Kullanılır
- 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

## Ön Gereksinimler
- Completed forensic analysis identifying all malware artifacts
- List of all compromised systems and accounts
- EDR/AV with updated signatures Dağıtılmış
- YARA rules for the specific malware family
- Clean system images or verified backups for restoration
- Network isolation still in effect during eradication

## İş Akışı

### Adım 1: Map All Persistence Mechanisms
```bash
autorunsc.exe -accepteula -a * -c -h -s -v > autoruns_report.csv

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

schtasks /query /fo CSV /v > schtasks_all.csv

Get-WMIObject -Namespace root\Subscription -Class __EventFilter
Get-WMIObject -Namespace root\Subscription -Class CommandLineEventConsumer
Get-WMIObject -Namespace root\Subscription -Class __FilterToConsumerBinding

Get-Service | Where-Object {$_.Status -eq 'Running'} | Select-Object Name, DisplayName, BinaryPathName

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
```

### Adım 2: Identify All Malware Artifacts
```bash
yara -r -s malware_rules/specific_family.yar C:\ 2>/dev/null

clamscan -r --infected --remove=no /mnt/infected_disk/

Bul: / -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

Bul: /var/www/ -name "*.php" -newer /tmp/baseline -exec grep -l "eval\|base64_decode\|system\|passthru\|shell_exec" {} \;

Bul: / -name "authorized_keys" -exec cat {} \; 2>/dev/null
```

### Adım 3: Remove Malware Files and Artifacts
```bash
Remove-Item -Path "C:\Windows\Temp\malware.exe" -Force
Remove-Item -Path "C:\Users\Public\backdoor.dll" -Force

schtasks /delete /tn "MaliciousTaskName" /f

Get-WMIObject -Namespace root\Subscription -Class __EventFilter -Filter "Name='MalFilter'" | Remove-WMIObject
Get-WMIObject -Namespace root\Subscription -Class CommandLineEventConsumer -Filter "Name='MalConsumer'" | Remove-WMIObject

reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "MalEntry" /f

sc stop "MalService" && sc delete "MalService"

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
```

### Adım 4: Reset Compromised Credentials
```bash
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-KrbtgtPassword -DomainController DC01
Reset-KrbtgtPassword -DomainController DC01

Get-ADServiceAccount -Filter * | ForEach-Object {
  Reset-ADServiceAccountPassword -Identity $_.Name
}

Get-AzureADUser -All $true | ForEach-Object {
  Revoke-AzureADUserAllRefreshToken -ObjectId $_.ObjectId
}

```

### Adım 5: Patch Vulnerability Used for Initial Access
```bash
Install-WindowsUpdate -KBArticleID "KB5001234" -AcceptAll -AutoReboot

apt update && apt upgrade -y  # Debian/Ubuntu
yum update -y                 # RHEL/CentOS


Get-HotFix -Id "KB5001234"
```

### Adım 6: Validate Eradication
```bash
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"]}'

autorunsc.exe -accepteula -a * -c -h -s -v | Bul:str /i "unknown verified"

Get-Process | Where-Object {$_.Path -notlike "C:\Windows\*" -and $_.Path -notlike "C:\Program Files*"}

Get-NetTCPConnection -State Established |
  Where-Object {$_.RemoteAddress -notlike "10.*" -and $_.RemoteAddress -notlike "172.16.*"} |
  Select-Object LocalPort, RemoteAddress, RemotePort, OwningProcess

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

1. **RAT with Multiple Persistence**: Remote access trojan using registry, scheduled task, and WMI subscription. Must remove all three persistence mechanisms.
2. **Web Shell on IIS/Apache**: PHP/ASPX web shell in web root. Remove shell, audit all web files, patch application vulnerability.
3. **Rootkit Infection**: Kernel-level rootkit that survives cleanup. Requires full re-image from known-good media.
4. **Fileless Malware**: PowerShell-based attack living in memory and registry. Remove registry entries, clear WMI subscriptions, restart system.
5. **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

<!--
  ⚔ Bu skill FETIH AI Agent icin gelistirilmistir — https://github.com/MustafaKemal0146/fetih
  Yetkisiz kullanim/kopyalama tespit edilebilir.
  hash: 09cad63a3159fdc6
-->

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.