
Summary
Detects a run of at least 21 escaped 0xDF (sharp S) bytes in an HTTP POST body, which in affected Ruby versions can trigger a heap-buffer overflow during case conversion. Using Zeek HTTP POST Body as the data source, the rule matches input where the body contains a sequence of escaped 0xDF bytes (\xdf) repeated 21 or more times. It collects identifiers (uid, src, dest, dest_port), the HTTP method, and the body size, and aggregates by connection to report first/last seen times and the URL. A dedicated Zeek script (forwarded as http_post_body.log with KV_MODE=json) preserves escaped non-UTF-8 bytes as \xdf and extracts fields such as method, body_bytes, uid, uri, id.orig_h, id.resp_h, and id.resp_p. The detection is tied to CVE-2026-132825 and MITRE ATT&CK T1190 (Exploit Public-Facing Application), indicating potential exploitation of a vulnerable Ruby encoding path that may lead to remote code execution or worker crashes when processed by affected Ruby versions. Actions include verifying the target Ruby version and request handling, inspecting downstream workers or processes for crashes or shell activity following matches, and tuning the 21-byte threshold if legitimate content commonly contains long legacy-encoded sequences. Privacy considerations apply due to possible sensitive data in POST bodies; limit capture and review retention policies. The rule is most applicable to web servers exposing HTTP POST endpoints and should be used in conjunction with corroborating host-based or network telemetry. Known false positives may occur in systems that legitimately accept long runs of legacy-encoded sharp S characters without reaching the vulnerable Ruby path. References: GHSA-34m4-m9fh-gqp5; verialabs ruby2shell.
Categories
- Web
Data Sources
- Kernel
- WMI
- File
- Process
- Network Traffic
- Web Credential
- Pod
- Container
- Image
- Script
- Internet Scan
- Application Log
- Logon Session
- Kernel
- Driver
- Volume
- Cloud Service
- Domain Name
- Module
- Network Share
- Scheduled Job
- Firmware
- Active Directory
- Service
- Process
- Firewall
- Web Credential
- Web Credential
- Domain Name
- Network Traffic
- Image
- File
- Drive
- Snapshot
- Kernel
- Driver
- Volume
- Cloud Service
- Scheduled Job
- Firmware
ATT&CK Techniques
- T1190
Created: 2026-11-23