Autonomous Red Teaming for Microsoft 365 with EntraReaper

Network of user icons connected by red and blue lines, with text boxes reading Research Insights and Privilege Escalation Detected, illustrating an Autonomous Red Teaming cybersecurity threat targeting Microsoft Entra ID in a digital system.

EntraReaper transforms Claude Code and AADInterlas into a powerful, governed autonomous red team platform for Microsoft 365, including Entra ID. Built by the Guardz research team, this MCP server wraps 238 AADInternals PowerShell cmdlets into purpose-built tools. It enables safe, OPSEC-aware attack simulation across the full Microsoft 365 identity stack. With strong governance, adaptive kill chains, and detailed reporting, EntraReaper helps defenders understand real-world attack paths before adversaries exploit them.

Excited to announce EntraReaper: an MCP server for Autonomous Red Teaming with Claude and AADInternals, streamlining operations on Microsoft Entra ID. Try it out, check the link, and comment if you want a Windows version!.

EntraReaper Overview

EntraReaper is an autonomous red team platform for Microsoft Entra ID. It serves as an MCP server that connects Claude Code with 238 AADInternals PowerShell cmdlets. The tool wraps these cmdlets into 65 purpose-built tools. These tools cover recon, credential access, persistence, privilege escalation, lateral movement, collection, impact evasion, analysis, and reporting.

The platform includes 87 attack scenarios and 13 kill chains labeled A through M. It supports full, semi-auto, and manual engagement modes. Three hat modes exist: WHITE for authorized pentest, GRAY for red team, and BLACK for adversary simulation. Adaptive routing re-evaluates attack paths after each action based on tenant settings. It targets Entra ID Exchange, Online Teams, SharePoint, OneDrive, and Azure.

A dark-themed infographic illustrates EntraReaper, an Autonomous Red Teaming cyber threat targeting Microsoft 365 and Microsoft Entra ID, featuring a skull logo, AI elements, adaptive kill chain routing, and selectable attack modes: full-auto, semi-auto, and manual.

Architecture and Features

EntraReaper uses a four-layer architecture. Governance manages the noise budget and evasion. Execution runs over 50 attack tools safely via subprocess. Intelligence performs Conditional Access analysis and privilege pathfinding using BFS graphs. Reporting generates 12-section reports, MITRE ATT, and CK Navigator JSON evidence manifests and cleanup checklists. It stores data in 15 engagement folders. Every tool call checks the noise budget, applies jitter delays, rotates user agents, and automatically saves the output.

A layered cybersecurity framework diagram featuring Autonomous Red Teaming and Microsoft Entra ID across four layers: Governance, Execution, Intelligence, and Reporting—each layer detailed with labeled tools in a glowing, high-tech design.

The noise budget starts at 100 points by default. Silent tools cost zero points while loud tools cost up to 50 points and require human approval. This prevents runaway operations during autonomous runs. Evasion engine rotates user agents across eight contexts and supports FOCI token cascade across 37 app pivots.

The Scenarios

EntraReaper provides more than 70 tools grouped by MITRE ATT and CK phases. Recon tools include recon tenant, recon domains, recon dns, and recon openid. Credential tools include cred device code and cred token decode. Evasion tools include the FOCI evasion list and the audience switch. Specific scenarios include the following.

  • Silent tenant reconnaissance runs recon on tenant recon domains, DNS, and OpenID at zero-noise cost to fingerprint tenant ID, federation type, domains, DNS records, and OpenID configuration.
  • Device code phishing with FOCI pivot executes cred device code, cred token decode, evasion foci list, and evasion audience switch at three points, with a cost to obtain an admin token and cascade across Exchange, Teams, and Azure.
  • Full kill chain A proceeds from external recon through user enumeration, device code phishing, insider recon, CA analysis, MFA audit, to Azure escalation toward Global Admin in semi-auto mode with adaptive path selection and set noise budget.

Hands-On

Most engagements begin with reconnaissance, and that is where the real attack surface starts to take shape. With EntraReaper’s black box mode, AI-driven recon significantly accelerates this phase, uncovering a large volume of findings, mapping potential attack paths, and highlighting areas that would otherwise take much longer to identify manually.

Instead of relying solely on traditional enumeration, AI Recon continuously analyzes and correlates data to surface misconfigurations, weak points, and chaining opportunities. This creates a clearer picture of how an attacker might move through the environment.

From there, fuzzing becomes far more targeted. Rather than blindly probing, you are testing specific hypotheses derived from recon, making the process more efficient and more likely to uncover meaningful vulnerabilities.

In practice, AI Recon inside EntraReaper is not just about collecting data, it’s about turning reconnaissance into an actionable attack flow.

Still have questions before choosing a plan?
Talk to a real human. No forms. No waiting. No Slack account needed.

No Slack account needed.

The EntraReaper console

I took a lab and ran on it an ai- recon, what was the result? Once I loaded EntraReaper and selected AI-Recon for a specific domain, the module ran in recon mode and offered many recon options. A few of them are as the image below.

Screenshot of a terminal-style interface listing EntraReaper Autonomous Red Teaming results, including scenario components, catalog indexes, and agent details with file paths and descriptions highlighted in yellow.

Result and Findings

The AI-Recon on EntraReaper was run for about 25 minutes, with massive operations, and yielded great results. Below are massive results.

Attack Surface Score

External probing was performed with zero visibility and completed in approximately 25 minutes, resulting in a score of 70 out of 100, which falls within the high-risk range. The real impact comes from compound risk rather than individual findings, where an implicit grant enabled, an exposed device code endpoint, FOCI multi refresh token behavior, and missing DMARC at the apex align to create a pre-authentication attack surface.

