找到你的 ISP 路由器凭据
过去几年里,我把所有不写新文章的时间都花在了搭建 homelab 上。这包括弄了一台新的小型服务器用来跑 home-assistant、一个很酷的接入点、一个网络交换机,当然还有我自己的路由器。我还不知怎么地最终搞出了一个 100TB 的 Plex 收藏库,现在就放在一个数据中心里,为此砸进去了几千美元买完全没必要的硬件。这些我本来都不必做,但一旦你掉进这个兔子洞,就再也回不去了。
我的配置一直运行得很好,直到我不得不搬到新公寓,才发现我当时的 ISP 无法在那里保证千兆速度。我从千兆速度被降级到了区区 100mbps,那是我旧住处速度的十分之一!你可以争辩说我不需要千兆,但……我的意思是,我显然需要千兆。我怎么可能用区区 100 mbit/s 的网络反复运行 docker pull xetera/abandoned-project 呢?
我开始四处寻找可以换过去的新 ISP,当我找到一家告诉我我的楼支持光纤的 ISP 时,我学到了关于“光纤互联网”对 ISP 来说意味着什么的重要一课。围绕光纤有着令人难以置信的营销炒作,就好像顾客会在意他们的线缆是用什么材料做的一样。每个社区都在升级到光纤连接,这些 ISP 还借此大谈特谈惊人的技术进步。但他们不会告诉你、或者会很不情愿地告诉你的是,他们花哨的新光纤仅限于非对称 VDSL 速度。下行 100 mb/s,上行 10 mb/s。所有这些公司似乎都找到了一种方法,把政府补贴和一项长期的省钱投资——为新客户铺设光纤而不是铜线——变成了大多数人甚至都不理解的炒作。我一开始当然也不理解。
经过进一步挖掘,我发现一家承诺千兆速度的 ISP 的传单一直挂在我公寓入口处,就在我上网搜寻的整个期间,上面还附有负责光纤的经理的电话号码。那一刻,我不知怎么地仅凭意志力就立刻克服了千禧一代对打电话的恐惧,给那家伙打了电话。他说他可以保证 500mbps 的速度,但不能更高,因为我的公寓是光纤到楼(FTTB),这意味着从地下室的 ONT 到我家可能需要一段很长的以太网线,从而降低最高速度。我不确定在那之后我是怎么回应他的,和一个有技术知识的人交谈,而不是被随机抛来一堆流行词,让我如坠云雾。到了第二天,那家伙和他的团队就已经过来给我接好网络了。一切看起来都很棒。
等我的新网络能用了,我问这位新的“光纤互联网总监”,我怎样才能拿到路由器的 PPPoE 密码,好把它换成我自己的路由器,就像我之前那家 ISP 那样,在他们的 Android 应用上点个按钮就行。他的回答令人崩溃。“哦我不知道,他们甚至都不告诉我我自己路由器的密码。你要是搞明白怎么找到它了,告诉我一声。”
这真的吓到我了,因为我完全不知道这到底有没有可能找到。但经过一番挖掘和实验,我当天晚些时候就搞明白了。
光纤互联网总监先生,如果你正在读这篇文章,方法如下。
更换你的路由器
如果你足够幸运,你的 ISP 用的是 DOCSIS,那你很可能只需把 ISP 调制解调器设为桥接模式,然后在另一端接上你自己的路由器,一切就能正常工作。不幸的是,我的情况并非如此。
文章标题:Finding your ISP router's credentials
正文: 另外,你挖掘那个密码的第一个选择,就是看看路由器是否在它的 Web UI 里直接展示给你。我所熟悉的很多 ISP 都会在路由器上搭载定制固件,出于审查原因禁用自定义 DNS 配置之类的选项。而那些没有搭载定制固件的,通常也为它提供一个只写字段,不会把明文密码发送到 UI。所以我只是顺带提一下这个选项。它大概率不会奏效。
你可以尝试入侵路由器,利用某种漏洞进入它及其配置,但老实说,那听起来工作量很大。许多 ISP 路由器都有一个可通过 TR-069 协议使用的管理接口,但以我的经验,即使你获得了访问权限,也只能从中拿到用户名,拿不到密码。
幸运的是,还有好得多的第三个选项,那就是对路由器进行 MITM,找出它那些 juicy 的秘密。为此,你不是把自己拥有的设备连接到路由器,而是把路由器连接到你控制的设备。但要走到那一步,你首先需要熟悉让路由器上网所用的各种协议。
PPPoE
使用光纤时,ONT 负责对到 ISP 基础设施的物理链路进行认证。尤其是如果你生活在第三世界国家,你的 ISP 会在其之上使用一种名为 Point-to-Point over Ethernet(PPPoE)的古老协议来进行会话认证。
当你的路由器开机时,它会广播一个数据包,以发现另一端是否存在可供其进行认证的 PPPoE 服务器。这种认证使用用户名和密码进行,但 ISP 通常还会考虑设备的 MAC 地址,如果请求来自他们没给你的设备,就不会授权。几乎总是还会涉及一个带有特定配置的 VLAN。例如,我的就设置了 VLAN 标签为 0,这甚至不在有效 VLAN ID 的范围内。
礼貌地索要密码
在 PPPoE 上建立会话之后,根据服务器要求什么,路由器有两种方式对它所连接的对象进行认证。一种是 CHAP,客户端和服务器之间进行 3 次握手来求解一个挑战,类似于你对现代登录方式的预期。相比之下,还有 PAP,你的设备本质上就是把自己的所有秘密对着虚空大喊,并希望没人在听。类似于公元前 1200 年两个穴居人之间的争吵(大约也是 PPPoE 最初被创造出来的年代)。这就是我们将用来找出密码的方式。不过别搞混了,这是一个古老的协议,这意味着 CHAP 也好不到 PAP 哪里去。是的,挑战包含一个 salt,让彩虹表无法使用,但它用的是 MD5(有时是 DES)!即使你的路由器使用 CHAP,密码也很容易被现代硬件破解。
我其实并不认为后者一定危险,尽管它显然不安全。你需要对路由器有物理访问权限才能造成任何破坏,而且据我所知,并没有多少记录在案的案例表明客户设备通过这条途径被劫持。这让我更加愤怒:ISP 说出于安全目的不能给你那个密码。扯淡。
让我们把路由器连接到你所运行的计算机上。需要注意的一件重要事情是,你必须在另一端运行一个 PPPoE 服务器,才能到达你的路由器准备好登录并暴露其凭据的那一步。否则你只会看到路由器在寻找服务器的数据包,仅此而已。如果你做不到这一点,请读到结尾,那里有一个能为你完成所有这些的自动化工具。
我已经有一台运行 pfsense 的外部路由器,所以我把 ISP 路由器连接到了我 pfsense 机器上的 igc3 接口。如果你也是 pfsense 用户,你可以通过前往

