|
| 1 | +# Wlan 802.11 Decoder in Java # |
| 2 | + |
| 3 | +http://akinaru.github.io/wlan-decoder-java/ |
| 4 | + |
| 5 | +<i>Last update 04/05/2015</i> |
| 6 | + |
| 7 | +Decoder for Wlan 802.11 frame preceding with Radiotap header or not |
| 8 | + |
| 9 | +Radiotap header are parsed with project http://akinaru.github.io/pcapng-decoder-java/ |
| 10 | + |
| 11 | +All type of Wlan 802.11 frames are parsed : |
| 12 | + * MANAGEMENT_FRAME_TYPE |
| 13 | + * CONTROL_FRAME_TYPE |
| 14 | + * DATA_FRAME_TYPE |
| 15 | + |
| 16 | +But there are a few of "information element" block parsed for now (tagged parameters) : |
| 17 | +* SSID |
| 18 | +* HT CAPABILITIES |
| 19 | +* SUPPORTED RATE |
| 20 | +* TIM |
| 21 | +* EXTENDED SUPPORTED RATE |
| 22 | +* ERP |
| 23 | +* DSSS PARAMETER |
| 24 | + |
| 25 | +It lacks a lot of informations element that will be implemented later |
| 26 | + |
| 27 | +<hr/> |
| 28 | + |
| 29 | +<b>USAGE</b> |
| 30 | + |
| 31 | +The following usage show how to decode a Wlan 802.11 frame preceding with Radiotap frames. |
| 32 | + |
| 33 | +You can also decode only wlan802.11 frames if you dont have radiotap header before |
| 34 | + |
| 35 | +First you need a pcapng file containing : |
| 36 | + * your wlan 802.11 frames preceding with radiotap frames |
| 37 | + |
| 38 | +You can use to parse this file |
| 39 | +* the jnetpcap library |
| 40 | +* my own lib in http://akinaru.github.io/pcapng-decoder-java/ (pcapng-decoder-java) |
| 41 | + |
| 42 | +You dont have to take the jar to you it is already in lib folder |
| 43 | + |
| 44 | +So basically this project use 2 external libs pcapngdecoder.jar and radiotapdecoder.jar |
| 45 | + |
| 46 | +<hr/> |
| 47 | + |
| 48 | +<b>COMMAND LINE SYNTAX</b> |
| 49 | + |
| 50 | +``java -cp ../libs/pcapngdecoder-1.0.jar:../libs/radiotapdecoder-1.0.jar:wlandecoder-1.0.jar fr.bmartel.wlandecoder.DecodeMain -f ../pcapfile/exemple.pcapng -v`` |
| 51 | + |
| 52 | +-f <file.pcapng> : input file |
| 53 | + |
| 54 | +-v : verbose, will show all section parsing content |
| 55 | + |
| 56 | +This exemple is launched from release folder |
| 57 | + |
| 58 | +<hr/> |
| 59 | + |
| 60 | +<b>PROGRAM SYNTAX for parsing Wlan802.11 frames preceding with radiotap header</b> |
| 61 | + |
| 62 | +``//data parsed from pcapng file`` |
| 63 | +``byte[] wlanDataPrecedingWithRadiotapHeader = packet.getPacketData();`` |
| 64 | + |
| 65 | +``//initiate decoding`` |
| 66 | +``WlanDecoder dataDecode = new WlanDecoder(packet.getPacketData());`` |
| 67 | +``dataDecode.decodeWithRadiotap();`` |
| 68 | +``wlanDecodedFrameList.add(dataDecode);`` |
| 69 | + |
| 70 | +You can retrieve radiotap data too if you want. Go check http://akinaru.github.io/radiotap-decoder-java/ for more precision |
| 71 | + |
| 72 | +<b>PROGRAM SYNTAX for parsing Wlan802.11 frames ONLY</b> |
| 73 | + |
| 74 | +``//data parsed from pcapng file`` |
| 75 | +``byte[] wlanDataPrecedingWithRadiotapHeader = packet.getPacketData();`` |
| 76 | + |
| 77 | +``//initiate decoding`` |
| 78 | +``WlanDecoder dataDecode = new WlanDecoder(packet.getPacketData());`` |
| 79 | +``dataDecode.decode();`` |
| 80 | +``wlanDecodedFrameList.add(dataDecode);`` |
| 81 | + |
| 82 | +# Output example |
| 83 | + |
| 84 | +`` |
| 85 | +Wlan frame control |
| 86 | +=======protocolVersion : 0 |
| 87 | +=======type : 0 |
| 88 | +=======subType : 8 |
| 89 | +=======toDS : false |
| 90 | +=======fromDS : false |
| 91 | +=======moreFragmentation : false |
| 92 | +=======retry : false |
| 93 | +=======powerManagement : false |
| 94 | +=======moreData : false |
| 95 | +=======wep : false |
| 96 | +=======order : false |
| 97 | +Wlan management frame |
| 98 | +=======duration id : 00 | 00 |
| 99 | +=======destinationAddr : FF | FF | FF | FF | FF | FF |
| 100 | +=======sourceAddr : 00 | 24 | D4 | 6B | 0C | 5D |
| 101 | +=======bssid : 00 | 24 | D4 | 6B | 0C | 5D |
| 102 | +=======sequenceControl : 00 | E5 |
| 103 | +=======frameBody : 60 | 01 | 25 | DE | 32 | 03 | 00 | 00 | 60 | 00 | 01 | 04 | 00 | 08 | 46 | 72 | 65 | 65 | 57 | 69 | 66 | 69 | 01 | 08 | 82 | 84 | 8B | 96 | 2C | 0C | 12 | 18 | 03 | 01 | 0C | 05 | 04 | 00 | 02 | 00 | 00 | 2A | 01 | 04 | 32 | 05 | 24 | 30 | 48 | 60 | 6C | 2D | 1A | 6C | 00 | 03 | FF | FF | FF | 00 | 01 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 01 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 3D | 16 | 0C | 00 | 13 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 7F | 08 | 00 | 00 | 00 | 00 | 00 | 00 | 00 | 40 | DD | 18 | 00 | 50 | F2 | 02 | 01 | 01 | 00 | 00 | 03 | A4 | 00 | 00 | 27 | A4 | 00 | 00 | 42 | 43 | 5E | 00 | 62 | 32 | 2F | 00 |
| 104 | +=======fcs : A3 | 26 | 13 | 07 |
| 105 | +=======MANAGEMENT BEACON FRAME |
| 106 | +==============timestamp : 00 | 00 | 03 | 32 | DE | 25 | 01 | 60 |
| 107 | +==============beaconInterval : 96 |
| 108 | +==============capability information : 04 | 01 |
| 109 | +=====================Dynamic Elements |
| 110 | +=====================element id : 0 |
| 111 | +============================SSID : FreeWifi |
| 112 | +=====================Dynamic Elements |
| 113 | +=====================element id : 1 |
| 114 | +============================data rates supported : 1000kbps,2000kbps,5500kbps,11000kbps,22000kbps,6000kbps,9000kbps,12000kbps, |
| 115 | +=====================Dynamic Elements |
| 116 | +=====================element id : 3 |
| 117 | +============================currentChannel : 12 |
| 118 | +============================frequency : -1 |
| 119 | +=====================Dynamic Elements |
| 120 | +=====================element id : 5 |
| 121 | +============================number of beacon frame before next DTIM : 0 |
| 122 | +============================number of beacon interval between 2 DTIM : 2 |
| 123 | +============================TIM bitmapControl : 0 |
| 124 | +============================TIM partialVirtualBitmap : 00 | |
| 125 | +=====================Dynamic Elements |
| 126 | +=====================element id : 42 |
| 127 | +============================isErpPresent : false |
| 128 | +============================useProtection : false |
| 129 | +============================isBarkerPreambleMode : true |
| 130 | +=====================Dynamic Elements |
| 131 | +=====================element id : 50 |
| 132 | +============================extended data rates supported : 18000kbps,24000kbps,36000kbps,48000kbps,54000kbps, |
| 133 | +=====================Dynamic Elements |
| 134 | +=====================element id : 45 |
| 135 | +============================support short 20Mhz : true |
| 136 | +============================support short 40Mhz : true |
| 137 | +============================channel width 20MHz supported : false |
| 138 | +============================channel width 40MHz supported : true |
| 139 | +============================AMPDU paramters : 3 |
| 140 | +============================MCS Supported : n°0-BPSK |
| 141 | +============================MCS Supported : n°1-QPSK |
| 142 | +============================MCS Supported : n°2-QPSK |
| 143 | +============================MCS Supported : n°3-16-QAM |
| 144 | +============================MCS Supported : n°4-16-QAM |
| 145 | +============================MCS Supported : n°5-64-QAM |
| 146 | +============================MCS Supported : n°6-64-QAM |
| 147 | +============================MCS Supported : n°7-64-QAM |
| 148 | +============================MCS Supported : n°8-BPSK |
| 149 | +============================MCS Supported : n°9-QPSK |
| 150 | +============================MCS Supported : n°10-QPSK |
| 151 | +============================MCS Supported : n°11-16-QAM |
| 152 | +============================MCS Supported : n°12-16-QAM |
| 153 | +============================MCS Supported : n°13-64-QAM |
| 154 | +============================MCS Supported : n°14-64-QAM |
| 155 | +============================MCS Supported : n°15-64-QAM |
| 156 | +============================MCS Supported : n°16-BPSK |
| 157 | +============================MCS Supported : n°17-QPSK |
| 158 | +============================MCS Supported : n°18-QPSK |
| 159 | +============================MCS Supported : n°19-16-QAM |
| 160 | +============================MCS Supported : n°20-16-QAM |
| 161 | +============================MCS Supported : n°21-64-QAM |
| 162 | +============================MCS Supported : n°22-64-QAM |
| 163 | +============================MCS Supported : n°23-64-QAM |
| 164 | +============================HT Extended capabilities : 00 | 00 |
| 165 | +============================Transmit beam forming capabilities : 00 | 00 | 00 | 00 |
| 166 | +============================ASEL capabilities : 0 |
| 167 | +`` |
| 168 | + |
| 169 | +Element id not parsed will be displayed at the beginning of the output like this : |
| 170 | +* Element id not decoded => 61 |
| 171 | + |
| 172 | +<hr/> |
| 173 | + |
| 174 | +* Project is JRE 1.7 compliant |
| 175 | +* You can build it with ant => build.xml |
| 176 | +* Development on Eclipse |
| 177 | +* Specification from http://www.radiotap.org |
0 commit comments