Cybersecurity-Projects/PROJECTS/beginner
CarterPerez-dev f5196252e9 feat(rube): M1 Marshal stream parser - inspect payloads without deserializing
Scaffolds the Ruby deserialization security lab and lands its defensive core
first: a parser that extracts structure, referenced class names, and gadget
sinks from a Marshal stream without ever calling Marshal.load.

Sinks are classified along the gated/ungated dispatch axis. Marshal checks
respond_to? before invoking marshal_load and _load, while hash, eql?, <=> and
[]= are dispatched blind, so the same class can be dead as a Marshal entry
point and live as a #hash entry point.

Object links are ZERO-indexed. Ruby's Marshal format documentation says
one-indexed and is wrong: a self-referential array dumps as 04 08 5b 06 40 00
with the trailing 00 linking to the outermost object. Written against observed
bytes rather than the docs.

Validation rejects truncated streams, unsupported version bytes, unknown type
tags, out-of-bounds object links and symlinks, oversized fixnum widths,
trailing bytes, and nesting past a configurable depth limit.

A negative-control script accompanies the suite and caught a test that was
passing vacuously: the TracePoint oracle watched :c_call, but Marshal.load is
a Ruby-level method in Ruby 4.0 (<internal:marshal>:33) and fires :call, so
the test could never have failed. The suite now asserts the oracle observes a
real Marshal.load before the negative assertion is allowed to mean anything.

Gem manifest is an explicit allowlist rather than git ls-files, so the
deliberately vulnerable target cannot be swept into a published gem later.

34 tests, 62 assertions, 0 failures. 52/52 corpus round-trip. gem build
--strict clean. All execution in ruby:4.0-slim with --network none.
2026-07-26 09:32:14 -04:00
..
base64-tool Update DEMO.md 2026-04-28 18:01:21 -04:00
c2-beacon chore(deps): bump starlette in /PROJECTS/beginner/c2-beacon/backend 2026-06-04 17:25:29 +00:00
caesar-cipher chore: add demos for projects, update haskell-reverse-proxy modules, refresh siem assets 2026-04-26 23:12:48 -04:00
canary-token-generator style(canary): format config_test.go with golines (max-len 80) 2026-07-19 03:18:17 -04:00
deserialization-gadget-lab feat(rube): M1 Marshal stream parser - inspect payloads without deserializing 2026-07-26 09:32:14 -04:00
dns-lookup chore: add demos for projects, update haskell-reverse-proxy modules, refresh siem assets 2026-04-26 23:12:48 -04:00
firewall-rule-engine feat: sbom generator & vulnerability matcher + docstrings across 6 projects 2026-04-08 23:53:40 -04:00
hash-cracker cracked 2026-05-23 05:01:01 -04:00
keylogger Update README.md 2026-06-02 09:16:11 -04:00
linux-cis-hardening-auditor cracked 2026-05-23 05:01:01 -04:00
linux-ebpf-security-tracer add: AGPL 3.0 license files to hash-cracker, ebpf tracer, dlp scanner 2026-04-11 05:56:43 -04:00
metadata-scrubber-tool chore(deps): bump pypdf in /PROJECTS/beginner/metadata-scrubber-tool 2026-06-18 15:28:54 +00:00
network-traffic-analyzer ci(network-traffic-analyzer): drop ruff preview to keep lint green across versions 2026-07-19 03:18:03 -04:00
simple-port-scanner cracked 2026-05-23 05:01:01 -04:00
simple-vulnerability-scanner Delete PROJECTS/beginner/simple-vulnerability-scanner/hf_readme.gif 2026-07-19 23:26:24 -04:00
steganography-multi-tool docs(crypha): add learn/ track and surface the built project (M9) 2026-07-19 03:06:49 -04:00
systemd-persistence-scanner chore: add demos for projects, update haskell-reverse-proxy modules, refresh siem assets 2026-04-26 23:12:48 -04:00