ksp replay
ksp replay
Command ReferenceReplay recorded pcapng traffic streams against a KSP endpoint to test idempotency and sliding window rejection.
Session & Security
RFC § 14 — Sliding Window Replay ProtectionPurpose
Replay recorded pcapng traffic streams against a KSP endpoint to test idempotency and sliding window rejection.
Syntax
Command-line specificationbash / powershell
ksp replay --trace <PCAP_FILE> --target <URI> [OPTIONS]
Options & Flags
| Option Flag | Description |
|---|---|
| --trace <FILE> | Path to input `.pcapng` trace capture file containing historical KSP packets. |
| --target <URI> | Target server address to inject recorded frames into. |
| --speed <MULT> | Playback speed multiplier (e.g., `1.0` for real-time, `10.0` for stress test). |
Example Usage
Example command
ksp replay --trace ksp-session.pcapng --target 127.0.0.1:9876
Expected Output
[+] Loading trace: ksp-session.pcapng (142 packets) [+] Target server: 127.0.0.1:9876 [+] Replaying frames at 1.0x speed... [REPLAY] Injecting Packet #01 (StreamID: 1 | Seq: 104)... [REPLAY] Server response: REPLAY_DETECTED (Frame dropped by sliding window) [✔] Replay protection verified! 100% of duplicated sequence numbers were correctly rejected by target.
Implementation Notes
Crucial testing utility for validating that custom server implementations strictly adhere to RFC § 14 replay rejection.