您现在的位置: 骇客基地 >> 黑客文章 >> 黑客攻防 >> 黑客入门 >> 正文

菜鸟分析网络数据-----网络执法官分析
骇客基地 阅读: 时间:2007-6-1 7:32:00 来源:www.hookbase.com
  
最近在论坛上看到很多贴子在讨论网络执法官的问题.   
菜鸟我正好知道这回事情.人道"人之患好为人师"   
手里忍不住,就写点东西吧.   
我也很忙.又没有MM,又没有MONEY....晕倒有点跑题.   

OK,闲话少说,切如正题.   
要了解网络执法官的原理.   
就要先了解局域网的通信的原理.   

前面我们看到了.在以太网上传输的都是具有以太网头的数据包.   
也就是局域网上连个机器相互通讯就要知道对方的MAC地址.   

看看具体的过成   
比如一台netbug的机器要和一台o3的机器通讯.   

首先.netbug要知道o3的IP地址.(这就要用到dns协议,暂时我们略过)   
netbug知道了o3的IP后,就可以组装IP协议层以上的包了.   
但前面已经说了.要在以太网上传输数据,就必须有一个的MAC,   

要找MAC,netbug首先在自己的arp缓存里找是否有这个条目.   
大家可以在cmd环境下.   
C:\>arp -a   

Interface: 192.168.0.225 --- 0x2   
Internet Address Physical Address Type   
192.168.0.4 00-80-ad-77-e2-9a dynamic   
192.168.0.9 00-e0-4c-39-15-f2 dynamic   
192.168.0.10 00-e0-4c-39-19-a5 dynamic   
192.168.0.12 00-10-b5-4d-4b-b7 dynamic   

看到没有?   
如果IP所对应的MAC在这里没有.那netbug就会用到我们以前所讲的arp协议.   

发送一个广播.如果在局域网上发现中间的IP和自己的IP符合,就发回ARP回应.   
ff ff ff ff ff ff 00 e0 4c 82 8f ba 08 06 00 01   
08 00 06 04 00 01 00 e0 4c 82 8f ba c0 a8 00 27   
00 00 00 00 00 00 c0 a8 00 01 20 20 20 20 20 20   
20 20 20 20 20 20 20 20 20 20 20 20   

00 01:ethern   
08 00:IP   
06:hardware address length   
04:Protocol address length   
00 01:Opertion type   
00 e0 4c 82 8f ba :sender hardware address   
c0 a8 00 27: sender IP address 192.168.0.39   
00 00 00 00 00 00:receiver hardware address 00 00 00 00 00 00 broadcast   
c0 a8 00 01:receiver ip address 192.168.0.1   
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20:the data fixed.   


如果没有回应,那netbug就会把网关的MAC做为对方的MAC   
然后封装ethern网包.发送出去.   

OK,原理就说到这里,大家看出什么漏洞了吗?   
对,如果我门在arp缓存里修改网关的mac那.netbug就上去网了.   

那如何远程去修改对方的arp缓存呢?   
有办法.   
就是arp的一个属性.免费arp.   
1.一个主机可以通过她来确定另一个主机是否设置了相同的IP地址.   
2.如果发送免费ARP的主机正好改变了硬件地址.那这个分组就可以更新其它主机缓存中的硬件地址.   

C:\>arp /?   

Displays and modifies the IP-to-Physical address translation tables used by   
address resolution protocol (ARP).   

ARP -s inet_addr eth_addr [if_addr] <===添加arp条目   
ARP -d inet_addr [if_addr] <====删除arp条目   
ARP -a [inet_addr] [-N if_addr] <====显示arp条目   

-a Displays current ARP entries by interrogating the current   
protocol data. If inet_addr is specified, the IP and Physical   
addresses for only the specified computer are displayed. If   
more than one network interface uses ARP, entries for each ARP   
table are displayed.   
-g Same as -a.   
inet_addr Specifies an internet address.   
-N if_addr Displays the ARP entries for the network interface specified   
by if_addr.   
-d Deletes the host specified by inet_addr. inet_addr may be   
wildcarded with * to delete all hosts.   
-s Adds the host and associates the Internet address inet_addr   
with the Physical address eth_addr. The Physical address is   
given as 6 hexadecimal bytes separated by hyphens. The entry   
is permanent.   
eth_addr Specifies a physical address.   
if_addr If present, this specifies the Internet address of the   
interface whose address translation table should be modified.   
If not present, the first applicable interface will be used.   
Example:   
> arp -s 157.55.85.212 00-aa-00-62-c6-09 .... Adds a static entry.   
> arp -a .... Displays the arp table.   

