Signed-token workshop (JWT)
Fissure includes a signed-token workshop for inspecting and forging JSON Web Tokens (JWT/JWS). It is the offline analogue of SignSaboteur and JWT Editor: a tester decodes a token, edits its claims, and re-signs, strips, verifies, or cracks it, entirely as a local transform with no network traffic.
The same workshop also handles framework signed cookies (Flask, Django, Rails, and a generic mode); see "Framework signed cookies" below.
The workshop is built on three pieces:
fissure_token.{c,h}: a pure, GUI-free engine over compact JWS strings (base64url(header).base64url(payload).base64url(signature)).fissure_cookie.{c,h}: a pure engine for framework signed cookies.fissure_gui_token.{c,h}: the "Tokens" popup that drives both engines; its Mode button switches between JWT and each cookie scheme.
Opening it
- Toolbar: the "Tokens" button opens the workshop with an empty token field.
- Context menu: right-click a proxy flow, finding, or Repeater request
that carries a JWT (in a header such as
Authorization: Bearer ..., a cookie, or the body) and choose "Signed tokens". Fissure finds the first token and opens the workshop pre-loaded and decoded. The entry appears only when a JWT is present in the selected request.
What it does
- Decode: splits the token and shows the header and payload as
editable JSON, and reports the algorithm named in the header, with a
note when it is
none(unsigned, signature not checked), a non-HMAC algorithm (RSA/ECDSA/...), or an HMAC algorithm (crackable offline). - Sign / forge: re-signs the edited header and payload with the chosen
algorithm and secret. Choose the algorithm with the "Sign as" button,
which cycles HS256, HS384, HS512, and none. The header's
algis set to match. HS* tokens are signed with HMAC overheader.payload;noneproduces an unsigned token with an empty signature segment. - Verify: recomputes the HMAC of the token in the field and compares it to the supplied secret in constant time, reporting valid, invalid, or "not an HMAC token".
- alg:none: rebuilds the token as an unsigned
alg:nonevariant, for testing servers that trust the header algorithm instead of enforcing a fixed one. - Crack HS: tries each line of a chosen wordlist as the HMAC secret and, on a hit, loads the recovered secret into the secret field. Applies to HS256/384/512 tokens.
- HS/RS algorithm confusion: sign an RSA-verified token as HS* using the RSA public key text as the HMAC secret. Paste the public key into the secret field, pick "Sign as HS256", and Sign. A server that verifies with the public key under an HMAC algorithm accepts the forgery.
Using the result
- Copy places the forged token on the clipboard.
- To Repeater swaps the source token for the forged one in the active Repeater request (the request line, headers, and body are all searched) and switches to the Repeater. If no active request holds the source token, the forged token is copied to the clipboard as a fallback.
Ethics
Forging is a purely local transform: no request is sent by the workshop. Sending a forged token is an explicit, separate action (To Repeater then Send, or paste into a request), and active use stays subject to the scope allowlist and the authorization banner like any other request Fissure sends.
Framework signed cookies
Switch the Mode button (top-left of the workshop) from "JWT" to a
cookie scheme to work with the
value<separator>signature signed cookies that web
frameworks issue. A Salt field appears (pre-filled with the scheme
default); the alg buttons are hidden because each scheme fixes its own
digest.
Supported schemes:
- Flask (itsdangerous session cookie):
payload.timestamp.signature, HMAC-SHA1, with the signing key derived asHMAC-SHA1(secret, "cookie-session"). The payload segment (base64url JSON, optionally zlib-compressed) is decoded into the Payload editor. - Django (
django.core.signing):value:signature, HMAC-SHA256, with the salted_hmac key derivationSHA256(salt + "signer" + secret). The default salt isdjango.core.signing.Signer; set it to match the app's signer. - Rails signed cookie (
ActiveSupport::MessageVerifier):base64--hexhmac, HMAC-SHA1 over the base64 payload, with the key derived by PBKDF2-HMAC-SHA1 fromsecret_key_baseand the "signed cookie" salt (1000 iterations, 64 bytes). The base64 JSON payload is decoded into the Payload editor. - Express
cookie-session(keygrip): a two-cookie pairsession=<base64url json>; session.sig=<signature>, where the signature isbase64url(HMAC-SHA1(secret, "session=<value>")). Paste the whole pair (as it appears in the Cookie header); Decode shows the JSON payload, and Sign emits the updated pair with a fresh.sig. - Rails encrypted cookie
(
ActiveSupport::MessageEncryptor): AES-256-GCM, formatbase64(ciphertext)--base64(iv)--base64(tag), with the key derived by PBKDF2-HMAC-SHA1 fromsecret_key_baseand the "authenticated encrypted cookie" salt (1000 iterations, 32 bytes). Unlike the signed schemes it must be decrypted: enter the secret first, then Decode to show the plaintext; Sign re-encrypts the edited payload with a fresh IV; Verify and Crack succeed when the GCM tag authenticates (the tag is the check, so a candidate secret is confirmed by a successful decrypt). - Generic: an unknown
payload<sep>signaturestring. Verify and crack try each digest (SHA1/256/384/512) and signature encoding (base64url, hex, base64) with the secret used directly as the HMAC key.
The operations mirror the JWT path:
- Decode: split the cookie, show the signed value, and (Flask/Rails) decode the JSON payload for editing.
- Sign: re-sign the (edited) payload or signed value under the secret and salt.
- Verify: check the cookie's signature against the secret (and salt).
- Crack HS: try each line of a wordlist as the secret and load a hit into the Secret field. For Rails, the wordlist candidates are secret_key_base values (each runs through PBKDF2, so cracking is slower than the HMAC-only schemes).
The secret meaning is per-scheme: the Flask/Django app secret, or the
Rails secret_key_base. Enter it (and, for Django, the app's
salt) and Sign or Verify.
Cryptographic primitives
The HMAC signing and verification use the Nilorea
n_digest helpers (n_hmac_sha1/256/384/512,
n_pbkdf2_hmac_sha1 for the Rails key derivation,
n_aead_aes256gcm_encrypt/_decrypt for Rails
encrypted cookies, n_digest_consttime_equal) and the
multitool base64url/base64/hex/zlib transforms. Header edits go through
cJSON. See docs/audits/NILOREA_AUDIT.md for the
upstream-first split.
SAML workshop (assertion forging)
A sibling workshop for SAML single sign-on, opened from the command
palette ("Open SAML workshop") or the /api/saml control
route (MCP tool saml). Where the Tokens workshop handles
JWTs and framework cookies, this one handles the XML-DSig assertions an
IdP posts to a service provider (SP). SAML is app-specific
functionality: the XML parsing (libxml2) and signing/verification
(xmlsec1) are linked in Fissure, not Nilorea (they have no other use in
the library).
What it does
- Decode: paste a
SAMLRequest/SAMLResponsevalue and decode it to XML. The binding is auto-detected: HTTP-POST is base64 of the XML; HTTP-Redirect is base64 of a raw-DEFLATE stream (URL-decode a Redirect value before pasting). - Inspect: summarize the message (Issuer, NameID, Destination, the
attribute name/value pairs, whether a
ds:Signatureis present and whether it currently verifies against its own embedded certificate). - Edit: replace the NameID (the identity the SP trusts) or set/add a
SAML attribute (for example
role=admin). - Strip signature (signature exclusion): remove every
ds:Signature, to test an SP that accepts an unsigned assertion. - XML signature wrapping (XSW): keep the validly signed assertion but
inject a forged one, positioned so a vulnerable SP validates the
original signature yet processes the forged assertion. Three variants
cover the common processing orders: forged-before, the original wrapped
in a
ds:Signature/ds:Object, and the original moved intosamlp:Extensions. The last two used to emit shapes no schema-validating SP would accept (an assertion nested directly inside an assertion, and anExtensionselement with no namespace), so they tested nothing. Note that a strict verifier reports theds:Objectvariant as invalid, which is correct: it subtracts the whole signature subtree, so the wrapped assertion digests as empty. The variant is still what a vulnerable SP mishandles. - Verify checks EVERY
ds:Signaturein the message, not just the first. Multi- signature SAML (a signed Response carrying a signed Assertion) is the common enterprise shape, and reporting "signature valid" from the first one while a second was broken is exactly the confusion these attacks exploit.inspectreportssignatures[],signature_countandsignature_detail. - Generate key / Sign / Verify: mint a throwaway self-signed RSA key + cert, then re-sign an edited or stripped message with an enveloped RSA-SHA256 signature. Against an SP that does not pin the IdP certificate, the tester's own signature is accepted. Verify is a pure signature/digest check: the public key is taken from the embedded certificate and the cert chain and validity window are deliberately not enforced, so a tampered-but-not-resigned message fails.
- Encode: re-encode the working XML back to a POST- or Redirect-binding blob to paste into a request.
Ethics
Like the Tokens workshop, every operation is a local transform: the SAML workshop sends no request. SAML SSO testing is only for assertions you are authorized to test; sending a forged assertion is an explicit, separate action subject to the scope allowlist and the authorization banner.
Cryptographic primitives (SAML)
RSA key/cert generation uses OpenSSL (EVP_RSA_gen,
X509_sign with SHA-256); XML signing/verification uses
xmlsec1 (xmlSecDSigCtxSign/Verify, exclusive
C14N, enveloped transform); the HTTP-Redirect binding uses raw zlib
DEFLATE and a whitespace-tolerant base64. See
src/fissure_saml.c.