Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:0sec labs 0 Strategy Composition

From Leeroopedia
Knowledge Sources
Domains LLM_Security, Red_Team, Payload_Generation
Last Updated 2026-10-30 00:00 GMT

Overview

Technique for composing framing strategies (visible instruction body) with concealment strategies (hidden reinforcement channels) to generate a diverse, combinatorial attack surface.

Description

Strategy composition is the principle that effective LLM attacks combine two orthogonal dimensions: framing (the visible text that frames the instruction as legitimate — roleplay, few-shot, language switch) and concealment (hidden channels that reinforce the instruction — Unicode tags, sneaky bits, zero-width characters). The full attack surface is the Cartesian product: every framing alone, plus every framing × every concealment. Escalation stacks ALL concealment channels onto one framing ("kitchen-sink"). This combinatorial approach ensures the campaign explores the full space of attack techniques, not just hand-crafted payloads.

Usage

Use this principle when an LLM red-team campaign needs to systematically explore attack techniques. The composition guarantees coverage of the framing × concealment space.

Theoretical Basis

The combinatorial expansion:

# Abstract algorithm (NOT real implementation)
def generate_candidates(behavior):
    candidates = []
    for framing in framing_strategies:
        candidates.append(framing.build(behavior))      # framing alone
        for concealment in concealment_strategies:
            composite = compose(framing, concealment)
            candidates.append(composite.build(behavior))  # framing × concealment
    return candidates

def escalated_candidates(behavior):
    # Kitchen-sink: each framing with ALL concealments stacked
    return [compose_many(f, all_concealments).build(behavior)
            for f in framing_strategies]

The compose function merges a framing and concealment into a single strategy whose payload has the visible framing text plus the hidden reinforcement. The composeMany function stacks multiple concealment channels sequentially onto one framing.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment