Skip to content

Release 2.2.4 stable: protocol validation and security hardening - #5

Merged
ItsWanheda merged 22 commits into
mainfrom
release/2.2.4
Nov 6, 2026
Merged

ItsWanheda merged 22 commits into
mainfrom
release/2.2.4

Conversation

@ItsWanheda

@ItsWanheda ItsWanheda commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Prepare SpectraScan 2.2.4 (stable) by closing the six protocol-validation findings identified in the release audit. This PR hardens response correlation and wire-format parsing, adds targeted regression coverage, removes an unsupported RDP vulnerability classification, and aligns the project documentation with the 2.2.4 stable release line.

This PR is intentionally isolated on release/2.2.4; it targets main and does not modify main directly.

Security and protocol fixes

1. High — SNMP response correlation

  • Validate that the response is an SNMPv2c message (version 1).
  • Compare the response request ID with the exact request ID sent for the query.
  • Compare the returned community octets with the requested community string.
  • Require complete response-PDU framing and retain the requested-OID check.
  • Generate and retain the request ID in query() so unsolicited, stale, or mismatched datagrams are rejected.

2. High — RDP negotiation framing

  • Validate TPKT version, reserved byte, and exact declared packet length.
  • Require an X.224 Connection Confirm TPDU with the expected length indicator and code.
  • Require a complete, exactly eight-byte RDP negotiation response/failure structure.
  • Reject unknown negotiation types/protocol selections and malformed or truncated packets.
  • Read the complete TPKT frame from TCP instead of assuming one recv() returns the entire packet.

3. Medium — MongoDB response correlation

  • Require OP_MSG responseTo to equal the outstanding request ID exactly.
  • Remove the previous zero-value wildcard acceptance; zero and all other mismatches are rejected.

4. Medium — RDP NLA finding accuracy

  • Remove the unsupported medium-severity vulnerability generated solely when NLA is not negotiated.
  • Preserve the result as an explicit configuration observation.
  • Keep BlueKeep explicitly unassessed unless OS and patch-level evidence is available.

5. Medium — RTSP malformed-response handling

  • Require a valid RTSP status line and complete CRLF header terminator.
  • Reject malformed/folded header lines, duplicate headers, invalid or oversized Content-Length values, and mismatched body lengths.
  • Reject malformed SDP media lines and invalid media ports rather than returning misleading partial stream data.

6. Medium — SMTP multiline-response validation

  • Require each reply line to use a valid three-digit SMTP status code and legal separator.
  • Require all lines in a multiline reply to use the same status code.
  • Accept completion only on the final space-delimited status line (or a three-digit terminal line).
  • Reject malformed, inconsistent, oversized, and unterminated replies.

Regression tests

Expanded tests/test_protocol_parsers.py to cover:

  • SNMP matching response plus request-ID and community mismatches.
  • MongoDB matching responseTo plus zero/mismatched correlation.
  • RDP valid HYBRID/SSL negotiation, incorrect TPKT lengths, and invalid negotiation lengths.
  • RDP disabled-NLA behavior (observation only; no vulnerability entry).
  • RTSP valid SDP parsing, malformed status lines, duplicate Content-Length, and body-length mismatch.
  • SMTP valid multiline EHLO, inconsistent status codes, malformed lines, and missing terminators.

Documentation and release metadata

  • Updated the README release section and status badge for 2.2.4 stable.
  • Replaced the stale beta instructions with the 2.2.4 protocol/security summary and local test command.
  • Added the 2.2.4 release notes to CHANGELOG.md, including security, fixes, tests, and documentation changes.
  • Updated SECURITY.md supported-version guidance and removed the beta-only support status.
  • Added the root VERSION file containing 2.2.4.
  • Preserved the 2.2.4b changelog entry as historical context rather than deleting release history.

Validation

The repository CI workflow is configured to run:

  • Python compilation and startup/import smoke tests.
  • The full unittest discovery suite on Linux and Windows.
  • Python 3.10, 3.11, and 3.12.
  • Bandit checks for the hardened protocol modules on Linux.
  • pip-audit on Linux/Python 3.12.

CI status: PASSED — latest PR-head workflow run #42301773756 completed successfully across all six Linux/Windows × Python 3.10/3.11/3.12 jobs. The full regression suite passed (54 tests); Linux Bandit checks passed; the Linux/Python 3.12 pip-audit passed. Compile and startup/import smoke checks also passed in every matrix job.

Release checklist

  • Work isolated on release/2.2.4.
  • All six audit findings addressed in code.
  • Regression tests added for each finding.
  • README, CHANGELOG, SECURITY policy, and VERSION updated.
  • All six PR CI jobs pass.
  • Review the final diff; the 10 changed files are limited to the protocol fixes, tests, and release documentation.
  • Merge to main.
  • Create and publish the v2.2.4 Git tag / GitHub Release after merge.

Compatibility and scope

No new runtime dependency is introduced. The changes are confined to protocol response validation, RDP finding classification, regression tests, and release documentation. Network probing remains intended for explicitly authorized targets only.

@ItsWanheda
ItsWanheda merged commit d5289c1 into main Nov 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant