Principle:0sec labs 0 Target Evaluation
| Knowledge Sources | |
|---|---|
| Domains | LLM_Security, Red_Team, Target_Evaluation |
| Last Updated | 2026-10-30 00:00 GMT |
Overview
Technique for sending attack payloads to LLM targets — both deterministic mock models for testing and live OpenAI-compatible endpoints for real audits — and collecting their responses.
Description
Target evaluation is the principle of abstracting over LLM endpoints with a unified Target interface. A mock target simulates the easy/hard split measured in real arenas: each mock model has policies (followsVisible — will it execute visibly-framed commands? decodes — which hidden channels it decodes and acts on?), enabling deterministic testing without API costs. A chat target points at any OpenAI-compatible /chat/completions endpoint, embedding the payload as UNTRUSTED content (the indirect-injection setup) and reading back the assistant's response including tool calls. The unified send() method returns a TargetResponse with the transcript and optional tool calls.
Usage
Use this principle when designing an LLM red-team system that needs to test against both simulated models (for CI/demos) and live endpoints (for real audits) with the same campaign engine.
Theoretical Basis
The Target abstraction:
# Abstract interface (NOT real implementation)
class Target:
name: str
models: list[str]
async def send(payload, behavior, model=None) -> TargetResponse
class MockModel:
name: str
follows_visible: bool # will it run a visibly-framed command?
decodes: list[str] # hidden channels it decodes ("tags", "bits")
class TargetResponse:
transcript: str
tool_calls: list[{tool, args}] # optional
model: str
The mock target's behavior is deterministic:
- visibleHit: the payload text contains the goal literal AND the model follows visible instructions
- hiddenHit: the model decodes a hidden channel (Unicode tags, sneaky bits) and the decoded text contains the goal literal
- If either hits, the mock "executes" the goal and returns a tool call