Together, these signals unlock multiple attack chains before any authentication event occurs. The scoring is additive and transparent, with 50 points from primary findings and 20 from secondary indicators such as SharePoint version leakage, ActiveSync 451, and the onmicrosoft auth path, reduced by 25 due to existing defenses. Remediation requires four focused DNS and Conditional Access changes, cutting the score to 30 and quickly eliminating major exposure.

Bar chart visualizing Attack Surface Scores for Microsoft 365, with colored bands: LOW to CRITICAL. Markers show two scores—62 (A horse) and 70 (A deep)—demonstrating EntraReaper’s Autonomous Red Teaming insights.

S89 AI-Reconnaissance is structured as a four-phase pipeline. Phase 1 runs eight unauthenticated recon primitives in parallel (S01-S08 concurrent). Phase 1+ extends to deep fuzzing across the M365 service mesh, federation metadata, and OAuth phishing URL pre-flight. The fusion stage normalizes outputs and ranks next-phase targets via LLM inference. Phase 2 is the auto-routed initial-access scenario, namely S17 Device Code Phish in this run.

A flowchart titled S89 AI-Reconnaissance — Attack Flow shows three phases in purple boxes, arrows, and findings in colored boxes labeled M1–M16 below. Each phase details Autonomous Red Teaming methods against Microsoft 365, with color-coded findings by category.

The M365 Service Surface, with external probing, established what is reachable from the public internet. Twelve services were enumerated. Eight are fully exposed at the protocol level (Exchange Online, SharePoint, OneDrive, Teams, Microsoft Graph, Azure RBAC, Kerberos endpoint, OIDC). ActiveSync and EWS are policy-blocked but not removed, namely returning HTTP 451 and HTTP 401, respectively, rather than HTTP 404. Federation is disabled (managed-only tenant).

A table listing 13 services with their status: several are marked EXPOSED in red by EntraReaper, some as AUTH-REQUIRED in blue, others as POLICY-BLOCKED in yellow, and a few as INDETERMINATE or NOT-CONFIGURED in gray.

The Kill Chain Viability was evaluated against the findings. Seven chains are immediately viable (READY or ELEVATED), four require a token (POST-TOKEN), three are blocked by absent infrastructure (no federation, no hybrid sync), and one (Chain D, MSP Supply Chain) is indeterminate. Chain O is this run itself, namely the adaptive AI-routed chain that produced the ranked next-phase output.

A table showing the viability of 15 cyber kill chains, with colored bars indicating predicted success rates from 100% to 35%. EntraReaper marks seven chains as READY and one as ACTIVE for the current Autonomous Red Teaming run.

Installation and Usage

The installation requires Python 3.11, PowerShell 7, and AADInternals. Clone the repo from Guardzcom Security Research Labs. Navigate to the EntraReaper folder. Run UV sync. Start the server with uv run python server.py. Add it to Claude Code using the mcp add command. The tool runs on macOS and Linux.

Usage starts with silent recon using tools like recon tenant, recon domains, and recon dns at zero noise cost. User enumeration targets C-suite accounts, with recon users at a one-time cost. Device code phishing with FOCI pivot uses the cred device code and evasion tools at a three-point cost.

Full kill chain A runs in semi-auto mode with a set noise budget toward Global Admin. EntraReaper is for authorized use only. Operators must own the tenant or have explicit written permission. Unauthorized testing violates laws.

The repository is at https://github.com/guardzcom/security-research-labs/tree/main/AI-Cloud-Tools/M365-Tools/EntraReaper.

More Tools

AI Security Tools

The AI-Cloud-Tools section offers OpenClaw Analyzer for AI configuration security analysis and SkillScan for scanning AI skills/files/URLs. It also includes an OAuth IOCs checker that helps organizations secure AI agents and detect supply-chain risks.

CloudAdversary

CloudAdversary is a dedicated place in the Guardz Security Research Labs repository that provides PowerShell-based red team and adversary emulation scripts focused on Microsoft 365 and Entra ID. These tools help authorized security teams test real attack techniques against cloud identities and productivity services.

For deeper technical insights and detailed breakdowns, visit the Guardz Blog

Categories:

Subscribe to
Our Newsletter.

Abstract image of two overlapping shield shapes, one dark blue and one green, with a soft glowing effect on a light background—perfect for enhancing your single post template with a modern, secure aesthetic.
Abstract image with a large dark blue, semi-circular shape overlapping a bright green, glowing circular shape on a light gray background. Perfect for enhancing your single post template, the green circle appears partially blurred and luminous.

Keep your clients secure.

A stylized, dark blue shield icon with a green gradient glow on the right side, set against a light gray background—ideal for enhancing your single post template design.

Continue Reading

A digital illustration of an npm package box being disrupted by a Mini Shai-Hulud, with data fragments and warning icons like locks and alerts emerging, symbolizing security vulnerabilities. A banner reads Research Insights.

Shai-Hulud Strikes Again

MSP cybersecurity checklist

MSP Cybersecurity Checklist: How to Protect Clients, Devices, and Data

Guardz and Syncro Secure logos displayed side by side with a plus sign on a dark background featuring green circuit-like lines, showcasing a powerful MSP workflow integration.

Guardz + Syncro Secure: Bringing Security Into the MSP Workflow

A person in a futuristic chair sits at a high-tech control panel, looking out at a starry space scene with planets and mountains. The dashboard glows with colorful buttons and screens, like the perfect single post template for exploring new worlds.

Guardz, Your Cybersecurity
Co-Pilot for MSPs

Demonstrate the value you bring to the table as an MSP and gain visibility into your clients’ external postures.

Holistic Protection.
Hassle-Free.
Cost-Effective.
Slack
Slack
Chat with us No Slack account needed.