{"id":27,"date":"2011-05-22T13:35:06","date_gmt":"2011-05-22T17:35:06","guid":{"rendered":"http:\/\/www.braindeadprojects.com\/blog\/?p=27"},"modified":"2011-05-22T13:49:16","modified_gmt":"2011-05-22T17:49:16","slug":"packet-creation-for-ipv6","status":"publish","type":"post","link":"http:\/\/www.braindeadprojects.com\/blog\/what\/packet-creation-for-ipv6\/","title":{"rendered":"Packet Creation for IPv6"},"content":{"rendered":"<p>With most of my projects, I&#8217;ve noticed that before I can <em>really<\/em> begin to delve into them, I first have to learn something completely new.<\/p>\n<p>I don&#8217;t do most of my work in <a title=\"Perl \" href=\"http:\/\/www.perl.org\/\" target=\"_blank\">Perl<\/a>, but I can definitely make ends meet. My more recent work in Perl has dealt w\/ <a title=\"RIP\" href=\"http:\/\/en.wikipedia.org\/wiki\/Routing_Information_Protocol\" target=\"_blank\">RIP<\/a> scanning and route-updating (a lot of DSL CPE tends to have RIP enabled). Packet creation isn&#8217;t that difficult, and using Perl I could bang out a script in a short period of time.<\/p>\n<p>Usually for packet manipulation, I stay away from Perl &#8211; instead I&#8217;m a huge fan of <a href=\"http:\/\/www.hping.org\/\" target=\"_blank\">Hping[23]<\/a>. If you&#8217;re wanting to watch and play w\/ the transport layer &#8211; an old laptop with hping and wireshark running is definitely the way to go. If you want to test MTU problems, or ACLs\u00a0 &#8211;\u00a0 Hping is fast and easy.<\/p>\n<p>Hping is an amazing tool &#8211; one of my favorites. Hand crafted TCP and UDP traceroutes are easy as hell, and hand crafting TCP timestamp requests is easy too. Just read the manpages and you&#8217;ll find all sorts of interesting features of TCP\/IP.<\/p>\n<figure id=\"attachment_964\" aria-describedby=\"caption-attachment-964\" style=\"width: 150px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/hping.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-964\" title=\"HPing\" src=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/hping.jpg\" alt=\"hping: A Great Tool\" width=\"150\" height=\"59\" \/><\/a><figcaption id=\"caption-attachment-964\" class=\"wp-caption-text\">hping: Like a screwdriver set with most of the bits.<\/figcaption><\/figure>\n<p>The downside to Hping is that it doesn&#8217;t seem to be under regular development (last release 2005?), and IPv6 isn&#8217;t supported yet (Aside from some basic <a href=\"http:\/\/www.sfc.wide.ad.jp\/~watari\/Download\/sendit.html\" target=\"_blank\">third-party patches<\/a>). Application layer creation is also left for other utilities to handle (But in all fairness &#8211; that&#8217;s not it&#8217;s job)<\/p>\n<p>I was a late adopter, but about a year ago I made a new friend (and picked up some <a title=\"Python\" href=\"http:\/\/www.python.org\/\" target=\"_blank\">python<\/a> along the way). My new best friend is <a href=\"http:\/\/www.secdev.org\/projects\/scapy\/doc\/\" target=\"_blank\">Scapy<\/a>. &#8220;Scapy is a powerful interactive packet manipulation program. It is able to forge or decode packets of a wide number of protocols, send them on the wire, capture them, match requests and replies, and much more.&#8221; It runs in interactive and script-able mode, and thus far it&#8217;s proven to be quite powerful. It also supports IPv6.<\/p>\n<p>Scapy understands a large number of Application level protocols (SNMP, TFTP, SMB, etc, etc), and makes it easy for one to craft such packets.\u00a0 When I recently realized early versions of Cisco IP Router Export have corrupt headers &#8211; Scapy came to the rescue (albeit, only to rip the headers off, as fixing them wasn&#8217;t possible).\u00a0 When I wanted to craft a quick and easy <a href=\"http:\/\/www.braindeadprojects.com\/blog\/what\/freeradius-packet-of-death\/\" target=\"_blank\">FreeRadius Packet of Death<\/a> &#8211; Scapy came to the rescue.<\/p>\n<figure id=\"attachment_1241\" aria-describedby=\"caption-attachment-1241\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/Exploits-Database-by-Offensive-Security_1306085049070.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1241\" title=\"Exploits Database by Offensive Security_1306085049070\" src=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/Exploits-Database-by-Offensive-Security_1306085049070-300x177.png\" alt=\"Exploits Database\" width=\"300\" height=\"177\" srcset=\"http:\/\/www.braindeadprojects.com\/blog\/wp-content\/Exploits-Database-by-Offensive-Security_1306085049070-300x177.png 300w, http:\/\/www.braindeadprojects.com\/blog\/wp-content\/Exploits-Database-by-Offensive-Security_1306085049070-1024x604.png 1024w, http:\/\/www.braindeadprojects.com\/blog\/wp-content\/Exploits-Database-by-Offensive-Security_1306085049070.png 1074w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1241\" class=\"wp-caption-text\">FreeRadius PoD on www.exploit-db.com<\/figcaption><\/figure>\n<p>Another great thing about Scapy is that it&#8217;s easy to add &#8220;layers&#8221; (protocols). Recently I sat down with the RFC&#8217;s for <a title=\"OSPF\" href=\"http:\/\/en.wikipedia.org\/wiki\/Open_Shortest_Path_First\" target=\"_blank\">OSPF<\/a> and in about 2 days time had fully implemented OSPF in Scapy &#8211; learning a <strong>lot<\/strong> about the protocol along the way. (Dirk Loss had beat me and <a href=\"http:\/\/trac.secdev.org\/scapy\/attachment\/wiki\/OSPF\/scapy_ospf.py\" target=\"_blank\">submitted<\/a> it first, but that was besides the point).<\/p>\n<p>Looking for a fun new world to poke, and tired of IPv4? Sign up for a <a title=\"Sixxs.net\" href=\"http:\/\/www.sixxs.net\/\" target=\"_blank\">6-in-4 tunnel<\/a> and go exploring. Just make sure you pack Scapy and a <a href=\"http:\/\/www.packetlevel.ch\/html\/scapy\/scapyipv6.html\" target=\"_blank\">handy guide<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With most of my projects, I&#8217;ve noticed that before I can really begin to delve into them, I first have to learn something completely new. I don&#8217;t do most of my work in Perl, but I can definitely make ends meet. My more recent work in Perl has dealt w\/ RIP scanning and route-updating (a &hellip; <a href=\"http:\/\/www.braindeadprojects.com\/blog\/what\/packet-creation-for-ipv6\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Packet Creation for IPv6<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,33,32,1],"tags":[],"class_list":["post-27","post","type-post","status-publish","format-standard","hentry","category-ipv6","category-perl","category-python","category-what"],"_links":{"self":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/27"}],"collection":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/comments?post=27"}],"version-history":[{"count":33,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":1260,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/posts\/27\/revisions\/1260"}],"wp:attachment":[{"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/media?parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/categories?post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.braindeadprojects.com\/blog\/wp-json\/wp\/v2\/tags?post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}