Skip to content

galyarderlabs/galyarder-framework / integrations/antigravity/eradicating-malware-from-infected-systems

eradicating-malware-from-infected-systems

Flagged

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

FileKindSize
SKILL.mdskill md10.9 KB
references/api-reference.mdmarkdown2.1 KB
references/standards.mdmarkdown2.8 KB
references/workflows.mdmarkdown3.9 KB
scripts/agent.pyscript7.4 KB
scripts/process.pyscript18.0 KB

references/workflows.md

View on GitHub
# 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
1. Compile list of all malware files with paths and hashes
2. Map all persistence mechanisms per system
3. List all compromised accounts (user, service, admin)
4. Identify all backdoor access methods
5. Document network-level indicators (C2 IPs, domains)
6. 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:**
1. Remove malware files from all systems
2. Delete persistence mechanisms (registry, tasks, services, WMI)
3. Disable compromised accounts
4. Block all C2 infrastructure at network level
5. Remove unauthorized SSH keys and certificates
6. Clean up web shells from all web servers

### Phase 3: Credential Reset
**Priority Order:**
1. KRBTGT password (reset twice, 12+ hours apart)
2. Domain admin accounts
3. Service accounts
4. All accounts that logged into compromised systems
5. Application credentials and API keys
6. Machine account passwords (if targeted)

### Phase 4: Vulnerability Remediation
1. Patch the vulnerability used for initial access
2. Patch any additional vulnerabilities discovered during investigation
3. Harden configurations that were exploited
4. Update security tool signatures and rules
5. Close unnecessary ports and services

### Phase 5: Validation
1. Full AV/EDR scan on all previously compromised systems
2. YARA scan for specific malware family artifacts
3. Check all persistence locations are clean
4. Verify no unauthorized processes running
5. Confirm no unauthorized network connections
6. Validate all credentials were successfully rotated
7. 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/
```

---
 2026 Galyarder Labs. Galyarder Framework.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall