Logotipo de Auditing Jwt Verification And Key Trust

Auditing Jwt Verification And Key Trust

Organización
UnboundCompute
auditing-jwt-verification-and-key-trust

Audita cómo verifica un servicio los JSON Web Tokens para detectar los clásicos saltos de verificación: un ataque de confusión de algoritmos en el que el token cambia el algoritmo de firma para que se use una clave pública como secreto simétrico o se establezca el algoritmo en none; una clave seleccionada mediante una cabecera controlable por el atacante (un identificador de clave, una URL de JWKS o una clave incrustada), de modo que el token indica quién lo firma; una firma que se decodifica, pero no se verifica realmente; y atributos (caducidad, emisor, audiencia) que se analizan, pero no se hacen cumplir. Abarca los servicios que aceptan y verifican JWT para autenticar o autorizar a un usuario. Úsalo cuando el JWT sea la credencial y su verificación marque el límite de seguridad. El token falsificado o no verificado es el origen; la acción autenticada o autorizada que permite, el destino; y el fallo consiste en aceptar el token por confusión de algoritmos, una clave elegida por el atacante o un atributo sin verificar.

Descripción general

EditorUnboundCompute
Repositoriosecurity-agent-skills
Nombre de la habilidadauditing-jwt-verification-and-key-trust
Estrellas
27
Forks
8
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por UnboundCompute en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Auditing Jwt Verification And Key Trust en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-jwt-verification-and-key-trust
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-jwt-verification-and-key-trust .claude/skills/auditing-jwt-verification-and-key-trust
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Auditing Jwt Verification And Key Trust en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Auditing Jwt Verification And Key Trust automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Auditing Jwt Verification And Key Trust no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Auditing JWT verification and key trust: the token names its own signer unless you stop it

A JSON Web Token is a signed claim, and its security is entirely in how the verifier checks the signature and the claims. The failures are a small, famous set, and they recur because the token itself carries the parameters an attacker wants to control. The algorithm lives in the token header, so a verifier that trusts it can be steered into algorithm confusion, verifying an RS256 token as HS256 using the public key as the shared secret, or accepting an algorithm of none with no signature at all. The key can be selected from the header too, a key id, a JWKS URL, or an embedded key, so a token can name a signer the attacker controls. A verifier that decodes the token and reads the claims but never actually checks the signature accepts anything. And a verifier that checks the signature but not the expiry, issuer, and audience honors expired or wrong-context tokens. The audit pins the algorithm and key on the server side and confirms the signature and claims are enforced. You audit this by presenting manipulated tokens and confirming each is refused.

When to use

  • A service accepts JWTs and verifies them to authenticate or authorize a caller.
  • The signing algorithm or key may be chosen from token-supplied fields (alg, kid, jku, embedded key).
  • Claims such as expiry, issuer, and audience may be parsed but not enforced during verification.

Scope check

Test JWT verification only against services you own or are authorized to assess, on non-production tokens and accounts. Forging tokens attempts real authentication, so use non-production credentials and never use a forged token to reach real data. If you can't name the authorization, stop.

The loop

  1. Establish the intended algorithm and key first. Name the exact algorithm the service should accept and the specific key or key set it should verify against, both fixed on the server side. This is the false-positive killer: a verifier that pins the algorithm, selects the key from server configuration or a pinned trusted key set, verifies the signature, and enforces expiry, issuer, and audience is correct. Name the intended algorithm and key, then test manipulation.

  2. Test algorithm confusion and none. Present a token whose header switches the algorithm: an RS256 token re-signed as HS256 using the public key as the secret, and a token with the algorithm set to none and no signature. Confirm the verifier rejects any algorithm other than the one it expects and never accepts none. A verifier that honors the header's algorithm is steerable into using the wrong verification path.

  3. Test attacker-chosen key selection. Check whether the key is selected from a token-supplied field: a key id that indexes an attacker-influenceable store or path, a JWKS URL the token names so the server fetches the attacker's key, or an embedded key the token carries. Present tokens that manipulate each and confirm the server ignores token-supplied key hints and uses only its pinned trusted keys.

  4. Confirm the signature is actually verified. Confirm the code verifies the signature rather than merely decoding the token and reading claims. Present a token with a valid structure but an invalid signature and confirm it is rejected. A decode-without-verify path accepts any well-formed token regardless of signature.

  5. Check claim enforcement. Confirm the verifier enforces expiry (and not-before), issuer, and audience, not just parses them. Present an expired token, one from the wrong issuer, and one for a different audience, and confirm each is refused. A signature-valid token with an unenforced claim is honored outside its intended time or context.

  6. Confirm and record. Confirm by getting a manipulated token accepted, an algorithm-confused or none token, one signed by an attacker-named key, one with an unverified signature, or an expired or wrong-audience token, on non-production accounts and without reaching real data. Kill the lead if the verifier pins the algorithm, uses only server-side trusted keys, verifies the signature, and enforces expiry, issuer, and audience. Record the forged token, the authenticated or authorized action sink, and the algorithm confusion, attacker-chosen key, or unverified claim that accepted it.

Where JWT verification leaks

  • Algorithm from the header enables confusion. Trusting the token's algorithm allows RS256-to-HS256 confusion using the public key as the secret, or an algorithm of none with no signature.
  • Key from the token names its own signer. A key id, a JWKS URL, or an embedded key taken from the token lets an attacker point verification at a key they control.
  • Decode is not verify. Reading the claims without checking the signature accepts any well-formed token.
  • Parsed claims are not enforced claims. Expiry, issuer, and audience read but not checked honor expired or wrong-context tokens.
  • A valid signature is not sufficient authorization. A correctly signed token still must match the expected issuer, audience, and time to authorize this action.

Worked example (a confirm and a kill)

Confirm. A service verifies RS256 tokens but selects the verification algorithm from the token header. A token re-signed as HS256, using the service's known public key as the HMAC secret, is accepted because the verifier runs the HMAC path with the public key. The forged token authenticates as an arbitrary user. Confirmed JWT algorithm-confusion authentication bypass, critical, remediation = pin the accepted algorithm to exactly RS256 on the server, reject any other algorithm and none, and never derive the verification key or algorithm from token-supplied fields.

Kill. The verifier accepts only the one configured algorithm, rejects none and any mismatch, selects the key solely from a pinned trusted key set ignoring the token's key id, JWKS URL, and embedded key, verifies the signature on every token, and enforces expiry, issuer, and audience. An algorithm-confused, wrong-key, unsigned, expired, or wrong-audience token is refused. Killed, kill_reason = "algorithm pinned, key taken only from server-side trusted set, signature verified, and claims enforced; no manipulated token authenticates."

Rationalizations to reject

  • "The library verifies the token." → Confirm it pins the algorithm and ignores token-supplied keys; many verify paths honor the header's algorithm and key hints unless configured not to.
  • "We use RS256." → Confirm the server rejects a token that claims HS256 or none; accepting the header's algorithm is exactly the confusion attack.
  • "The key id tells us which key." → A token-supplied key id, JWKS URL, or embedded key is attacker input; select the key from your trusted set, never from the token.
  • "We read the claims." → Reading is not verifying; confirm the signature is checked and expiry, issuer, and audience are enforced, not just parsed.
  • "The signature is valid." → A valid signature proves origin, not context; enforce issuer, audience, and expiry so the token authorizes only this action now.

Executing this in practice

You need the algorithm the service accepts, how the verification key is selected, whether the signature is actually verified, and which claims are enforced. For each, present an algorithm-confused or none token, a token naming an attacker-controlled key, an invalid-signature token, and expired and wrong-audience tokens. Reading the verification code shows the intended pinning; a manipulated token accepted shows whether it holds.

Related

  • auditing-oauth-token-audience-and-scope-trust - the audience and scope layer above verification; a token must verify here before its audience and scope can be trusted there.
  • auditing-saml-and-oidc-federation-trust - OIDC ID tokens are JWTs, so this verification is the mechanism underneath that skill's issuer and audience checks.
  • auditing-webhook-authenticity-and-callback-trust - signed webhooks share the verify-the-signature-and-the- claims discipline; the same decode-without-verify and key-trust mistakes appear there.
  • hunting-non-human-identity-and-secret-reachability - the signing key is a high-value secret; that skill traces who can reach it, which decides whether forgery is even needed.
  • FINDING-SCHEMA.md - source = the forged or unverified token, sink = the authenticated or authorized action it grants, evidence = the algorithm confusion, attacker-chosen key, or unverified claim that accepted it.

Preguntas frecuentes

¿Qué hace la habilidad de IA Auditing Jwt Verification And Key Trust?

Audita cómo verifica un servicio los JSON Web Tokens para detectar los clásicos saltos de verificación: un ataque de confusión de algoritmos en el que el token cambia el algoritmo de firma para que se use una clave pública como secreto simétrico o se establezca el algoritmo en none; una clave seleccionada mediante una cabecera controlable por el atacante (un identificador de clave, una URL de JWKS o una clave incrustada), de modo que el token indica quién lo firma; una firma que se decodifica, pero no se verifica realmente; y atributos (caducidad, emisor, audiencia) que se analizan, pero no...

¿Por qué usar Auditing Jwt Verification And Key Trust en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Auditing Jwt Verification And Key Trust está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Auditing Jwt Verification And Key Trust en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-jwt-verification-and-key-trust. TypingMind lee el archivo SKILL.md de esa carpeta e instala su contenido como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Auditing Jwt Verification And Key Trust?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Auditing Jwt Verification And Key Trust?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Auditing Jwt Verification And Key Trust con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Auditing Jwt Verification And Key Trust?

Sí. UnboundCompute la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