Download to pcap bug in base_payload.php, fix included
Brought to you by:
secureideas,
sinukas
This affects BASE 1.4.5. When downloading to pcap, some packets have a fragment offset injected erroneously, and the IP flags disappear. The IP flags and offset are referenced with the wrong array indexes, and then the two fields are merely concatenated. When lines 350 and 351 in base_payload.php are replaced with the following, it seems to work correctly:
$data_header.= sprintf("%04s", dechex($ip[6]*8192+$ip[5]) ); // flags and offset; 8192 multiplier shifts the flags into the right position
Original code (with incorrect array indices):
$data_header.= sprintf("%02s", dechex($ip[5])); // flags
$data_header.= sprintf("%02s", dechex($ip[6])); // offset