Knowledge Base · general

Prompt Injection

generaltechnique notetechniqueprompt-injection

Manipulating an LLM system into leaking data or performing unintended actions, and using the same guardrail weaknesses offensively.

How it works

  • Direct override (‘ignore previous instructions’), role-play, encoding/synonym sweeps to bypass filters.
  • In CTFs, flag-bearing text is often placed in a ticket/feedback field read by an assistant — treat it as a decoy or an intended path.

Detection & defence

  • Treat model output as untrusted; never grant an LLM privileges it should not have.
  • Validate/allow-list what an assistant can retrieve, and log its tool calls.