Oauth Sso Attack logo

Oauth Sso Attack

OrganizationPopular
wgpsec
oauth-sso-attack

OAuth 2.0 / SSO / OpenID Connect 认证流程攻击。当目标有「使用 Google/GitHub/微信 登录」按钮、redirect_uri 参数、authorization_code 流程、或 /.well-known/openid-configuration 端点时使用。覆盖 redirect_uri 劫持、state 缺失 CSRF、token 泄露、scope 提升

Overview

Publisherwgpsec
RepositoryAboutSecurity
Skill nameoauth-sso-attack
Stars
1.8K
Forks
247
Bundled files
3
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wgpsec on GitHub. Read the source before you install it.

Installation

Install the Oauth Sso Attack AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wgpsec/AboutSecurity/tree/master/skills/exploit/auth/oauth-sso-attack
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wgpsec/AboutSecurity.git /tmp/AboutSecurity
mkdir -p .claude/skills
cp -r /tmp/AboutSecurity/skills/exploit/auth/oauth-sso-attack .claude/skills/oauth-sso-attack
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Oauth Sso Attack in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Oauth Sso Attack on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Oauth Sso Attack is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

OAuth/SSO 攻击方法论

OAuth 2.0 是现代 Web 应用最常见的第三方认证协议。攻击面集中在认证流程的各个跳转环节——redirect_uri 校验、state 参数、token 传递。

⛔ 深入参考(必读)

Phase 1: 识别 OAuth 流程

点击「第三方登录」,观察重定向 URL 中的 client_id, redirect_uri, response_type, scope, state。

检查端点:/.well-known/openid-configuration, /oauth/authorize, /api/auth/providers

Phase 2: redirect_uri 劫持(最常见)

目标:让 code/token 发到攻击者 URL。快速测试:

redirect_uri=https://target.com/callback/../evil
redirect_uri=https://evil.target.com/callback
redirect_uri=https://target.com/callback?next=https://evil.com
redirect_uri=https://evil.com/steal

→ 完整 payload 列表 → references/oauth-attack-vectors.md

Phase 3: state 缺失 → CSRF 攻击

无 state 参数时:攻击者获取 code → 构造 callback 链接 → 诱导受害者点击 → 账户绑定攻击者第三方账户

Phase 4: Token 泄露

  • Referer 泄露:回调页含外部资源 → token 通过 Referer 头外泄
  • Implicit Flow:response_type=token → access_token 在 URL fragment
  • 日志:code 在 URL query,可能被记录

Phase 5: 其他攻击面

  • Scope 提升:scope=openid profile email admin
  • client_secret 泄露:检查 JS 源码/GitHub/配置文件
  • 账户接管:邮箱匹配合并 → references/oauth-attack-vectors.md

Phase 6: CTF 与账户接管

6.1 CTF 中的 OAuth

  • 重点考察 redirect_uri 绕过,Flag 在管理员 token 或高权限 scope API 中

6.2 账户接管 — 邮箱预关联攻击

  1. 攻击者注册 attacker@target.com(后缀匹配利用)
  2. 在第三方平台修改邮箱为受害者邮箱
  3. 受害者 OAuth 登录时自动关联到已有账户(邮箱匹配)
  4. 关键:检查目标是否验证邮箱(绕过邮箱验证)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Oauth Sso Attack AI skill do?

OAuth 2.0 / SSO / OpenID Connect 认证流程攻击。当目标有「使用 Google/GitHub/微信 登录」按钮、redirect_uri 参数、authorization_code 流程、或 /.well-known/openid-configuration 端点时使用。覆盖 redirect_uri 劫持、state 缺失 CSRF、token 泄露、scope 提升

Why use Oauth Sso Attack on TypingMind?

Because you install it once and use it with any model. Oauth Sso Attack is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Oauth Sso Attack in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wgpsec/AboutSecurity/tree/master/skills/exploit/auth/oauth-sso-attack. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Oauth Sso Attack?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Oauth Sso Attack?

As many as you like. As long as a model supports skills, you can use Oauth Sso Attack with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Oauth Sso Attack AI skill free?

It is published on GitHub by wgpsec. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