User Tools

Site Tools


packetforge-ng

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
packetforge-ng [2007/01/27 20:49] – Standardizing the format darkaudaxpacketforge-ng [2007/04/27 16:58] – added examples for v.8 new features darkaudax
Line 1: Line 1:
 ====== Packetforge-ng ====== ====== Packetforge-ng ======
- 
- 
  
  
Line 31: Line 29:
       *-y <file>      : read PRGA from this file       *-y <file>      : read PRGA from this file
  
-====Modes:====+====Modes (long modes use double dashes):====
  
       *--arp          : forge an ARP packet    (-0)       *--arp          : forge an ARP packet    (-0)
       *--udp          : forge an UDP packet    (-1)       *--udp          : forge an UDP packet    (-1)
       *--icmp         : forge an ICMP packet   (-2)       *--icmp         : forge an ICMP packet   (-2)
 +      *--null         : build a null packet (-3)
       *--custom       : build a custom packet  (-9)       *--custom       : build a custom packet  (-9)
- 
  
  
 ===== Usage Example ===== ===== Usage Example =====
  
 +==== Generating an arp request packet ====
 Here is an example of how to generate an arp request packet. Here is an example of how to generate an arp request packet.
  
Line 100: Line 99:
  
 By entering "y" above, the packet you created with packetforge-ng is then injected. By entering "y" above, the packet you created with packetforge-ng is then injected.
 +
 +
 +==== Generating a null packet ====
 +
 +This option allows you to generate LLC null packets.  These are the smallest possible packets and contain no data.  The switch "-s" is used to manually set the size of the packet.  This a simple way to generate small packets for injection.
 +
 +Remember that the size value (-s) defines the absolute size of an unencrypted packet, so you need to add 8 bytes to get its final length after encrypting it (4 bytes for iv+idx and 4 bytes for icv). This value also includes the 802.11 header with a length of 24bytes.
 +
 +The command is:
 +
 +   packetforge-ng --null -s 42 -a BSSID -h SMAC -w short-packet.cap -y fragment.xor
 +
 +Where:
 +  * --null means generate a LLC null packet (requires double dash).
 +  * -s 42 specifies the packet length to be generated.
 +  * -a BSSID is the MAC address of the access point.
 +  * -h SMAC is the source MAC address of the packet to be generated.
 +  * -w short-packet.cap is the name of the output file.
 +  * -y fragment.xor is the name of the file containing the PRGA.
 +
 +
 +==== Generating a custom packet ====
 +If you want to generate a customer packet, first create a packet with the tool of your choice.  This could a specialized tool, a hex editor or even from a previous capture.  Then save it as a pcap file.  Following this, run the command:
 +
 +   packetforge-ng -9 -r input.cap -y keystream.xor -w output.cap
 +
 +Where:
 +  * -9 means generate a custom packet.
 +  * -r input.cap is the input file.
 +  * -y keystream.xor is the file containing the PRGA.
 +  * -w output.cap is the output file.
 +
 +When it runs, packetforge-ng will ask you which packet to use and then output the file.
  
  
Line 111: Line 143:
 ===== Usage Troubleshooting ===== ===== Usage Troubleshooting =====
 A common mistake people make is to include either or both -j and -o flags and create invalid packets.  These flags adjust the FromDS and ToDS flages in the packet generated.  Unless you are doing something special and really know what you are doing, don't use them.  In general, they are not needed. A common mistake people make is to include either or both -j and -o flags and create invalid packets.  These flags adjust the FromDS and ToDS flages in the packet generated.  Unless you are doing something special and really know what you are doing, don't use them.  In general, they are not needed.
- 
packetforge-ng.txt · Last modified: 2010/08/22 20:59 by mister_x