linux下防范arp欺骗攻击 - 我的天地

linux下防范arp欺骗攻击

rurutia posted @ 2007年4月23日 08:17 in linux with tags arp 攻击 , 3589 阅读

前两天家里的网断断续续,发现有人在用arp欺骗,其实真正碰到有人在攻 击的几率不大,大部分原因都是有人在用win下的诸如“P2P终结者”这样的软件导致的 。再怎么bs那人也是没有用的,问题还是要解决,win下倒是好办,现成的软件多的是 ,linux下面就要自己动手了^^。

arp欺骗的原理不多述,基本就是利用发 送假的arp数据包,冒充网关。一般在网上通讯的时候网关的IP和MAC的绑定是放在arp 缓存里面的,假的arp包就会刷新这个缓存,导致本该发送到网关的数据包发到了欺骗 者那里。解决的办法就是静态arp。

假设网关的IP是192.168.0.1,我们要 先得到网关的正确MAC,先ping一下网关:

ping 192.168.0.1

然后运行arp查看arp缓存中的网关MAC:

localhost~$ arp
Address HWtype HWaddress Flags Mask Interface
192.168.0.1 ether 00:12:34:56:78:9A C eth0

这里得到的网关MAC假定 为00:12:34:56:78:9A,C代表这个绑定是保存在缓冲里的,我们要做的就是把这个IP和 MAC静态的绑定在一起,首先建立/etc/ethers文件,输入以下内容:

192.168.0.1 00:12:34:56:78:9A

保存退出,之后便是应 用这个静态绑定:

localhost~$ arp -f

再运行arp查看:

localhost~$ arp
Address HWtype HWaddress Flags Mask Interface
192.168.0.1 ether 00:12:34:56:78:9A CM eth0

多了个M,表示静态网关 ,OK收工~

另外,如果你不会和局域网内的用户通讯的话,那么可以干脆 把arp解析关掉,假定你的网卡是eth0,那么可以运行:

localhost~$ ifconfig eth0 -arp

这样对付那些终结者软件就可以了,但是真的有人 向攻击的话,这样还是不够的,因为攻击者还可以欺骗网关,解决的办法就是在网关和 局域网内机器上做双向绑定,原理方法同上,一般网吧里面也是这样做的。

 

Avatar_small
wcw 说:
2007年9月27日 05:45

谢谢!受用了! 

Avatar_small
cleaning companies i 说:
2019年9月29日 18:39

Windows cleaning seriously isn't necessarily an uncomplicated job, and it is a fact that almost all cleaning products and services do this window cleaning within the inefficient technique which leaves many stains in addition to dust that is certainly visible when closer check up. This is usually something you can avoid after you call this services connected with Spectrum cleaning who definitely are the very best window cleaning carrier's networks, for we get those widows and so clean you forget them to were there from the start until people bump with it. Yes, i am that skilled!

Avatar_small
clean tech laws 说:
2019年11月18日 16:49

There may come a amount of time in your romantic relationship where you need to make the actual transition through just relationship to formally being inside a relationship. If you think like you as well as your partner 're going in an excellent direction, you might want to take it to another level.

Avatar_small
shawcor success 说:
2020年3月28日 18:25

To fulfill its purpose in business planning to enjoy the right kind of knowledge. To elaborate in the term "right knowledge", one will have to be updated through relevant, contemporary and even practical know-how about concepts. Management education has a lot in core, integrative plus functional matters. <a href="http://www.shawcorsuccess.com">www.shawcorsuccess.com</a>

Avatar_small
river bank marketing 说:
2020年3月28日 18:25

To start up business owners, starting an online business is often specific to it reward. They can be thrilled kid be their own individual bosses, and to help you successfully acquire a business uploaded and functioning. Often they are really happy merely keep that dream survive. <a href="http://www.riverbankmarketing.com">www.riverbankmarketing.com</a>

Avatar_small
siberyan health 说:
2020年3月28日 18:26

That occupational well-being nurse can develop pro-active ways of help that workforce continue to keep or rebuild their get the job done ability. Unique workers, senior workers, women time for work immediately after pregnancy and workers who've been unemployed for one prolonged time may all enjoy health advice as well as a planned procedure of get the job done hardening exercises that will maintain and restore ones own work opportunity even well before any medical conditions arise. <a href="http://www.siberyanhealth.com">www.siberyanhealth.com</a>

Avatar_small
healthy n balanced 说:
2020年3月28日 18:26

It is best to important to manage oneself using the principles of health and wellness. Regular check-ups, proper food intake and good living every enable you to always watch out for their health at a careful though reasonable option. Often you becomes overly involved with health matters and swept up in an important cycle in health fears. <a href="http://www.healthynbalanced.com">www.healthynbalanced.com</a>

Avatar_small
sikkim health 说:
2020年3月28日 18:26

It is best to important to manage oneself using the principles of health and wellness. Regular check-ups, proper food intake and good living every enable you to always watch out for their health at a careful though reasonable option. Often you becomes overly involved with health matters and swept up in an important cycle in health fears. <a href="http://www.sikkimhealth.org">www.sikkimhealth.org</a>

Avatar_small
full time maids in d 说:
2020年5月01日 01:17

Maids are typically looked off as poor income crew, unglamorous and additionally unadventurous all those. But, with a tiny bit of imagination and additionally creativity you’re able to turn yourself perfectly into a very awesome and adventurous type maid. Any sensuous costumes would earn other young ladies highly envious of you will. Conversely, this approach sexy apparel would earn men any willing slaves. They would frequently gather around suits you worker bees waiting around for your orders placed and party favors.

Avatar_small
painting company in 说:
2020年5月01日 01:17

If you happen to wondering why an average should look into hiring a fabulous painter, you should identify the major causes for using such type of professional. You might surprised inside the reasoning in back of paying someone to paint your personal property for you will. Consider numerous reasons before spending money on this version of expert.

Avatar_small
home maids dubai 说:
2021年6月07日 18:51

All household holder should usage Microfiber cloth to fix the virtually all overlooked areas of your home. Moreover, finding a microfiber small cloth to rinse the place like the floor beneath typically the carpet, lampshades and / or shelves could be highly reliable. This bit of cloth assists in the render an improvement over various cleaning devices. To understand about her necessity, seek assistance from a experienced.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee