defender-for-identity
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "defender-for-identity" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-59077c64adc6a0c6b44ee539ed911f15cbad0e7941cf5622905d869bc7781752. Verify the upstream source and version against https://github.com/vinayaklatthe/microsoft-security-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Microsoft Defender for Identity (MDI) guide — Identity threat detection (ITDR) for on-premises Active Directory, AD CS, AD FS, and Entra Connect using deployed sensors. Includes sensor deployment, prerequisites, security posture assessment, and lateral-movement detection. Applicable to on-prem AD threat detection scenarios (e.g., Kerberoasting, DCSync, Golden Ticket). Not intended for protecting Entra ID cloud identities or correlating cross-workload events.
Introduction source: third_party · vinayaklatthe · 0.1.0 Reference
SkillPi interpretation
- Tasks
- Guidance for Microsoft Defender for Identity (MDI) — identity threat detection (ITDR) across on-premises Active Directory, AD CS, AD FS, and Entra Connect using sensors. Covers sensor placement, prerequisites, posture assessments, and lateral-movement detection. WHEN: Defender for Identity, MDI, MDI sensors, detect lateral movement, on-prem AD threat detection, identity security posture, AD CS monitoring, ADCS abuse, domain controller sensor, detect Kerberoasting, DCSync, Golden Ticket, identity ITDR, honeytoken, gMSA Directory Service Account, suspicious LDAP, ESC1 ESC8. DO NOT USE when the goal is cloud identity protection in Entra ID (use entra-id-protection) or correlating cross-workload incidents (use defender-xdr).
- Audience
- Detecting identity-based attacks against **on-premises Active Directory**, **AD CS**, **AD FS**, and **Entra Connect** — and surfacing identity posture issues (legacy protocols, unsecure accounts, risky delegations) that lead to those attacks. Do not use this skill** for cloud-only Entra ID risk detection — that is **Entra ID Protection** (`entra-id-protection`). MDI sees on-prem and hybrid identity infrastructure.
- Testing
- Not tested
Browse files
Frontmatter
name: defender-for-identity
description: "Guidance for Microsoft Defender for Identity (MDI) — identity threat detection (ITDR) across on-premises Active Directory, AD CS, AD FS, and Entra Connect using sensors. Covers sensor placement, prerequisites, posture assessments, and lateral-movement detection. WHEN: Defender for Identity, MDI, MDI sensors, detect lateral movement, on-prem AD threat detection, identity security posture, AD CS monitoring, ADCS abuse, domain controller sensor, detect Kerberoasting, DCSync, Golden Ticket, identity ITDR, honeytoken, gMSA Directory Service Account, suspicious LDAP, ESC1 ESC8. DO NOT USE when the goal is cloud identity protection in Entra ID (use entra-id-protection) or correlating cross-workload incidents (use defender-xdr)."
license: MIT
metadata:
author: Microsoft
version: "0.1.0"Microsoft Defender for Identity
Microsoft Defender for Identity (MDI) is a cloud-based identity threat detection and response (ITDR) solution. Lightweight sensors on domain controllers and other identity infrastructure parse network traffic, ETW events, and AD object reads to detect reconnaissance, credential theft, lateral movement, and domain dominance. Signals correlate into Defender XDR incidents.
When to use
Detecting identity-based attacks against on-premises Active Directory, AD CS, AD FS, and Entra Connect — and surfacing identity posture issues (legacy protocols, unsecure accounts, risky delegations) that lead to those attacks.
Do not use this skill for cloud-only Entra ID risk detection — that is Entra ID
Protection (entra-id-protection). MDI sees on-prem and hybrid identity infrastructure.
Map the attack to a detection source
Pick the row that matches the attacker behaviour to confirm MDI is the right control and which sensor surface produces the signal.
| If the attacker is... | MDI detection family | Sensor surface |
|---|---|---|
| Enumerating users, groups, SPNs | Reconnaissance | DC sensor (LDAP, SAMR) |
| Cracking service-account TGS tickets offline | Kerberoasting | DC sensor (Kerberos) |
| Replicating directory secrets (DCSync) | Domain dominance | DC sensor (DRSUAPI RPC) |
| Forging Kerberos tickets | Golden / Silver Ticket | DC sensor (Kerberos anomalies) |
| Abusing AD CS misconfig (ESC1–ESC8) | Certificate-based privilege escalation | AD CS sensor |
| Hijacking the AD FS sign-in flow | Token / SAML forgery | AD FS sensor |
| Stealing Entra Connect sync account creds | Hybrid identity compromise | Entra Connect sensor |
| Probing risky configurations (legacy SMB, weak SPNs) | Identity Security Posture (ISPM) | All sensors + cloud assessments |
Rule of thumb: if the attacker touches an on-prem identity service for any step, MDI should see it. A gap in any sensor (one un-instrumented DC, AD CS, or AD FS) is a blind spot for the whole kill chain.
Approach
-
Map identity infrastructure — Inventory every domain controller (including RODCs), every AD CS Enterprise CA, every AD FS server, and every Entra Connect / Cloud Sync host. This list is the sensor target list — gaps here become attack paths later. Verify: `Get-ADDomainController -Filter ` count equals the deployed sensor count in the MDI portal under Settings → Sensors.*
-
Confirm prerequisites before deploy — Each sensor host needs outbound HTTPS to the MDI cloud service, the MDI sensor MSI, a Directory Service Account (DSA), and (on DCs) the Advanced Audit Policy settings + Object Access SACLs that MDI requires. Verify: run the MDI sizing tool and confirm CPU/RAM headroom; sensors should add < 10% sustained CPU on a DC.
-
Use a gMSA for the Directory Service Account — Group Managed Service Accounts rotate passwords automatically and remove the worst class of credential exposure. Never use a plaintext-password service account. Verify:
Get-ADServiceAccount mdi-gmsa$ -Properties PrincipalsAllowedToRetrieveManagedPasswordreturns the sensor host group, nothing wider. -
Deploy sensors in waves — DC sensors first (highest signal), then AD CS, AD FS, Entra Connect. Wait 24 hours between waves to baseline traffic and avoid drowning the SOC in first-time-seen activity alerts.
-
Tune alerts, then act on posture — Acknowledge benign first-week alerts (admin tooling noise), then work the Identity Security Posture Assessments (Secure Score panel). Posture issues (e.g. Unsecure account attributes, Legacy protocols, Dormant accounts) are the weak links attackers exploit before alerts ever fire. Verify: posture score baseline captured at week 1; track delta monthly, not daily.
-
Deploy honeytokens — Plant 1-2 fake high-privilege accounts (e.g.
svc-legacy-backup) that no human should ever touch. Any auth attempt is high-confidence malicious. -
Correlate in Defender XDR — MDI alerts auto-correlate with MDE and Entra ID Protection into a single XDR incident. Investigate from the incident, not the standalone alert.
Guardrails
- Every DC must have a sensor. A single un-instrumented DC is the lateral-movement landing pad attackers will find. RODCs included.
- Sensor on AD CS is not optional in 2026. AD CS abuse (ESC1-ESC8) is the most common privilege-escalation path in current incident response cases - without the AD CS sensor you see the result (Domain Admin) but not the cause.
- Use a gMSA for the DSA. Never a regular service account with a static password - it becomes the next Kerberoasting target.
- Tune, don't suppress. Disabling an alert class to silence noise removes the detection. Suppress per-source instead and review monthly.
- Honeytokens require care. Place them where reconnaissance tools see them (group memberships, descriptions) but document them so the SOC doesn't waste cycles investigating legitimate test triggers.
Common anti-patterns
- "We'll cover the most important DCs first" - Attackers pick the un-instrumented one. All DCs or none.
- "We use a domain admin account as the DSA for simplicity" - Hands attackers a domain admin if the sensor host is compromised. Always use gMSA with least privilege.
- "Posture alerts are not real alerts so we ignore them" - Posture issues are pre-attack signals. Working them down is cheaper than responding to the incident they enable.
- "We didn't deploy the AD CS sensor - we don't issue many certs" - Issuance volume is irrelevant. ESC1/ESC8 misconfigs exist in stock AD CS installs and need monitoring.
- "MDI alerts go straight to the legacy SIEM, we don't use Defender XDR" - Loses cross- workload correlation. Even if SIEM is primary, keep XDR for the attack graph.
Example prompts
Plan Defender for Identity sensor coverage across DCs, AD CS, AD FS, and Entra Connect.Which Defender for Identity detections cover the Kerberoasting kill chain?How do I configure a gMSA Directory Service Account for MDI?Which Identity Security Posture assessments should I fix first?Show me how to deploy a honeytoken account in MDI.Why am I seeing high CPU on a DC after installing the MDI sensor - how do I size it?
Microsoft Learn
- Overview: https://learn.microsoft.com/defender-for-identity/what-is
- Plan capacity (sizing tool): https://learn.microsoft.com/defender-for-identity/deploy/capacity-planning
- Sensor on AD CS: https://learn.microsoft.com/defender-for-identity/deploy/active-directory-federation-services
- Directory Service Account (gMSA): https://learn.microsoft.com/defender-for-identity/deploy/directory-service-accounts
- Identity Security Posture Assessments: https://learn.microsoft.com/defender-for-identity/security-assessment
- Honeytoken accounts (entity tags): https://learn.microsoft.com/defender-for-identity/entity-tags
- Alerts reference (Kerberoasting, DCSync, Golden Ticket): https://learn.microsoft.com/defender-for-identity/alerts-overview
Current listing version
0.1.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 Microsoft Defender for Identity 的完整部署与检测指导,覆盖本地 AD、AD CS、AD FS、Entra Connect 的身份威胁检测(ITDR)
Highlights
- 触发词精准完整,覆盖多种变体(MDI、Kerberoasting、ESC1/ESC8等),边界清晰,明确排除 entra-id-protection 与 defender-xdr
Areas to improve
-
description写错位置 Reported severity: Minor
顶层 description 字段为空,实质描述内容位于 skill_body 内部
Recommendation: 建议将触发描述移至顶层 description 字段,保持规范一致
Highlights
- 结构完整,含攻击映射表、部署步骤、最佳实践、反模式、示例提示与官方文档链接
Areas to improve
-
文档略长 Reported severity: Minor
skill_body 约450行,接近500行上限
Recommendation: 建议适当精简或拆分内容,提升可读性
Highlights
- 工具来源明确(Microsoft Learn),参数正确,覆盖主要异常场景,关键操作有验证机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 14, 60
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- learn.microsoft.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.