compromise-recovery

应对与恢复重大身份/租户泄露事件的指导方案,旨在通过协调行动重新获得管理控制、驱逐攻击者并加固系统以防再次入侵。涵盖可信基础(PAW)、遏制、驱逐、身份恢复(krbtgt、联合身份)以及事后加固措施。适用场景包括泄露事件恢复、紧急响应、驱逐攻击者、租户被攻陷或对手已获取高权限时的恢复与加固。不适用于常规 SOC 调查或未发生泄露时的预防性加固。

仓库最近推送
GitHub Stars
183
Forks
34
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "compromise-recovery":https://skillpi.com/zh/skills/deepskill-256eda508b0141f0f7f277d110054459f8bdaf9a6f61944f3e40a34252fbddd9。安装前核对上游来源和版本:https://github.com/vinayaklatthe/microsoft-security-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

应对与恢复重大身份/租户泄露事件的指导方案,旨在通过协调行动重新获得管理控制、驱逐攻击者并加固系统以防再次入侵。涵盖可信基础(PAW)、遏制、驱逐、身份恢复(krbtgt、联合身份)以及事后加固措施。适用场景包括泄露事件恢复、紧急响应、驱逐攻击者、租户被攻陷或对手已获取高权限时的恢复与加固。不适用于常规 SOC 调查或未发生泄露时的预防性加固。

0 下载

介绍来源: third_party · vinayaklatthe · 0.1.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: compromise-recovery
description: "Guidance for responding to and recovering from a significant identity/tenant compromise - regaining administrative control, evicting the adversary in a single coordinated action, and hardening to prevent reentry. Covers trusted foundation (PAW), containment, eviction, identity recovery (krbtgt, federation), and post-eviction hardening. WHEN: compromise recovery, incident response, regain control after breach, evict attacker, tenant compromise, rebuild trust, ransomware recovery, post-breach hardening, kick out adversary, emergency response, attacker is in our tenant right now, ransomware hit our organisation, regain admin access after a breach, adversary has domain admin or Global Admin. DO NOT USE for routine SOC investigation (use defender-xdr / sentinel) or for preventive hardening with no active compromise (use security-architecture / entra-id)."
license: MIT
metadata:
  author: Microsoft
  version: "0.1.0"

Compromise Recovery

Compromise recovery is the disciplined process of regaining administrative control of an environment during or after a significant breach, evicting the adversary in a single coordinated action, and re-establishing a trustworthy security posture so the attacker cannot return.

When to use

Responding to a confirmed widespread compromise - tenant-wide Entra/AD compromise, ransomware, persistent adversary with Global Admin or Domain Admin - where normal remediation is insufficient and the existing infrastructure cannot be trusted.

Do not use this skill for:

  • Routine alert triage or single-host malware (use defender-xdr)
  • Pre-incident architecture hardening (use security-architecture, entra-id, paw-design)
  • Sentinel hunting and detection engineering (use sentinel)

Decide what stage you are at

Situation Stage First action
Anomalies detected, not yet confirmed scope Investigate Hunt + preserve evidence, do not tip off
Adversary confirmed, scope still expanding Contain Stand up trusted foundation (PAW), protect crown jewels
Adversary scope known, ready to remove Evict Single coordinated action across all persistence
Adversary removed, validating no re-entry Recover Reset krbtgt, federation secrets, privileged creds
Stable, hardening to prevent recurrence Harden MFA-everywhere, PIM, PAW, monitoring expansion
Hardening complete, back to BAU Transition Hand off to sustained SecOps + improvement

Rule of thumb: Never start eviction from the compromised environment. Stand up a trusted foundation first - dedicated admin workstations (PAW), out-of-band communications, a clean Entra tenant or cleanly-rebuilt admin accounts. Acting from untrusted infrastructure hands the adversary your response plan in real time.

