{"id":3066,"date":"2024-03-23T03:49:52","date_gmt":"2024-03-22T19:49:52","guid":{"rendered":"http:\/\/www.ccwifi.cc\/blogs\/?p=3066"},"modified":"2024-03-23T03:49:52","modified_gmt":"2024-03-22T19:49:52","slug":"wpa3dragonfly%e8%9c%bb%e8%9c%93%e5%af%86%e9%92%a56631","status":"publish","type":"post","link":"https:\/\/www.ccwifi.cc\/blogs\/2024\/03\/23\/wpa3dragonfly%e8%9c%bb%e8%9c%93%e5%af%86%e9%92%a56631\/","title":{"rendered":"WPA3 Dragonfly(\u873b\u8713)\u5bc6\u94a5\u4ea4\u6362\u7b97\u6cd5"},"content":{"rendered":"<div>\n<p>\u5728\u7ebfwifi\u8dd1\u5305 \u91d1\u521a\u5305\u8dd1\u5305 cap\u8dd1\u5305 hccapx ewsa\u5728\u7ebf \u5c31\u6765 <strong><a href=\"https:\/\/ccwifi.cc\" target=\"_blank\" rel=\"noopener\">\u63e1\u624b\u5305\u8dd1\u5305<\/a><\/strong><\/p>\n<p>\u5404\u4f4d\u597d \u53c8\u89c1\u9762\u4e86 \u6211\u662f\u66f9\u64cd \u4eca\u5929\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u7bc7\u65b0\u7684\u6559\u7a0b<\/p>\n<p>\u5e0c\u671b\u5404\u4f4d\u7ec6\u5fc3\u5b66\u4e60 \u4f4e\u8c03\u7528\u7f51<\/p>\n<\/div>\n<p><img decoding=\"async\" src=\"http:\/\/www.ccwifi.cc\/blogs\/wp-content\/uploads\/2024\/03\/1711136991700_0.jpg\" alt=\"\u6293\u53d6\u63e1\u624b\u5305\u7834\u89e3\"><\/p>\n<p>\u80cc\u666f\uff1a\u57282018\u5e741\u67088\u65e5\uff0c\u7f8e\u56fd\u62c9\u65af\u7ef4\u52a0\u65af\u7684\u56fd\u9645\u6d88\u8d39\u7535\u5b50\u5c55(CES)\u4e0a\uff0cWi-Fi\u8054\u76df\u53d1\u5e03\u4e86\u6700\u65b0\u7684WPA3\u52a0\u5bc6\u534f\u8bae\uff0c\u4f5c\u4e3aWPA2\u6280\u672f\u7684\u540e\u7eed\u7248\u672c\u3002\u5e76\u57282018\u5e746\u670826\u65e5\uff0cWiFi\u8054\u76df\u5ba3\u5e03WPA3\u534f\u8bae\u5df2\u6700\u7ec8\u5b8c\u6210\u3002WPA3\u4e2d\u6700\u5927\u7684\u6539\u8fdb\u662f\u5c06\u539f\u6765\u7684\u56db\u6b21\u63e1\u624b\u534f\u8bae\u6362\u6210\u4e86\u65b0\u7684Dragonfly Key Exchange\u534f\u8bae\uff0c\u8be5\u534f\u8bae\u5c06\u8ba4\u8bc1\u548c\u79d8\u94a5\u4ea4\u6362\u5408\u5e76\u4e3a\u4e00\u4e2a\u534f\u8bae\u3002WPA3\u53f7\u79f0\u53ef\u4ee5\u89e3\u51b3WPA2\u4e2d\u672a\u89e3\u51b3\u7684\u51e0\u4e2a\u5b89\u5168\u95ee\u9898\uff0c\u5982\u79bb\u7ebf\u5bc6\u7801\u7834\u89e3\u3001\u524d\u5411\u5b89\u5168\u548c\u5176\u4ed6\u5df2\u77e5\u653b\u51fb\u65b9\u6cd5\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.ccwifi.cc\/blogs\/wp-content\/uploads\/2024\/03\/1711136991700_1.jpg\" alt=\"\u6293\u53d6\u63e1\u624b\u5305\u7834\u89e3\"><\/p>\n<p>\u6839\u636eWi-Fi\u8054\u76df\u5b98\u65b9\u53d1\u5e03\u7684\u6587\u6863\uff0cWPA3\u5206\u4e3aWPA3\u4e2a\u4eba\u7ea7\u548cWPA3\u4f01\u4e1a\u7ea7\u4e24\u79cd\u6807\u51c6\u3002WPA3\u4f01\u4e1a\u7ea7\u8ba4\u8bc1\u4e0eWPA2\u76f8\u6bd4\u5dee\u522b\u4e0d\u5927\uff0c\u4ec5\u5c06\u5bc6\u94a5\u957f\u5ea6\u589e\u52a0\u5230\u4e86192\u4f4d\u3002\u800cWPA3\u4e2a\u4eba\u7ea7\u76f8\u5bf9\u4e8eWPA2\u4e2a\u4eba\u7ea7\u7684\u6539\u8fdb\u4e3b\u8981\u4f53\u73b0\u5728\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a\u66f4\u5f3a\u7684\u57fa\u4e8e\u5bc6\u7801\u7684\u8ba4\u8bc1\u5b89\u5168\u3001\u4f7f\u7528\u7b49\u91cf\u540c\u6b65\u8ba4\u8bc1\u7684\u873b\u8713\u534f\u8bae\uff0c\u4ee5\u53ca\u5bc6\u94a5\u957f\u5ea6\u6269\u5c55\u5230192\u4f4d\u3002<\/p>\n<pre><code>#!\/usr\/bin\/env python\nimport hmac\nfrom hashlib import pbkdf2_hmac,sha1,md5\ndef PRF(key,A,B):\n    nByte = 48\n    i = 0\n    R = ''\n    while ( i &lt;= ((nByte*8 + 159)\/160)):\n        hmacsha1 = hmac.new(key,A+\"x00\" + B + chr(i),sha1)\n        R += hmacsha1.digest()\n        i += 1\n    return R[0:nByte]\ndef MakeAB(aNonce,sNonce,apMac,cliMac):\n    A = \"Pairwise key expansion\"\n    B = min(apMac,cliMac) + max(apMac,cliMac) + min(aNonce, sNonce) + max(aNonce, sNonce)\n    return (A,B)\ndef MakeMIC(pwd,ssid,A,B,data,wpa = False):\n    pmk = pbkdf2_hmac('sha1',pwd,ssid,4096,32)\n    ptk = PRF(pmk,A,B)\n    hmacFunc = md5 if wpa else sha1\n    mics = [hmac.new(ptk[0:16],i,hmacFunc).digest() for i in data]\n    return (mics,ptk,pmk)\ndef calcKey(essid,psk,apMac,cliMac,data0,data1,data2,data3):\n    ssid = essid\n    #print ssid\n    aNonce = data0[17:17+32]\n    #print aNonce.encode('hex')\n    sNonce = data1[17:17+32]\n    #print sNonce.encode('hex')\n    apMac = apMac.replace(':','').decode(\"hex\")\n    cliMac = cliMac.replace(':','').decode(\"hex\")\n    mic1 = data1[81:81+16]\n    data1 = data1.replace(mic1,'x00'*16)\n    mic2 = data2[81:81+16]\n    data2 = data2.replace(mic2,'x00'*16)\n    mic3 = data3[81:81+16]\n    data3 = data3.replace(mic3,'x00'*16)\n    A,B = MakeAB(aNonce,sNonce,apMac,cliMac)\n    mics,ptk,pmk = MakeMIC(psk,ssid,A,B,[data1,data2,data3])\n    print \"pmk:\",pmk.encode('hex')\n    print \"ptk:\",ptk.encode('hex'),\"len:\",len(ptk)*8\n    print \"desired mic1:\",mic1.encode('hex')\n    print \"acture mic1:\",mics[0].encode('hex')[:-8]\n    if (mic1==mics[0][:-4]):\n        print \"MIC1 MATCHED\"\n    print \"desired mic2:\",mic2.encode('hex')\n    print \"acture mic2:\",mics[1].encode('hex')[:-8]\n    if (mic2==mics[1][:-4]):\n        print \"MIC2 MATCHED\"\n    print \"desired mic3:\",mic3.encode('hex')\n    print \"acture mic3:\",mics[2].encode('hex')[:-8]\n    if (mic3==mics[2][:-4]):\n        print \"MIC3 MATCHED\"\n    return ptk\n<\/code><\/pre>\n<p>\u5728WPA2\u4e2d\uff0c\u8bbe\u5907\u5165\u7f51\u8ba4\u8bc1\u7684\u8fc7\u7a0b\u9700\u8981\u8fdb\u884c\u591a\u6b21\u4ea4\u4e92\uff0c\u5305\u62ecProbe Request\u3001Probe Response\u3001Authentication Request\u3001Authentication Response\u3001Association Request\u548cAssociation Response\u3002\u800c\u5728WPA3\u4e2d\uff0c\u524d\u4e09\u6b21\u4ea4\u4e92\u4e0eWPA2\u76f8\u540c\uff0c\u4f46\u5bc6\u94a5\u4ea4\u6362\u8fc7\u7a0b\u6709\u6240\u6539\u53d8\u3002\u5728WPA2\u4e2d\uff0c\u5bc6\u94a5\u4ea4\u6362\u8fc7\u7a0b\u9700\u8981\u901a\u8fc7\u8ba1\u7b97PTK\u6765\u751f\u6210\u5bc6\u94a5\uff0c\u800cPTK\u7684\u8ba1\u7b97\u4f9d\u8d56\u4e8ePSK\uff0c\u8fd9\u4f7f\u5f97WPA2\u65e0\u6cd5\u63d0\u4f9b\u524d\u5411\u5b89\u5168\u3002\u7136\u800c\uff0c\u5728WPA3\u4e2d\uff0c\u4f7f\u7528Dragonfly Key Exchange\u7b97\u6cd5\uff0c\u901a\u8fc7\u751f\u6210P\u548cR\u6765\u8ba1\u7b97\u5bc6\u94a5\uff0c\u4ece\u800c\u5b9e\u73b0\u4e86\u524d\u5411\u5b89\u5168\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.ccwifi.cc\/blogs\/wp-content\/uploads\/2024\/03\/1711136991700_2.jpg\" alt=\"\u6293\u53d6\u63e1\u624b\u5305\u7834\u89e3\"><\/p>\n<p>\u5728WPA3\u4e2d\uff0c\u873b\u8713\u5bc6\u94a5\u4ea4\u6362\u7b97\u6cd5\u7684\u6838\u5fc3\u662f\u901a\u8fc7PSK\u751f\u6210P\uff0c\u5e76\u901a\u8fc7\u8ba1\u7b97\u751f\u6210\u5bc6\u94a5\u3002\u8be5\u7b97\u6cd5\u4e0eDiffie-Hellman\u7b97\u6cd5\u76f8\u4f3c\uff0c\u4f46\u5728\u8ba1\u7b97\u8fc7\u7a0b\u4e2d\u5f15\u5165\u4e86\u79bb\u6563\u5bf9\u6570\u95ee\u9898\uff0c\u4ece\u800c\u4fdd\u8bc1\u4e86\u524d\u5411\u5b89\u5168\u6027\u3002\u7136\u800c\uff0c\u873b\u8713\u7b97\u6cd5\u5e76\u4e0d\u80fd\u5b8c\u5168\u9632\u6b62\u4e2d\u95f4\u4eba\u653b\u51fb\uff0c\u4e14\u5bf9\u4e8e\u79bb\u7ebf\u5b57\u5178\u653b\u51fb\u4e5f\u6ca1\u6709\u4e25\u683c\u7684\u8bc1\u660e\u3002\u867d\u7136WPA3\u5728\u5b89\u5168\u6027\u65b9\u9762\u6709\u6240\u63d0\u5347\uff0c\u4f46\u4ecd\u9700\u6ce8\u610f\u5bc6\u7801\u7684\u9009\u62e9\u548c\u7f51\u7edc\u73af\u5883\u7684\u5b89\u5168\u6027\u3002<\/p>\n<p><!-- \u6587\u7ae0\u6765\u6e90:https:\/\/www.freebuf.com\/articles\/web\/187245.html --><\/p>\n<p>\u603b\u7ed3\u6765\u8bf4\uff0cWPA3\u7684\u873b\u8713\u5bc6\u94a5\u4ea4\u6362\u7b97\u6cd5\u5728\u63d0\u4f9b\u524d\u5411\u5b89\u5168\u6027\u65b9\u9762\u5177\u6709\u4f18\u52bf\uff0c\u4f46\u4ecd\u5b58\u5728\u4e2d\u95f4\u4eba\u653b\u51fb\u548c\u79bb\u7ebf\u5b57\u5178\u653b\u51fb\u7684\u98ce\u9669\u3002\u5bf9\u4e8eWPA3\u7684\u5b9e\u9645\u5e94\u7528\u548c\u5b89\u5168\u6027\u7ec6\u8282\uff0c\u8fd8\u9700\u8981\u8fdb\u4e00\u6b65\u7684\u5de5\u7a0b\u5b9e\u8df5\u548c\u7814\u7a76\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WPA3 Dragonfly(\u873b\u8713)\u5bc6\u94a5\u4ea4\u6362\u7b97\u6cd5\u80cc\u666f\u57282018\u5e741\u67088\u65e5\u7f8e\u56fd\u62c9\u65af\u7ef4\u52a0\u65af\u7684\u56fd\u9645\u6d88\u8d39\u7535\u5b50\u5c55(CES)\u4e0a\uff0cWi-Fi\u8054\u76df\u53d1\u5e03\u4e86\u6700\u65b0\u7684WPA3\u52a0\u5bc6\u534f\u8bae\uff0c\u4f5c\u4e3aWPA2\u6280\u672f\u7684\u7684\u540e\u7eed\u7248\u672c\uff0c\u5e76\u57282018\u5e746\u670826\u65e5<\/p>\n","protected":false},"author":1,"featured_media":3067,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-3066","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/posts\/3066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/comments?post=3066"}],"version-history":[{"count":0,"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/posts\/3066\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/media\/3067"}],"wp:attachment":[{"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/media?parent=3066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/categories?post=3066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/tags?post=3066"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.ccwifi.cc\/blogs\/wp-json\/wp\/v2\/topic?post=3066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}