rcekit 3.0.0__tar.gz → 3.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {rcekit-3.0.0 → rcekit-3.6.1}/CHANGELOG.md +707 -0
  2. {rcekit-3.0.0 → rcekit-3.6.1}/PKG-INFO +328 -99
  3. {rcekit-3.0.0 → rcekit-3.6.1}/README.md +327 -98
  4. {rcekit-3.0.0 → rcekit-3.6.1}/docs/guide.md +101 -23
  5. {rcekit-3.0.0 → rcekit-3.6.1}/docs/reference.md +367 -17
  6. {rcekit-3.0.0 → rcekit-3.6.1}/rcekit.egg-info/PKG-INFO +328 -99
  7. {rcekit-3.0.0 → rcekit-3.6.1}/rcekit.egg-info/SOURCES.txt +6 -0
  8. {rcekit-3.0.0 → rcekit-3.6.1}/rcekit.py +1496 -76
  9. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/README.md +109 -36
  10. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/cases/fastjson-1.2.83.json +2 -2
  11. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/cases/hugegraph-gremlin-eval.json +9 -7
  12. rcekit-3.6.1/tests/bench/cases/hugegraph-gremlin-reflected-class.json +81 -0
  13. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/cases/log4shell-cve-2021-44228.json +1 -1
  14. rcekit-3.6.1/tests/bench/cases/mongo-express-where-boolean.json +75 -0
  15. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/cases/opentsdb-cve-2023-25826.json +2 -2
  16. rcekit-3.6.1/tests/bench/cases/webmin-cve-2019-15107-enumerated.json +52 -0
  17. rcekit-3.6.1/tests/bench/cases/webmin-cve-2019-15107-time.json +55 -0
  18. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/cases/webmin-cve-2019-15107.json +6 -4
  19. rcekit-3.6.1/tests/bench/requests/mongo-express-literal.txt +3 -0
  20. rcekit-3.6.1/tests/bench/requests/mongo-express-where.txt +3 -0
  21. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/runner.py +5 -2
  22. {rcekit-3.0.0 → rcekit-3.6.1}/tests/test_docs.py +398 -0
  23. {rcekit-3.0.0 → rcekit-3.6.1}/tests/test_generator.py +2760 -11
  24. {rcekit-3.0.0 → rcekit-3.6.1}/CONTRIBUTING.md +0 -0
  25. {rcekit-3.0.0 → rcekit-3.6.1}/LICENSE +0 -0
  26. {rcekit-3.0.0 → rcekit-3.6.1}/MANIFEST.in +0 -0
  27. {rcekit-3.0.0 → rcekit-3.6.1}/SECURITY.md +0 -0
  28. {rcekit-3.0.0 → rcekit-3.6.1}/docs/generation.md +0 -0
  29. {rcekit-3.0.0 → rcekit-3.6.1}/docs/verify-it-yourself.md +0 -0
  30. {rcekit-3.0.0 → rcekit-3.6.1}/pyproject.toml +0 -0
  31. {rcekit-3.0.0 → rcekit-3.6.1}/rcekit.egg-info/dependency_links.txt +0 -0
  32. {rcekit-3.0.0 → rcekit-3.6.1}/rcekit.egg-info/entry_points.txt +0 -0
  33. {rcekit-3.0.0 → rcekit-3.6.1}/rcekit.egg-info/top_level.txt +0 -0
  34. {rcekit-3.0.0 → rcekit-3.6.1}/setup.cfg +0 -0
  35. {rcekit-3.0.0 → rcekit-3.6.1}/templates/payloads.json +0 -0
  36. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/cases/hugegraph-gremlin-shell.json +0 -0
  37. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/cases/struts2-s2-001.json +0 -0
  38. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/cases/tomcat-cve-2017-12615.json +0 -0
  39. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/cases/webmin-cve-2019-15107-file.json +0 -0
  40. {rcekit-3.0.0 → rcekit-3.6.1}/tests/bench/requests/webmin.txt +0 -0
  41. {rcekit-3.0.0 → rcekit-3.6.1}/tests/test_bench_runner.py +0 -0
  42. {rcekit-3.0.0 → rcekit-3.6.1}/tests/test_corpus_embedding.py +0 -0
  43. {rcekit-3.0.0 → rcekit-3.6.1}/tools/embed_corpus.py +0 -0
@@ -8,6 +8,44 @@ formats, or the template schema.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ### Documentation
12
+
13
+ - **The response side of the byte-order mark is a decision, and nothing said
14
+ so.** 3.1.2 stripped the mark everywhere RCEKit decides what a *request* body
15
+ is. The response side was left alone on purpose and that purpose was written
16
+ down nowhere, so the next reader had no way to tell a boundary from an
17
+ oversight. Both halves are now stated where someone would meet them, with
18
+ what each costs measured rather than asserted.
19
+
20
+ `_json_leaf_channels`: a marked response yields no leaves, because
21
+ `json.loads` rejects the mark. Mostly that costs only the precision of the
22
+ channel name a finding reports — `response body` carries the whole document
23
+ and the encoded-value search peels URL, HTML, `\uXXXX`, base64 and hex out of
24
+ it. But a value whose JSON rendering uses an escape that peeling does not undo
25
+ (`\/`, or a surrogate pair) is reachable *only* through the parsed leaf, and
26
+ measured, it is found on no channel at all once the mark is there. That is a
27
+ lost confirmation rather than a lost label. No method is exposed to it today
28
+ because every expected value is tag-bracketed decimal digits or a lowercase
29
+ token, and no conforming encoder escapes `[A-Za-z0-9]` — a property of the
30
+ probes rather than of the channel, so it is asserted across the **whole**
31
+ registry: every method in `DETECTION_METHODS`, every probe it builds over a
32
+ spread of environments and contexts, with a method that builds none failing
33
+ rather than passing quietly. `time` and `boolean` are named as the two that
34
+ search no value at all, so a third falling silent is something to look at
35
+ rather than absorb. A method whose expected value stopped being alphanumeric
36
+ now fails loudly instead of quietly losing findings.
37
+
38
+ `response_shape`: a marked JSON response takes the word-count reading instead
39
+ of the structural one, which is the weaker guard, so `boolean`'s resistance to
40
+ a false `evaluation-sink` is lower against a mark-emitting JSON API.
41
+
42
+ Neither is fixed here, and the reason is the same for both: this is the input
43
+ to a detection method's verdict, which this project does not settle on a
44
+ fixture, and `boolean` is the one method with no bench case to settle it
45
+ against. Pinned by tests worded so that closing either half is a deliberate
46
+ act with a failing test in front of it, rather than something done by
47
+ accident — and so that neither reads as an endorsement.
48
+
11
49
  ### Added
12
50
 
13
51
  - **A coverage ledger, so a measured result and a reproduced one stop looking
@@ -70,6 +108,56 @@ formats, or the template schema.
70
108
 
71
109
  ### Fixed
72
110
 
111
+ - **The quick start told readers to run a command two of its three install
112
+ paths do not provide.** Every example in the section was spelled `rcekit`,
113
+ which exists only after a PyPI install -- while the same section offers
114
+ `curl -O rcekit.py` and `git clone` as the other two ways to get the tool.
115
+ `docs/guide.md` spells it `python rcekit.py` in all 28 of its examples, so the
116
+ README was the single inconsistent page, and a reader following its own
117
+ install advice could not run any of its commands. Every example now spells it
118
+ the way the guide does, which works from a checkout and from the single file,
119
+ with one line saying an installed copy answers to `rcekit`. The `--doctor`
120
+ check, which every path runs first, carries both spellings, because that one
121
+ is reached before the examples and before the line explaining them.
122
+
123
+ `--insecure` never appeared in the section either, although an internal target
124
+ with a self-signed certificate is the common case rather than the exception.
125
+ Reproduced against a local HTTPS sink: all four probes come back `error`, with
126
+ `NEVER REACHED THE TARGET` and the hint to pass the flag. The run is right to
127
+ refuse to call that `negative`, but to someone copying a line out of the
128
+ README it reads as a broken command, so the flag is now in the examples and
129
+ the paragraph above them says what it costs.
130
+
131
+ The section is now 6 scenarios named for the situation each answers, with a
132
+ query-string command and a captured-request command for every one: output
133
+ comes back; nothing comes back but the target has egress (a bare IP for `oob`,
134
+ a delegated name for the DNS shapes, `lookup` and `deser`); no output and no
135
+ egress but a read-back channel; your own request stores the file; everything
136
+ the tool has; and a known target narrowed for speed. That covers `lookup`,
137
+ `deser`, `boolean`, `--bridges`, `--observe-url`, `--auto-params`,
138
+ `--confirm-depth` and the `--sink-env`/`--sink-shape` pair, none of which had
139
+ a runnable example before.
140
+
141
+ All 12 commands were run against a local sink that really executes, over HTTP
142
+ and over HTTPS with a self-signed certificate, which is how the one broken
143
+ example in the draft was caught: `--environments windows --contexts raw
144
+ --sink-env powershell --sink-shape sq` builds no probes at all and reports
145
+ `NOTHING WAS TESTED`. The Windows example is now the pairing the `--sink-env`
146
+ help describes -- a .NET runtime with a PowerShell sink -- and the paragraph
147
+ under it says that pinning the pair wrong is the one way to narrow into
148
+ nothing. The `--environments` values offered in that scenario are the ones
149
+ measured to build detection probes; `sql`, `powershell` and `kubernetes` build
150
+ none and are left out.
151
+
152
+ The probe-count arithmetic and the two meanings of `--max-payloads` move out
153
+ to `docs/guide.md`, which already carried both in more detail, leaving a
154
+ one-line warning and a link. The counts that stay were re-measured at 3.1.2
155
+ against a confirming Unix sink -- 1154 probes, 124 with `--environments unix`,
156
+ 17 adding `--contexts raw` -- and the sample transcript is a real run rather
157
+ than counts from one run spliced onto an evidence line from another.
158
+
159
+ No version bump -- this is documentation only.
160
+
73
161
  - **The comparison table named seven of the nine registered methods.** `lookup`
74
162
  and `boolean` had no row in "How RCEKit compares", although `lookup` is the
75
163
  Log4Shell row the CVE table directly above it already carries, and `boolean`
@@ -290,6 +378,615 @@ formats, or the template schema.
290
378
 
291
379
  No version bump -- this is documentation and tests only.
292
380
 
381
+ ## [3.6.1] — 2026-10-27
382
+
383
+ ### Fixed
384
+
385
+ - **A run narrowed to nothing printed the plan of a full sweep.**
386
+ `sink_shape_plan` was written `selected = shapes or SINK_SHAPE_RUNGS`, so an
387
+ **empty** tuple — every rung narrowed away — was read as the same thing as
388
+ `None`, which means no selection was made. Those are opposite facts, and an
389
+ empty tuple is falsy.
390
+
391
+ Measured on 3.6.0 with `--sink-shape sq --sink-env windows` (cmd.exe has no
392
+ quote-breakout rung, so the intersection is empty): the run sent 0 probes and
393
+ the plan listed all 8 rungs under a `sink shapes:` header with nothing after
394
+ the colon. The pre-flight plan is the one output an operator is told to read
395
+ *instead of* inferring the run from the traffic, and it was the output that
396
+ disagreed with it. The end-of-run half was already right — `sent 0 probes`,
397
+ `NOTHING WAS TESTED`, exit non-zero.
398
+
399
+ `None` now means the whole ladder and `()` means no rung, and the plan names
400
+ the empty case rather than printing a blank header and nothing under it,
401
+ because an empty list is the same quiet shrink by a different route:
402
+
403
+ ```
404
+ [detect] sink shapes: none
405
+ [detect] (no rung survives the narrowing, so none of the shell methods will build a probe -- this run will report NOTHING WAS TESTED)
406
+ ```
407
+
408
+ The run-wide half of that sentence is claimed only where it holds, which
409
+ the first version of this got wrong. Four methods ride the ladder and
410
+ five do not, so `--methods reflected,eval` with an empty ladder still
411
+ sends `eval` probes -- measured as `sent 1 probes (1 result(s)):
412
+ negative=1` and exit 0, under a plan that had just predicted `NOTHING
413
+ WAS TESTED`. Predicting the whole run from the ladder alone put this
414
+ output back in the one state it exists to rule out. A mixed run gets the
415
+ narrower sentence instead, and the condition is a set comparison rather
416
+ than a probe count: a cost estimate is documented as a floor, and an
417
+ aggregate method may answer with further waves once it has seen the
418
+ first, so a zero estimate would be the same over-claim reached more
419
+ expensively.
420
+
421
+ Predates 3.5.0 and was reachable before the `env` rung existed; found while
422
+ adding it, because `--sink-shape env --sink-env windows` is a natural way to
423
+ hit it. A second route is `--contexts raw --sink-shape sq`: an explicit
424
+ `--contexts` suppresses the carriers the quote and substitution rungs ride,
425
+ which is measured in the near-neighbour test rather than assumed — the first
426
+ draft of that test used it expecting one rung and got none.
427
+
428
+ ## [3.6.0] — 2026-10-27
429
+
430
+ ### Added
431
+
432
+ - **A shape held back with no rung to name it could not be asked for.** 3.5.0
433
+ added the Shellshock shape to `reflected` and suppressed it whenever the
434
+ operator declared the sink's shape — correctly, since `--sink-raw`,
435
+ `--sink-shape` and `--separators` each say the value lands inside a command
436
+ the application built, and this sink has none. But the suppression read
437
+ three flags directly and the ladder had no rung for it, which left two
438
+ things wrong at once: there was no `--sink-shape` name that asked for the
439
+ shape *instead* of the others, and the pre-flight plan — presented as an
440
+ audit of the traffic about to be sent — could not say it was being held
441
+ back. A ladder that shrinks quietly is indistinguishable from a target with
442
+ nothing to find, which is the thing this plan exists to prevent.
443
+
444
+ `--sink-shape` gains **`env`**: the value reaches the shell as an
445
+ environment variable rather than inside a command, and bash parses a
446
+ function definition out of it on the way in. It is in the ladder by default,
447
+ so no run's traffic changes; `--sink-shape env` now asks for it alone, which
448
+ is one request per carrier instead of 37 against an endpoint already known
449
+ to be a CGI. The separator sweep goes empty under it on purpose — the only
450
+ shape left supplies its own way into the shell, the same way `--sink-shape
451
+ sq` already behaved.
452
+
453
+ Narrowing follows the rung rather than a separate read. `--sink-raw` and
454
+ `--separators` drop `env` exactly as they drop `raw`; `--sink-env windows`
455
+ and `powershell` rule it out, because neither shell parses its environment
456
+ that way, and a run narrowed to `--sink-shape env` on one of them builds
457
+ nothing and reports `nothing-tested` rather than a clean negative.
458
+ `--environments` and `--contexts` are deliberately not part of it: they are
459
+ how an operator who suspects a CGI narrows.
460
+
461
+ `DetectionMethod._env_rung_selected` reads `effective_sink_shapes` the way
462
+ `_raw_rung_selected` already does, so what is printed and what is sent
463
+ cannot drift — and a test now pins that the engine's answer and the plan's
464
+ line are the same read, for every narrowing.
465
+
466
+ ## [3.5.0] — 2026-10-27
467
+
468
+ ### Added
469
+
470
+ - **A CGI header sink was enumerated and could not be confirmed.** `-p all` has
471
+ named headers as candidates for a long time, and the reason given in the docs
472
+ was Shellshock riding `User-Agent`. Nothing in `reflected` could reach that
473
+ sink: every probe it builds breaks *out* of a command the application is
474
+ assembling, and a Shellshock sink has no such command — the server copies the
475
+ header into the environment and a vulnerable bash runs the text after a
476
+ function definition while it starts up, before the script executes a line.
477
+ So the point was offered, probed, and reported `negative` about a sink nothing
478
+ had asked a question it could answer.
479
+
480
+ `reflected` now builds one more shape: `() { :;}; echo; echo; echo
481
+ RK…$((a+b))…RK` (CVE-2014-6271). The arithmetic proof and the tier are
482
+ unchanged — the computed value must be present in the response and absent
483
+ from the payload-free control — and the finding names the shape, because
484
+ "patch bash" and "fix the application" are different remediations.
485
+
486
+ Three parts of it are load-bearing and each is pinned by a test:
487
+
488
+ - **No separator, at any rung.** The value has to *begin* with `() {`, so the
489
+ sweep and `--sink-raw` leave this shape byte-identical.
490
+ - **Only a context that prepends nothing carries it.** `attribute` opens with
491
+ a quote and `attribute_unquoted` with a single space — one invisible
492
+ character, and enough that bash no longer reads a function definition.
493
+ Those contexts get no Shellshock probe rather than one that cannot confirm.
494
+ - **`echo; echo;` closes the CGI header block.** The injected output arrives
495
+ where the response headers belong; without the two blank lines the server
496
+ reads the computed value as a malformed header, answers 500 and discards
497
+ it. Measured against a fixture that models exactly that, and the fixture
498
+ has its own test so it cannot stop modelling it silently.
499
+ - **A declared sink shape suppresses it.** `--sink-raw`, `--sink-shape` and
500
+ `--separators` each say the value lands inside a command the application
501
+ built, which a Shellshock sink has none of — the same reasoning that drops
502
+ the `raw` rung when separators are named. The ladder's own tests pin that
503
+ every payload honours the declared shape, and they were right to fail on
504
+ the first version of this, which read none of the three. `--environments`
505
+ and `--contexts` are deliberately not read: they are how an operator who
506
+ suspects a CGI narrows. The ladder has no rung for a value reaching bash
507
+ through the environment, so there is no `--sink-shape` name asking for this
508
+ shape instead, and the pre-flight plan therefore does not print it being
509
+ held back — a rough edge, recorded rather than smoothed over.
510
+
511
+ One request per carrier — 17 of the 661 a default `reflected` run sends at
512
+ `--probe-depth quick` — and sent at **both** probe depths, since the sink it
513
+ reaches is reachable by no other shape and that is not the saving
514
+ `--probe-depth quick` exists for.
515
+
516
+ **`--evade` never touches this shape**, and a `Probe` now says so with
517
+ `evadable=False`. Both rungs replace spaces with `${IFS}`, which turns the
518
+ value into `()${IFS}{${IFS}:;};…` — no longer a function definition, so the
519
+ retry reaches nothing and comes back 200 from the very filter that refused
520
+ the real probe. Measured against a CGI answering 403 to the signature:
521
+ `(403, 'blocked')` had become `(200, 'negative')`, which is the false clean
522
+ the verdict beside it exists to remove. A filter keyed on whitespace makes
523
+ this shape unreachable by construction, since bash matched the literal
524
+ `() {`, so there is nothing to evade and the run says `blocked`.
525
+
526
+ The field is the proper form of a guard `_escalate` already carries as a
527
+ payload test for the redirect shapes, whose comment records that the
528
+ build-time `evade` argument stopped doing anything when the rung became a
529
+ retry. Those shapes are left on the payload test here; moving them is not
530
+ this change.
531
+
532
+ Stated in `docs/reference.md` rather than left to be discovered: this tests
533
+ CVE-2014-6271 and not the shapes that survive its patch (CVE-2014-6277,
534
+ CVE-2014-6278) or the parser-state shape that writes a file instead of
535
+ stdout (CVE-2014-7169), so a target patched against 6271 alone answers
536
+ `negative`, which is narrower than "not vulnerable to Shellshock". A blind
537
+ Shellshock sink is out of reach too — only `reflected` carries the shape.
538
+ So is a **cookie crumb**, which an earlier draft of these docs claimed:
539
+ `HTTP_COOKIE` is the whole `Cookie` header and an enumerated crumb keeps its
540
+ name, so the parser sees `session=() { :;};` rather than a function
541
+ definition — and there is no whole-`Cookie`-header point to use instead,
542
+ because `Cookie` is excluded from header enumeration in favour of its crumbs.
543
+ A header point is the carrier that reaches this sink.
544
+
545
+ No bench case yet. The unit tests prove the method reaches the right verdict
546
+ from a modelled CGI; only a bench case proves it against a real
547
+ bash-behind-Apache, and the README claims nothing it has not run.
548
+
549
+ ## [3.4.0] — 2026-10-26
550
+
551
+ ### Added
552
+
553
+ - **A session token was one opaque leaf, and the fields inside it are what the
554
+ application reads.** A base64 `state` parameter, JSON in a cookie, a bearer
555
+ token: the enumerator could name the carrier and had no way to reach anything
556
+ in it. `--auto-params blob` now adds a point per field inside, named
557
+ `carrier>field` — `state>role`, `tok>sub` — across query values, form values,
558
+ JSON string leaves and cookie or header values.
559
+
560
+ The carrier **keeps its own point**, because a sink may read the token before
561
+ decoding it. One layer only, at most 64 fields per blob.
562
+
563
+ **What counts as a blob** is narrow on purpose: it has to look like base64 of
564
+ a useful length, decode as UTF-8, and parse as a JSON object or array. A
565
+ scalar is refused — plenty of accidental base64 decodes to a number or a word,
566
+ and a scalar carries no field to address. A two-segment token is not a JWT.
567
+ The inner format is JSON only; a base64 XML blob (SAML) is not covered,
568
+ because the common binding is deflate-then-base64 over a signed assertion,
569
+ which is the signed-envelope case the `xml` kind already refuses.
570
+
571
+ **The marker goes outside the encoding.** base64 destroys a marker placed in
572
+ the decoded document — measured, `'FUZZ' in base64(json_with_FUZZ)` is false —
573
+ so the request would have gone out carrying the blob unchanged and the run
574
+ would have reported `negative` about a point it never tested. The marker
575
+ replaces the whole carrier value instead, and the payload is put inside the
576
+ blob when the request is rendered: into the decoded document, re-encoded, and
577
+ then through the carrier's **own** encoder. A blob in a query value is still
578
+ percent-encoded; one in a JSON leaf is still JSON-escaped. Getting that
579
+ second step wrong put raw base64 containing `+` into a query string, where `+`
580
+ is a space.
581
+
582
+ **A JWT's signature is invalidated**, necessarily, and that is the point
583
+ rather than a flaw: an application that accepts the rewritten token is not
584
+ verifying it, which is itself a finding, and one that rejects it answers 4xx
585
+ where the captured request got through — reported as `blocked`, not as a clean
586
+ negative.
587
+
588
+ That took **one extra request per blob point**, found by review and not by me:
589
+ the payload-free control carries the canary *inside* the blob, so it carries a
590
+ rewritten one too, and a verifying target refuses the control exactly as it
591
+ refuses every probe. `payload_refused` needs the control to have got through,
592
+ so it answered no, and the run reported `negative` about a sink no probe had
593
+ reached — the one outcome this tool exists to refuse, under documentation that
594
+ claimed `blocked`. A blob point now also fires a **baseline** that puts the
595
+ captured value back verbatim and lends only its status; the evidence
596
+ differential still rests on the canary control, which is the comparison that
597
+ has to hold the payload constant.
598
+
599
+ An `Authorization: Bearer <token>` header was **advertised and never
600
+ reached**, also found by review: the patterns anchor on the encoded form
601
+ alone, so the header value as read matched none of them and the bearer case
602
+ produced no points at all. The scheme word is split off before decoding and
603
+ put back when the value is rebuilt — stripping it without restoring it would
604
+ send a header the target cannot parse. The header and signature segments are preserved byte for byte,
605
+ so a rejection is about the claim and not about something else RCEKit changed.
606
+
607
+ The inner document is re-serialised compactly, so the rebuilt value is not
608
+ byte-identical to the captured one even where the field is unchanged. JSON has
609
+ no offsets to splice the way the XML scanner does. The payload-free control is
610
+ rendered through the same path, so probe and control still differ in the field
611
+ under test and in nothing else.
612
+
613
+ ### Changed
614
+
615
+ - **An injection *location* may now be a callable, not only a registry name.**
616
+ A blob has to be rebuilt per payload, which the encoder could not do because
617
+ it is a pure function of the payload and never sees the body. Threading a
618
+ transform through `_fire`, `_fire_channels`, `_escalate`, `run_detection` and
619
+ `run_verification` was the obvious answer and the wrong one: `body_location`
620
+ already flows through all five untouched and is consumed in exactly one
621
+ place, so the location carries the transform and nothing else changed. The
622
+ same threading is what shifted a positional caller's arguments on 3.1.1.
623
+
624
+ `--verify-body-location` is unaffected and gains no value: a blob location is
625
+ derived per point and never operator-supplied, so the CLI's choices still
626
+ come from the encoder registry alone.
627
+
628
+ - **`_build_verify_request` takes a `header_location`.** It was the one of the
629
+ three slots that could not be chosen, hard-coded to single-line escaping
630
+ because no point had needed anything else; a blob in a cookie or an
631
+ `Authorization` value does. **Appended** after `mark`, like `mark` itself was,
632
+ for the reason the comment above that parameter records.
633
+
634
+ - **The kind filter decides what enumeration *reports*, not what it scans.** A
635
+ blob is an encoding of a value that already has a point, so its carriers have
636
+ to be walked to find one. Gating the scan made `--auto-params blob` mean
637
+ "nothing at all"; it now means "only the fields inside blobs".
638
+
639
+ ## [3.3.0] — 2026-10-26
640
+
641
+ ### Added
642
+
643
+ - **A boolean and a `null` are places the application reads input, and were the
644
+ last scalars excluded.** An empty JSON string and an empty form value were
645
+ candidates already; `{"debug": true}` was not, so a field that reaches a shell
646
+ through a boolean flag could not be tested at all.
647
+
648
+ The exclusion was inherited from the *response* walk, where it is right for a
649
+ reason that does not hold on this side: a response channel is somewhere a
650
+ computed value could surface, and `true` can carry none, so searching it is a
651
+ wasted comparison. A request leaf is somewhere the application reads attacker
652
+ input. The two walks ask opposite questions, and a test now pins that the
653
+ response side still skips them.
654
+
655
+ The payload goes in as a JSON **string**, the only form that leaves the body
656
+ parseable, so the leaf's type changes from boolean or null to string. An
657
+ endpoint that validates the type answers 4xx where the payload-free control
658
+ got through, which the engine already reports as `blocked` rather than
659
+ `negative` — a refusal, not a clean result. That is the reason these are worth
660
+ enumerating anyway: the run says the sink was never reached instead of saying
661
+ the target is fine. Objects and arrays are still not candidates, because they
662
+ carry no value of their own.
663
+
664
+ - **A query or form key posted more than once had only its first occurrence
665
+ tested.** A checkbox array and a repeated filter both post one name several
666
+ times. Addressing by name alone rewrote the first pair for every candidate, so
667
+ every later one was counted as covered and probed nowhere — the same defect a
668
+ repeated multipart field had, fixed the same way.
669
+
670
+ Each occurrence is now its own point, addressed by **position** with the name
671
+ as the key placement re-checks, so a point that no longer describes the request
672
+ rewrites nothing rather than the wrong parameter. The index is shown as `(#1)`,
673
+ `(#2)` only where the key repeats, because it is noise on the common one.
674
+
675
+ `_mark_urlencoded_param` takes the position as an **appended** argument.
676
+ Threading a parameter through this file has already shifted a positional
677
+ caller's arguments once. Without an index — the `-p NAME` path, which has no
678
+ position to give — **every** matching pair is rewritten, exactly as this
679
+ helper did before the index existed. The two callers ask different questions:
680
+ enumeration asks which of these positions is the sink, `-p NAME` asks for the
681
+ name wherever it goes. Keeping only the first there would be a false negative
682
+ wearing a tidy diff, because an application that reads the *last* value of a
683
+ repeated key would never see the payload.
684
+
685
+ ## [3.2.0] — 2026-10-23
686
+
687
+ ### Added
688
+
689
+ - **An upload's filename is a value the application reads, and it had no
690
+ injection point.** Only part *content* was replaceable: `place_injection_point`
691
+ rebuilt each part as `[head, content]` and preserved the header verbatim, so
692
+ `filename="a.txt"` was unreachable. A filename is where a traversal, a double
693
+ extension, or a name a converter shells out with has to go — the routes from an
694
+ upload to execution — and the reference page said outright that a file part's
695
+ `filename` "stays as captured".
696
+
697
+ The new `filename` kind is the inverse of `multipart`, and they are separate
698
+ kinds because they are separate values: the content is what an upload
699
+ *contains*, the filename is what the application is told it is called. Only
700
+ parts that declare one are candidates, each addressed by part index and
701
+ verified by its field name, exactly as the content points are and for the same
702
+ reason — several parts may share a name, and matching on the name alone rewrote
703
+ the first of them for every candidate. The part header changes; the content,
704
+ the other parameters, the part's other headers and every byte outside the
705
+ quotes stay as captured, because a parser on the far side reads them too.
706
+
707
+ Three characters cannot reach a part header as themselves, and the reasons are
708
+ not the same. The quote and the backslash are syntax: RFC 7578's quoted-string
709
+ form needs them escaped or the name is truncated at the payload's own quote,
710
+ and the backslash is escaped first so it does not escape the escape the quote
711
+ just gained — the `cmd.exe` probes carry quotes, so dropping such probes would
712
+ have cost that dialect this whole carrier. **CR and LF are replaced with a
713
+ space, and that one is a safety decision rather than a syntactic one:** a
714
+ newline in a part header does not corrupt the request, it *forges a new part*,
715
+ which is a different vulnerability and one no notice afterwards can undo. A
716
+ payload that needs a newline there is testing header injection, not a filename
717
+ sink. A traversal or a double extension contains none of the three and goes on
718
+ the wire unchanged.
719
+
720
+ `--verify-body-location` gained `multipart_filename` for a hand-written
721
+ capture, and the point names that encoder for itself rather than the engine
722
+ locating the marker to work it out — the same mechanism an XML point uses, and
723
+ now one function (`point_body_location`) so the list of position-encoded kinds
724
+ exists once.
725
+
726
+ **The flag's choices are now derived from the encoder registry** rather than
727
+ written out beside it. They were two lists, and that is exactly how far they
728
+ drifted inside this change: the encoder was registered, documented as a flag
729
+ value in the reference, the guide and this entry, and left out of the parser's
730
+ copy, so the CLI answered `invalid choice` to its own documentation and the
731
+ encoder was reachable only through an enumerated point. A test now reads the
732
+ choices out of argparse's own error rather than off the helper, because
733
+ comparing the helper with the registry would pass while someone re-hardcoded
734
+ the parser's list.
735
+
736
+ ### Fixed
737
+
738
+ - **`filename` ends in `name`, and the field-name pattern had no boundary.**
739
+ Pre-existing, and found while building the kind above rather than reported:
740
+ `Content-Disposition: form-data; filename="second.png"; name="report"`
741
+ enumerated as a field called `second.png`, because an unanchored `name="..."`
742
+ matches inside `filename="..."`. Parameter order is free in RFC 7578 and
743
+ libraries differ, so that is an ordinary capture rather than a curiosity, and
744
+ on such a part every content point was labelled with the upload's filename
745
+ instead of its field.
746
+
747
+ Fixed here rather than separately because the new kind uses the field name as
748
+ its identity and as the key its placement re-checks, so the kind is wrong
749
+ without it. Both orderings are now read, and the near neighbours are pinned: a
750
+ part with only a filename, a disposition with no space before its first
751
+ parameter, and the unquoted form that is still deliberately not read.
752
+
753
+ ## [3.1.2] — 2026-10-17
754
+
755
+ ### Fixed
756
+
757
+ - **A JSON body with a byte-order mark yielded no injection point at all.** The
758
+ same U+FEFF that used to send an XML body down the form branch sent a JSON body
759
+ nowhere: `str.strip()` leaves the mark, so the test on the first character said
760
+ "not JSON", and `-p NAME` could not reach a JSON field either. .NET clients
761
+ emit a mark routinely.
762
+
763
+ Fixing that test alone would not have been enough, and that is the shape of the
764
+ bug worth recording: `json.loads` **rejects** the mark outright
765
+ (`Unexpected UTF-8 BOM`), so the branch and the parse had to agree. Five
766
+ request-side sites did not — two branch tests, a third in `-p NAME`'s own path,
767
+ and three parses behind them.
768
+
769
+ The mark is now stripped through one shared helper wherever RCEKit decides what
770
+ a body *is*, which is also where the XML branch already asked, so the two
771
+ carriers cannot drift apart again. The constant moved out of the XML block and
772
+ lost its `_XML_` prefix, since both now use it.
773
+
774
+ Because the JSON path re-serialises, **the mark is put back on** the body that
775
+ goes to the target: the capture carried it and the application accepted it, so
776
+ sending it back is the faithful answer, and the payload-free control is rendered
777
+ through the same path, so probe and control still differ in the field under test
778
+ and in nothing else.
779
+
780
+ A mark is not a licence to guess. A body that is still neither JSON nor XML once
781
+ it is stripped goes down exactly the paths it did before.
782
+
783
+ The mark is removed **and then** whitespace, in that order, and the order is
784
+ the whole of it: `str.strip()` stops at a mark, so a body whose mark is
785
+ followed by a newline still has that newline in front of its delimiter after
786
+ stripping — and every test on the first character then says "not JSON" about a
787
+ document `json.loads` accepts, and "not XML" about one the scanner reads. That
788
+ is the same branch-disagrees-with-parse failure this entry is about, reached by
789
+ writing the rule correctly and the order backwards. One helper named for the
790
+ order now owns it, and a test fails if the two are swapped.
791
+
792
+ - **A form key behind a byte-order mark was addressable only as an invisible
793
+ name.** A mark sits in front of the *first* key, where it is an artefact of how
794
+ the body was encoded rather than part of the field name, so enumeration
795
+ reported `<mark>cmd` — a report with an invisible character in it — and
796
+ `-p cmd` could not find the field at all. The point is now named without the
797
+ mark, while the body keeps its own bytes: the key is written back exactly as
798
+ captured, because a urlencoded parser on the far side sees the mark too, and a
799
+ key RCEKit rewrote is a key it changed.
800
+
801
+ ## [3.1.1] — 2026-10-17
802
+
803
+ ### Fixed
804
+
805
+ - **A capture carrying its own `FUZZ` had the payload put in two places.** The
806
+ delivery layer substitutes at *every* occurrence of the marker, which is right
807
+ for a marker the operator wrote — two `FUZZ` in a request mean both — and wrong
808
+ for one RCEKit inserted. Enumeration places its own marker at a chosen point,
809
+ and a point wins over an inline marker by design, so a capture containing the
810
+ literal `FUZZ` ended up with two markers: the payload landed in a field nobody
811
+ selected, and a confirmation could not be attributed to the point under test.
812
+ Measured for `xml`, `json`, `form` and `query` alike, so it was not specific to
813
+ any one carrier.
814
+
815
+ Enumeration now marks each point with a token of its own whenever — and only
816
+ when — the capture already contains the default marker, and the run says so.
817
+ The captured `FUZZ` then goes to the target as the value it is. The swap is
818
+ conditional because `FUZZ` is what the exports, the documentation and the
819
+ inline path all name, so it is left alone wherever it cannot collide; the token
820
+ keeps the `FUZZ` prefix so a marked request still reads as marked.
821
+
822
+ **`-p NAME` never reached this, and is deliberately unchanged.** A pre-existing
823
+ marker sends it down the *inline* path before the parameter is ever placed, so
824
+ giving it a marker of its own would change which place the run tests. The
825
+ unbounded substitution is also unchanged: the operator-written case needs it,
826
+ and this only stops RCEKit's own marker colliding with theirs.
827
+
828
+ What this does not change: nothing differs on the wire for a capture without a
829
+ literal `FUZZ` in it, which is every capture the test suite and the docs use.
830
+
831
+ Threading the marker to the delivery layer **appends** it to every signature it
832
+ touches — `run_detection`, `run_verification`, `_fire`, `_fire_channels`,
833
+ `_escalate` and `_detect_body_location` — so no existing parameter moves. In
834
+ `run_detection` that puts it after `config` and `rng` rather than beside
835
+ `body_location` where it belongs by meaning, and deliberately: inserting it in
836
+ the obvious place shifted those two along by one, so a caller passing `config`
837
+ positionally bound a dict to `mark` and the first delivery raised `TypeError`
838
+ from `str.replace`. A test pins the ordering per signature, because the fix
839
+ looks like untidiness and the next tidy-up would reintroduce the break.
840
+
841
+ ## [3.1.0] — 2026-10-17
842
+
843
+ ### Added
844
+
845
+ - **An XML or SOAP body is enumerated, and until now it had one injection point
846
+ that could not confirm anything.** No branch recognised XML, so an envelope
847
+ fell through to the **form** branch — which it reaches, because a prolog and
848
+ every attribute contain `=`. Splitting it on `&` produced exactly one point,
849
+ named `<?xml version`, and every probe for it rewrote the prolog. The run
850
+ printed a point and a probe count while no element, attribute or CDATA section
851
+ in the document was ever tested. That is the failure that matters: coverage
852
+ reported and not delivered reads exactly like a clean target.
853
+
854
+ The new `xml` kind addresses every element's character data, every attribute
855
+ value and every CDATA section by path — `soap:Body/getUser/name`,
856
+ `getUser/@id`, `note/cdata()`. A repeated sibling is indexed from the second
857
+ occurrence (`items/item`, `items/item[2]`), the same way a repeated multipart
858
+ field is labelled, so the later ones are reachable rather than counted as
859
+ covered. `xmlns` declarations are not candidates: a payload in a namespace URI
860
+ renames the element instead of reaching anything that reads its value.
861
+
862
+ An element with no element children is a candidate **even when it is empty or
863
+ holds only whitespace**, because `<cmd></cmd>` and `<cmd> </cmd>` are the
864
+ ordinary shape of a field in a SOAP template, and a JSON `""` leaf and a form
865
+ `key=` were candidates already — XML would have been the one carrier that
866
+ dropped them, so an envelope of placeholders could report no body injection
867
+ point at all. Whitespace between two *elements* is still formatting and yields
868
+ nothing: the test is whether the element had an element child, not whether its
869
+ text is blank, because the blank test answers the same for a placeholder field
870
+ and for the indentation of a pretty-printed envelope. A self-closing `<cmd/>`
871
+ is not a candidate, for the reason a missing JSON key is not.
872
+
873
+ The body is recognised **byte-order mark and all**. `str.strip()` does not
874
+ remove U+FEFF, and the cost of missing it is not a missed point but the wrong
875
+ branch: a body with a prolog contains `=`, so a marked envelope would have
876
+ fallen through to the form branch and produced the single bogus point this
877
+ kind exists to replace. .NET clients emit a mark routinely.
878
+
879
+ The document is **spliced at the value's offsets**, never parsed and
880
+ re-emitted. Two reasons, and the second decided it. A signed envelope
881
+ (WS-Security / XML-DSig) covers its own bytes with a digest, and
882
+ parse-then-emit loses attribute order, insignificant whitespace and the
883
+ prolog's quoting style — none of which XML requires preserved and all of which
884
+ the digest covers. And a capture aimed at an **XXE** sink carries a DOCTYPE
885
+ with an external entity, because that is exactly what the operator is trying to
886
+ prove the *target* resolves; a real parser resolves it here instead, which
887
+ turns the tool into the thing it is testing for. A scanner interprets no
888
+ entity, so there is nothing to resolve, no billion laughs to expand and no
889
+ retrieval to disable.
890
+
891
+ A signed body is therefore not probed, and the run **says so** rather than
892
+ reporting zero points — every probe would come back refused for a reason that
893
+ has nothing to do with the sink, which reads exactly like a filter. "Signed"
894
+ means a `Signature` element **in** the XML-DSig namespace, and both halves are
895
+ required: the namespace URI alone appears wherever a schema predeclares the
896
+ prefix without signing anything, and an element named `Signature` is ordinary
897
+ in plenty of schemas, so either test on its own would suppress every point in
898
+ a document that is perfectly testable. Comments and CDATA sections count
899
+ neither way — a tag or a declaration written inside one is an example or a
900
+ payload, not markup, and a commented-out `<!-- <ds:Signature> -->` reached the
901
+ same wrong answer by a second route.
902
+
903
+ - **`--verify-body-location` gained `xml_text`, `xml_attr` and `xml_cdata`**, and
904
+ the automatic choice now reads the marker's *position* rather than the body's
905
+ type. The escaping an XML payload needs is not a property of the body: a
906
+ payload in an attribute has to escape the quote that delimits it, one in
907
+ character data does not, and one inside CDATA must not be escaped at all or the
908
+ sink receives `&amp;&amp;` literally. The target's parser undoes the escaping,
909
+ so the sink receives `a && b` from `a &amp;&amp; b` — the same reason
910
+ `json_string` escapes rather than percent-encodes. Sent raw, a single `&` or
911
+ `<` makes the body not-well-formed and the request is rejected before anything
912
+ reads the value, which is a whole class of sink answering `negative` for a
913
+ reason that has nothing to do with the sink. An application that scrapes the
914
+ envelope with a regex instead of parsing it still needs
915
+ `--verify-body-location raw`, and can now say so.
916
+
917
+ `xml_cdata` leaves the payload alone except for the one sequence that would end
918
+ the section, which it splits across a section boundary — the bytes the sink
919
+ receives are unchanged.
920
+
921
+ Each enumerated point **carries the shape of its own value**, so the escaping
922
+ is never recovered by locating the marker. The delivery layer replaces every
923
+ occurrence of `FUZZ`, so a capture that already contains a literal `FUZZ` of
924
+ its own has two, and reading the first one picked the other span's shape: a
925
+ probe aimed at element text was escaped as CDATA, its `&` went on the wire
926
+ bare, and the target refused to parse the document — a whole sink answering
927
+ `negative` for a reason that has nothing to do with the sink. For a
928
+ hand-written `--verify-data` envelope the marker is still located, and where
929
+ its occurrences fall in values of more than one shape the body falls through
930
+ to `raw` rather than a silent guess.
931
+
932
+ ### Changed
933
+
934
+ - **`--auto-params form` against an XML body now finds no body point**, where it
935
+ used to find the one that tested nothing. The branch is chosen by the body's
936
+ own shape and the kind filter is applied inside it, so an envelope can no
937
+ longer be read as `a=1&b=2`.
938
+
939
+ ## [3.0.1] — 2026-10-01
940
+
941
+ ### Fixed
942
+
943
+ - **`reflected` named a shell it had not proved.** One of its probe shapes — a
944
+ bare `expr a + b` at `--probe-depth full`, whose expected value was the sum
945
+ alone, matched digit-fenced — reported `executed` under
946
+ `[reflected/<environment>/...]` against targets where nothing executed a
947
+ command. Groovy reads `expr 548286 + 675041` as the command expression
948
+ `expr(548286 + 675041)`: it computes the sum, fails to resolve the method, and
949
+ echoes the result in its error.
950
+
951
+ The tier was never wrong. The target did compute a value reflection cannot
952
+ forge, and `eval` reaches `executed` on such an endpoint honestly. What was
953
+ wrong is the **class**: a finding printed under `reflected/unix` asserts a
954
+ POSIX shell ran the input, and in a report a correct proof filed under the
955
+ wrong class is worse than a miss.
956
+
957
+ Measured against a plain Apache HugeGraph 1.2.0 Gremlin endpoint with every
958
+ shape mapped (`--confirm-depth every`): 42 probes, `executed=3`, all three
959
+ that one shape, and 0 of 36 tagged probes confirming. Measured against the
960
+ same build's ProcessBuilder body, where a real `sh -c` runs: 4 tagged shapes
961
+ confirm — the canonical `$(( ))` plus `$(echo TAG)` collapse, the backtick
962
+ `expr`, the `${IFS}` space-free form and the comment-terminated collapse — so
963
+ removing the shape costs nothing on a genuine shell. The remaining shapes all
964
+ require the target to place RCEKit's random tags *around* the value it
965
+ computed, which an expression evaluator handed the payload cannot do.
966
+
967
+ The shape is removed rather than repaired: `expr` has no portable string
968
+ concatenation, so there is no way to bracket its result in a tag without
969
+ reintroducing the `$(` or the `echo` keyword the shape existed to avoid. The
970
+ substitution-free coverage it shared is carried by `awk` alone, which is
971
+ unaffected. A sink that filters `$(`, backticks and `awk` at once is now out
972
+ of `reflected`'s reach and stays reachable through `time`, `oob` and `file`.
973
+
974
+ `--probe-depth quick` never sent the shape, so a `quick` run is unchanged.
975
+ Two guards hold the invariant over every environment, context and depth: no
976
+ probe's expected value may be the arithmetic alone, and none may match
977
+ digit-fenced. Both were run against the restored shape and both fail on it,
978
+ as does a new bench case whose control runs `reflected` against the same
979
+ Gremlin endpoint and requires `negative` — with the shape restored it reports
980
+ `executed=30`.
981
+
982
+ One second-order effect worth knowing: the retired shape was also the
983
+ shortest probe `reflected` built, so the shortest is now 41 characters rather
984
+ than about 20. A `--max-length` below 41 therefore leaves the method with no
985
+ probe at all. That fails loudly rather than quietly — the run prints
986
+ `NOTHING WAS TESTED — this is not a negative result`, names
987
+ `--max-length` as what removed all 36 probes, and says to relax it or treat
988
+ the sink as one the probe vocabulary cannot reach.
989
+
293
990
  ## [3.0.0] — 2026-09-30
