本文へスキップ
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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-saas-sso-token-abuse/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に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

…
よくある質問

「トークンの悪用」とは何ですか?

攻撃者が正規のユーザーから「トークン」(一時的なアクセスキーのようなもの)を盗み、それを使って本人になりすまし、パスワードや追加の認証なしにオンラインサービスへアクセスすることです。

「インポッシブル・トラベル」とは何ですか?

ログイン記録で、同じユーザーが短時間のうちに地理的に遠く離れた2つの場所からサービスにアクセスしたように見えることです。物理的には不可能なため、不審な動きとみなされます。

この方法で攻撃者をどのように見つけるのですか?

ログを分析することで、セッショントークンが複数の場所から使われたり、信頼できないネットワークから使われたりするなど、通常と異なる使われ方をしていないかを特定します。これは、トークンが盗まれて攻撃者に再利用されている可能性を示します。

詳細

作者による元の説明

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

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル