Skip to content

v2.35.1 — four ways a run could end without a verdict

Choose a tag to compare

@kabiri-labs kabiri-labs released this 21 Aug 06:49
· 170 commits to main since this release

A patch release, and the first since RCEKit went to PyPI. Four ways a run could
end without a verdict — or with a verdict it had not earned — on input the tool
did not choose. No new capability.

If you installed from PyPI, 2.35.0 has the crash below. If you curl the
single file from main, you already have the fix.

The one that matters

A truncated error response ended the whole run. Reading an HTTPError's
body happens inside the except handler, where the sibling except Exception
cannot reach it — so an exception raised there escapes main() entirely. A
target that promised a Content-Length it never delivered was enough:

File "rcekit.py", line 2433, in run_detection
  _, control_body, control_channels, _ = self._fire_channels(
File "rcekit.py", line 2047, in _fire_channels
  text = exc.read().decode(errors="replace")
ConnectionResetError: [Errno 104] Connection reset by peer

It fired on the control request, so a run could die before sending a single
probe; mid-flight it took every probe already fired with it. That is precisely
the failure the verdict model exists to prevent: a run that ends without saying
what happened. A body that does arrive is still read in full, so the
500-stack-trace confirmations that branch exists for are untouched.

Three that misled rather than crashed

  • An unknown --environments or --encodings was silent. --environments linux — the corpus calls it unix — produced an empty file and exit 0,
    indistinguishable from a target with no payloads for it. Unknown contexts and
    categories already warned; these two did not. Both now name the value and list
    the ones that exist, and an empty result is no longer announced as
    "Successfully generated 0 payloads".
  • A --target-profile was used before it was checked. A profile is written
    by hand, so a typo in one is ordinary; it surfaced as a traceback thousands of
    payloads from its cause. Twelve inputs crashed — a top level that is not a
    JSON object, deny_chars that is not text, max_length that is not a number,
    selector fields given as numbers. Each is now an operator-readable [!]
    message and exit 1, the way the sink-shape fields already behaved.
  • A callback could rewrite the operator's terminal. The host and path of an
    OOB callback are chosen by the target, which in an engagement is hostile by
    definition. Printed raw, an ESC byte let it colour, erase and rewrite lines —
    hiding a genuine [HIT] behind \x1b[2K\r, or forging one that never
    arrived. Control characters are now escaped for display as \xNN; the
    recorded hit and the --listen-log JSONL keep the bytes verbatim.

Upgrading

No breaking changes. No flag was removed and nothing changed meaning. One
behaviour note if you keep target profiles:

  • A selector field given as a string now means one name, not one character
    each. "environments": "unix" used to be iterated u, n, i, x and
    matched nothing; it now means ["unix"], and "raw, html" means two names.
    This is not a compatibility break — the old behaviour matched nothing — and
    every profile in profiles/ uses lists.
  • A profile that was silently tolerated because a bad field was ignored will now
    be rejected with a message. That is the point, but it is worth a look before
    you run against a live target.

Verification

535 tests, standard library only, Python 3.8 – 3.13.

Each fix carries a regression test that fails without it — verified by
running the new tests against the unfixed module, where all fifteen behavioural
tests failed. Three more pass in both states by design; they guard against
over-correction ("a readable error body is still returned in full", "default
selectors never warn").

Detection behaviour is unchanged, measured rather than assumed: the same
injectable sink returns 844 probes: confirmed=446, negative=398 before and
after, and the negative control — an endpoint that reflects the payload verbatim
without executing it — still comes back negative on every probe.

Full changelog: v2.35.0...v2.35.1