class

Crowbar::Rules::PacketRule

Inherits Crowbar::Rule < Reference < Object

Structure-preserving rule for raw network packets (IPv4, TCP, UDP) and PCAP capture traces. Automatically maintains RFC 791 16-bit Internet Header Checksums, Total Length, and UDP length fields, while fuzzing ports, sequence numbers, TCP flags, TTL, fragmentation offsets, IP options, and transport payloads.

Constants

PCAP_MAGIC_BE = Bytes[161, 178, 195, 212]
PCAP_MAGIC_LE = Bytes[212, 195, 178, 161]

Instance methods

apply(context : Context, buffer : Buffer) : Bool

Applies a structure-preserving transformation to the buffer

Source
description
Source
match?(buffer : Buffer) : Bool

Checks whether the buffer matches the format handled by this rule

Source
name
Source
recalculate_ip_checksum(buffer : Buffer, base_off : Int32, ihl : Int32)
Source