Skip to content

Exploit scripts ​

The hub can turn captured flows into a script that does the same again against another team. When an attacker's exploit shows up in your traffic, this is the quickest way to use it yourself. The hub only writes the script: nothing is sent from the hub, and running it is up to you.

Making one ​

  • script generator… in a flow's menu starts from that flow.
  • Build exploit → with several flows selected, or on a session (flows grouped with Group as session in the flow list), starts from all of them, in capture order.

The Script screen lists the steps. Reorder them, switch one off, or change how it is sent:

  • Values are chained. What changes between runs (session cookies, ids from earlier responses, fresh random usernames) is taken from the earlier response instead of replayed.
  • As captured. A step can instead be sent byte for byte as it was captured, with only Host and your flag ID swapped.

Output: Python requests, httpx, pwntools or curl. For a gRPC call: grpcurl, Python grpcio or Go, with your flag ID swapped into the messages (gRPC).

The script generator: the captured request, the values chained between steps, the output language tabs, and the generated Python script.The script generator: the captured request, the values chained between steps, the output language tabs, and the generated Python script.

The target is read from $TARGET. With attack info on, the script asks the gameserver for $TARGET's flag IDs for the service and does one run per ID; that lookup exists for the FAUST and ECSC game modes. Looping over the teams is up to you.

The sequence and the options are in the URL, so a teammate opens the same script.

Choosing what changes ​

Click a step to see its values: path segments, query parameters, headers, and the fields of a JSON or form body, decoded. mark on a value turns it into a variable of the script:

  • Random — one click on its kind: a-z0-9, A-Za-z0-9, hex, a UUID, or a number, at the length you set. A name used in two places gives both the same value (register, then log in with it).
  • From response — a header, cookie or JSON value of an earlier step's response; the ones equal to the captured value come first. Or a regex on the body.
  • Flag ID — your flag ID, from $FLAG_ID or the game's attack info.

A step that is sent as captured is switched to rebuilt as code when you mark one of its values.

Decoded or raw ​

A rebuilt step's body is written decoded: a JSON body is read and written again (escapes such as \u0061 become the characters, keys stay in order, numbers stay as written), and %61-style encodings of plain letters and digits in the URL and form bodies become the characters — what the server's own parsing would read anyway. Values the application decodes itself (base64, hex, JSON inside a string) are left as they are; the value list says what they hold. When decoding could change what the server sees (a key given twice, a lone \ud800, another charset, a body cut short), the step is sent as captured and says why. raw bytes keeps a step's body exactly as captured.

Escaping JSON ​

JSON strings in bodies (for the script, or per step) writes keys and string values as \uXXXX: every character, or the letters and non-ASCII only (digits and punctuation stay). The JSON means the same thing; a value filled in when the script runs is escaped the same way.

Bodies on the wire ​

Bodies on the wire (for the script, or per step) sends a rebuilt step's body compressed and/or chunked, to get past a rule or a filter that only reads plain bodies:

  • gzip or deflate compresses the body and sends Content-Encoding (after any coding the captured header already names). deflate is zlib, which is what HTTP means by it.
  • Transfer-Encoding: chunked sends the body in chunks of the size you choose (the last one shorter).

The encoding happens when the script runs, after this run's values are filled in and \uXXXX-escaped, so it combines with marks, fresh identities and JSON escaping. Every HTTP language does it: requests and httpx compress in the script and send the chunks as an iterator; pwntools writes the chunked framing itself; curl pipes the body from printf through gzip -c -n (or a small deflate helper built from gzip, od and awk) into stdin, and for chunks feeds curl -T - one piece at a time, so its chunks follow the pieces (exact sizes are guaranteed in the Python languages; curl may join two under load). Brotli is not offered: none of the languages has it without an extra package. Steps sent as captured, and steps without a body, keep the captured bytes and say so.

Captured text stays text ​

Everything captured is the attacker's, and the scripts are run by you. Captured values are always written as data: string literals with every control and invisible character (newlines, carriage returns, NUL, right-to-left overrides, line separators) as an escape, never inside a comment raw, so a newline in a gRPC method name cannot end a comment and start code. curl calls use --globoff (a captured [1-100000] is one request, not a flood under your team's name) and --data-raw (a body starting with @ is text, not a file of yours); a body with NUL bytes goes through printf into stdin, since no shell argument can hold one. The same encoder writes the webhook messages (alerts).

Finding the code ​

Clicking a step, a value, or a line of the script ties them together: a step or value scrolls the script to the lines that send it and highlights them; a line selects its step.

y on a flow copies its request as Python requests, for a quick one-off.

Limits ​

  • Flows over TLS are opaque to the hub, so there is nothing to replay.
  • The hub chains the values it can find in earlier responses. Read the script before you run it against every team.