views:

713

answers:

8

We have a networked device, and we would like to perform some tests on how it handles malformed packets.

Is there a product out there that can generate arbitrary packets and packet sequences? I would like to be able to specify a set of TCP/IP payloads and it would open a connection and send the data. Obviouly, the TCP/IP checksum should be calculated correctly, etc...

Kind of like a wireshark in reverse.

Note that I am not interested in network loading and blasting millions of packet.

+5  A: 

Scapy should be able to do what you want

Mez
+3  A: 

Here are the ones that I've heard about. Can't comment on how good they are.

You can also, always, write your own. The PCAP file format is documented and is not very complex.

Andrew Edgecombe
+3  A: 

tcpreplay can modify and replay pcaps. It does not generate a complete protocol exchange out of thin air, but given a pcap file of a protocol it can tweak, modify, and replicate the exchange to test corner cases in a product.

DGentry
+1  A: 

nmap should be able to generate some of the more mundane junk packets. Beyond that, you can also roll your own junk packets using LibNet.

I also liked the suggestions from Denton & Andrew of replaying PCAP format packets.

ceretullis
Libnet is really good for this.
jakobengblom2
A: 

I would suggest getting a hardware box from a place like Ixia. Their "Smartbits" box is probably what you want for this kind of testing. Such hardware tools CAN do load testing, but also have lots of features for functionality testing and protocol boundary-case testing, etc.

jakobengblom2
+1  A: 

I've found Colasoft's Packet Player useful for simple tasks.

http://www.colasoft.com/packet_player/

Adam Liss
+1  A: 

FYI: In the security and testing realm this type of tool is usually referred to as a "fuzzer".

An open source one that might be interesting is Taof.

Here's an entire site devoted to fuzzing, they have a list of fuzzing tools. Check out QueFuzz and ProtoFuzz on that page.

Tim Farley
A: 

I know this is an old thread, but for the sake of people coming here from a search engine ...

I just released an open-source, cross-platform packet generator/analyzer - Ostinato

http://ostinato.googlecode.com/

Srivats P