IDS测试工具与使用方法介绍

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

IDS测试工具与使用方法介绍
IDS测试工具与使用方法介绍 (1)
Nmap -- 扫描工具 (3)
Nmap简介 (3)
功能选项: (3)
Nmap使用例子: (3)
Nikto -- 变形工具(一) (4)
Nikto简介 (4)
Nikto使用例子: (4)
Fragrouter -- 会话分片工具 (5)
Fragrouter简介 (5)
环境配置: (6)
测试步骤: (7)
Blade - Evasion gateway -- 变形工具(二) (8)
Blade-Evasion 简介 (8)
Blade Evasion Gateway 配置 (9)
测试步骤: (10)
Snot--NIDS欺骗 (11)
Snot 简介 (11)
Snot使用例子: (11)
Trojans (11)
Nmap -- 扫描工具
Nmap简介
【名称】Nmap-网络探测和安全扫描工具
【语法】nmap [Scan Type(s)] [Options] <host or net #1 ... [#N]>
功能选项:
1.扫描类型
●-sT TCP connect()扫描,这是最基本的TCP扫描方式。

●–sS TCP同步扫描(TCP SYN),因为不必全部打开一个TCP连接,所以这项技术
通常称为半开扫描(half-open)。

●-sF –sX –sN 秘密FIN数据包扫描,圣诞树(Xmas Tree),空(Null)扫描模式。

●–sP ping扫描。

●–sU UDP扫描。

●-sR RPC扫描。

●-sV Version scan probes open ports determining service & app names/versions
2.通用选项
●–v 详细模式。

强烈推荐使用这个选项,它会给出扫描过程中的详细信息。

●-O这个选项激活对TCP/IP指纹特征(fingerprinting)的扫描,获得远程主机的标志。

换句话说,nmap使用一些技术检测目标主机操作系统网络协议栈的特征。

nmap
使用这些信息建立远程主机的指纹特征,把它和已知的操作系统指纹特征数据库做
比较,就可以知道目标主机操作系统的类型。

Nmap使用例子:
nmap -v -sT 192.168.20.0/24
nmap -v -sU 192.168.20.140-200
nmap -v -sX 192.168.20.0-100
nmap -v -sN 192.168.20.101-144
nmap -v -O 192.168.20.145-245
Nikto -- 变形工具(一)
Nikto简介
Nikto是一款能对web服务器多种安全项目进行测试的扫描软件,能在200多种服务器上扫描出2000多种有潜在危险的文件、CGI及其他问题。

nikto-1.35共实现了九种ids 逃避技术。

安装在windows操作平台下时,需要安装activestate perl。

【语法】nikto [-h target] [options]
[-h target] :目标主机的ip地址或名字。

[options] :-evasion IDS evasion techniques. This enables the intrusion detection evasion in LibWhisker. Multiple options can be used by stringing the numbers together, i.e. to enable methods 1 and 5, use "-e 15".
The valid options are (use the number preceeding each description):
1.Random URI encoding (non-UTF8)
2.Add directory self-reference /./
3.Premature URL ending
4.Prepend long random string to request
5.Fake parameters to files
6.TAB as request spacer instead of spaces
7.Random case sensitivity
e Windows directory separator \ instead of /
9.Session splicing
Nikto使用例子:
192.168.20.145是目标主机,运行的环境是 IIS
nikto.pl -h 192.168.20.145 -e 1
nikto.pl -h 192.168.20.145 -e 2
nikto.pl -h 192.168.20.145 -e 3
nikto.pl -h 192.168.20.145 -e 4
nikto.pl -h 192.168.20.145 -e 5
nikto.pl -h 192.168.20.145 -e 6
nikto.pl -h 192.168.20.145 -e 7
nikto.pl -h 192.168.20.145 -e 8
nikto.pl -h 192.168.20.145 -e 9
Fragrouter -- 会话分片工具
Fragrouter简介
fragrouter是一个具有路由器功能的应用程序,它能够对攻击者发送的攻击流量进行分片处理之后,向攻击目标转发。

Fragrouter可运行在如下的环境中:
- OpenBSD 2.x
- FreeBSD 3.x
- BSD/OS 3.x
- Redhat Linux 5.x
- Solaris 2.x
Fragrouter原理如下所示:
attack fragmented attack
+-------+ +------------+ +--------+
| hax0r |-------> | fragrouter |- - - - - - - - - - -- - - - - -- - - - - -> | victim |
+-------+ +------------+ | +--------+
V
+------+------+
| network IDS |
+-------------+
【语法】Usage: fragrouter [-i interface] [-p] [-g hop] [-G hopcount] ATTACK
Where ATTACK is one of the following:
-B1: base-1: normal IP forwarding
-F1: frag-1: ordered 8-byte IP fragments
-F2: frag-2: ordered 24-byte IP fragments
-F3: frag-3: ordered 8-byte IP fragments, one out of order
-F4: frag-4: ordered 8-byte IP fragments, one duplicate
-F6: frag-6: ordered 8-byte fragments, marked last frag first
-F7: frag-7: ordered 16-byte fragments, fwd-overwriting
-T1: tcp-1: 3-whs, bad TCP checksum FIN/RST, ordered 1-byte segments
-T3: tcp-3: 3-whs, ordered 1-byte segments, one duplicate
-T4: tcp-4: 3-whs, ordered 1-byte segments, one overwriting
-T5: tcp-5: 3-whs, ordered 2-byte segments, fwd-overwriting
-T7: tcp-7: 3-whs, ordered 1-byte segments, interleaved null segments
-T8: tcp-8: 3-whs, ordered 1-byte segments, one out of order
-T9: tcp-9: 3-whs, out of order 1-byte segments
-C2: tcbc-2: 3-whs, ordered 1-byte segments, interleaved SYNs
-C3: tcbc-3: ordered 1-byte null segments, 3-whs, ordered 1-byte segments
-R1: tcbt-1: 3-whs, RST, 3-whs, ordered 1-byte segments
-I2: ins-2: 3-whs, ordered 1-byte segments, bad TCP checksums
-I3: ins-3: 3-whs, ordered 1-byte segments, no ACK set
【拓扑】
NIDS
环境配置:
1.攻击机attacker的配置ip地址为10.0.9.142,网关配置为10.0.9.40。

2.安装nikto ,向192.168.20.36 victim 发攻击流。

3.在linux操作系统的主机上安装fragrouter,主机是双网卡。

两块网卡配置成不同的网
段,并配置成网关。

具体步骤如下:
a)配置网卡的接口地址:
ifconfig eth1 10.0.9.40
ifconfig eth0 192.168.20.36
b)添加路由:
route add -net 192.168.20.0 gw 192.168.20.36 netmask 255.255.255.0
route add -net 10.0.9.0 gw 10.0.9.40 netmask 255.255.255.0
c)修改配置
echo “1”> proc/sys/net/ipv4/ip_forward
d)禁用iptables
4.victim 配置的ip地址为192.168.20.145 ,网关配置为192.168.20.36。

装有IIS 服务。

测试步骤:
1.先运行fragrouter:./fragrouter -B1(只是转发包)
2.在attack上发攻击包:nikto.pl –h 192.168.20.145
3.攻击包发送完毕后,查看NIDS的上报事件
4.停掉1中运行的./fragrouter -B1
5.运行./fragrouter -F1
6.在attack上发攻击包:nikto.pl –h 192.168.20.145
7.攻击包发送完毕后,查看NIDS的上报事件
重复步骤4-6,一次执行如下命令:
./fragrouter -B1
./fragrouter -F1
./fragrouter -F2
./fragrouter -F3
./fragrouter -F4
./fragrouter -F6
./fragrouter -F7
./fragrouter -T1
./fragrouter -T3
./fragrouter –T4
./fragrouter –T5
./fragrouter –T7
./fragrouter –T8
./fragrouter –T9
./fragrouter -C2
./fragrouter –C3
./fragrouter -R1
./fragrouter -I2
./fragrouter –I3
Blade - Evasion gateway -- 变形工具(二) Blade-Evasion 简介
Blade-Evasion Gateway 针对HTTP 的URL encoding逃避技术的变形共十一种。

