Skip to content
Skillpedia
Documentation35k · #5509

attacking-entra-id-with-roadtools

Helps your agent enumerate and attack Microsoft Entra ID (Azure AD). It can discover tenant information and abuse tokens to gain access.

What it does

This tool helps investigate and gain access to Microsoft Entra ID (formerly Azure AD) systems. It can collect information about users and settings, and manipulate access tokens to reach other resources.

When to use it

  • ✓During authorized security tests on Microsoft Entra ID systems.
  • ✓When you have compromised credentials and need to explore the system.
  • ✓To test how access tokens are used between different Microsoft services.

Example of what to ask your AI

“I want to investigate a Microsoft Entra ID system I have permission for, using the credentials I obtained.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/attacking-entra-id-with-roadtools/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/attacking-entra-id-with-roadtools/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool connects to the Microsoft Entra ID system, gathers data about users, groups, and settings, and can obtain or exchange access tokens. These tokens allow you to access other services as if you were a legitimate user.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill attacking-entra-id-with-roadtools

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/attacking-entra-id-with-roadtools/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Attacking Entra ID with ROADtools

Authorized use only: ROADtools interacts with live Microsoft Entra ID (Azure AD) tenants and can register devices, mint and exchange tokens, and enumerate directory objects. Use it solely against tenants you own or are explicitly authorized in writing to test. Unauthorized access to a cloud tenant is illegal.

Overview

ROADtools (by Dirk-jan Mollema) is the de facto offensive toolkit for Microsoft Entra ID. It has two main components:

  • ROADrecon — authenticates to Entra ID, gathers the full directory into a local SQLite database via the Azure AD Graph API, and serves an Angular GUI to explore users, groups, roles, applications, service principals, conditional-access policies, and device objects offline. A plugin system exports to BloodHound and analyzes CA policies.
  • roadtx (ROADtools Token eXchange) — acquires and exchanges Entra-issued tokens across the many OAuth flows (ROPC, device code, auth-code, refresh-token exchange, app/federated app), performs device registration, and handles Primary Refresh Token (PRT) operations including PRT-based SSO and cookie minting. Its FOCI (Family of Client IDs) awareness lets a refresh token for one first-party client be redeemed for another resource.

Together they cover the Discovery phase against cloud identity: enumerate the tenant (T1087.004 Account Discovery: Cloud Account) and obtain/manipulate the tokens needed to reach Microsoft Graph, Azure Resource Manager, and other resources. ROADrecon's offline database makes recon stealthy and fast; roadtx makes token theft, PRT abuse, and cross-resource pivoting practical.

When to Use

  • During an authorized Azure / Entra ID red-team or cloud penetration test.
  • When you have a foothold credential, refresh token, or PRT and need to enumerate the tenant.
  • When you must pivot a token from one resource (e.g., Azure CLI) to another (e.g., Microsoft Graph).
  • When validating that conditional-access, device-compliance, and token controls actually constrain an attacker.
  • When mapping Entra attack paths (export to BloodHound for graph analysis).

Prerequisites

  • Written authorization and defined scope for the target tenant.
  • A starting credential: username/password (no MFA flows), a device code session, a refresh/access token, or a registered device's PRT.
  • Python 3.7+ (roadtx Selenium flows need a matching geckodriver/Firefox).
# Core install (roadlib is a shared dependency, pulled in automatically)
python -m pip install roadrecon
python -m pip install roadtx
# Verify
roadrecon --help
roadtx --help

Objectives

  • Authenticate to Entra ID via the appropriate flow (device code preferred for MFA).
  • Gather the full directory with ROADrecon and analyze it in the GUI.
  • Export the directory to BloodHound and run CA-policy analysis plugins.
  • Acquire tokens with roadtx and exchange refresh tokens across resources/clients.
  • Demonstrate PRT-based SSO and document the resulting access.

MITRE ATT&CK Mapping

ID Tactic Official Technique Name Role in this skill
T1087.004 Discovery Account Discovery: Cloud Account ROADrecon enumerates tenant users/accounts
T1069.003 Discovery Permission Groups Discovery: Cloud Groups ROADrecon enumerates Entra groups and roles
T1538 Discovery Cloud Service Dashboard GUI exploration of tenant configuration
T1550.001 Defense Evasion / Lateral Movement Use Alternate Authentication Material: Application Access Token roadtx refresh-token exchange across resources
T1528 Credential Access Steal Application Access Token roadtx PRT/token acquisition

Workflow

Step 1: Authenticate with ROADrecon

Pick the flow that matches your foothold. Device code supports MFA; ROPC (-u/-p) does not.

# Username/password (legacy, no MFA)
roadrecon auth -u user@tenant.onmicrosoft.com -p 'Password123!'

# Device-code flow (supports MFA)
roadrecon auth --device-code

# From a stolen access or refresh token
roadrecon auth --access-token <JWT>
roadrecon auth --refresh-token <refresh_token>

# From a PRT (with session key) for SSO-grade access
roadrecon auth --prt <prt> --prt-sessionkey <session_key>

Authentication writes .roadtools_auth in the working directory.

Step 2: Gather the directory

# Full gather into roadrecon.db (default)
roadrecon gather


…
FAQ

Do I need permission to use this tool?

Yes, it is crucial to have written authorization to use this tool on any system. Using it without permission is illegal.

What are 'tokens'?

Tokens are like digital keys that prove your identity and allow you to access different services without logging in every time.

Can I use this on any Microsoft account?

No, this tool is intended for use only on Microsoft Entra ID (Azure AD) systems for which you have explicit permission to test.

Details

Original description by the author

Enumerate Microsoft Entra ID (Azure AD) tenants with ROADrecon and acquire, exchange, and abuse tokens (including primary refresh tokens) with roadtx. Use for authorized red-team enumeration of a tenant's directory objects or for token-based identity attacks against Entra ID you are explicitly authorized to test.

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#5509
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills