BotSting

Attack libraryTechnique

Delimiter spoofing

The attacker imitates the markers a system uses to separate instructions from data.

Attacks in the library
10
Data disclosure
4 attacks
Unauthorized actions
3 attacks
Planted text
3 attacks

What the attacker does

Many systems wrap user input or retrieved text in markers: a line of dashes, a tag, a phrase such as end of user message. The attacker types the closing marker, then writes what looks like a new instruction block.

Why it works

The markers are ordinary text. If the system does not escape them, the model cannot tell the real boundary from a forged one, and reads the attacker's text as coming from the system.

A wrapper that marks text as untrusted but does not escape a forged end marker is an easy mistake to make, and a common one.

What BotSting counts as proof

The planted value or the recorded call. Whether the boundary was truly crossed is shown by the outcome, not inferred from the reply's tone.

What to change

  • Escape or strip your own markers from any text you wrap, every time.
  • Use the model provider's structured roles for system and user content where available, not markers inside one block of text.
  • Assume the boundary can still fail, and keep the controls in code.

Related techniques