본문으로 건너뛰기
Skillpedia
에이전트35k · #7980

hunting-saas-sso-token-abuse

하는 일

이 도구는 사용자 계정이 침해되었는지 찾는 데 도움을 줍니다. 원래 사람이 로그인하지 않았는데도, 누군가 다른 사람의 자격 증명(접근 ‘토큰’)을 사용해 허가 없이 온라인 서비스에 로그인한 흔적을 찾습니다.

사용하는 경우

  • ✓공격자가 도난당한 자격 증명으로 서비스에 접근하고 있다고 의심될 때.
  • ✓‘불가능한 이동’ 경고(짧은 시간에 매우 먼 곳에서 접속)를 조사할 때.
  • ✓공격 후 공격자가 온라인 서비스 내에서 측면으로 이동했는지 확인하는 경우.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-saas-sso-token-abuse/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-saas-sso-token-abuse/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“다중 인증을 우회했을 수 있는 도난당한 세션 토큰의 사용을 찾아 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 도구는 Microsoft Entra ID와 Okta 같은 서로 다른 서비스의 로그인 기록을 비교합니다. 같은 로그인 세션이 매우 먼 위치나 신뢰할 수 없는 네트워크에서 나타나는 등 비정상적인 패턴을 찾습니다.

기술 내용 (원본 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 (requests for 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

…
자주 묻는 질문

‘토큰 오용’이란 무엇인가요?

공격자가 정상 사용자의 ‘토큰’(일시적인 접근 키)을 훔쳐 그 사람인 척하고, 비밀번호나 추가 인증 없이 온라인 서비스에 접근하는 것입니다.

‘불가능한 이동’이란 무엇인가요?

로그인 기록에서 한 사용자가 짧은 시간 안에 지리적으로 멀리 떨어진 두 곳에서 서비스에 접근한 것으로 나타나는 경우입니다. 실제로는 불가능한 일입니다.

이 도구는 공격자를 어떻게 찾나요?

로그인 로그를 분석해, 여러 위치에서 사용되거나 신뢰할 수 없는 네트워크에서 쓰이는 등 세션 토큰이 비정상적으로 사용되는지 확인합니다. 이는 토큰이 도난당해 공격자가 재사용하고 있음을 나타낼 수 있습니다.

상세 정보

작성자의 원본 설명

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

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#7980
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