oauth
하는 일
이 스킬은 느슨한 리다이렉트 주소와 약한 state 검사처럼 OAuth와 OpenID 로그인에서 흔한 실수를 설명합니다. 외부 계정 로그인을 검토하는 보안 테스터를 위한 스킬입니다.
사용하는 경우
- ✓사이트가 Google 같은 제공자로 로그인하는 기능을 제공하는 경우.
- ✓보안 검토에서 리다이렉트 주소가 엄격하게 확인되는지 물을 때.
- ✓탈취된 로그인 코드나 토큰이 다른 계정에서 쓰일 수 있는지 테스트하고 싶을 때.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/oauth/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 사이트의 Google 로그인 흐름이 로그인 코드를 잘못된 주소로 보낼 수 있는지 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 로그인 엔드포인트를 파악하고, 리다이렉트 주소와 다른 파라미터를 바꾼 뒤, 제공자나 사이트가 바뀐 값을 받아들이는지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
OAuth / OIDC Attack Playbook
OAuth bugs are the single highest-paying ATO vector in modern bug bounty. Every B2B SaaS has an OAuth surface; many implement it wrong.
1. Map the flow
# Discovery
curl -s https://target/.well-known/openid-configuration | jq
# Key endpoints to identify:
# - /authorize (where redirect_uri/client_id/scope arrive)
# - /token (where code exchanges for tokens)
# - /userinfo (claims about user)
# - /jwks.json (signing keys, see jwt/SKILL.md)
# - /revoke (sometimes overpermissive)
Capture a normal flow in Burp. Note: client_id, redirect_uri, state,
scope, response_type, code_challenge (PKCE).
2. Attack surface
2.1 redirect_uri bypass
The #1 OAuth bug class. Server's allowlist regex is too loose:
| Bypass | Example |
|---|---|
| Path append | https://target.com/callback/../../evil |
| Subdomain wildcard | https://target.com.evil.com/cb (server matches *.target.com) |
| Userinfo trick | https://target.com@evil.com/cb |
| Path-traversal in fragment | https://target.com/cb#@evil.com |
| Open-redirect chain | redirect_uri=https://target.com/known-redirect?to=evil.com |
| Localhost / loopback | redirect_uri=http://localhost:1337 (often allowlisted) |
data: URI |
redirect_uri=data:text/html,<script>... (rare but devastating) |
| Mixed-protocol | http:// accepted where https:// required |
| URL-encoded slash | https://target.com%2Fcallback%2F@evil.com |
| Different fragment behavior | redirect_uri=https://evil.com#https://target.com/cb |
Test ALL of these. paramspider + Burp Intruder w/ payload list = systematic.
2.2 State parameter missing / weak (CSRF)
state should bind the auth request to the user's session. Missing or
predictable state → attacker initiates OAuth in own browser, sends victim
the URL, victim clicks → attacker's account now linked to victim's identity.
GET /authorize?response_type=code
&client_id=...
&redirect_uri=https://target.com/cb
&state= ← empty or predictable
2.3 PKCE downgrade
Public clients (mobile, SPA) SHOULD use PKCE. If server accepts
code_verifier omission for a flow that should require it:
POST /token
client_id=mobile-app
code=<stolen_code>
# Note: no code_verifier sent
Some servers fall back to non-PKCE flow → stolen code exchanges fine.
2.4 Code reuse / replay
Some servers don't invalidate codes after first exchange. Capture the code (via referer leak, IDOR, log scrape) → exchange in attacker's session for victim's tokens.
2.5 Referer leak of code
Some apps render auth-callback as a regular page that fetches resources
from third-party CDNs. The full URL (including ?code=...) is sent in
Referer header to those CDNs. Attacker who owns / can compromise a
CDN link extracts the code.
Test: visit the callback URL, observe Referer to all third-party hosts.
2.6 Scope creep / mass-assignment in token request
POST /token
grant_type=authorization_code
code=...
scope=read write admin ← inject elevated scope
Some servers honor a scope parameter at token-exchange time and don't
re-validate against original /authorize scope.
2.7 response_type confusion
The hybrid flow (response_type=code id_token) may behave differently:
- Server returns id_token in URL fragment (visible client-side)
- Then code exchange for access_token
- Sometimes the id_token validation is weak/skipped on response_type variations
2.8 client_id confusion
Some servers trust client_id as the only identifier. If two clients
share a redirect_uri pattern, you can re-use one's code as another:
client_id=trusted-internal-app
redirect_uri=https://attacker.com/cb (also allowlisted for trusted app!)
2.9 OAuth → Account Takeover chain
The classic ATO via OAuth:
- Victim signs in to target via OAuth (Google/Microsoft)
- Attacker finds open-redirect or XSS on target
- Attacker crafts OAuth init URL w/ redirect_uri pointing to attacker via open-redirect
- Victim clicks → server issues code → redirected to attacker's host w/ code in URL
- Attacker exchanges code for victim's tokens → full ATO
2.10 Account-linking vulnerabilities
"Sign in with Google" can link a NEW Google account to an EXISTING email-password account if the server matches solely by email. Attacker registers victim@target-mail.com (a typosquat or sub-add), starts OAuth, links to victim's existing account.
3. Tools
- `o
자주 묻는 질문
redirect_uri 우회란 무엇인가요?
로그인 서버가 약간 바뀐 반환 주소를 받아들여, 로그인 코드가 실제 사이트가 아닌 다른 곳으로 전달되는 경우입니다.
PKCE도 다루나요?
네. PKCE를 낮추거나 건너뛸 수 있는지 확인하는 방법을 언급합니다.
어디서 시작하나요?
제공자의 openid-configuration 파일을 읽어 주요 엔드포인트를 찾는 것으로 시작합니다.
상세 정보
작성자의 원본 설명
OAuth 2.0 / OIDC attacks — redirect_uri bypass, state CSRF, code leak via Referer, response_type confusion, PKCE downgrade, scope creep, ATO chains.
인기도
- GitHub 스타
- 6.5k
- 순위
- #14073
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.