Session Forensics
Executive summary — Session Forensics is an application forensics investigation on TryHackMe: on TryFlufMe's internal portal a normal user started performing admin actions. By correlating web server, application, Identity Provider and browser dump logs, we reconstruct how the userFluffyCatwent from roleusertoadminby forging a JWT with thenonealgorithm and planting it inlocalStorage. A JWT forgery → session hijacking → privilege escalation path seen from the defensive side.
| Platform | TryHackMe |
| Operating system | N/A (log analysis) |
| Difficulty | Medium |
| Room | Session Forensics |
| Target IP | N/A (no live target — pure log/artifact analysis) |
Attack map
[USER] FluffyCat — legitimate HS256 JWT, role: user
│ forges a new JWT with alg: none and role: admin
▼
[BROWSER] malicious JWT stored in localStorage (browser_dump.txt)
│ the app trusts the token without verifying the signature
▼
[APP] access to the admin portal — role mismatch (app.log)
│ the IdP never issued an admin token (idp.log)
▼
[ESCALATION] user → admin with no valid credentials1. Fundamentals: sessions and JWT
Before touching the crime scene, it pays to nail down the concepts. A session is like a hotel room key: the server holds the room number (the state) and you only carry the card (the session ID). A JWT, by contrast, is like a boarding pass: it carries all the information inside it (user, role, expiry) and needs no central database. That convenience comes at a price: if the token is forged or tampered with, access is instant.
Why it matters: because a JWT is self-contained, security rests entirely on signature verification. If the server doesn't validate the signature properly, anyone can write their own token.
Q: What security mechanism must you implement when introducing JWT?
A: revocation
Q: What is the attack called when an attacker steals your session ID?
A: session hijacking
Resumen ejecutivo — Session Forensics es una investigación de forense de aplicaciones en TryHackMe: en el portal interno de TryFlufMe un usuario normal empezó a ejecutar acciones de administrador. Correlacionando registros de servidor web, aplicación, Identity Provider y volcado del navegador se reconstruye cómo el usuarioFluffyCatpasó de roluseraadminforjando un JWT con el algoritmononey colocándolo enlocalStorage. Un recorrido JWT forgery → session hijacking → privilege escalation visto desde el lado defensivo.
| Plataforma | TryHackMe |
| Sistema operativo | N/A (análisis de logs) |
| Dificultad | Medium |
| Room | Session Forensics |
| IP objetivo | N/A (sin objetivo en vivo — solo análisis de logs/artefactos) |
Mapa del ataque
[USUARIO] FluffyCat — JWT legítimo HS256, role: user
│ forja un JWT nuevo con alg: none y role: admin
▼
[NAVEGADOR] JWT malicioso guardado en localStorage (browser_dump.txt)
│ la app confía en el token sin verificar la firma
▼
[APP] acceso al portal de administración — role mismatch (app.log)
│ el IdP nunca emitió un token admin (idp.log)
▼
[ESCALADA] user → admin sin credenciales válidas1. Fundamentos: sesiones y JWT
Antes de tocar la escena del crimen conviene fijar los conceptos. Una sesión es como la llave de una habitación de hotel: el servidor guarda el número de habitación (el estado) y tú solo llevas la tarjeta (el session ID). Un JWT, en cambio, es como una tarjeta de embarque: lleva toda la información dentro (usuario, rol, expiración) y no necesita una base de datos central. Esa comodidad tiene un precio: si el token se falsifica o manipula, el acceso es inmediato.
Por qué importa: como el JWT es autoportante, la seguridad recae por completo en la verificación de la firma. Si el servidor no valida bien la firma, cualquiera puede escribirse su propio token.
Q: ¿Qué mecanismo de seguridad hay que implementar al introducir JWT?
A: revocation
Q: ¿Cómo se llama el ataque en el que un atacante roba tu session ID?
A: session hijacking
This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.
See Root Access plansNo account? Create one free then upgrade from your console.
Este contenido es solo para Root Access. Todo lo demás del sitio — el nivel gratuito, toda la biblioteca pública — sigue abierto.
Ver planes de Root Access¿Sin cuenta? Crea una gratis y luego mejora desde tu consola.