如下图所示:
1. Reverse Backslash
Forward slash "/" is converted to a back slash "\" so:
GET /documents/example.pdf becomes GET /documents\example.pdf
2.Directory Self Reference
Initial directory or page is prepended with a directory self reference (/./) so:
GET /documents/example.pdf becomes GET /./documents/example.pdf
3.Prepend Random String
GET /documents/example.pdf becomes /<random alpha numeric string>/../GET /documents/example.pdf
4.Fake Parameter
GET /documents/example.pdf becomes GET /documents/example.pdf?MyH=asdRF
5.Random Case URL
GET /documents/example.pdf becomes GET /doCuMentS/ExaMPLe.Pdf
6.TAB Separator GET Request
GET /documents/example.pdf becomes GET<TAB>/documents/example.pdf
7.Random case GET Request
GET /documents/example.pdf becomes geT /documents/example.pdf
8.Invalid HTTP Version
HTTP/1.1become HTTP 1.3
9.Invalid HTTP version (dot)
HTTP/1.1 becomes HTTP/161
10.Random case HTTP
HTTP/1.1 becomes HttP/1.1
11.Session Splicing
将GET /index.htm变形为:
G E T I n d e x . h t m
Blade Evasion Gateway 配置【拓扑】
Blade Informer
internal interface:
mac:00-00-00-00-00-11
ip address:192.168.3.100 gatewaymacaddres:00-00-00-00-00-aa
external interface:
mac:00-50-ba-a9-a3-00
ip address:192.168.1.100 gatewaiymacaddress:00-00-00-00-00-bb NIDS
Blade Evasion Gateway
Internal interface
mac:00-00-00-00-00-aa ip address:192.168.3.254 gateway:0.0.0.0
Blade Evasion Gateway
External interface
mac:00-00-00-00-00-bb
ip address:192.168.1.254
gateway:0.0.0.0
Hub
配置步骤:
两台测试机,一台用作blade Evasion Gateway,并要求是双网卡。

另一台用作Blade informer,也是双网卡。

Blade Evasion Gateway 一端与blade informer 直连,另一端接到与NIDS一起接到HUB上。

1.首先配置blade informer ,如图所示:
2.配置blade evasion gateway,如图所示:
测试步骤:
1.Evasion Gateway 配置好后,点击“start gateway”,启用。

2.blade informer ,在左边选取响应的攻击包后,右边分别配置源ip:192.168.
3.100和目
的ip:192.168.1.100,如图所示:
Snot--NIDS欺骗
Snot 简介
snot 一个针对ids的NIDS欺骗软件,以snort的rule作为输入,Snot是一个任意包生成器,使用snort规则文件作为它的包信息源。

可实时生成任意的未包含于规则中的信息,以牵制snort规则'snot 检测'的生成。

可以运行在*BSD, Linux, Win2k, NT4.0 and Win98。

选项说明:
-r The rules file that snot will read in.
-s Source host. This may be just an ip address/mask, or a snort array of ip address/mask combinations.
-d Destination host. Same as the source.
-l Delay. snot will pick a random number between 1 and delay and sleep between packets
-n Number of Packets. How many packets total you want to send. If unset or 0 snot will run forever.
注:Snot编译需要Libnet-1.0.2a
Snot使用例子:
snot -r snortrules.txt -s 192.168.20.170 –d 192.168.20.145 -n 10000
其中snortrules.txt是snort规则库的全集。

Trojans
1.Mini灰鸽子
2.寿鼠1.1
3.Randomdoor
4.广外女生
5.流萤v2.2
6.Netsys7.2
7.Penumbra 1.3C
【注】以上攻击借助公开的攻击工具实现。

11。

相关文档
最新文档