294
991
 
295
992
  ### Changed
@@ -2700,6 +3397,16 @@ this file and have not been restated here.
2700
3397
 
2701
3398
 
2702
3399
  [Unreleased]: https://github.com/kabiri-labs/rcekit/compare/v2.36.0...HEAD
3400
+ [3.6.1]: https://github.com/kabiri-labs/rcekit/compare/v3.6.0...v3.6.1
3401
+ [3.6.0]: https://github.com/kabiri-labs/rcekit/compare/v3.5.0...v3.6.0
3402
+ [3.5.0]: https://github.com/kabiri-labs/rcekit/compare/v3.4.0...v3.5.0
3403
+ [3.4.0]: https://github.com/kabiri-labs/rcekit/compare/v3.3.0...v3.4.0
3404
+ [3.3.0]: https://github.com/kabiri-labs/rcekit/compare/v3.2.0...v3.3.0
3405
+ [3.2.0]: https://github.com/kabiri-labs/rcekit/compare/v3.1.2...v3.2.0
3406
+ [3.1.2]: https://github.com/kabiri-labs/rcekit/compare/v3.1.1...v3.1.2
3407
+ [3.1.1]: https://github.com/kabiri-labs/rcekit/compare/v3.1.0...v3.1.1
3408
+ [3.1.0]: https://github.com/kabiri-labs/rcekit/compare/v3.0.1...v3.1.0
3409
+ [3.0.1]: https://github.com/kabiri-labs/rcekit/compare/v3.0.0...v3.0.1
2703
3410
  [3.0.0]: https://github.com/kabiri-labs/rcekit/compare/v2.45.7...v3.0.0
2704
3411
  [2.45.7]: https://github.com/kabiri-labs/rcekit/compare/v2.45.6...v2.45.7
2705
3412
  [2.45.6]: https://github.com/kabiri-labs/rcekit/compare/v2.45.5...v2.45.6