hashcat / hashcat-utils

Small utilities that are useful in advanced password cracking
MIT License
1.36k stars 355 forks source link

cap2hccapx bad qos manipulation #44

Closed jamazi closed 6 years ago

jamazi commented 6 years ago

Hello.

cap2hccapx does not manipulate qos packets properly if it contains not only 3 address but 4 address. I corrected this by changing this portion of code (line=804) :

else if ((frame_control & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA)
  {
    // process header: ieee80211

    //int set = 0;

    //if (frame_control & IEEE80211_FCTL_TODS)   set++;
    //if (frame_control & IEEE80211_FCTL_FROMDS) set++;

    //if (set != 1) return;

    // find offset to llc/snap header

    int llc_offset;

    if ((frame_control & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_QOS_DATA)
    {
      llc_offset = sizeof (ieee80211_qos_hdr_t);
      u16 tmp = IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS;
      if ((frame_control & tmp) == tmp) llc_offset += 6;
    }
    else
    {
      llc_offset = sizeof (ieee80211_hdr_3addr_t);
    }

    // process header: the llc/snap header

tested and works properly. Thanks

jsteube commented 6 years ago

Please send in a PR

jamazi commented 6 years ago

Done thank you :+1: