[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AEXYHYREYZ2WE9QHTJP2PJ":3,"skill-same:01M6AEXYHYREYZ2WE9QHTJP2PJ":110},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":65,"commitSha":66,"skillDirectory":67,"forksCount":68,"repositoryHtmlUrl":69,"repositoryHomepageUrl":70,"ownerHtmlUrl":71,"ownerBlogUrl":72,"ownerDescription":73,"updatedAt":74,"install":75,"resources":88},"01M6AEXYHYREYZ2WE9QHTJP2PJ","hunting-saas-sso-token-abuse","SaaS SSO 令牌滥用狩猎","Hunts for stolen-session and OAuth\u002FPRT token replay (T1550.001) by correlating Microsoft Entra ID SigninLogs SessionId\u002FUniqueTokenIdentifier fields and Okta System Log sso\u002Fsession events to spot impossible travel, refresh-token reuse, and token use from anomalous ASNs. Use when hunting MFA-bypass via stolen cookies\u002Ftokens, investigating impossible-travel alerts, or scoping SaaS lateral movement after phishing.","通过关联 Microsoft Entra ID SigninLogs 的 SessionId\u002FUniqueTokenIdentifier 字段与 Okta System Log 的 sso\u002Fsession 事件，狩猎盗取会话及 OAuth\u002FPRT 令牌重放（T1550.001），以发现不可能旅行（impossible travel）、刷新令牌重用以及来自异常 ASN 的令牌使用。适用于狩猎通过盗取 Cookie\u002F令牌绕过 MFA、调查不可能旅行告警，或界定钓鱼攻击后 SaaS 横向移动的范围。","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36146,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-saas-sso-token-abuse\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTHYSJPJ500X64JJ5CH06D","安全事件响应与威胁狩猎","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"hunting saas sso token abuse","saas","sso","detection-engineering","okta","pass-the-cookie","t1550","PRT","impossible-travel","mfa","cybersecurity","token-theft","entra-id","OAuth","soc","phishing","cookies","threat-hunting","entra id","microsoft","2026-11-10 10:12:30",false,"---\nname: hunting-saas-sso-token-abuse\ndescription: Hunts for stolen-session and OAuth\u002FPRT token replay (T1550.001) by correlating Microsoft Entra ID SigninLogs SessionId\u002FUniqueTokenIdentifier fields and Okta System Log sso\u002Fsession events to spot impossible travel, refresh-token reuse, and token use from anomalous ASNs. Use when hunting MFA-bypass via stolen cookies\u002Ftokens, investigating impossible-travel alerts, or scoping SaaS lateral movement after phishing.\ndomain: cybersecurity\nsubdomain: soc-operations\ntags:\n- threat-hunting\n- sso\n- oauth\n- token-theft\n- pass-the-cookie\n- entra-id\n- okta\n- detection-engineering\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- DE.CM-01\nmitre_attack:\n- T1550.001\n---\n# Hunting SaaS SSO Token Abuse\n\n## Overview\n\nAdversaries increasingly bypass MFA not by defeating it but by stealing the artifacts issued *after* a successful authentication — session cookies, OAuth access\u002Frefresh tokens, and Primary Refresh Tokens (PRTs). With a stolen token an attacker replays the existing session (\"pass-the-cookie\" \u002F token replay), inheriting the victim's authenticated state across federated SaaS without ever prompting for credentials or MFA. Mandiant's M-Trends reporting and Microsoft\u002FOkta incident data both highlight token theft as a dominant cloud lateral-movement technique, mapped to MITRE ATT&CK **T1550.001 Use Alternate Authentication Material: Application Access Token**.\n\nDetection relies on correlating identity telemetry rather than watching for failed logins. In Microsoft Entra ID the key tables are `SigninLogs` (interactive), `AADNonInteractiveUserSignInLogs` (where replayed cookies\u002Frefresh tokens commonly surface), and `AADServicePrincipalSignInLogs`. Entra now exposes *linkable identifiers* — `SessionId` and `UniqueTokenIdentifier` — that let a hunter stitch every artifact derived from one root authentication event together and spot a single session being used from multiple IPs, ASNs, or device fingerprints. In Okta the System Log carries `authentication.sso`, `policy.evaluate_sign_on`, and `user.session.start` events with a `deviceToken`\u002Fsession context; the same session token appearing from divergent IPs\u002Fuser-agents is the tell. Okta Identity Threat Protection (ITP) can natively flag \"suspected session hijacking.\"\n\nThis skill provides a hypothesis-driven hunt: baseline normal session behavior, then look for impossible travel within a single session, refresh-token reuse, token use from anomalous infrastructure (hosting\u002FVPS ASNs), and SaaS access patterns inconsistent with the user's device. Source: MITRE ATT&CK T1550.001; Microsoft Entra ID sign-in log documentation; Okta System Log reference; Mandiant M-Trends.\n\n## When to Use\n\n- Threat hunting for MFA-bypass via stolen tokens\u002Fcookies across Entra ID and SaaS\n- Investigating an alert for impossible travel, anomalous OAuth grant, or token reuse\n- Validating detection coverage for T1550.001 after a phishing\u002FAiTM incident\n- Building Sentinel\u002FSplunk\u002FOkta detections for session-token replay\n- Post-incident hunting to scope SaaS lateral movement from a compromised identity\n\n## Prerequisites\n\n- Entra ID sign-in logs flowing to a queryable store (Microsoft Sentinel \u002F Log Analytics):\n  ```bash\n  # Confirm the diagnostic settings export SigninLogs + non-interactive logs to a workspace\n  az monitor diagnostic-settings list --resource \\\n    \u002Fproviders\u002FMicrosoft.aadiam\u002FdiagnosticSettings -o table\n  ```\n- Okta System Log access via API or SIEM ingestion:\n  ```bash\n  curl -s -H \"Authorization: SSWS $OKTA_API_TOKEN\" \\\n    \"https:\u002F\u002F\u003Corg>.okta.com\u002Fapi\u002Fv1\u002Flogs?filter=eventType eq \\\"user.session.start\\\"&since=2026-06-01T00:00:00Z\"\n  ```\n- An IP enrichment source (GeoIP + ASN\u002Fhosting-provider classification)\n- Read access to the SIEM (KQL for Sentinel, SPL for Splunk)\n- Python 3.9+ for the helper script (`requests` for the Okta API)\n\n## Objectives\n\n- Baseline normal per-user session behavior (IPs, ASNs, devices, SaaS apps)\n- Correlate Entra sign-in artifacts by `SessionId` \u002F `UniqueTokenIdentifier`\n- Detect a single session used from multiple IPs\u002FASNs (token replay)\n- Detect impossible travel within one authenticated session\n- Detect refresh-token reuse and anomalous OAuth grants\n- Hunt Okta System Log for reused session tokens across contexts\n- Produce findings and feed confirmed patterns into standing detections\n\n## MITRE ATT&CK Mapping\n\n| ID | Name | Use in this skill |\n|----|------|-------------------|\n| T1550.001 | Use Alternate Authentication Material: Application Access Token | Core technique — replaying stolen OAuth tokens\u002Fcookies |\n| T1539 | Steal Web Session Cookie | The cookie theft that precedes pass-the-cookie replay |\n| T1528 | Steal Application Access Token | Acquisition of OAuth tokens via phishing\u002Fillicit consent |\n| T1078.004 | Valid Accounts: Cloud Accounts | Replayed tokens grant valid-account access to SaaS |\n| T1098.001 | Account Manipulation: Additional Cloud Credentials | Follow-on persistence after token abuse |\n\n## Workflow\n\n### 1. Correlate Entra sign-in artifacts by session\nStitch interactive, non-interactive, and SP sign-ins for one session to see the full chain.\n```kusto\nunion SigninLogs, AADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(7d)\n| where isnotempty(SessionId)\n| summarize IPs=make_set(IPAddress), Apps=make_set(AppDisplayName),\n            Locations=make_set(tostring(LocationDetails.countryOrRegion)),\n            Count=count() by SessionId, UserPrincipalName\n| where array_length(IPs) > 1\n```\n\n### 2. Detect a single session used from multiple ASNs (token replay)\n```kusto\nAADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(24h)\n| extend ASN = tostring(parse_json(tostring(NetworkLocationDetails))[0].networkType)\n| summarize distinctIPs = dcount(IPAddress),\n            ipset = make_set(IPAddress) by SessionId, UserPrincipalName\n| where distinctIPs >= 2\n```\n\n### 3. Detect impossible travel within one authenticated session\n```kusto\nSigninLogs\n| where TimeGenerated > ago(7d)\n| project TimeGenerated, UserPrincipalName, IPAddress,\n          City=tostring(LocationDetails.city),\n          Country=tostring(LocationDetails.countryOrRegion), SessionId\n| order by UserPrincipalName, TimeGenerated asc\n| serialize\n| extend prevCountry = prev(Country), prevTime = prev(TimeGenerated),\n         prevUser = prev(UserPrincipalName)\n| where UserPrincipalName == prevUser and Country != prevCountry\n        and datetime_diff('minute', TimeGenerated, prevTime) \u003C 60\n```\n\n### 4. Detect token use from hosting\u002FVPS infrastructure\nReplayed tokens are frequently used from datacenter ASNs, unlike the user's residential\u002Fcorporate ranges.\n```kusto\nAADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(24h)\n| where ResultType == 0\n| extend asnOrg = tostring(parse_json(tostring(AutonomousSystemNumber)))\n| where IPAddress in (toscalar(externaldata(ip:string)[\"\u003Chosting-asn-iplist>\"]))\n| project TimeGenerated, UserPrincipalName, AppDisplayName, IPAddress\n```\n\n### 5. Hunt anomalous OAuth grants \u002F illicit consent (token theft precursor)\n```kusto\nAuditLogs\n| where TimeGenerated > ago(30d)\n| where OperationName in (\"Consent to application\", \"Add OAuth2PermissionGrant\",\n                          \"Add delegated permission grant\")\n| extend app = tostring(TargetResources[0].displayName)\n| project TimeGenerated, InitiatedBy, app, Result\n```\n\n### 6. Hunt the Okta System Log for reused session tokens\nA single Okta session (`deviceToken`) used from divergent IPs\u002Fclients indicates hijack.\n```bash\ncurl -s -H \"Authorization: SSWS $OKTA_API_TOKEN\" \\\n  \"https:\u002F\u002F\u003Corg>.okta.com\u002Fapi\u002Fv1\u002Flogs?filter=eventType eq \\\"policy.evaluate_sign_on\\\"&since=2026-06-15T00:00:00Z\" \\\n  | jq -r '.[] | [.authenticationContext.externalSessionId, .client.ipAddress, .client.userAgent.rawUserAgent] | @tsv' \\\n  | sort | uniq -c | sort -rn\n```\n\n### 7. Splunk equivalent for Okta session reuse\n```spl\nindex=okta eventType=\"policy.evaluate_sign_on\"\n| stats dc(client.ipAddress) as ip_count\n        values(client.ipAddress) as ips\n        values(client.userAgent.rawUserAgent) as agents\n        by authenticationContext.externalSessionId actor.alternateId\n| where ip_count > 1\n```\n\n### 8. Triage and respond\nFor confirmed token abuse, revoke sessions and rotate, then promote the hunt to a rule.\n```bash\n# Revoke all refresh tokens \u002F sessions for the user in Entra\naz rest --method POST \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Fusers\u002F\u003CuserId>\u002FrevokeSignInSessions\"\n```\nSee `scripts\u002Fagent.py` to pull Okta logs and flag reused session tokens automatically.\n\n## Tools and Resources\n\n| Resource | Purpose | Link |\n|----------|---------|------|\n| MITRE ATT&CK T1550.001 | Technique reference | https:\u002F\u002Fattack.mitre.org\u002Ftechniques\u002FT1550\u002F001\u002F |\n| Entra sign-in logs schema | KQL hunting field reference | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fentra\u002Fidentity\u002Fmonitoring-health\u002Freference-azure-monitor-sign-ins-log-schema |\n| Azure-Sentinel hunting repo | Community KQL detections | https:\u002F\u002Fgithub.com\u002FAzure\u002FAzure-Sentinel |\n| Okta System Log API | Event hunting source | https:\u002F\u002Fdeveloper.okta.com\u002Fdocs\u002Freference\u002Fapi\u002Fsystem-log\u002F |\n| Mandiant M-Trends | Token-theft threat landscape | https:\u002F\u002Fwww.mandiant.com\u002Fm-trends |\n| AzureAD-Attack-Defense | PRT\u002Ftoken replay detection guidance | https:\u002F\u002Fgithub.com\u002FCloud-Architekt\u002FAzureAD-Attack-Defense |\n\n## Preventive Controls to Recommend\n\nDetection should pair with controls that make stolen tokens far less useful:\n\n- **Entra Conditional Access \"token protection\"** binds the sign-in session to the\n  device, so an exfiltrated cookie\u002FPRT cannot be replayed off-device.\n- **Continuous Access Evaluation (CAE)** revokes access in near-real-time on risk\n  events instead of waiting for token expiry.\n- **Phishing-resistant MFA (FIDO2\u002Fpasskeys)** blocks the AiTM proxy phishing that\n  harvests tokens in the first place.\n- **Short token lifetimes + refresh-token rotation** shrink the replay window and turn\n  refresh-token reuse into an unambiguous compromise signal.\n- **Okta Identity Threat Protection (ITP)** flags suspected session hijacking natively.\n\n## False-Positive Tuning\n\n| Benign cause | Tuning |\n|--------------|--------|\n| Corporate VPN\u002Fproxy egress (many users, few IPs) | Allowlist known egress IPs\u002FASNs |\n| Mobile carrier IP rotation | Widen impossible-travel time\u002Fdistance thresholds |\n| Legitimate multi-device users | Correlate device IDs, not just IPs |\n| Backend\u002FAPI calls within one session | Exclude expected service principals |\n\n## Key Indicators\n\n| Indicator | Signal |\n|-----------|--------|\n| One `SessionId` across multiple IPs\u002FASNs | Token\u002Fcookie replay |\n| Non-interactive sign-in from new datacenter IP | Replayed refresh token |\n| Impossible travel within \u003C 1h | Concurrent session use |\n| Refresh-token reuse after rotation | Strong compromise signal |\n| New OAuth consent to unfamiliar app | Illicit-consent token theft |\n| Okta session token from divergent user-agents | Session hijack |\n\n## Validation Criteria\n\n- [ ] Entra `SigninLogs` and `AADNonInteractiveUserSignInLogs` queryable\n- [ ] Okta System Log accessible via API or SIEM\n- [ ] Per-session correlation by `SessionId` produces results\n- [ ] Multi-IP \u002F multi-ASN single-session query implemented\n- [ ] Impossible-travel-within-session query implemented\n- [ ] Anomalous OAuth consent hunt implemented\n- [ ] Okta reused-session-token hunt implemented\n- [ ] Confirmed findings triaged and sessions revoked\n- [ ] Effective queries promoted to standing detection rules\n- [ ] False-positive baseline (VPN\u002Fproxy egress) documented\n","# Hunting SaaS SSO Token Abuse\n\n## Overview\n\nAdversaries increasingly bypass MFA not by defeating it but by stealing the artifacts issued *after* a successful authentication — session cookies, OAuth access\u002Frefresh tokens, and Primary Refresh Tokens (PRTs). With a stolen token an attacker replays the existing session (\"pass-the-cookie\" \u002F token replay), inheriting the victim's authenticated state across federated SaaS without ever prompting for credentials or MFA. Mandiant's M-Trends reporting and Microsoft\u002FOkta incident data both highlight token theft as a dominant cloud lateral-movement technique, mapped to MITRE ATT&CK **T1550.001 Use Alternate Authentication Material: Application Access Token**.\n\nDetection relies on correlating identity telemetry rather than watching for failed logins. In Microsoft Entra ID the key tables are `SigninLogs` (interactive), `AADNonInteractiveUserSignInLogs` (where replayed cookies\u002Frefresh tokens commonly surface), and `AADServicePrincipalSignInLogs`. Entra now exposes *linkable identifiers* — `SessionId` and `UniqueTokenIdentifier` — that let a hunter stitch every artifact derived from one root authentication event together and spot a single session being used from multiple IPs, ASNs, or device fingerprints. In Okta the System Log carries `authentication.sso`, `policy.evaluate_sign_on`, and `user.session.start` events with a `deviceToken`\u002Fsession context; the same session token appearing from divergent IPs\u002Fuser-agents is the tell. Okta Identity Threat Protection (ITP) can natively flag \"suspected session hijacking.\"\n\nThis skill provides a hypothesis-driven hunt: baseline normal session behavior, then look for impossible travel within a single session, refresh-token reuse, token use from anomalous infrastructure (hosting\u002FVPS ASNs), and SaaS access patterns inconsistent with the user's device. Source: MITRE ATT&CK T1550.001; Microsoft Entra ID sign-in log documentation; Okta System Log reference; Mandiant M-Trends.\n\n## When to Use\n\n- Threat hunting for MFA-bypass via stolen tokens\u002Fcookies across Entra ID and SaaS\n- Investigating an alert for impossible travel, anomalous OAuth grant, or token reuse\n- Validating detection coverage for T1550.001 after a phishing\u002FAiTM incident\n- Building Sentinel\u002FSplunk\u002FOkta detections for session-token replay\n- Post-incident hunting to scope SaaS lateral movement from a compromised identity\n\n## Prerequisites\n\n- Entra ID sign-in logs flowing to a queryable store (Microsoft Sentinel \u002F Log Analytics):\n  ```bash\n  # Confirm the diagnostic settings export SigninLogs + non-interactive logs to a workspace\n  az monitor diagnostic-settings list --resource \\\n    \u002Fproviders\u002FMicrosoft.aadiam\u002FdiagnosticSettings -o table\n  ```\n- Okta System Log access via API or SIEM ingestion:\n  ```bash\n  curl -s -H \"Authorization: SSWS $OKTA_API_TOKEN\" \\\n    \"https:\u002F\u002F\u003Corg>.okta.com\u002Fapi\u002Fv1\u002Flogs?filter=eventType eq \\\"user.session.start\\\"&since=2026-06-01T00:00:00Z\"\n  ```\n- An IP enrichment source (GeoIP + ASN\u002Fhosting-provider classification)\n- Read access to the SIEM (KQL for Sentinel, SPL for Splunk)\n- Python 3.9+ for the helper script (`requests` for the Okta API)\n\n## Objectives\n\n- Baseline normal per-user session behavior (IPs, ASNs, devices, SaaS apps)\n- Correlate Entra sign-in artifacts by `SessionId` \u002F `UniqueTokenIdentifier`\n- Detect a single session used from multiple IPs\u002FASNs (token replay)\n- Detect impossible travel within one authenticated session\n- Detect refresh-token reuse and anomalous OAuth grants\n- Hunt Okta System Log for reused session tokens across contexts\n- Produce findings and feed confirmed patterns into standing detections\n\n## MITRE ATT&CK Mapping\n\n| ID | Name | Use in this skill |\n|----|------|-------------------|\n| T1550.001 | Use Alternate Authentication Material: Application Access Token | Core technique — replaying stolen OAuth tokens\u002Fcookies |\n| T1539 | Steal Web Session Cookie | The cookie theft that precedes pass-the-cookie replay |\n| T1528 | Steal Application Access Token | Acquisition of OAuth tokens via phishing\u002Fillicit consent |\n| T1078.004 | Valid Accounts: Cloud Accounts | Replayed tokens grant valid-account access to SaaS |\n| T1098.001 | Account Manipulation: Additional Cloud Credentials | Follow-on persistence after token abuse |\n\n## Workflow\n\n### 1. Correlate Entra sign-in artifacts by session\nStitch interactive, non-interactive, and SP sign-ins for one session to see the full chain.\n```kusto\nunion SigninLogs, AADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(7d)\n| where isnotempty(SessionId)\n| summarize IPs=make_set(IPAddress), Apps=make_set(AppDisplayName),\n            Locations=make_set(tostring(LocationDetails.countryOrRegion)),\n            Count=count() by SessionId, UserPrincipalName\n| where array_length(IPs) > 1\n```\n\n### 2. Detect a single session used from multiple ASNs (token replay)\n```kusto\nAADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(24h)\n| extend ASN = tostring(parse_json(tostring(NetworkLocationDetails))[0].networkType)\n| summarize distinctIPs = dcount(IPAddress),\n            ipset = make_set(IPAddress) by SessionId, UserPrincipalName\n| where distinctIPs >= 2\n```\n\n### 3. Detect impossible travel within one authenticated session\n```kusto\nSigninLogs\n| where TimeGenerated > ago(7d)\n| project TimeGenerated, UserPrincipalName, IPAddress,\n          City=tostring(LocationDetails.city),\n          Country=tostring(LocationDetails.countryOrRegion), SessionId\n| order by UserPrincipalName, TimeGenerated asc\n| serialize\n| extend prevCountry = prev(Country), prevTime = prev(TimeGenerated),\n         prevUser = prev(UserPrincipalName)\n| where UserPrincipalName == prevUser and Country != prevCountry\n        and datetime_diff('minute', TimeGenerated, prevTime) \u003C 60\n```\n\n### 4. Detect token use from hosting\u002FVPS infrastructure\nReplayed tokens are frequently used from datacenter ASNs, unlike the user's residential\u002Fcorporate ranges.\n```kusto\nAADNonInteractiveUserSignInLogs\n| where TimeGenerated > ago(24h)\n| where ResultType == 0\n| extend asnOrg = tostring(parse_json(tostring(AutonomousSystemNumber)))\n| where IPAddress in (toscalar(externaldata(ip:string)[\"\u003Chosting-asn-iplist>\"]))\n| project TimeGenerated, UserPrincipalName, AppDisplayName, IPAddress\n```\n\n### 5. Hunt anomalous OAuth grants \u002F illicit consent (token theft precursor)\n```kusto\nAuditLogs\n| where TimeGenerated > ago(30d)\n| where OperationName in (\"Consent to application\", \"Add OAuth2PermissionGrant\",\n                          \"Add delegated permission grant\")\n| extend app = tostring(TargetResources[0].displayName)\n| project TimeGenerated, InitiatedBy, app, Result\n```\n\n### 6. Hunt the Okta System Log for reused session tokens\nA single Okta session (`deviceToken`) used from divergent IPs\u002Fclients indicates hijack.\n```bash\ncurl -s -H \"Authorization: SSWS $OKTA_API_TOKEN\" \\\n  \"https:\u002F\u002F\u003Corg>.okta.com\u002Fapi\u002Fv1\u002Flogs?filter=eventType eq \\\"policy.evaluate_sign_on\\\"&since=2026-06-15T00:00:00Z\" \\\n  | jq -r '.[] | [.authenticationContext.externalSessionId, .client.ipAddress, .client.userAgent.rawUserAgent] | @tsv' \\\n  | sort | uniq -c | sort -rn\n```\n\n### 7. Splunk equivalent for Okta session reuse\n```spl\nindex=okta eventType=\"policy.evaluate_sign_on\"\n| stats dc(client.ipAddress) as ip_count\n        values(client.ipAddress) as ips\n        values(client.userAgent.rawUserAgent) as agents\n        by authenticationContext.externalSessionId actor.alternateId\n| where ip_count > 1\n```\n\n### 8. Triage and respond\nFor confirmed token abuse, revoke sessions and rotate, then promote the hunt to a rule.\n```bash\n# Revoke all refresh tokens \u002F sessions for the user in Entra\naz rest --method POST \\\n  --url \"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Fusers\u002F\u003CuserId>\u002FrevokeSignInSessions\"\n```\nSee `scripts\u002Fagent.py` to pull Okta logs and flag reused session tokens automatically.\n\n## Tools and Resources\n\n| Resource | Purpose | Link |\n|----------|---------|------|\n| MITRE ATT&CK T1550.001 | Technique reference | https:\u002F\u002Fattack.mitre.org\u002Ftechniques\u002FT1550\u002F001\u002F |\n| Entra sign-in logs schema | KQL hunting field reference | https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fentra\u002Fidentity\u002Fmonitoring-health\u002Freference-azure-monitor-sign-ins-log-schema |\n| Azure-Sentinel hunting repo | Community KQL detections | https:\u002F\u002Fgithub.com\u002FAzure\u002FAzure-Sentinel |\n| Okta System Log API | Event hunting source | https:\u002F\u002Fdeveloper.okta.com\u002Fdocs\u002Freference\u002Fapi\u002Fsystem-log\u002F |\n| Mandiant M-Trends | Token-theft threat landscape | https:\u002F\u002Fwww.mandiant.com\u002Fm-trends |\n| AzureAD-Attack-Defense | PRT\u002Ftoken replay detection guidance | https:\u002F\u002Fgithub.com\u002FCloud-Architekt\u002FAzureAD-Attack-Defense |\n\n## Preventive Controls to Recommend\n\nDetection should pair with controls that make stolen tokens far less useful:\n\n- **Entra Conditional Access \"token protection\"** binds the sign-in session to the\n  device, so an exfiltrated cookie\u002FPRT cannot be replayed off-device.\n- **Continuous Access Evaluation (CAE)** revokes access in near-real-time on risk\n  events instead of waiting for token expiry.\n- **Phishing-resistant MFA (FIDO2\u002Fpasskeys)** blocks the AiTM proxy phishing that\n  harvests tokens in the first place.\n- **Short token lifetimes + refresh-token rotation** shrink the replay window and turn\n  refresh-token reuse into an unambiguous compromise signal.\n- **Okta Identity Threat Protection (ITP)** flags suspected session hijacking natively.\n\n## False-Positive Tuning\n\n| Benign cause | Tuning |\n|--------------|--------|\n| Corporate VPN\u002Fproxy egress (many users, few IPs) | Allowlist known egress IPs\u002FASNs |\n| Mobile carrier IP rotation | Widen impossible-travel time\u002Fdistance thresholds |\n| Legitimate multi-device users | Correlate device IDs, not just IPs |\n| Backend\u002FAPI calls within one session | Exclude expected service principals |\n\n## Key Indicators\n\n| Indicator | Signal |\n|-----------|--------|\n| One `SessionId` across multiple IPs\u002FASNs | Token\u002Fcookie replay |\n| Non-interactive sign-in from new datacenter IP | Replayed refresh token |\n| Impossible travel within \u003C 1h | Concurrent session use |\n| Refresh-token reuse after rotation | Strong compromise signal |\n| New OAuth consent to unfamiliar app | Illicit-consent token theft |\n| Okta session token from divergent user-agents | Session hijack |\n\n## Validation Criteria\n\n- [ ] Entra `SigninLogs` and `AADNonInteractiveUserSignInLogs` queryable\n- [ ] Okta System Log accessible via API or SIEM\n- [ ] Per-session correlation by `SessionId` produces results\n- [ ] Multi-IP \u002F multi-ASN single-session query implemented\n- [ ] Impossible-travel-within-session query implemented\n- [ ] Anomalous OAuth consent hunt implemented\n- [ ] Okta reused-session-token hunt implemented\n- [ ] Confirmed findings triaged and sessions revoked\n- [ ] Effective queries promoted to standing detection rules\n- [ ] False-positive baseline (VPN\u002Fproxy egress) documented\n",{"name":5,"tags":56,"author":58,"domain":41,"license":16,"version":59,"nist_csf":60,"subdomain":62,"description":7,"mitre_attack":63},[48,33,57,42,36,43,35,34],"oauth","mahipal","1.0",[61],"DE.CM-01","soc-operations",[64],"T1550.001","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fhunting-saas-sso-token-abuse",4425,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":9,"skillName":5,"commands":76,"prompt":86,"zipAvailable":87},[77,80,83],{"tool":78,"command":79},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill hunting-saas-sso-token-abuse",{"tool":81,"command":82},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill hunting-saas-sso-token-abuse",{"tool":84,"command":85},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill hunting-saas-sso-token-abuse","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-saas-sso-token-abuse\u002FSKILL.md",true,[89,94,100,104],{"path":90,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":92,"sourceHtmlUrl":93},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-saas-sso-token-abuse\u002FLICENSE",{"path":95,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fapi-reference.md","REFERENCE","参考文档",2231,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-saas-sso-token-abuse\u002Freferences\u002Fapi-reference.md",{"path":101,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Fstandards.md",1423,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-saas-sso-token-abuse\u002Freferences\u002Fstandards.md",{"path":105,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":108,"sourceHtmlUrl":109},"scripts\u002Fagent.py","SCRIPT","脚本",5280,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-saas-sso-token-abuse\u002Fscripts\u002Fagent.py",[111,143,172,204,235,267],{"skillNo":112,"name":113,"nameZh":114,"description":115,"descriptionZh":116,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":117,"categories":118,"keywords":123,"publishedAt":51},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","SLSA 构建来源验证","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","使用 Sigstore 的 cosign（verify、verify-attestation、verify-blob-attestation）和 slsa-verifier（verify-artifact）验证工件签名和 SLSA 来源（provenance），强制校验 keyless OIDC 构建者身份和源仓库是否符合 SLSA Build 级别。适用于 CI\u002FCD 中部署工件前、消费第三方证明时、建立 SLSA Build L3 管道，或在事件响应或准入控制期间确认来源的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[119,120],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":121,"categoryName":122,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C32Q37WAMK06SGMFC02VFP","软件供应链安全",[124,125,126,127,128,41,129,130,131,132,133,134,135,136,137,138,139,140,141,142],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","security","incident response","identity","pr","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":144,"name":145,"nameZh":146,"description":147,"descriptionZh":148,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":149,"categories":150,"keywords":155,"publishedAt":51},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","TPM 测量启动验证","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","使用 tpm2-tools 验证 TPM 2.0 测量启动（measured boot）的完整性和远程证明：读取 PCR（tpm2_pcrread）、重放启动事件日志、生成并检查签名报价（tpm2_quote\u002Ftpm2_checkquote），以及将机密封印（seal）到 PCR 策略。适用于确认系统已启动可信固件\u002F内核以实现零信任（Zero Trust）设备状态、通过 PCR 漂移检测启动链篡改，或构建黄金值基线用于机群（fleet）证明。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[151,152],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":153,"categoryName":154,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C89JJEXGGRGHS6XVXDA46K","终端安全加固",[156,139,157,158,128,159,41,131,160,161,162,163,164,165,166,167,168,169,170,171],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":173,"name":174,"nameZh":175,"description":176,"descriptionZh":177,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":178,"categories":179,"keywords":186,"publishedAt":51},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","备份完整性验证","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","通过加密哈希验证、自动化恢复测试、损坏检测和可恢复性检查来验证备份完整性，确认备份对于灾难恢复和勒索软件响应是可靠的。适用于在依赖备份进行恢复之前、构建备份后验证管道、审计备份基础设施以满足合规要求，或检查不可变\u002Fair-gapped（气隙）备份是否存在静默损坏或篡改的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[180,183],{"categoryNo":181,"categoryName":182,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":184,"categoryName":185,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSSTY86MWS6W5GDQWB1ADQ","备份与灾难恢复",[166,187,188,189,190,41,191,192,160,193,194,195,196,197,198,199,200,201,202,203],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","compliance","hash-verification","incident-response","ransomware","cryptocurrency","detection","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":205,"name":206,"nameZh":207,"description":208,"descriptionZh":209,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":210,"categories":211,"keywords":216,"publishedAt":51},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","KAPE Windows 取证收集","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","运行 KAPE（Kroll Artifact Parser and Extractor），通过 Targets 收集目标取证工件（注册表配置单元、$MFT、事件日志、prefetch、浏览器数据），并使用封装 Eric Zimmerman 的 EZ Tools（PECmd、MFTECmd、RECmd）的 Modules 进行解析。适用于事件遏制\u002F分诊早期阶段——此时完整磁盘镜像不切实际，但需要快速获得可采信、可解析的 Windows 工件集，包括大规模远程收集。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[212,213],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":214,"categoryName":215,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9JZH3GWXPJ6CQG5P7J48Y","数字取证与电子证据分析",[217,218,219,41,220,221,222,223,224,225,226,227,228,229,230,231,163,232,233,234],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":236,"name":237,"nameZh":238,"description":239,"descriptionZh":240,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":241,"categories":242,"keywords":247,"publishedAt":51},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","SSVC 漏洞优先级分诊","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","使用 CISA 的 Stakeholder-Specific Vulnerability Categorization（SSVC，利益相关方特定漏洞分类）决策树对漏洞进行分诊和优先级排序，权衡利用状态（通过 CISA KEV 目录和 FIRST EPSS API）、技术影响、自动化程度和任务普遍性，输出 Track\u002FTrack*\u002FAttend\u002FAct 决策。适用于对漏洞扫描结果（OpenVAS、Nessus、Qualys）进行优先级排序以制定修复计划，而不局限于原始 CVSS 分数的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[243,246],{"categoryNo":244,"categoryName":245,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[248,249,250,41,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":268,"name":269,"nameZh":270,"description":271,"descriptionZh":272,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":273,"categories":274,"keywords":277,"publishedAt":51},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","安全事件初步分诊","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","使用 NIST SP 800-61r3 和 SANS PICERL 框架对安全事件进行初步分诊，分类事件类型、按业务影响分配优先级，并路由到相应的响应团队。适用于 SIEM\u002FEDR 告警需要人工分类、并发告警必须确定优先级，或用户报告或威胁情报 IOC 匹配需要初步事件分类的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[275,276],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[128,278,41,279,280,281,45,282,283,284,285,199,286,200,287,288,289,290,291,292],"triaging security incident","siem","file","ioc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]