在路由器启动之前,我们希望已经用 wireshark 在该接口上抓取所有网络通信。假设你已经可以通过 ssh 访问你的机器,运行以下命令即可将 tcpdump 的输出通过管道传给 wireshark,从而一窥底层情况。
wireshark -k -i <(ssh [email protected] tcpdump -i igc3 -U -w -)
我个人把家庭子网设为 10.0.0.0/8,因为我很厉害。如果你以前没做过这类事情,或者不知道子网是什么,那你大概率默认使用的是 192.168.1.1。
给路由器通电并稍等它启动后,我们应该开始看到路由器发送的 PADI 数据包,用于发起 PPPoE 握手。我们还没有在另一端搭建 PPPoE 服务器,所以这些数据包会石沉大海、得不到任何响应。大多数路由器都被设置为会重试发现过程,以避免陷入无所事事的状态。在我的情况下,可以看到它每 30 秒重试一次。

一次典型的 PPPoE 会话流程大致如下:
- PADI 你的路由器在其所连接的网络中广播,看看是否存在服务器。
- PADO 服务器对该广播的响应。这基本上就是路由器 ping 的 pong,其中包含额外信息,比如服务器名称,以及用于跟踪会话的会话 cookie。
- PADR 你的路由器发送的请求,使用上一步收到的现有会话建立连接。
- PADS 服务器对 PADR 数据包的确认。此步骤之后,你的服务器就可以开始发送 PPP 配置数据包,以协商上网所使用的设置。
- PADT 终止数据包。我曾见过我的某台路由器在发送 PADI 数据包之前先发送这个,可能是为了确保任何可能存在的会话都被丢弃?服务器也可以出于任何原因想让你下线时发送它。
以下是路由器与 PPPoE 服务器之间一次完整的交互式 wireshark 交换过程。
| Time | Source | Destination | Protocol | Info |
|---|---|---|---|---|
| 0.000000000 | TPLink_04:cf:02 | Ericsson_91:a9:ba | PPPoED | Active Discovery Terminate (PADT) |
| Frame 1 , 60 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:22.173280000 +03 UTC Arrival Time: Aug 4, 2024 01:02:22.173280000 UTC Frame number: 1 Frame Length: 60 bytes ( 480 bits) Capture Length: 60 bytes ( 480 bits) Ethernet II, Src: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Dst: Ericsson_91:a9:ba ( 34:6e:9d:91:a9:ba ) Destination: Ericsson_91:a9:ba ( 34:6e:9d:91:a9:ba ) Source: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Discovery 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Active Discovery Terminate (PADT) ( 0xa7 ) Session ID: 0x000a Payload Length: 0 PPPoE Tags | ||||
| 0.000392000 | TPLink_04:cf:02 | Broadcast | PPPoED | Active Discovery Initiation (PADI) |
| Frame 2 , 60 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:22.173672000 +03 UTC Arrival Time: Aug 4, 2024 01:02:22.173672000 UTC Frame number: 2 Frame Length: 60 bytes ( 480 bits) Capture Length: 60 bytes ( 480 bits) Ethernet II, Src: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Dst: Broadcast ( ff:ff:ff:ff:ff:ff ) Destination: Broadcast ( ff:ff:ff:ff:ff:ff ) Source: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Discovery 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Active Discovery Initiation (PADI) ( 0x09 ) Session ID: 0x0000 Payload Length: 12 PPPoE Tags Host-Uniq: 1a:12:00:00 | ||||
| 0.000590000 | SBluetech_11:e9:df | TPLink_04:cf:02 | PPPoED | Active Discovery Offer (PADO) AC-Name='pfSense.home.arpa' |
| Frame 3 , 74 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:22.173870000 +03 UTC Arrival Time: Aug 4, 2024 01:02:22.173870000 UTC Frame number: 3 Frame Length: 74 bytes ( 592 bits) Capture Length: 74 bytes ( 592 bits) Ethernet II, Src: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Dst: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Destination: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Source: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Discovery 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Active Discovery Offer (PADO) ( 0x07 ) Session ID: 0x0000 Payload Length: 50 PPPoE Tags AC-Name: pfSense.home.arpa Service-Name: * Host-Uniq: 1a:12:00:00 AC-Cookie: 00:68:6f:60:00:f8:ff:ff | ||||
| 0.000994000 | TPLink_04:cf:02 | SBluetech_11:e9:df | PPPoED | Active Discovery Request (PADR) |
| Frame 4 , 60 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:22.174274000 +03 UTC Arrival Time: Aug 4, 2024 01:02:22.174274000 UTC Frame number: 4 Frame Length: 60 bytes ( 480 bits) Capture Length: 60 bytes ( 480 bits) Ethernet II, Src: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Dst: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Destination: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Source: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID:
文章标题:找到你的 ISP 路由器的凭据
正文: 35 PPP-over-Ethernet Discovery 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Active Discovery Request (PADR) ( 0x19 ) Session ID: 0x0000 Payload Length: 24 PPPoE Tags Host-Uniq: 1a:12:00:00 AC-Cookie: 00:68:6f:60:00:f8:ff:ff | | | | |
| 0.001034000 | SBluetech_11:e9:df | TPLink_04:cf:02 | PPPoED | Active Discovery Session-confirmation (PADS) AC-Name='pfSense.home.arpa' |
|---|---|---|---|---|
| Frame 5 , 69 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:22.174314000 +03 UTC Arrival Time: Aug 4, 2024 01:02:22.174314000 UTC Frame number: 5 Frame Length: 69 bytes ( 552 bits) Capture Length: 69 bytes ( 552 bits) Ethernet II, Src: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Dst: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Destination: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Source: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Discovery 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Active Discovery Session-confirmation (PADS) ( 0x65 ) Session ID: 0x0007 Payload Length: 45 PPPoE Tags AC-Name: pfSense.home.arpa Host-Uniq: 1a:12:00:00 AC-Cookie: 00:68:6f:60:00:f8:ff:ff | ||||
| 0.001112000 | SBluetech_11:e9:df | TPLink_04:cf:02 | PPP LCP | Configuration Request |
| Frame 6 , 46 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:22.174392000 +03 UTC Arrival Time: Aug 4, 2024 01:02:22.174392000 UTC Frame number: 6 Frame Length: 46 bytes ( 368 bits) Capture Length: 46 bytes ( 368 bits) Ethernet II, Src: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Dst: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Destination: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Source: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Session 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Session Data (0x00) Session ID: 0x0007 Point-to-Point Protocol Type: Link Control Protocol ( 0xc021 ) PPP Link Control Protocol Code: Configuration Request ( 1 ) Identifier: 1 ( 1 ) Length: 20 Options: (16 bytes), Protocol Field Compression, Maximum Receive Unit, Magic Number, Authentication Protocol Protocol Field Compression Type: Protocol Field Compression ( 7 ) Length: 2 Maximum Receive Unit: 1492 Type: Maximum Receive Units ( 1 ) Length: 4 Maximum Receive Unit: 1492 Magic Number: 0x3b67d5b0 Type: Magic Number ( 5 ) Length: 6 Magic Number: 0x3b67d5b0 Authentication Protocol: Password Authentication Protocol 0xc023 Type: Authentication Protocol ( 3 ) Length: 4 Authentication Protocol: Password Authentication Protocol 0xc023 | ||||
| 0.004942000 | TPLink_04:cf:02 | SBluetech_11:e9:df | PPP LCP | Configuration Request |
| Frame 7 , 60 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:22.178222000 +03 UTC Arrival Time: Aug 4, 2024 01:02:22.178222000 UTC Frame number: 7 Frame Length: 60 bytes ( 480 bits) Capture Length: 60 bytes ( 480 bits) Ethernet II, Src: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Dst: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Destination: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Source: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Session 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Session Data (0x00) Session ID: 0x0007 Point-to-Point Protocol Type: Link Control Protocol ( 0xc021 ) PPP Link Cont
Protocol Code: Configuration Request ( 1 ) Identifier: 1 ( 1 ) Length: 14 Options: (10 bytes), Maximum Receive Unit, Magic Number Maximum Receive Unit: 1492 Type: Maximum Receive Units ( 1 ) Length: 4 Maximum Receive Unit: 1492 Magic Number: 0x1b983c97 Type: Magic Number ( 5 ) Length: 6 Magic Number: 0x1b983c97 | | | | |
| 0.005074000 | SBluetech_11:e9:df | TPLink_04:cf:02 | PPP LCP | Configuration Ack |
|---|---|---|---|---|
| Frame 8 , 40 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:22.178354000 +03 UTC Arrival Time: Aug 4, 2024 01:02:22.178354000 UTC Frame number: 8 Frame Length: 40 bytes ( 320 bits) Capture Length: 40 bytes ( 320 bits) Ethernet II, Src: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Dst: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Destination: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Source: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Session 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Session Data (0x00) Session ID: 0x0007 Point-to-Point Protocol Type: Link Control Protocol ( 0xc021 ) PPP Link Control Protocol Code: Configuration Ack ( 2 ) Identifier: 1 ( 1 ) Length: 14 Options: (10 bytes), Maximum Receive Unit, Magic Number Maximum Receive Unit: 1492 Type: Maximum Receive Units ( 1 ) Length: 4 Maximum Receive Unit: 1492 Magic Number: 0x1b983c97 Type: Magic Number ( 5 ) Length: 6 Magic Number: 0x1b983c97 | ||||
| 2.001803000 | SBluetech_11:e9:df | TPLink_04:cf:02 | PPP LCP | Configuration Request |
| Frame 9 , 46 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:24.175083000 +03 UTC Arrival Time: Aug 4, 2024 01:02:24.175083000 UTC Frame number: 9 Frame Length: 46 bytes ( 368 bits) Capture Length: 46 bytes ( 368 bits) Ethernet II, Src: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Dst: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Destination: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Source: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Session 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Session Data (0x00) Session ID: 0x0007 Point-to-Point Protocol Type: Link Control Protocol ( 0xc021 ) PPP Link Control Protocol Code: Configuration Request ( 1 ) Identifier: 2 ( 2 ) Length: 20 Options: (16 bytes), Protocol Field Compression, Maximum Receive Unit, Magic Number, Authentication Protocol Protocol Field Compression Type: Protocol Field Compression ( 7 ) Length: 2 Maximum Receive Unit: 1492 Type: Maximum Receive Units ( 1 ) Length: 4 Maximum Receive Unit: 1492 Magic Number: 0x3b67d5b0 Type: Magic Number ( 5 ) Length: 6 Magic Number: 0x3b67d5b0 Authentication Protocol: Password Authentication Protocol 0xc023 Type: Authentication Protocol ( 3 ) Length: 4 Authentication Protocol: Password Authentication Protocol 0xc023 | ||||
| 2.002651000 | TPLink_04:cf:02 | SBluetech_11:e9:df | PPP LCP | Configuration Reject |
| Frame 10 , 60 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:24.175931000 +03 UTC Arrival Time: Aug 4, 2024 01:02:24.175931000 UTC Frame number: 10 Frame Length: 60 bytes ( 480 bits) Capture Length: 60 bytes ( 480 bits) Ethernet II, Src: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Dst: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Destination: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Source: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effo
rt(默认)0 ... 0 .... .... .... = DEI:不符合条件 .... 0000 0010 0011 = ID:35 PPP-over-Ethernet Session 0001 .... = Version:1 .... 0001 = Type:1 Code:Session Data(0x00)Session ID:0x0007 Point-to-Point Protocol Type:Link Control Protocol( 0xc021 )PPP Link Control Protocol Code:Configuration Reject( 4 )Identifier:2( 2 )Length:6 Options:(2 字节),Protocol Field Compression Protocol Field Compression Type:Protocol Field Compression( 7 )Length:2 | | | | |
| 2.002739000 | SBluetech_11:e9:df | TPLink_04:cf:02 | PPP LCP | Configuration Request |
|---|---|---|---|---|
| Frame 11,接口 /dev/fd/14 上线路长度 44 字节 Interface id:0( /dev/fd/14 )Encapsulation type:Ethernet(1)Arrival Time:Aug 4, 2024 04:02:24.176019000 +03 UTC Arrival Time:Aug 4, 2024 01:02:24.176019000 UTC Frame number:11 Frame Length:44 字节( 352 位)Capture Length:44 字节( 352 位)Ethernet II,Src:SBluetech_11:e9:df( 60:be:b4:11:e9:df )Dst:TPLink_04:cf:02( 78:8c:b5:04:cf:02 )Destination:TPLink_04:cf:02( 78:8c:b5:04:cf:02 )Source:SBluetech_11:e9:df( 60:be:b4:11:e9:df )Type:802.1Q Virtual LAN( 0x8100 )802.1Q Virtual LAN,PRI:0,DEI:0,ID:35 000 . .... .... .... = Priority:Best Effort(默认)0 ... 0 .... .... .... = DEI:不符合条件 .... 0000 0010 0011 = ID:35 PPP-over-Ethernet Session 0001 .... = Version:1 .... 0001 = Type:1 Code:Session Data(0x00)Session ID:0x0007 Point-to-Point Protocol Type:Link Control Protocol( 0xc021 )PPP Link Control Protocol Code:Configuration Request( 1 )Identifier:3( 3 )Length:18 Options:(14 字节),Maximum Receive Unit,Magic Number,Authentication Protocol Maximum Receive Unit:1492 Type:Maximum Receive Units( 1 )Length:4 Maximum Receive Unit:1492 Magic Number:0x3b67d5b0 Type:Magic Number( 5 )Length:6 Magic Number:0x3b67d5b0 Authentication Protocol:Password Authentication Protocol 0xc023 Type:Authentication Protocol( 3 )Length:4 Authentication Protocol:Password Authentication Protocol 0xc023 | ||||
| 2.003365000 | TPLink_04:cf:02 | SBluetech_11:e9:df | PPP LCP | Configuration Ack |
| Frame 12,接口 /dev/fd/14 上线路长度 60 字节 Interface id:0( /dev/fd/14 )Encapsulation type:Ethernet(1)Arrival Time:Aug 4, 2024 04:02:24.176645000 +03 UTC Arrival Time:Aug 4, 2024 01:02:24.176645000 UTC Frame number:12 Frame Length:60 字节( 480 位)Capture Length:60 字节( 480 位)Ethernet II,Src:TPLink_04:cf:02( 78:8c:b5:04:cf:02 )Dst:SBluetech_11:e9:df( 60:be:b4:11:e9:df )Destination:SBluetech_11:e9:df( 60:be:b4:11:e9:df )Source:TPLink_04:cf:02( 78:8c:b5:04:cf:02 )Type:802.1Q Virtual LAN( 0x8100 )802.1Q Virtual LAN,PRI:0,DEI:0,ID:35 000 . .... .... .... = Priority:Best Effort(默认)0 ... 0 .... .... .... = DEI:不符合条件 .... 0000 0010 0011 = ID:35 PPP-over-Ethernet Session 0001 .... = Version:1 .... 0001 = Type:1 Code:Session Data(0x00)Session ID:0x0007 Point-to-Point Protocol Type:Link Control Protocol( 0xc021 )PPP Link Control Protocol Code:Configuration Ack( 2 )Identifier:3( 3 )Length:18 Options:(14 字节),Maximum Receive Unit,Magic Number,Authentication Protocol Maximum Receive Unit:1492 Type:Maximum Receive Units( 1 )Length:4 Maximum Receive Unit:1492 Magic Number:0x3b67d5b0 Type:Magic Number( 5 )Length:6 Magic Number:0x3b67d5b0 Authentication Protocol:Password Authentication Protocol 0xc023 Type:Authentication Protocol( 3 )Length:4 Authentication Protocol:Password Authentication Protocol 0xc023 | ||||
| 2.003765000 | TPLink_04:cf:02 | SBluetech_11:e9:df | PPP LCP | Echo Request |
| Frame 13,接口 /dev/fd/14 上线路长度 60 字节 Interface id:0( /dev/fd/14 )Encapsulation type:Ethernet(1)Arrival Time:Aug 4, 2024 04:02:24.177045000 +03 UTC Arrival Time:Aug 4, 2024 01:02:24.177045000 UTC Frame number:13 Frame Length:60 字节( 480 位)Capture Length:60 字节( 480 位)Ethernet II,Src:TPLink_04:cf:02( 78:8c:b5:04:cf:02 )Dst:SBluetech_11:e9:
文章标题:Finding your ISP router's credentials
正文: df ( 60:be:b4:11:e9:df ) Destination: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Source: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Session 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Session Data (0x00) Session ID: 0x0007 Point-to-Point Protocol Type: Link Control Protocol ( 0xc021 ) PPP Link Control Protocol Code: Echo Request ( 9 ) Identifier: 0 ( 0 ) Length: 8 | | | | |
| 2.003785000 | SBluetech_11:e9:df | TPLink_04:cf:02 | PPP LCP | Echo Reply |
|---|---|---|---|---|
| Frame 14 , 34 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:24.177065000 +03 UTC Arrival Time: Aug 4, 2024 01:02:24.177065000 UTC Frame number: 14 Frame Length: 34 bytes ( 272 bits) Capture Length: 34 bytes ( 272 bits) Ethernet II, Src: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Dst: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Destination: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Source: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Session 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Session Data (0x00) Session ID: 0x0007 Point-to-Point Protocol Type: Link Control Protocol ( 0xc021 ) PPP Link Control Protocol Code: Echo Reply ( 10 ) Identifier: 0 ( 0 ) Length: 8 | ||||
| 2.004079000 | TPLink_04:cf:02 | SBluetech_11:e9:df | PPP PAP | Authenticate-Request (Peer-ID='ak69517242@vodafone', Password='mrJz6vCar3') |
| Frame 15 , 61 bytes on wire on interface /dev/fd/14 Interface id: 0 ( /dev/fd/14 ) Encapsulation type: Ethernet (1) Arrival Time: Aug 4, 2024 04:02:24.177359000 +03 UTC Arrival Time: Aug 4, 2024 01:02:24.177359000 UTC Frame number: 15 Frame Length: 61 bytes ( 488 bits) Capture Length: 61 bytes ( 488 bits) Ethernet II, Src: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Dst: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Destination: SBluetech_11:e9:df ( 60:be:b4:11:e9:df ) Source: TPLink_04:cf:02 ( 78:8c:b5:04:cf:02 ) Type: 802.1Q Virtual LAN ( 0x8100 ) 802.1Q Virtual LAN, PRI: 0 , DEI: 0 , ID: 35 000 . .... .... .... = Priority: Best Effort (default) 0 ... 0 .... .... .... = DEI: Ineligible .... 0000 0010 0011 = ID: 35 PPP-over-Ethernet Session 0001 .... = Version: 1 .... 0001 = Type: 1 Code: Session Data (0x00) Session ID: 0x0007 Point-to-Point Protocol Type: Password Authentication Protocol ( 0xc023 ) PPP Password Authentication Layer Code: Authentication Request ( 1 ) Identifier: 1 Length: 35 Data Peer-ID-Length: 19 Peer-ID: ak69517242@vodafone Password-Length: 10 Password: mrJz6vCar3 |
显然认证失败是因为我们没有真实的 PPPoE 服务器,它不认识任何用户,但这无关紧要。我们现在已经拥有了替换这台路由器所需的一切。让我们从 Authenticate-Request 中提取凭据。以太网帧中的 MAC 地址和 802.1Q 帧中的 VLAN ID。
创建一个配置正确的 VLAN,并将其附加到 WAN 接口:

如果你使用的是 Superonline 或其他将 VLAN 设为 0 的 ISP,你需要通过手动编辑 pfSense 中的配置文件来完成此操作,因为 0 在那里不是有效的标签。
然后更新新路由器 WAN 的 PPPoE 配置(不是我的真实凭据,别担心)

你的 MAC 地址也需要更新,但我死活想不通这在 pfSense 中是如何为 WAN 接口完成的。所以我使用 shell 命令为 igc0 手动设置了它。我肯定只是漏掉了什么显而易见的东西。
就是这样。如果你的路由器使用 CHAP,你需要想办法破解哈希。了解模式对配置会有帮助。根据我的实验,我发现不同的土耳其 ISP 有不同的密码模式, namely:
- Superonline 仅数字 [0-9]{10}
- Turk Telekom 小写字母数字 [0-9a-z]{10}
在现代 GPU 上应该不到一天就能完成。如果你有想要分享的发现,请告诉我。我很想建立一个这些发现的数据库。
如果你不想或无法遵循这些说明,我创建了一个免费开源的桌面应用程序,它可以假装是 PPPoE 服务器并执行完整握手以提取正确的变量。我希望最终将其变成一个适用于各种不同配置路由器的工具。