本文へスキップ
Skillpedia
エージェント35k · #8341

post-exploiting-microsoft-graph-with-graphrunner

できること

このツールは、初期アクセスを得た後に、Microsoft 365のシステム(メールやファイルなど)を調査し、操作するのに役立ちます。情報を収集したり、アクセスを維持したり、システム内での権限を昇格させたりするために使えます。

使う場面

  • ✓Microsoft 365システムへの許可されたアクセスを得た後。
  • ✓権限やセキュリティポリシーを確認するとき。
  • ✓攻撃者がどのようにアクセスを維持したり権限を昇格させたりするかを実演するとき。

スキルのリンク

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/post-exploiting-microsoft-graph-with-graphrunner/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/post-exploiting-microsoft-graph-with-graphrunner/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Microsoft 365システムを調べて、機密情報を見つけ、アクセスを維持する方法を探りたいです。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールはMicrosoft Graph APIを使ってシステムとやり取りします。通常の通信に紛れ込んで動作するため、データの窃取、偽のアクセス権の作成、グループへのメンバー追加などの操作が可能です。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Post-Exploiting Microsoft Graph with GraphRunner

Authorized use only: GraphRunner performs offensive actions against live Microsoft 365 / Entra ID tenants — deploying OAuth apps, cloning groups, adding members, and reading mailboxes, SharePoint, and Teams. Run it only against tenants you own or are explicitly authorized in writing to test. Unauthorized use is illegal.

Overview

GraphRunner (Beau Bullock / Black Hills Information Security) is a PowerShell post-exploitation toolset built entirely on the Microsoft Graph API. Given a foothold token, it performs recon, establishes persistence, escalates privilege, and pillages M365 data — all through Graph, which blends in with normal traffic and bypasses many endpoint controls. It is the natural follow-on to credential/token theft (e.g., device-code phishing or ROADtools): once you hold Graph access, GraphRunner operationalizes it.

The toolset is a single PowerShell module (GraphRunner.ps1) exposing dozens of functions grouped by purpose:

  • Authentication — Get-GraphTokens (device-code login), Invoke-RefreshGraphTokens, Invoke-AutoTokenRefresh, Invoke-ImportTokens, Invoke-RefreshToSharePointToken.
  • Recon & Enumeration — Invoke-GraphRecon (tenant/user permission summary), Invoke-DumpCAPS (conditional-access policies), Invoke-DumpApps (app registrations / consent grants), Get-AzureADUsers, Get-SecurityGroups, Get-UpdatableGroups, Get-DynamicGroups, Invoke-SearchUserAttributes, Invoke-GraphOpenInboxFinder, Find-PermissiveCalendars.
  • Persistence — Invoke-InjectOAuthApp (deploy a malicious OAuth app for consent-grant persistence), Invoke-CreateInboxForwardingRule.
  • Privilege Escalation — Get-UpdatableGroups, Invoke-AddGroupMember, Invoke-SecurityGroupCloner, Invoke-InviteGuest.
  • Pillage / Data Search — Invoke-SearchMailbox, Invoke-SearchSharePointAndOneDrive, Invoke-SearchTeams, Get-TeamsChat, Invoke-DriveFileDownload.
  • Master runner — Invoke-GraphRunner runs an automated recon-and-pillage pass; List-GraphRunnerModules prints all modules.

This maps to MITRE ATT&CK T1098 — Account Manipulation: GraphRunner manipulates accounts, groups, and OAuth grants (adding members, injecting apps, cloning groups, inviting guests) to maintain and escalate access in the cloud identity plane.

When to Use

  • After obtaining a valid Microsoft Graph access/refresh token during an authorized M365/Entra engagement.
  • When mapping tenant permissions, conditional-access policies, and OAuth app exposure.
  • When establishing cloud persistence via OAuth consent grants or inbox forwarding (in scope).
  • When demonstrating privilege escalation through updatable/dynamic groups.
  • When searching mailboxes, SharePoint/OneDrive, and Teams for sensitive data to evidence impact.

Prerequisites

  • Written authorization and scope for the target tenant.
  • A Graph token foothold (from Get-GraphTokens device-code login, or imported tokens).
  • PowerShell 5.1+ or PowerShell 7 (cross-platform).
# Clone and import the module
git clone https://github.com/dafthack/GraphRunner.git
cd GraphRunner
Import-Module .\GraphRunner.ps1

# List every available module
List-GraphRunnerModules

Objectives

  • Authenticate to Microsoft Graph and maintain tokens via refresh.
  • Enumerate tenant users, groups, CA policies, and OAuth apps.
  • Identify updatable groups and demonstrate privilege escalation.
  • Establish persistence via an injected OAuth app and/or inbox forwarding rule.
  • Search mailboxes, SharePoint/OneDrive, and Teams for sensitive content.

MITRE ATT&CK Mapping

ID Tactic Official Technique Name Role in this skill
T1098 Persistence Account Manipulation Add group members, clone groups, invite guests to retain/escalate access
T1098.003 Privilege Escalation Account Manipulation: Additional Cloud Roles Adding members to privileged/updatable groups
T1528 Credential Access Steal Application Access Token Get-GraphTokens device-code token acquisition
T1087.004 Discovery Account Discovery: Cloud Account Get-AzureADUsers, Invoke-SearchUserAttributes
T1114.002 Collection Email Collection: Remote Email Collection Invoke-SearchMailbox over Graph
T1606.002 Credential Access Forge Web Credentials: SAML/OAuth Invoke-InjectOAuthApp consent-grant persistence

…

よくある質問

このツールを使うには許可が必要ですか?

はい。どのシステムで使う場合も、明示的な書面による許可が必要です。許可なく使用することは違法です。

「Graphトークン」とは何ですか?

従来のパスワードがなくても、ツールがメールやファイルなどのMicrosoftサービスとやり取りできるようにする、特別なアクセスキーです。

このツールはどのシステムに影響しますか?

Microsoft 365とEntra ID(旧Azure AD)のエコシステム内で動作し、Outlook、SharePoint、Teamsなどのサービスに影響します。

詳細

作者による元の説明

Runs GraphRunner, a PowerShell post-exploitation toolset built on the Microsoft Graph API, to perform tenant recon, establish persistence (OAuth app injection, inbox rules), escalate privilege via group manipulation, and pillage mailboxes, SharePoint, and Teams data from a foothold Graph token. Use during authorized red-team engagements against Microsoft 365/Entra ID tenants once you hold a Graph

repo: mukul975/Anthropic-Cybersecurity-Skills

人気

GitHubのスター
35k
ランキング
#8341
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

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

コメント

  • …

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

似ているスキル