Approach

  1. Engage qualified incident responders immediately - For major incidents, engage Microsoft Incident Response or a qualified DFIR partner. The cost of delay (re-entry, ransomware double-extortion, regulator timelines) dwarfs the engagement cost. Verify: an IR partner is engaged within the first 24 hours of confirmed compromise.
  2. Establish a trusted foundation - Stand up out-of-band communications (separate Teams tenant, signal/voice), secure admin devices (PAWs), and a clean admin identity path. Assume existing infrastructure - mail, chat, jump hosts, admin accounts - may be untrusted or monitored by the adversary. Verify: incident bridge is on out-of-band channel; responders authenticate from PAW or equivalent isolated workstation; no compromised admin account is used.
  3. Preserve forensic evidence before remediating - Snapshot affected systems, export sign- in logs, audit logs, mail items, and Entra/AD changes. Once you remediate you lose evidence; regulators and insurers will ask for it. Verify: forensic acquisitions are stored on isolated, write-protected media with chain of custody documented.
  4. Contain without tipping off - Limit the adversary's ability to act: protect crown jewels (privileged accounts, federation/signing keys, backup credentials), tighten Conditional Access in stealth mode where possible, monitor known adversary accounts without blocking them yet. Partial eviction warns the adversary and invites re-entrenchment under a new identity. Verify: containment actions are recorded in a sequenced runbook, not ad-hoc; nothing visible to the adversary has changed unless deliberate.
  5. Evict in a single coordinated action - Plan a sequenced removal across all known persistence: compromised accounts (disable + reset), app registrations and consent grants (review and revoke), mailbox rules and forwarding (delete), scheduled tasks / startup items, golden/forged Kerberos tickets, federation/SAML tokens, any added admin roles. Aim for one decisive action window rather than piecemeal changes. Verify: an eviction runbook lists every persistence artefact with owner, time, and verification step; rehearsed before execution.
  6. Reset identity trust - Reset the krbtgt account (twice, with sufficient interval for replication), reset all privileged credentials, rotate federation/SAML signing certificates, rotate Entra Connect sync account, and reset any service principal secrets the adversary could have touched. Verify: krbtgt reset is logged twice; federation cert rollover is complete; sign-in logs show no remaining sessions from compromised tokens.
  7. Harden to prevent reentry - Enforce phishing-resistant MFA on all privileged and high-risk users, move privileged roles into PIM with just-in-time activation and approvals, deploy or expand PAW for admin work, expand Defender + Sentinel monitoring with detections tuned to the observed adversary TTPs, and apply the least privilege model across the privileged tier. Verify: 100% of privileged accounts in PIM and behind phishing-resistant MFA; named PAW estate for admin work; new detections deployed for the specific TTPs seen.
  8. Transition to BAU - Hand off to a sustained security operations and improvement programme with a 90-day watch period, a documented lessons-learned, and committed investment in the gaps that allowed initial compromise.

Guardrails

  • Engage qualified incident responders (e.g. Microsoft Incident Response) for any major incident. This is not a self-service exercise above a certain threshold.
  • Sequence eviction carefully - partial eviction warns the adversary and invites re- entrenchment. Plan, rehearse, then execute as one action.
  • Preserve forensic evidence before remediating where investigation, regulatory, or insurance obligations apply. Wiping is destruction of evidence.
  • Never act from compromised infrastructure - establish a trusted foundation and PAW before touching the adversary's territory.
  • Reset krbtgt twice with replication interval between resets - a single reset still leaves valid golden tickets in flight.
  • MFA without phishing-resistant factors is not enough post-AiTM-era. Move privileged users to FIDO2 / Windows Hello for Business / certificate-based auth.
  • PIM and least privilege are post-eviction non-negotiables - if the adversary got in via standing privilege, removing standing privilege is the eviction.

Common anti-patterns

  • Piecemeal eviction. Disabling one compromised account tips off the adversary, who pivots to the next persistence and digs deeper. Plan and execute as one coordinated action.
  • Acting from the compromised admin workstation. The adversary watches the response in real time and adapts. Always operate from PAW or equivalent.
  • Skipping krbtgt reset because "the password changed". krbtgt is the AD trust root - if it was harvested, every Kerberos ticket is forged-capable until reset (twice).
  • Forgetting service principals and app registrations. Modern Entra compromises persist via consent grants and app secrets long after user accounts are reset.
  • Declaring victory too early. Without a 90-day watch period and new detections tuned to the observed TTPs, you will not see the re-entry attempt.
  • No lessons learned, no investment commitment. The compromise will recur if the root cause (weak MFA, no PIM, flat network, no PAW) is not funded for remediation.

Example prompts

  • An attacker has Global Admin in our tenant right now. Walk me through evicting them.
  • Walk me through the Microsoft incident response process for a ransomware attack.
  • How do I evict an adversary from an Entra ID tenant without tipping them off?
  • What should I do in the first 24 hours after discovering a tenant compromise?
  • How do I harden the tenant after eviction so the attacker cannot return?
  • How do I rebuild trust in our admin accounts after a breach?

Microsoft Learn

当前收录版本

0.1.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 提供重大身份/租户泄露事件的端到端恢复框架,涵盖从调查到加固的全生命周期
  • 面向高价值应急响应场景(如勒索软件、全局管理员沦陷),具有明确刚需性
触发精准95/100

亮点

  • WHEN/DO NOT USE 字段清晰界定适用与排除场景,边界明确
  • 覆盖多种攻击状态描述(如 attacker is in our tenant right now, ransomware hit our organisation)
结构规范90/100

待提升项

  • description写错位置 原报告严重程度:轻微

    顶层 frontmatter 中 description 为空,实际内容位于 skill_body 内部

    改进建议:将 description 内容移至顶层 frontmatter

  • 缺少显式 'When to Use' 章节标题 原报告严重程度:轻微

    内容存在但未使用标准章节标题

    改进建议:添加显式 'When to Use' 章节标题以提升可读性

亮点

  • 结构完整,含阶段划分表、8步 Approach、Guardrails、Anti-patterns 等关键模块
  • 提供验证点与出口条件,逻辑闭环清晰
执行可靠90/100

亮点

  • 基于 Microsoft 官方实践,工具与方法来源明确
  • 覆盖关键异常处理(证据保全、防打草惊蛇、双次krbtgt重置)
  • 不可逆操作有确认机制,逻辑闭环完整
证据可验 (前四项均值)92/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 61, 75 行
文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • learn.microsoft.com
  • www.microsoft.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。