IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 系统运维 -> 基于openwrt的wifi 渗透 -> 正文阅读

[系统运维]基于openwrt的wifi 渗透

# 背景

使用路由器刷了 openwrt的固件。然后尝试破解wpa等wifi的密码

# 配置好网络之后,使用ssh连接路由器。

测试连通性

0 ping downloads.openwrt.org

root@OpenWrt:~# ping downloads.openwrt.org
PING downloads.openwrt.org (168.119.138.211): 56 data bytes
64 bytes from 168.119.138.211: seq=0 ttl=50 time=238.224 ms
64 bytes from 168.119.138.211: seq=1 ttl=50 time=234.064 ms
64 bytes from 168.119.138.211: seq=3 ttl=50 time=237.744 ms
root@OpenWrt:/# opkg update
Downloading https://downloads.openwrt.org/releases/21.02.1/targets/ramips/mt7620/packages/
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/21.02.

Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/base/Packa
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/luci/Packa
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/releases/21.02.

Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/packages/P
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/routing/Pa
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/telephony/
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/21.02.1/target
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/21.02.1/packag
 * opkg_download: Check your network settings and connectivity.

------------------------
修改配置/etc/opkg.conf 之前是报下面的错。
Failed to send request: Operation not permitted
*** Failed to download the package list from https://downloads.openwrt.org/relea          ses/21.02.1/packages/mipsel_24kc/telephony/Packages.gz

Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/21.0          2.1/packages/mipsel_24kc/telephony/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.


尝试很多次更新,尝试搜索问题,期间试过打开opkg配置文件,注释最后一句

/etc/opkg.conf?文件,都没解决,突然晚点试试,又可以了。

1马上opkg update 和 install aricrack-ng? screen?airmon-ng

//screen 支持后台运行窗口,可以后台抓包同时后台注入,然后后台破解密码

root@OpenWrt:/# opkg update
Downloading https://downloads.openwrt.org/releases/21.02.1/targets/ramips/mt7620/packages/
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/base/Packa
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/luci/Packa
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/packages/P
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/routing/Pa
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/telephony/
Updated list of available packages in /var/opkg-lists/openwrt_telephony
root@OpenWrt:/# opkg install aircrack-ng screen
Installing aircrack-ng (1.6-1) to root...
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/          packages/aircrack-ng_1.6-1_mipsel_24kc.ipk
Installing libnl-genl200 (3.5.0-1) to root...
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/          base/libnl-genl200_3.5.0-1_mipsel_24kc.ipk
Installing zlib (1.2.11-3) to root...
Downloading https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/          base/zlib_1.2.11-3_mipsel_24kc.ipk
Package screen (4.8.0-2) installed in root is up to date.
Configuring libnl-genl200.
Configuring zlib.
Configuring aircrack-ng.

查看一下我自己的网络情况(关键信息已***)

root@OpenWrt:/# ifconfig -a
br-lan    Link encap:Ethernet  HWaddr 00:0C:43:76:20:**
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:43ff:***:2080/64 Scope:Link
          inet6 addr: fd82:6e1b:68e2::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:134744 errors:0 dropped:0 overruns:0 frame:0
          TX packets:201387 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:16906566 (16.1 MiB)  TX bytes:211760728 (201.9 MiB)

eth0      Link encap:Ethernet  HWaddr 00:0C:43:76:20:**
          inet6 addr: fe80::20c:43ff:***:2080/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:781743 errors:0 dropped:0 overruns:0 frame:0
          TX packets:339947 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:422301082 (402.7 MiB)  TX bytes:231308516 (220.5 MiB)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr 00:0C:43:76:20:**
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:134745 errors:0 dropped:0 overruns:0 frame:0
          TX packets:201387 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:16906896 (16.1 MiB)  TX bytes:211760728 (201.9 MiB)

eth0.2    Link encap:Ethernet  HWaddr 00:0C:43:76:20:**
          inet addr:192.168.31.250  Bcast:192.168.31.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:43ff:***:2081/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:628901 errors:0 dropped:0 overruns:0 frame:0
          TX packets:138526 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:390228779 (372.1 MiB)  TX bytes:17925593 (17.0 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2763 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2763 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:306455 (299.2 KiB)  TX bytes:306455 (299.2 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:0C:43:76:20:**
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


? ?2 airmon-ng start wlan0

启动成功后,使用ifconfig /a 查看变化
? ?3?ifconfig -a

wlan0 -----> wlan0mon

? ?4?airodump-ng wlan0mon


? ?

5 新开一个putty 连接到openwrt路由上面。


6 airodump-ng --bssid 58:41:20:07:75:** -c 6 -w /tmp/wa wlan0mon

把信道6的wifi抓取,抓取到 /tmp/wa文件下面


? 10 ll /tmp/

root@OpenWrt:~# ll /tmp/
drwxrwxrwt   20 root     root           620 Jan  2 21:12 ./
drwxr-xr-x    1 root     root             0 Jan  1  1970 ../
drwx------    2 root     root            40 Jan  2 14:15 .uci/
-rw-r--r--    1 root     root             6 Jan  2 14:15 TZ
-rw-r--r--    1 root     root          1081 Jan  1  1970 board.json
-rw-r--r--    1 root     root            80 Jan  2 20:18 dhcp.leases
drwxr-xr-x    2 root     root            40 Jan  2 14:15 dnsmasq.d/
drwxr-xr-x    3 root     root            80 Jan  2 14:17 etc/
drwxr-xr-x    2 root     root            80 Jan  2 20:17 hosts/
drwxr-xr-x    3 root     root            60 Jan  2 14:15 lib/
drwxr-xr-x    2 root     root           380 Jan  2 21:12 lock/
drwxr-xr-x    2 root     root            80 Jan  2 14:15 log/
-rw-------    1 root     root            88 Jan  2 20:13 luci-indexcache.fg.52OGJa3fc3X.uyp5x51.lua
-rw-------    1 root     root          8223 Jan  2 20:13 luci-indexcache.z1WhauV2VgopPu7QvR3F4..json
drwxr-xr-x    2 root     root           260 Jan  2 20:13 luci-modulecache/
drwxr-xr-x    2 root     root           220 Jan  2 20:20 opkg-lists/
drwxr-xr-x    2 root     root            40 Jan  1  1970 overlay/
-rw-r--r--    1 root     root            47 Jan  2 14:17 resolv.conf
drwxr-xr-x    2 root     root            60 Jan  2 20:17 resolv.conf.d/
drwxr-xr-x    7 root     root           280 Jan  2 14:17 run/
drwxr-xr-x    3 root     root            60 Jan  2 20:25 screens/
drwxrwxrwt    2 root     root            40 Jan  1  1970 shm/
drwxr-xr-x    2 root     root            80 Jan  2 14:18 state/
drwxr-xr-x    2 root     root            80 Jan  1  1970 sysinfo/
drwxr-xr-x    2 root     root            40 Jan  2 14:15 tmp/
drwxr-xr-x    3 root     root            60 Jan  2 16:29 usr/
-rw-r--r--    1 root     root        842499 Jan  2 20:59 wa-01.cap
-rw-r--r--    1 root     root           474 Jan  2 20:59 wa-01.csv
-rw-r--r--    1 root     root           585 Jan  2 20:59 wa-01.kismet.csv
-rw-r--r--    1 root     root          2740 Jan  2 20:59 wa-01.kismet.netxml
-rw-r--r--    1 root     root        146088 Jan  2 20:59 wa-01.log.csv

我认为wa-01.cap就是抓到的包,但是如何破解, 等待更新。。。
? 12 恢复环境
?

root@OpenWrt:~# airmon-ng stop wlan0mon

PHY     Interface       Driver          Chipset

phy0    wlan0mon        rt2800_wmac     Not pci, usb, or sdio

                (mac80211 station mode vif enabled on [phy0]wlan0)

                (mac80211 monitor mode vif disabled for [phy0]wlan0mon)

root@OpenWrt:~# ifconfig -a

  系统运维 最新文章
配置小型公司网络WLAN基本业务(AC通过三层
如何在交付运维过程中建立风险底线意识,提
快速传输大文件,怎么通过网络传大文件给对
从游戏服务端角度分析移动同步(状态同步)
MySQL使用MyCat实现分库分表
如何用DWDM射频光纤技术实现200公里外的站点
国内顺畅下载k8s.gcr.io的镜像
自动化测试appium
ctfshow ssrf
Linux操作系统学习之实用指令(Centos7/8均
上一篇文章      下一篇文章      查看所有文章
加:2022-01-03 16:30:34  更:2022-01-03 16:32:02 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/16 6:25:18-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码