Individual skill
post-exploiting-microsoft-graph-with-graphrunner
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 token.
skills/post-exploiting-microsoft-graph-with-graphrunner/SKILL.md
Source commit 54a798831d2266a3ca61ce68a7acb80b81160d57
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 35,926
- Repository last updated
- Aug 31, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai-agents Repository topic
- claude-code Repository topic
- cybersecurity Repository topic
- incident-response Repository topic
- mitre-attack Repository topic
- penetration-testing Repository topic
- red-team Repository topic
- security Repository topic
- cloud-security Repository topic
- malware-analysis Repository topic
- red-team Declared skill tag
- microsoft-graph Declared skill tag
- graphrunner Declared skill tag
- entra-id Declared skill tag
- oauth-abuse Declared skill tag
- account-manipulation Declared skill tag
- post-exploitation Declared skill tag
- m365 Declared skill tag
- data Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
LICENSEasset · 11,255 bytesSKILL.mdcore · 10,383 bytesSKILL.mdcore · 10,383 bytesSKILL.mdcore · 10,383 bytesSKILL.mdcore · 10,383 bytesSKILL.mdcore · 10,383 bytesSKILL.mdcore · 10,383 bytesSKILL.mdcore · 10,383 bytesSKILL.mdcore · 10,383 bytesSKILL.mdcore · 10,383 bytesreferences/api-reference.mddoc · 3,696 bytesreferences/standards.mddoc · 1,664 bytesscripts/agent.pyruns · 6,393 bytes
Read excerpt
# 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`.