Skip to content

[AI] Fix #78: Add TCP segmentation support for TLS records #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 26, 2025

Summary

This PR implements TCP segmentation support for TLS records, allowing fine-grained control over how records are split across TCP segments. This addresses issue #78.

Changes

  • Added TcpSegmentConfiguration class to define how records should be segmented
  • Modified Record class to include optional TCP segmentation configuration
  • Updated RecordLayer to handle TCP segmentation when sending records
  • Added comprehensive unit tests for the segmentation functionality
  • Created documentation and example workflow

Features

  • Split TLS records at arbitrary byte offsets
  • Configure delays between TCP segments
  • Full XML serialization support for workflow traces
  • Works with all existing TLS-Attacker features

Usage Example

<Record>
    <tcpSegmentation>
        <segment>
            <offset>0</offset>
            <length>3</length>
        </segment>
        <segment>
            <offset>3</offset>
        </segment>
        <segmentDelay>10</segmentDelay>
    </tcpSegmentation>
</Record>

This example splits the record header, sending the first 3 bytes (ContentType + Version) in one TCP segment and the rest in another segment, with a 10ms delay between them.

Test Plan

  • Unit tests for TCP segmentation configuration
  • Tests verify XML serialization/deserialization
  • Build passes with mvn clean compile
  • All tests pass
  • Code formatted with spotless

Fixes #78

Implements fine-grained TCP segmentation control allowing TLS records
to be split across multiple TCP segments. This addresses issue #78.

Features:
- New TcpSegmentConfiguration class to define segment boundaries
- Support for splitting records at arbitrary byte offsets
- Configurable delay between segments
- XML serialization for workflow traces
- Comprehensive unit tests

Users can now split TLS record headers and payloads across TCP segments
for testing implementations' handling of fragmented records.
@ic0ns ic0ns changed the title Fix #78: Add TCP segmentation support for TLS records [AI] Fix #78: Add TCP segmentation support for TLS records Jun 26, 2025
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.

Is it possible to send SSL records in different tcp segments
1 participant