Wednesday, July 30, 2014

SendIP - an arbitrary IP packet generating tool

SendIP is a tool which allows creating (and, of course, sending) arbitrary IP (v4 and v6) packets.

How To Install

Download Tarbell package from here.
Steps to install:
  1. Untar it in some folder. (tar -xzvf sendip-2.5-mec-0.tar.gz)
  2. sudo make
  3. make install
  4. Now if you type sendip on Linux CLI, it should show all the available Modules. (Ex: ipv4 ipv6 icmp tcp udp bgp rip ripng ntp ah dest esp frag gre hop route)

How To Use


  • -p module //load the specified module (see below)
  • -v  be verbose
  • -h  print this message
  • -d  data //add this data as a string to the end of the packet. rN to generate N random(ish) data  bytes; //zN to generate N nul (zero) data bytes; 0x or 0X followed by hex  digits; 0 followed by octal digits; decimal number for decimal digits


Example:

  • ICMP4: sendip -v -p ipv4 -is 2.2.2.2 -p icmp -d r10 2.2.2.3 
  • ICMP6: sendip -v -p ipv6 -6s 9901::180 -p icmp -d "hello" 9901::100
  • TCP4 : sendip -v -p ipv4 -is 2.2.2.2 -p tcp -ts 1000 -td 1005 -tfs 1 -tn 0 2.2.2.3
  • TCP6 : sendip -v -p ipv6 -6s 9901::180 -p tcp -ts 1000 -td 1005 -tfs 1 -tn 0 9901::100
  • UDP4 : sendip -v -p ipv4 -is 2.2.2.2 -p udp -us 34001 -ud 34002 2.2.2.3
  • UDP6 : sendip -v -p ipv6 -6s 9901::180 -p udp -us 34001 -ud 34002 9901::100

Generate Various IPv6 Extension Header with ICMPv6 as next header.

  • Route(43):    sendip -v -p ipv6 -6s 9901::180 -6n 43 -p route -p icmp -d "hello" 9901::100
  • Frag(44): sendip -v -p ipv6 -6s 9901::180 -6n 44 -p frag -p icmp -d "hello" 9901::100
  • AH(51): sendip -v -p ipv6 -6s 9901::180 -6n 51 -p ah -p icmp -d "hello" 9901::100
  • HopByHop(0)sendip -v -p ipv6 -6s 9901::180 -6n 0 -p hop -p icmp -d "hello" 9901::100
  • Dest Opt(60)sendip -v -p ipv6 -6s 9901::180 -6n 60 -p dest -p icmp -d "hello" 901::100
  • ESC(50): sendip -v -p ipv6 -6s 9901::180 -6n 32 -p esc -p icmp -d "hello" 9901::100