Attackers who sign in with valid credentials, replayed sessions or forged tokens rarely trip a signature, so the identity compromises that matter most are often found by hunters rather than by alerts. Identity threat hunting is the practice of forming a specific hypothesis about how an identity could be abused in your environment, testing it against identity provider, directory and cloud audit logs, and turning what you learn into detections and posture fixes. This guide provides a hunt method adapted to identity data, the telemetry and pivot fields that make identity hunts work, a catalogue of hypotheses for human and non-human identities mapped to MITRE ATT&CK, and how to measure a hunting programme. It is for threat hunters, detection engineers and identity security teams. The wider detection and response capability is covered in the ITDR Guide; query-language specifics are in the KQL and SPL hunting guides.
Key takeaways
- Start from a falsifiable hypothesis. "A service principal is being used from infrastructure it has never used before" can be tested and closed; "look for bad sign-ins" cannot.
- Identity hunts need joined data. Sign-in events alone show access; you need audit events (credential, role and policy changes) and context (HR status, owner, expected source) to tell abuse from noise.
- Persistence lives in identity objects. New MFA methods, federation trusts, application credentials, OAuth grants and role assignments survive password resets, so they are the highest-value hunt targets.
- Non-human identities are the quietest targets. They have no MFA prompt or user to notice, but they have stable behaviour, which makes baseline hunts very effective.
- Every hunt should leave something behind. A detection, a posture fix, a data gap logged, or a documented negative result that lets the next hunter start further ahead.
A hunt method for identity data
The PEAK framework from Splunk's SURGe team (Prepare, Execute, and Act with Knowledge) describes three hunt types that map cleanly onto identity work: hypothesis-driven hunts, baseline hunts (exploratory data analysis of what normal looks like) and model-assisted hunts that use machine learning. Whatever framework you use, an identity hunt follows the same loop. See the Threat Hunting Frameworks Guide for a comparison of frameworks.
- Choose the topic from risk: start from your identity attack paths, recent threat intelligence (for example CISA's advisory AA23-320A on Scattered Spider, which describes help desk resets, push bombing, attacker-registered MFA tokens, SIM swaps and adding a federated identity provider with automatic account linking), and gaps found in ITDR coverage. See the Identity Attack Paths Guide.
- Write the hypothesis: actor, technique, identity type and observable. For example: "An attacker who stole an OAuth refresh token is using it from a hosting provider ASN, producing non-interactive sign-ins for a user whose interactive sign-ins come only from the corporate network."
- Confirm the data: check the logs exist, cover the period (retention is often the limit), and contain the fields you need. Record any gap as a finding.
- Execute: query, stack and pivot. Start broad, reduce with context (known good sources, service owners, change tickets), then examine what remains by hand.
- Escalate or close: anything suspicious goes to incident response with the evidence; otherwise document the negative result and the residual noise.
- Act: convert repeatable logic into a detection, file posture fixes (for example removing an unused federation trust) and update the hunt library.
Telemetry and pivot fields
| Source | Events that matter | Pivot fields | Common gap |
|---|---|---|---|
| Microsoft Entra ID sign-in logs | Four categories: interactive user, non-interactive user, service principal and managed identity sign-ins | User or app ID, IP and ASN, device, session and correlation identifiers, Conditional Access result, authentication protocol | Non-interactive and service principal logs not exported to the SIEM; the legacy view shows interactive sign-ins only |
| Microsoft Entra ID audit logs | Credential added to an application or service principal, consent granted, role assignment, authentication method registered, domain federation changed | Initiator, target object, modified properties | Changes made by service principals or automation not attributed to an owner |
| Okta System Log | Session starts, MFA factor changes, admin privilege grants, API token creation, identity provider changes, OAuth token grants (app.oauth2.as.token.grant) | Actor, client IP and user agent, session and transaction identifiers, target | Short default retention; export continuously. See the Okta System Log Detection Guide |
| Active Directory domain controller logs | 4624 and 4625 logons, 4768 TGT and 4769 service ticket requests, 4662 directory object access, 4728, 4732 and 4756 group membership additions, 5136 directory object changes | Account, client address, logon type, ticket encryption type, service name | Advanced audit policy not set, so 4662 and 5136 are missing; logs only from some domain controllers |
| AWS CloudTrail | ConsoleLogin, AssumeRole, AssumeRoleWithWebIdentity, CreateAccessKey, CreateLoginProfile, UpdateAssumeRolePolicy | userIdentity (type, ARN, access key ID, session issuer), sourceIPAddress, userAgent | Trails missing in some regions or accounts; data events off. See the AWS CloudTrail Guide |
| Google Cloud audit logs | Service account key creation, IAM policy changes, impersonation (token creator) activity | Principal email, caller IP, delegation chain | Data access logs disabled by default for many services |
| SaaS audit logs | OAuth app authorisations, API token creation, bulk exports, admin role changes | User, app or client ID, IP | Logs only on higher licence tiers or with short retention |
| Context sources | HR status, NHI inventory with owners and expected sources, change tickets, threat intelligence on hosting and anonymising networks | Identity ID, owner, environment | No authoritative inventory of non-human identities |
Normalise identities before hunting: the same person can appear as a user principal name, an on-premises SAM account name, an Okta login and an AWS role session name. A join table from identity governance data saves hours per hunt. For the Entra-specific fields and queries see the Entra ID Sign-In and Audit Log Detection Guide.
Hypotheses for identity provider and SaaS hunts
| Hypothesis | What to look for | ATT&CK |
|---|---|---|
| Password spraying succeeded against a few accounts | Many accounts with one or two failures from the same source or ASN, followed by a success for one of them; legacy protocol sign-ins | T1110.003 Password Spraying |
| An attacker got through by MFA fatigue | Bursts of denied or timed-out push prompts followed by an approval, especially outside working hours or from a new location | T1621 Multi-Factor Authentication Request Generation |
| A stolen session or refresh token is being replayed | The same session identifier from two locations or devices; non-interactive sign-ins from hosting providers for users whose interactive sign-ins come from the office; token use after a password reset | T1539 Steal Web Session Cookie; T1550.004 Web Session Cookie; T1528 Steal Application Access Token |
| A help desk reset was social engineering | Password or MFA reset by the help desk, followed within hours by a new MFA method or device registration and access to sensitive applications | T1556.006 Multi-Factor Authentication; T1098.005 Device Registration |
| A rogue identity provider or federation trust was added | New or modified federation settings, external identity providers, or automatic account linking; sign-ins whose token issuer is not your usual federation server | T1484.002 Trust Modification; T1606.002 SAML Tokens |
| Consent phishing created a malicious OAuth grant | New consent to an application with mail, files or offline access scopes by a small number of users; the application then reads data from unusual IPs | T1528 Steal Application Access Token; T1550.001 Application Access Token |
| An attacker gave themselves an admin role | Role assignments made outside the privileged access workflow, or by accounts that normally never assign roles | T1098.003 Additional Cloud Roles |
Session replay is a practical hunt target, not a theoretical one: in CitrixBleed attackers replayed stolen NetScaler session cookies that had been issued after MFA, and the guidance afterwards was to look for one session used from two locations and to revoke all sessions. See the Session Hijacking and Cookie Theft Guide and the MFA Fatigue and Bypass Guide.
Hypotheses for Active Directory hunts
- Kerberoasting (T1558.003): look for an account requesting 4769 service tickets for many different service accounts in a short time, especially with a Ticket Encryption Type other than the AES values 0x11 and 0x12 (for example 0x17, RC4-HMAC). Microsoft's own monitoring guidance for event 4769 is to flag encryption types other than 0x11 and 0x12. See the Kerberoasting and AS-REP Roasting Defence Guide.
- DCSync (T1003.006): 4662 events on the domain object with the directory replication extended rights, from an account or host that is not a domain controller.
- Service account misuse (T1078.002 Domain Accounts): interactive (type 2 or 10) logons by accounts that should only log on as services, or 4769 requests from client addresses outside the service's known hosts. Microsoft suggests alerting when an account requests tickets from outside its allow-listed addresses.
- Domain controller logons by unexpected accounts: 4769 events with Client Address
::1mean the account logged on to the domain controller itself; compare with the list of accounts allowed to do so. - Privileged group changes: 4728, 4732 and 4756 additions to Domain Admins, Enterprise Admins, Administrators and other tier 0 groups that have no matching change ticket, and 5136 changes to AdminSDHolder or Group Policy objects.
- Hybrid identity tampering (T1556.007): changes on synchronisation servers, pass-through authentication agents or federation servers, and new accounts with rights on them.
Ticket forgery hunts are covered in the Golden Ticket, Silver Ticket and DCSync Guide.
Hypotheses for cloud and non-human identity hunts
Non-human identities are where baseline hunts pay off most. A CI role, a service principal or an API key usually calls the same APIs, from the same networks, at the same times. Deviations are rare and meaningful.
| Hypothesis | Baseline to compare | ATT&CK |
|---|---|---|
| A leaked access key is being used by someone else | Source IP, ASN and user agent per access key over 30 to 90 days; new combinations, especially hosting providers or anonymising networks | T1078.004 Cloud Accounts |
| An attacker added credentials to a service principal or IAM user for persistence | Credential creation events (CreateAccessKey, new client secrets or certificates on applications) by actors other than the owning pipeline | T1098.001 Additional Cloud Credentials |
| A role trust policy was widened | UpdateAssumeRolePolicy and federated credential changes; subsequent AssumeRoleWithWebIdentity from new subjects | T1484.002 Trust Modification |
| A workload identity is being used by a human | Console sign-ins, interactive tools in the user agent, or working-hours patterns on an identity that normally runs on a schedule | T1078.004 Cloud Accounts |
| A compromised identity is mapping the environment | Bursts of list and describe calls, directory enumeration through Graph or IAM APIs, from identities that normally call a handful of APIs | T1087.004 Cloud Account |
| Dormant identities have woken up | First activity in 90 days or more by a service account, key, or leaver's account | T1078 Valid Accounts |
- Stack, do not scan: count distinct source ASNs, user agents and API names per identity and examine the long tail; this finds anomalies faster than reading events.
- Use the inventory: join each NHI to its owner, environment and expected sources; an identity with no owner that is active is itself a finding. See the Detection Engineering for Non-Human Identities Guide.
- AI agents: agents with delegated tokens behave less predictably than pipelines, so hunt on the tools and data they reach rather than on timing alone.
Running an identity hunting programme
- Cadence: a small team can run one identity hunt a fortnight from a prioritised backlog; larger teams run hunts in parallel by domain (IdP, AD, cloud, SaaS) and review the backlog monthly against threat intelligence.
- Hunt library: record each hunt's hypothesis, data sources, queries, results, false positive patterns and outputs. Use a template so hunts are repeatable; see the Detection Rule Documentation Template.
- From hunt to detection: when a hunt query has a manageable false positive rate and a clear response, hand it to detection engineering with test data; keep the exploratory version in the library. See the Detection as Code Guide.
- Hunting versus detection: choose a hunt when the behaviour is too noisy or too rare to alert on, when you lack a baseline, or when new intelligence arrives before a detection exists. Choose a detection when the logic is precise and the response is defined.
- Access and safety: hunters need read access to sensitive identity logs. Give them a dedicated, monitored role with no write rights on identity systems, and handle personal data in sign-in logs under your privacy rules.
- Testing: validate hunt queries with controlled tests in a lab or with authorised red team activity before relying on negative results.
Starting a programme
- Weeks 1 to 2: confirm identity logs are collected with enough retention (at least 90 days for sign-ins and a year for audit events is a common target), including non-interactive and service principal sign-ins and domain controller advanced auditing.
- Weeks 3 to 4: build the identity join table and NHI context (owners, expected sources).
- Weeks 5 to 8: run the first four hunts: session replay, new credentials on service principals, privileged role and group changes, and dormant identity activity.
- Ongoing: add hunts from intelligence and incidents, convert stable ones to detections and retire hunts whose detections are in place.
Measuring hunting
| Metric | What it shows |
|---|---|
| Identity hunts completed per quarter, by domain | Coverage across IdP, AD, cloud, SaaS and NHI |
| Detections created or improved from hunts | Whether hunting improves automated coverage |
| Posture fixes raised from hunts (removed trusts, deleted credentials, owners assigned) | Attack surface reduction |
| Data gaps found and closed | Telemetry quality over time |
| Incidents found by hunting rather than by alerts, and their dwell time | Hunting value against real threats |
| Percentage of ATT&CK identity techniques in scope with a hunt or detection | Breadth of coverage |
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev. 5 | RA-10 Threat Hunting | Establishes and maintains a threat hunting capability |
| NIST SP 800-53 Rev. 5 | AU-6 Audit Record Review, Analysis, and Reporting; SI-4 System Monitoring; CA-7 Continuous Monitoring | Identity log review and monitoring |
| NIST SP 800-53 Rev. 5 | IR-4 Incident Handling | Escalation path for hunt findings |
| NIST CSF 2.0 | DE.CM-03, DE.AE-02, DE.AE-07, ID.RA-03 | Monitoring personnel and technology activity, analysis, intelligence, threat identification |
| CIS Controls v8.1 | Control 8 Audit Log Management; Control 13 Network Monitoring and Defense | Log collection and retention, monitoring |
| MITRE ATT&CK | T1078 and sub-techniques, T1110.003, T1621, T1539, T1558.003, T1003.006, T1098.001, T1098.003, T1484.002 | Hypothesis sources listed in the tables above |
Common failure patterns
- Hunting only interactive sign-ins: token replay, service principal abuse and managed identity misuse appear in the non-interactive and workload logs that were never exported.
- No identity context: without owners and expected sources for each NHI, every unusual API call looks equally suspicious and hunts drown in noise.
- Retention shorter than dwell time: a 30-day log window cannot answer whether a credential added four months ago has been used.
- Ignoring identity configuration changes: hunts focus on sign-ins and miss the new federation trust or application secret that is the real persistence.
- Hunts that leave nothing behind: no documentation, no detection, so the same hunt is reinvented next quarter.
- Stopping at the password reset: declaring an account clean after a reset while sessions, refresh tokens and newly registered MFA methods remain.
Practitioner checklist
- Collect interactive, non-interactive, service principal and managed identity sign-ins, IdP system logs, domain controller advanced audit events and cloud audit trails into one platform.
- Keep identity logs long enough to cover realistic dwell times.
- Build an identity join table and NHI context with owners and expected sources.
- Maintain a prioritised hypothesis backlog drawn from attack paths, intelligence and incidents.
- Hunt identity configuration changes (MFA methods, federation, app credentials, roles) as well as sign-ins.
- Run baseline hunts on non-human identities by source, user agent and API.
- Document every hunt and convert stable logic into detections.
- Give hunters a read-only, monitored role on identity logs.
- Report hunting outcomes: detections, posture fixes, gaps closed and incidents found.
Standards and references
- NIST: SP 800-53 Rev. 5 (RA-10 Threat Hunting)
- MITRE ATT&CK: Credential Access
- CISA: Scattered Spider advisory AA23-320A
- Microsoft Learn: Sign-in logs in Microsoft Entra ID
- Microsoft Learn: Event 4769, a Kerberos service ticket was requested
- Okta Developer: System Log event types
- Splunk SURGe: PEAK Threat Hunting Framework
- NIST: Cybersecurity Framework 2.0
Related NHI Mgmt Group resources: ITDR Guide · Threat Hunting Guide · KQL for Threat Hunting Guide · Top 10 Identity Attacks · Identity Visibility, Posture and Threat Detection Guide