Sneaky Patch
Executive summary — Sneaky Patch is an Easy kernel-forensics room on TryHackMe: we start from a Linux system already compromised by a kernel-level rootkit shipped as a loadable module (LKM). Unlike a userspace backdoor, this module lives inside the kernel and evades conventional detection tooling. The journey is pure analysis: we enumerate loaded modules, single out the suspiciousspatch, inspect its metadata withmodinfo, pull strings from the.kobinary and decode the hex-encoded flag. A lsmod → modinfo → strings → hex decode journey.
| Platform | TryHackMe |
| Operating system | Linux |
| Difficulty | Easy |
| Room | Sneaky Patch |
| Target IP | MACHINE_IP |
Attack map
[ACCESS] session on the compromised host
| sudo su -> root for system-level analysis
v
[dmesg] kernel logs -> module loading events
|
v
[lsmod] suspicious module: spatch (not in standard docs)
| modinfo spatch -> author "Cipher", "Cipher is always root"
v
[strings] spatch.ko -> [CIPHER BACKDOOR] secret in hex
| xxd -r -p
v
[FLAG] THM{sup3r_sn34ky_d00r}
. (alt) echo get_flag > /proc/cipher_bd -> dmesg1. Context: why a kernel rootkit is so dangerous
Before touching the keyboard it helps to understand the terrain. A classic userspace backdoor leaves visible traces: added SSH keys, bind/reverse shells, malicious cron jobs. A kernel rootkit plays in a different league: it is implemented as a Loadable Kernel Module (LKM) and runs in ring 0, with direct access to system structures. From there it can hide processes, files and connections from conventional tools, because it is the kernel itself that lies.
The key idea: when the attacker controls the kernel, you cannot trust the answers the system gives you. Forensics focuses on what the module cannot fully hide: its own presence in the module list, its metadata and the contents of its on-disk binary.
Resumen ejecutivo — Sneaky Patch es un room Easy de TryHackMe de forensia de kernel: partimos de un sistema Linux ya comprometido por un rootkit a nivel de kernel implementado como módulo cargable (LKM). A diferencia de una backdoor en userspace, este módulo vive dentro del kernel y esquiva las herramientas de detección habituales. El recorrido es puramente de análisis: enumeramos los módulos cargados, identificamos el sospechosospatch, inspeccionamos sus metadatos conmodinfo, extraemos cadenas del binario.koy decodificamos la flag oculta en hex. Un recorrido lsmod → modinfo → strings → hex decode.
| Plataforma | TryHackMe |
| Sistema operativo | Linux |
| Dificultad | Easy |
| Room | Sneaky Patch |
| IP objetivo | MACHINE_IP |
Mapa del ataque
[ACCESO] sesión en el host comprometido
| sudo su -> root para análisis a nivel de sistema
v
[dmesg] logs del kernel -> eventos de carga de módulos
|
v
[lsmod] módulo sospechoso: spatch (fuera de la documentación estándar)
| modinfo spatch -> autor "Cipher", "Cipher is always root"
v
[strings] spatch.ko -> [CIPHER BACKDOOR] secret en hex
| xxd -r -p
v
[FLAG] THM{sup3r_sn34ky_d00r}
. (alt) echo get_flag > /proc/cipher_bd -> dmesg1. Contexto: por qué un rootkit de kernel es tan peligroso
Antes de tocar el teclado conviene entender el terreno. Una backdoor clásica de userspace deja huellas visibles: claves SSH añadidas, bind/reverse shells, cron jobs maliciosos. Un rootkit de kernel juega en otra liga: se implementa como Loadable Kernel Module (LKM) y se ejecuta en ring 0, con acceso directo a las estructuras del sistema. Desde ahí puede ocultar procesos, ficheros y conexiones a las herramientas convencionales, porque es el propio kernel el que miente.
La idea clave: cuando el atacante controla el kernel, no puedes confiar en las respuestas que te da el sistema. La forensia se centra en lo que el módulo no puede ocultar del todo: su propia presencia en la lista de módulos, sus metadatos y el contenido de su binario en disco.
This is USER ACCESS content — free to unlock, no payment. The rest of the write-up (and everything else at this level) opens up once you're signed in.
Create a free accountEsto es contenido de nivel USER ACCESS — se desbloquea gratis, sin pago. El resto del writeup (y todo lo demás de este nivel) se abre en cuanto inicies sesión.
Crear una cuenta gratis