争怎路由网:是一个主要分享无线路由器安装设置经验的网站,汇总WiFi常见问题的解决方法。

入侵检测系统之LIDS篇

时间:2024/2/20作者:未知来源:争怎路由网人气:

网络技术是从1990年代中期发展起来的新技术,它把互联网上分散的资源融为有机整体,实现资源的全面共享和有机协作,使人们能够透明地使用资源的整体能力并按需获取信息。资源包括高性能计算机、存储资源、数据资源、信息资源、知识资源、专家资源、大型数据库、网络、传感器等。 当前的互联网只限于信息共享,网络则被认为是互联网发展的第三阶段。

 入侵检测系统也叫IDS=instrusion detection system,他常常被网络管理员用来检测网络受攻击的程度和频繁度,为他进行下一步的管理提供充足的资料。
这里采用linux+snort,因为他们都是免费的,并且采用源码包安装
软件下载
libpcap http://www.tcpdump.org

snort-1.9 http://www.snort.org
首先你必须有root权限
su
passwd:**********
由于snort需要libpcap,所以先安装他
cd /usr/src
tar zxvf libpcap-0.6.2.tar.gz
tar zxvf snort-1.9.0.tar.gz
[root@SEC src]# cd libpcap-0.6.2
[root@SEC libpcap-0.6.2]# ./configure --prefix=/usr/local/libpcap-0.6.2
[root@SEC libpcap-0.6.2]#make
[root@SEC libpcap-0.6.2]#make install
接着安装snort,如果不需要把日志写到mysql数据库的话,配置很简单
[root@SEC libpcap-0.6.2]#cd ../snort-1.9.0
[root@SEC snort-1.9.0]#./configure --prefix=/usr/local/snort19
[root@SEC snort-1.9.0]#make
[root@SEC snort-1.9.0]#make install
OK,安装完毕,如果在上述安装过程中出现任何错误,请查看README文件
接着,把当前目录下的etc目录和rules目录cp到snort的安装目录
[root@SEC snort-1.9.0]#cp etc /usr/local/snort19 -r
[root@SEC snort-1.9.0]#cp rules /usr/local/snort19 -r
接着,把etc下的classification.config复制到/root/目录下
再把etc里面的snort.conf复制到root目录下并改名为.snortrc
[root@SEC snort-1.9.0]#cp etc/classification.config /root/
[root@SEC snort-1.9.0]#cp etc/snort.conf /root/.snortrc
现在编辑snort的配置文件.snortrc
vi /root/.snortrc
先在102行找到var RULE_PATH ../rules
把他改成var RULE_PATH /usr/local/snort19/rules
然后在590行看到
include $RULE_PATH/bad-traffic.rules
这些是SNORT的规则集,针对系统类型和网络环境选上你所需要的规则,OK,编辑完毕!
接着为了方便,我们把snort的可执行程序复制/usr/sbin目录
[root@SEC snort-1.9.0]#cp /usr/local/snort19/bin/snort /usr/sbin/snort
最后为snort放日志创建一个目录
[root@SEC snort-1.9.0]#mkdir /var/log/snort
马上测试一下
[root@SEC snort-1.9.0]#snort
Initializing Output Plugins!
Log directory = /var/log/snort

Initializing Network Interface eth0
using config file /root/.snortrc
Initializing Preprocessors!
Initializing Plug-ins!
Parsing Rules file /root/.snortrc
等等的输出,如果你看到的是这样的,那么恭喜你,你成功了!
下面让我们一起来看看snort的参数
[root@SEC snort-1.9.0]# snort --help
Initializing Output Plugins!
snort: invalid option -- -

-*> Snort! <*-
Version 1.9.0 (Build 209)
By Martin Roesch (roesch@sourcefire.com, www.snort.org)
USAGE: snort [-options]
Options:
-A Set alert mode: fast, full, console, or none (alert file alerts only)
"unsock" enables UNIX socket logging (experimental).
-a Display ARP packets
-b Log packets in tcpdump format (much faster!)
-c Use Rules File
-C Print out payloads with character data only (no hex)
-d Dump the Application Layer
-D Run Snort in background (daemon) mode
-e Display the second layer header info
-f Turn off fflush() calls after binary log writes
-F Read BPF filters from file
-g Run snort gid as group (or gid) after initialization
-G Add reference ids back into alert msgs (modes: basic, url)
-h Home network =
-i Listen on interface
-I Add Interface name to alert output
-l Log to directory
-m Set umask =
-n Exit after receiving packets
-N Turn off logging (alerts still work)
-o Change the rule testing order to Pass

关键词:入侵检测系统之LIDS篇




Copyright © 2012-2018 争怎路由网(http://www.zhengzen.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版