Skip to content

fuzz_raw

Synchronously fuzz a raw byte payload with RawMessage-typed positions. The schema mirrors resend_raw plus a positions[] list. This is the central HTTP request smuggling and byte-level fuzzing surface -- payload bytes are NEVER normalized on the proxy side.

Unlike resend_raw, fuzz_raw makes flow_id optional and owns the from-scratch byte-injection path. When flow_id is empty, supply either override_bytes or include a payload position so each variant carries its own bytes.

This tool is synchronous: every variant runs in-process. There is no concurrency or rate limit.

Limits

  • Maximum variants per call: 1000 (cartesian product across all positions)
  • Maximum positions per call: 32
  • Maximum decoded payload size per position: 1 MiB

Each variant is executed sequentially with a fresh dial. Each variant is re-checked against the current target scope on its post-substitution message, then passes per-variant SafetyFilter input gating, immediately before the upstream send. A scope change made mid-run (an agent security call or a SIGHUP policy reload) takes effect on the next variant. A blocked variant is recorded with error (no flow) and the run continues.

Parameters

Parameter Type Required Default Description
flow_id string No Recorded raw stream id. When empty, override_bytes or a payload position must supply the variant bytes
target_addr string Yes Upstream host:port. Explicit port required
use_tls boolean No false true to upgrade the dialled connection to TLS
sni string No target host SNI server name. Defaults to target_addr host portion when use_tls=true
override_bytes string No Replacement payload interpreted per override_bytes_encoding. Mutually exclusive with patches
override_bytes_encoding string No "text" "text" or "base64"
override_bytes_set boolean No false Set true to replace with empty bytes; otherwise an empty override_bytes string is treated as no override
patches array No Offset-based byte patches applied to the base bytes (see resend_raw for the patch shape). Used as a base for patches[N].data positions
insecure_skip_verify boolean No false Skip TLS server certificate verification when use_tls=true
tls_fingerprint string No Informational v1; per-call selection is deferred
timeout_ms integer No 30000 Per-variant timeout in milliseconds
tag string No Tag stored on every variant Stream's Tags map
positions array Yes Ordered position list (see below). At least one entry
stop_on_error boolean No false Abort remaining variants once any variant fails (network error, timeout, or pipeline drop)
pre_macro object No Macro hook run before a variant (see Macro hooks)
post_macro object No Macro hook run after a variant (see Macro hooks)

positions

Field Type Required Default Description
path string Yes Typed path: payload or patches[N].data
payloads string[] Yes List of values to substitute at this path. At least one element
encoding string No "text" "text" or "base64". Use "base64" for binary smuggling templates

The payload path replaces the entire RawMessage.Bytes for the variant; it wins over the recovered/override_bytes base bytes when both are present. patches[N].data mutates input.patches[N].data for the variant, then base + patches assembly proceeds as in resend_raw.

Macro hooks

pre_macro / post_macro take the same shape and semantics as on fuzz_http (name, scope, on_error, vars, run_interval, n, match_pattern), with these raw-specific differences. Raw is a byte stream with no L7 status and no headers:

  • pre_macro (scope="iteration") fires before each variant's dial; post_macro fires after the variant's receive loop ends (EOF or response cap). Job-scope post_macro also fires after a stop_on_error exit.
  • run_interval="on_status" is rejected (on both hooks). Use run_interval="on_match" with a match_pattern regex against __response_body instead. post_macro therefore accepts always or on_match.
  • run_interval="on_error" fires only after a transport error (dial, write/read failure, deadline) on the previous variant.

post_macro with scope="iteration" receives these reserved keys:

Key Source
__response_body Received bytes, capped at 64 KiB
__response_chunks Receive-loop chunk count (decimal string)
__response_truncated "true" when the receive loop hit the 16 MiB response cap

__response_status and __response_headers__* are not populated.

Unlike fuzz_http, fuzz_raw does not expand §var§ templates in the variant bytes -- payloads are sent exactly as given. Use the hooks for side effects (session setup, teardown, alerting) around each variant.

Response

Field Type Description
fuzz_id string ID of the fuzz_jobs row for this run. Pass it to query fuzz_results to aggregate variants
total_variants integer Total variant count
completed_variants integer Variants actually executed before completion or stop
stopped_reason string Empty when all variants ran; otherwise the stop reason
variants array Per-variant result rows (see below)
duration_ms integer Total run duration in milliseconds
tag string Echo of the supplied tag (when set)

Each variant row:

Field Type Description
index integer Variant index (zero-based)
stream_id string New stream record id
response_size integer Total response payload size in bytes
response_chunks integer Receive-direction envelope count
truncated boolean true when the receive loop hit the per-call response cap
payloads object Map of position path -> decoded payload string
error string Error message when the variant failed
duration_ms integer Per-variant duration

Raw flows have no L7 status code, so the row exposes shape diagnostics only. Full response bytes are reachable via the query tool keyed by stream_id.

Pipeline placement

Each variant traverses the same self-contained PluginStepPost -> RecordStep pipeline as resend_raw (PluginStepPre is bypassed per RFC-001 §9.3).

Examples

Fuzz a smuggling template (from-scratch)

// fuzz_raw
{
  "target_addr": "target.example.com:80",
  "positions": [
    {
      "path": "payload",
      "encoding": "base64",
      "payloads": [
        "R0VUIC8gSFRUUC8xLjENCkhvc3Q6IHRhcmdldA0KDQo=",
        "UE9TVCAvIEhUVFAvMS4xDQpIb3N0OiB0YXJnZXQNCg0K"
      ]
    }
  ]
}

Fuzz a single byte at offset 16

// fuzz_raw
{
  "flow_id": "raw-abc-123",
  "target_addr": "target.example.com:80",
  "patches": [
    {"offset": 16, "data": "X", "data_encoding": "text"}
  ],
  "positions": [
    {"path": "patches[0].data", "payloads": ["A", "B", "\u0000", "\r"]}
  ]
}