最新消息:阿啰哈,本人90后,目前单身,欢迎妹子们来撩!.(。→‿←。) 微信:frank01991

蹭网记

Security 林志斌 691浏览

我知道旁边有一根能上网的网线……我的笔记本现在很饥渴,它要上网!

0、把网线接到笔记本上(操作系统是Ubuntu 14.04.01 LTS),自动获取始终拿不到地址(根本没有dhcp服务器理会我电脑所发出的dhcp请求包),然后打开wireshark进行抓包,根据我的经验,马上就知道哪个网段能上网了。192.168.162.0/24,根据抓取到的数据包判断192.168.162.1很可能是默认网关,并且发现一个IP地址是192.168.162.203的TP-Link路由器

1、用nmap探下路:[email protected]:~$ sudo nmap -sP -n 192.168.162.1-254
Starting Nmap 6.47 ( http://nmap.org ) at 2014-12-25 13:20 CST
Nmap scan report for 192.168.162.1
Host is up (0.00010s latency).
MAC Address: 00:15:17:2C:16:90 (Intel Corporate)
Nmap scan report for 192.168.162.201
Host is up (0.00015s latency).
MAC Address: D0:27:88:5E:5F:E0 (Hon Hai Precision Ind.Co.Ltd)
Nmap scan report for 192.168.162.203
Host is up (0.00043s latency).
MAC Address: 54:E6:FC:62:51:35 (Tp-link Technologies CO.)
Nmap scan report for 192.168.162.205
Host is up (0.00011s latency).
MAC Address: 00:10:5C:E7:6A:9E (Quantum Designs (h.k.))
Nmap scan report for 192.168.162.249
Host is up (0.000088s latency).
MAC Address: 14:E6:E4:40:24:9F (Tp-link Technologies CO.)
Nmap scan report for 192.168.162.199
Host is up.
Nmap done: 254 IP addresses (6 hosts up) scanned in 5.28 seconds

2、sudo ip ad ad 192.168.162.203/24 dev eth0
3、sudo ip ro ad 0.0.0.0/0 via 192.168.162.1
4、sudo echo nameserver 8.8.8.8 >> /etc/resolv.conf
马上ping一下192.168.162.1,不通!
思考一下,问题在哪?
尝试把192.168.162.203的MAC地址找出来,并且sudo ip li set add 54:e6:fc:62:xx:xx dev eth0
再ping一下192.168.162.1通了,进而ping 8.8.8.8,也通了!但马上又不通了,why?
思考一下,问题又出在哪?
是的,arping 192.168.162.1 -q &,更新默认网关的MAC地址

能上网了……过程很简单,手段很残暴!

转载请注明:林志斌 » 蹭网记

发表评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址