crafting frames with linkcat

general = { about, articles, links, projects }     meta = { date-posted: 2006-12-29 }

I was shown a really cool utility not too long ago. It is called Linkcat. Linkcat could be considered netcat for layer 2. It is part of a suite of tools called Paketto, written by Dan Kaminsky.

Linkcat allows you to write a packet in hex, and dump that onto the line. It provides the ability to play back captured packets as well, but I have not tried it. I have only used Linkcat on a few occasions to craft single tcp syn packets.

Since I suck at calculating the checksums for tcp packets, I use ethereal to capture the attempt at dumping the packet on the line (first try). Ethereal will give you the hex output of the packet, as well as decipher the packet for you. The real bonus is that along with showing you the bad header checksum, it will show you what the correct checksum should be! zing!

For a great site for showing packet headers, with nice diagrams, check out NetworkSorcery.com. The rfc sourcebook is the bee's knees. :) Check out the 'hot' tcp header diagram on the TCP page.