Input Manipulation & Prompt Injection
Overview — Input Manipulation & Prompt Injection is an AI Security room that teaches how LLM-powered applications are attacked. It covers the three pillars of instruction abuse — system prompt leakage, jailbreaking and prompt injection — and ends with a hands-on challenge: an HR/IT chatbot from which you must extract two flags by bypassing its safety rules. The underlying idea is that prompt injection is not a patchable bug but an intrinsic consequence of models obeying natural language.
| Platform | TryHackMe |
| Category | AI Security |
| Difficulty | Easy |
| Room | Input Manipulation & Prompt Injection |
Context: why prompt injection is different
An LLM works with layered instructions. The system prompt is the hidden rule set that defines the model's role and limits ("You are an IT assistant", "Never reveal credentials"). The user prompt is what the user types. The problem is that when a query is processed both are concatenated into a single input, and the model carries no metadata distinguishing "trusted" (system) from "untrusted" (user) instructions. That design flaw is why prompt-based attacks succeed.
The consequence matters: prompt injection cannot be eliminated by tweaking model weights. The real attack surface is the whole ingestion and egress pipeline — input validation, tagging and constraining external sources, and output filtering before it reaches the user.
Resumen — Input Manipulation & Prompt Injection es un room de AI Security que enseña cómo se ataca a las aplicaciones basadas en LLM. Se cubren los tres pilares del abuso de instrucciones — system prompt leakage, jailbreaking y prompt injection — y se cierra con un reto práctico: un chatbot de RR. HH./IT del que hay que extraer dos flags saltando sus reglas de seguridad. La idea de fondo es que la inyección de prompts no es un bug parcheable, sino una consecuencia intrínseca de que los modelos obedecen lenguaje natural.
| Plataforma | TryHackMe |
| Categoría | AI Security |
| Dificultad | Easy |
| Room | Input Manipulation & Prompt Injection |
Contexto: por qué la inyección de prompts es distinta
Un LLM trabaja con instrucciones en capas. El system prompt es el conjunto de reglas ocultas que define el rol y los límites del modelo ("Eres un asistente de IT", "Nunca reveles credenciales"). El user prompt es lo que teclea el usuario. El problema es que, al procesar la consulta, ambos se concatenan en una sola entrada y el modelo no lleva metadatos que distingan lo "de confianza" (system) de lo "no fiable" (user). Ese es el defecto de diseño que hace que los ataques basados en prompts funcionen.
La consecuencia es importante: la inyección de prompts no se elimina retocando los pesos del modelo. La superficie de ataque real es toda la tubería de ingesta y salida — validación de entrada, etiquetado y acotación de fuentes externas, y filtrado de salida antes de que llegue al usuario.
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