C:\>   
网络执法官就是用的这个特性.   
使对方缓存中的网关地址错误.   
没有网关,当然上不去网了.   
如果发现相同IP具有不同的MAC,当然报错了.   
公司网络上不好使用网络执法官.   
等过几天,   
我抓几个包详细分析一下.  
让我们模拟一次arp攻击:   

C:\>arp -a   

Interface: 192.168.0.225 --- 0x2   
Internet Address Physical Address Type   
192.168.0.1 00-50-ba-2b-ad-7b dynamic   
192.168.0.4 00-80-ad-77-e2-9a dynamic   
192.168.0.9 00-e0-4c-39-15-f2 dynamic   
192.168.0.10 00-e0-4c-39-19-a5 dynamic   
192.168.0.12 00-10-b5-4d-4b-b7 dynamic   
192.168.0.53 00-e0-4c-39-1d-80 dynamic   
C:\>arp -d 192.168.0.4   

C:\>arp -s 192.168.0.4 00-e0-4c-39-15-f2   

C:\>arp -a   

Interface: 192.168.0.225 --- 0x2   
Internet Address Physical Address Type   
192.168.0.1 00-50-ba-2b-ad-7b dynamic   
192.168.0.4 00-e0-4c-39-15-f2 static   
192.168.0.9 00-e0-4c-39-15-f2 dynamic   
192.168.0.10 00-e0-4c-39-19-a5 dynamic   
192.168.0.12 00-10-b5-4d-4b-b7 dynamic   
192.168.0.51 00-c0-9f-16-da-8d dynamic   
192.168.0.53 00-e0-4c-39-1d-80 dynamic   

C:\>tracert 210.26.50.242   

Tracing route to 210.26.50.242 over a maximum of 30 ho   

1 * * * Request timed out.   
2 * * * Request timed out.   
3 * ^C   


C:\>arp -d 192.168.0.4   

C:\>arp -a   

Interface: 192.168.0.225 --- 0x2   
Internet Address Physical Address Type   
192.168.0.1 00-50-ba-2b-ad-7b dynamic   
192.168.0.4 00-80-ad-77-e2-9a dynamic   
192.168.0.9 00-e0-4c-39-15-f2 dynamic   
192.168.0.10 00-e0-4c-39-19-a5 dynamic   
192.168.0.12 00-10-b5-4d-4b-b7 dynamic   
192.168.0.51 00-c0-9f-16-da-8d dynamic   
192.168.0.53 00-e0-4c-39-1d-80 dynamic   

C:\>tracert 210.26.50.242   

Tracing route to XRL [210.26.50.242]   
over a maximum of 30 hops:   

1 <1 ms <1 ms <1 ms PROXY [192.168.0.4]   
2 1 ms <1 ms <1 ms 218.4.142.137   
3 1 ms <1&n

[1] [2] 下一页

今天广告
参与评论:
注意事项:
【菜鸟分析网络数据-----网络执法官分析】文章由骇客基地网上搜集,其立场行为并不代表本站。
如果您发现该文章若无意中侵犯到您的权利,请联系我们!
未经本站明确许可,任何网站不得非法盗链及抄袭本站资源;如引用页面,请注明来自本站,谢谢您的支持!
最近更新
最新推荐
     
 
黑客首页 | 服务指南 | 软件发布  | 关于我们 | 本站声明  | 隐私声明 | 诚征英才 | 网站地图 | 友情链接 |
 
 
中国·黑客·骇客·基地 请使用IE6.0版本, 分辩率1024×768进行浏览 www.hookbase.com 站长:利客 Email:hookbase@163.com
Copyright © 2004-2009 All Rights Reserved. 粤ICP备05000985号