hunting-saas-sso-token-abuse
यह क्या करती है
यह टूल पता लगाने में मदद करता है कि यूज़र अकाउंट से छेड़छाड़ हुई है या नहीं। यह देखता है कि कोई व्यक्ति किसी और के credentials (जैसे access 'token') का इस्तेमाल करके बिना इजाज़त online services में लॉगिन तो नहीं कर रहा, भले ही असली व्यक्ति ने खुद लॉगिन न किया हो।
कब इस्तेमाल करें
- ✓जब शक हो कि हमलावर चोरी के credentials से सेवाओं तक पहुंच रहा है।
- ✓'impossible travel' alerts की जांच करते समय (कम समय में बहुत दूर की जगहों से एक्सेस)।
- ✓किसी हमले के बाद यह देखने के लिए कि क्या हमलावर online services के अंदर एक सिस्टम से दूसरे में फैला है।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-saas-sso-token-abuse/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“ऐसे stolen session tokens का इस्तेमाल खोजो जो multi-factor authentication को बायपास कर सकते हैं।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल अलग-अलग services (जैसे Microsoft Entra ID और Okta) के login records की तुलना करता है। यह असामान्य पैटर्न खोजता है, जैसे एक ही login session का बहुत दूर की जगहों पर दिखना या किसी संदिग्ध network से आना।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Hunting SaaS SSO Token Abuse
Overview
Adversaries increasingly bypass MFA not by defeating it but by stealing the artifacts issued after a successful authentication — session cookies, OAuth access/refresh tokens, and Primary Refresh Tokens (PRTs). With a stolen token an attacker replays the existing session ("pass-the-cookie" / 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/Okta 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.
Detection 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/refresh 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/session context; the same session token appearing from divergent IPs/user-agents is the tell. Okta Identity Threat Protection (ITP) can natively flag "suspected session hijacking."
This 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/VPS 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.
When to Use
- Threat hunting for MFA-bypass via stolen tokens/cookies across Entra ID and SaaS
- Investigating an alert for impossible travel, anomalous OAuth grant, or token reuse
- Validating detection coverage for T1550.001 after a phishing/AiTM incident
- Building Sentinel/Splunk/Okta detections for session-token replay
- Post-incident hunting to scope SaaS lateral movement from a compromised identity
Prerequisites
- Entra ID sign-in logs flowing to a queryable store (Microsoft Sentinel / Log Analytics):
# Confirm the diagnostic settings export SigninLogs + non-interactive logs to a workspace az monitor diagnostic-settings list --resource \ /providers/Microsoft.aadiam/diagnosticSettings -o table - Okta System Log access via API or SIEM ingestion:
curl -s -H "Authorization: SSWS $OKTA_API_TOKEN" \ "https://<org>.okta.com/api/v1/logs?filter=eventType eq \"user.session.start\"&since=2026-06-01T00:00:00Z" - An IP enrichment source (GeoIP + ASN/hosting-provider classification)
- Read access to the SIEM (KQL for Sentinel, SPL for Splunk)
- Python 3.9+ for the helper script (
requestsfor the Okta API)
Objectives
- Baseline normal per-user session behavior (IPs, ASNs, devices, SaaS apps)
- Correlate Entra sign-in artifacts by
SessionId/UniqueTokenIdentifier - Detect a single session used from multiple IPs/ASNs (token replay)
- Detect impossible travel within one authenticated session
- Detect refresh-token reuse and anomalous OAuth grants
- Hunt Okta System Log for reused session tokens across contexts
- Produce findings and feed confirmed patterns into standing detections
MITRE ATT&CK Mapping
| ID | Name | Use in this skill |
|---|---|---|
| T1550.001 | Use Alternate Authentication Material: Application Access Token | Core technique — replaying stolen OAuth tokens/cookies |
| T1539 | Steal Web Session Cookie | The cookie theft that precedes pass-the-cookie replay |
| T1528 | Steal Application Access Token | Acquisition of OAuth tokens via phishing/illicit consent |
| T1078.004 | Valid Accounts: Cloud Accounts | Replayed tokens grant valid-account access to SaaS |
| T1098.001 | Account Manipulation: Additional Cloud Credentials | Follow-on persistence after token abuse |
Workflow
1. Correlate Entra sign-in artifacts by session
Stitch interactive, non-interactive, and SP sign-ins for one session to see the full chain.
union SigninLogs, AADNonInteractiveUserSignInLogs
…
अक्सर पूछे जाने वाले सवाल
'Token abuse' क्या है?
जब हमलावर किसी असली यूज़र का 'token' (एक तरह की अस्थायी access key) चुरा लेता है और उसका इस्तेमाल करके पासवर्ड या अतिरिक्त पुष्टि के बिना उस व्यक्ति बनकर online services तक पहुंचता है।
'Impossible travel' क्या है?
जब login records दिखाते हैं कि कोई यूज़र एक बहुत छोटे समय में दो भौगोलिक रूप से दूर की जगहों से services तक पहुंचा, जो असल में संभव नहीं है।
यह हमलावरों को खोजने में कैसे मदद करता है?
Login logs का विश्लेषण करके यह टूल पता लगा सकता है कि session token का असामान्य इस्तेमाल हो रहा है या नहीं, जैसे कई जगहों से या भरोसे के बाहर के networks से। इससे संकेत मिलता है कि token चोरी हुआ हो सकता है और हमलावर उसे दोबारा इस्तेमाल कर रहा है।
जानकारी
लेखक का मूल विवरण
Hunts for stolen-session and OAuth/PRT token replay (T1550.001) by correlating Microsoft Entra ID SigninLogs SessionId/UniqueTokenIdentifier fields and Okta System Log sso/session events to spot impossible travel, refresh-token reuse, and token use from anomalous ASNs. Use when hunting MFA-bypass via stolen cookies/tokens, investigating impossible-travel alerts, or scoping SaaS lateral movement af
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #7980
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।