azure-privilege-escalation

azure-privilege-escalation is a skill for Claude Code, Codex from xalgorix/xalgorix. It costs 58 tokens per session (1,434 once invoked), scanned C, original, Apache-2.0.

A security-testing guide for proving privilege escalation in Azure and Entra ID. It checks whether an existing user, application, service principal, or managed identity can gain higher directory or cloud permissions.

In plain words
What is it for?
It helps test application ownership, added credentials, privileged Graph permissions, role assignments, managed identities, Key Vault control, VM commands, Automation, and federated identity settings.
Why use it?
It avoids treating ownership, permissions, or role assignments as successful escalation until a formerly blocked action works. This makes the result tied to demonstrated control rather than configuration alone.

Skill for Claude CodeCodex

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

Good fit It helps test application ownership, added credentials, privileged Graph permissions, role assignments, managed identities, Key Vault control, VM commands, Automation, and federated identity settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xalgorix/xalgorix/azure-privilege-escalation
About the project

xalgorix/xalgorix is a self-hosted AI penetration-testing tool in which an LLM agent performs reconnaissance, looks for vulnerabilities, and coordinates exploitation, while a separate verifier re-tests findings before reporting them. It is for security teams, ethical hackers, and bug bounty work using a private, bring-your-own-LLM setup. The catalogue skills extend the agent's pentesting workflow.

xalgorix/xalgorix · 1,531 stars · on GitHub · xalgorix.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xalgorix/xalgorix --skill azure-privilege-escalation
Clone the repo
git clone --depth 1 https://github.com/xalgorix/xalgorix

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-privilege-escalation

README.md
[![agentmods](https://agentmods.dev/badge/skills/xalgorix/xalgorix/azure-privilege-escalation/github.svg)](https://agentmods.dev/skills/xalgorix/xalgorix/azure-privilege-escalation)
Your own site
<a href="https://agentmods.dev/skills/xalgorix/xalgorix/azure-privilege-escalation"><img src="https://agentmods.dev/badge/skills/xalgorix/xalgorix/azure-privilege-escalation/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-privilege-escalation

Your own site · 80×15
<a href="https://agentmods.dev/skills/xalgorix/xalgorix/azure-privilege-escalation"><img src="https://agentmods.dev/badge/skills/xalgorix/xalgorix/azure-privilege-escalation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,434 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00058 $0.01434
Opus 5.5 $0.00023 $0.00574
Sonnet 5.5 $0.00012 $0.00287
Haiku 4.5 $0.00006 $0.00143

Measured 2mo ago against content hash 718917cc7795, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

azure-privilege-escalation scanned grade C with 2 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 2mo ago.

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.

Cloud metadata endpointhighServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

az vm run-command invoke ... --scripts "curl -s -H Metadata:true 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/'"

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

az vm run-command invoke ... --scripts "curl -s -H Metadata:true 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/'"
internal/tools/skills/data/cloud-security/azure-privilege-escalation/SKILL.md · 122 lines

How it starts

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

Azure / Entra Privilege Escalation

Purpose

Prove Azure/Entra escalation from a controlled principal (discovered token, service principal, user, or managed identity) to higher privilege — a directory role, a privileged Graph app permission, an Owner/User Access Administrator RBAC role, or workload execution — with the formerly unavailable action demonstrated.

Entry Conditions

  • A validated Azure context from azure-entra-cloud-pentesting (principal, audience(s), roles/scopes enumerated)
  • Runtime authorization for the state-changing operations this skill exercises

Attack Model

baseline: principal cannot do X (role assignment, secret creation, command execution)
→ escalation primitive (ownership / credential / role assignment / workload exec)
→ higher-privilege identity or direct control
→ X succeeds
→ report

Methodology

Family 1 — Application & Service Principal Control

Owned apps/SPs: "Application.ReadWrite.Owner" / ownership grants let you add credentials
  (client secrets, cert) to the app. Adding a secret to a privileged app = full control of
  its identity. Check app roles:
  az rest --url "https://graph.microsoft.com/v1.0/applications/<id>" | jq .requiredResourceAccess
  az ad app credential list --id <appId>       # what creds exist
  az ad app credential reset --id <appId>      # (state change: runtime policy permitting)
Privileged Graph app roles (application permissions) on ANY app you can administer:
  RoleManagement.ReadWrite.Directory, Directory.ReadWrite.All, AppRoleAssignment.ReadWrite.All,
  Mail.ReadWrite, etc. — these act tenant-wide, not just for one user

Family 2 — Role Assignments (RBAC and Directory)

# User Access Administrator / Owner on a scope → assign roles at that scope
az role assignment create --assignee <yourObjectId> --role "Owner" --scope /subscriptions/<id>
# Directory roles: Privileged Role Administrator / Global Admin paths
az rest --url "https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments"   # who holds what
az rest --url "https://graph.microsoft.com/v1.0/roleEligibilityScheduleInstances"          # PIM assignments
# Groups: group-ownership → membership control of role-bearing groups

Read the full file on GitHub · 122 lines

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. 2mo ago First seen · 122 lines · 58 tokens per session scan C 718917cc7795

Subscribe to this mod's changes

azure-privilege-escalation is a skill published in the GitHub repository xalgorix/xalgorix (1,531 stars, last pushed yesterday), licensed Apache-2.0. It adds 58 tokens to every session and 1,434 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-29.

Related

azure-privilege-escalation compared with skills from other repositories

azure-privilege-escalation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
azure-privilege-escalationxalgorix/xalgorixSkill1.5kyesterdayApache-2.0C58Claude Code, Codex
cis-aws-foundations-2.1.1CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A19Claude Code, Codex
cis-aws-foundations-2.15CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A23Claude Code, Codex
cis-aws-foundations-4.1CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A18Claude Code, Codex
cis-aws-foundations-2.1.3CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A21Claude Code, Codex
cis-aws-foundations-2.4CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A20Claude Code, Codex
cis-aws-foundations-2.5CyberStrikeus/CyberStrikeSkill3.8ktodayAGPL-3.0A21Claude Code, Codex