attacking-oauth-with-device-code-phishing

attacking-oauth-with-device-code-phishing is a skill for Claude Code, Codex from andycungkrinx91/konoha. It costs 46 tokens per session (3,517 once invoked), scanned A, original, MIT.

An authorized security-testing guide for phishing attacks that misuse OAuth device codes and consent prompts in Microsoft Entra ID, Microsoft's cloud identity service.

In plain words
What is it for?
Use it in a controlled red-team assessment to create device-code and illicit-consent scenarios and evaluate protections around Microsoft 365 identities and applications.
Why use it?
It helps security teams test whether users or tenant settings could let an attacker obtain access or refresh tokens despite multi-factor authentication. Use it only on tenants you own or have written permission to test.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is pwsh -c "Import-Module ./TokenTactics/TokenTactics.psd1".

Good fit Use it in a controlled red-team assessment to create device-code and illicit-consent scenarios and evaluate protections around Microsoft 365 identities and applications.

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/andycungkrinx91/konoha
agentmods
npx agentmods add skills/andycungkrinx91/konoha/attacking-oauth-with-device-code-phishing

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 attacking-oauth-with-device-code-phishing

README.md
[![agentmods](https://agentmods.dev/badge/skills/andycungkrinx91/konoha/attacking-oauth-with-device-code-phishing/github.svg)](https://agentmods.dev/skills/andycungkrinx91/konoha/attacking-oauth-with-device-code-phishing)
Your own site
<a href="https://agentmods.dev/skills/andycungkrinx91/konoha/attacking-oauth-with-device-code-phishing"><img src="https://agentmods.dev/badge/skills/andycungkrinx91/konoha/attacking-oauth-with-device-code-phishing/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 attacking-oauth-with-device-code-phishing

Your own site · 80×15
<a href="https://agentmods.dev/skills/andycungkrinx91/konoha/attacking-oauth-with-device-code-phishing"><img src="https://agentmods.dev/badge/skills/andycungkrinx91/konoha/attacking-oauth-with-device-code-phishing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,517 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00046 $0.03517
Opus 5.5 $0.00018 $0.01407
Sonnet 5.5 $0.00009 $0.00703
Haiku 4.5 $0.00005 $0.00352

Measured today against content hash 495fa21b8ee6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

attacking-oauth-with-device-code-phishing scanned grade A with 1 finding 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 today.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.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.

Makes network callslowCapability

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

curl -s -X POST \
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.agents/skills/akatsuki-skill/references/anthropic-cybersecurity-skills-assets/skills/attacking-oauth-with-device-code-phishing/SKILL.md · 242 lines

How it starts

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

Attacking OAuth with Device-Code Phishing

Legal Notice: This skill is for authorized security testing, red-team engagements, and educational purposes only. Device-code and consent-grant phishing manipulate real users into authorizing attacker-controlled access to corporate identities. Execute only against tenants you own or have explicit written authorization (rules of engagement) to test. Unauthorized use violates the Computer Fraud and Abuse Act and equivalent laws worldwide.

Overview

The OAuth 2.0 Device Authorization Grant (RFC 8628) was designed for input-constrained devices (smart TVs, CLI tools) that cannot easily present a browser-based login. A device requests a short user_code and a device_code, displays the user_code and a verification URL to the user, and polls the token endpoint while the user authenticates on a separate, fully-featured device. Attackers weaponize this flow: instead of a smart TV, the "device" is the attacker's machine. The attacker initiates the device-code request, then phishes a victim to visit the legitimate Microsoft verification page (https://microsoft.com/devicelogin) and enter the attacker-generated user_code. Because the victim authenticates on the genuine Microsoft login page — completing MFA — the resulting tokens are minted to the attacker's polling session. This bypasses MFA entirely: the second factor is satisfied by the victim, but the bearer tokens land with the attacker (mapped to MITRE ATT&CK T1528 – Steal Application Access Token).

Microsoft Threat Intelligence, Volexity, and Proofpoint documented sharp growth in device-code phishing through 2025, with Russia-aligned actors (tracked by Microsoft as Storm-2372) among the most prolific. Mandiant's M-Trends reporting similarly highlights OAuth token theft as a leading cloud initial-access vector. A closely related technique is the illicit consent grant ("OAuth phishing"): the attacker registers a multi-tenant app and tricks the victim into clicking an /adminconsent or user-consent URL, granting the malicious app delegated Microsoft Graph permissions (Mail.Read, Files.ReadWrite.All, offline_access) that persist independently of password resets. This skill covers both, plus token replay across Microsoft 365 services using TokenTactics and validation/access mapping with ROADtools.

Read the full file on GitHub · 242 lines

Files

What ships with it

3 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. today First seen · 242 lines · 46 tokens per session scan A 495fa21b8ee6

Subscribe to this mod's changes

attacking-oauth-with-device-code-phishing is a skill published in the GitHub repository andycungkrinx91/konoha (12 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 3,517 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-25.

Related

Other skills, from other repositories

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

detecting-oauth-token-theft

Detects and responds to OAuth token theft and replay attacks in cloud environments, focusing on Microsoft Entra ID (Azure AD) token protection, conditional access policies, and sign-in anomaly detection. Covers access token theft, refresh token replay, Primary Refresh Token (PRT) abuse, and pass-the-cookie attacks.…

xalgorix/xalgorix · 97 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

hunting-saas-sso-token-abuse

Detect SSO and OAuth token replay and SaaS lateral movement.

adriannoes/awesome-agentic-ai · 23 tokens

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.

ShulkwiSEC/bb-huge · 56 tokens

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