本文档讨论使用IPS Manager Express(IME)配置入侵防御系统(IPS)TCP重置。IME和IPS传感器用于管理思科路由器以执行TCP重置。查看此配置时,请记住以下项:
安装传感器并确保传感器工作正常。
使嗅探接口跨度到接口外部的路由器。
本文档没有任何特定的要求。
本文档中的信息基于以下软件和硬件版本:
思科IPS管理器Express 7.0
思科IPS传感器7.0(0.88)E3
带Cisco IOS软件版本12.4的Cisco IOS®路由器
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
有关文件规则的更多信息请参见“ Cisco技术提示规则”。
本文档使用此图所示的网络设置。
本文档使用此处所示的配置。
路由器灯 |
---|
Current configuration : 906 bytes ! version 12.4 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname light ! enable password cisco ! username cisco password 0 cisco ip subnet-zero ! ! ! ip ssh time-out 120 ip ssh authentication-retries 3 ! call rsvp-sync ! ! ! fax interface-type modem mta receive maximum-recipients 0 ! controller E1 2/0 ! ! ! interface FastEthernet0/0 ip address 10.100.100.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 ip address 1.1.1.1 255.255.255.0 duplex auto speed auto ! interface BRI4/0 no ip address shutdown ! interface BRI4/1 no ip address shutdown ! interface BRI4/2 no ip address shutdown ! interface BRI4/3 no ip address shutdown ! ip classless ip route 0.0.0.0 0.0.0.0 10.100.100.1 ip http server ip pim bidir-enable ! ! dial-peer cor custom ! ! line con 0 line 97 108 line aux 0 line vty 0 4 login ! end |
路由器 House |
---|
Current configuration : 939 bytes ! version 12.4 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname house ! logging queue-limit 100 enable password cisco ! ip subnet-zero ! ! no ip cef no ip domain lookup ! ip audit notify log ip audit po max-events 100 ! ! no voice hpi capture buffer no voice hpi capture destination ! ! ! ! interface FastEthernet0/0 ip address 10.66.79.210 255.255.255.224 duplex auto speed auto ! interface FastEthernet0/1 ip address 10.100.100.1 255.255.255.0 duplex auto speed auto ! interface ATM1/0 no ip address shutdown no atm ilmi-keepalive ! ip classless ip route 0.0.0.0 0.0.0.0 10.66.79.193 ip route 1.1.1.0 255.255.255.0 10.100.100.2 no ip http server no ip http secure-server ! ! ! ! call rsvp-sync ! ! mgcp profile default ! ! line con 0 exec-timeout 0 0 line aux 0 line vty 0 4 exec-timeout 0 0 password cisco login line vty 5 15 login ! ! end |
完成以下步骤以开始配置传感器。
如果这是您首次登录传感器,则必须输入cisco作为用户名,cisco作为密码。
系统提示时,请更改密码。
注意:Cisco123是字典词,系统中不允许使用。
键入setup并完成系统提示,以便为传感器设置基本参数。
输入此信息:
sensor5#setup --- System Configuration Dialog --- !--- At any point you may enter a question mark '?' for help. !--- Use ctrl-c to abort the configuration dialog at any prompt. !--- Default settings are in square brackets '[]'. Current Configuration: networkParams ipAddress 10.66.79.195 netmask 255.255.255.224 defaultGateway 10.66.79.193 hostname Corp-IPS telnetOption enabled !--- Permit the IP address of workstation or network with IME accessList ipAddress 10.66.79.0 netmask 255.255.255.0 exit timeParams summerTimeParams active-selection none exit exit service webServer general ports 443 exit exit
保存配置。
传感器保存配置可能需要几分钟。
[0] Go to the command prompt without saving this config. [1] Return back to the setup without saving this config. [2] Save this configuration and exit setup. Enter your selection[2]: 2
要将传感器添加到IME中,请完成以下步骤:
转到安装了IPS Manager Express的Windows PC,然后打开IPS Manager Express。
选择“主页”>“添加”。
键入此信息并单击OK以完成配置。
选择Devices > Corp-IPS以验证传感器状态,然后右键单击以选择Device Status。
确保您看到订阅已成功打开。
要配置Cisco IOS路由器的TCP重置,请完成以下步骤:
从IME PC打开Web浏览器,然后转到https://10.66.79.195。
单击OK以接受从传感器下载的HTTPS证书。
在登录窗口中,输入cisco作为用户名,123cisco123作为密码。
此IME管理界面显示:
在“配置”选项卡中,单击“活动签名”。
然后单击“签名向导”。
在向导中,选择Yes,然后选择String TCP作为签名引擎。单击 Next。
您可以保留此信息,或输入您自己的签名ID、签名名称和用户注释。单击 Next。
选择Event Action,然后选择Produce Alert and Reset TCP Connection。单击OK,然后单击Next以继续。
输入正则表达式,testattack在本示例中使用。输入23作为服务端口,选择To Service作为方向,然后单击Next以继续。
您可以将此信息保留为默认值。单击 Next。
单击Finish以完成向导。
选择Configuration > sig0 > Active Signatures,以便通过Sig ID或Sig Name找到新创建的签名。单击Edit以查看签名。
确认后,单击“OK(确定)” ,然后单击“Apply(应用)”按钮,将签名应用于传感器。
要发起攻击并重置TCP,请完成以下步骤:
在启动攻击之前,请转至IME,选择Event Monitoring > Dropped Attacks View,然后选择右侧的传感器。
从路由器指示灯Telnet至路由器房间并进入testatck。
单击<space>或<enter>以重置Telnet会话。
light#telnet 10.100.100.1 Trying 10.100.100.1 ... Open User Access Verification Password: house>en Password: house#testattack [Connection to 10.100.100.1 closed by foreign host] !--- Telnet session has been reset due to the !--- signature "String.tcp" triggered.
在IPS事件查看器的控制面板中,一旦攻击启动,就会显示红色警报。
本部分提供的信息可用于对配置进行故障排除。
使用以下故障排除提示:
Shunning使用命令和控制端口对路由器访问控制列表(ACL)进行重新编程。 TCP重置从传感器的嗅探接口发送。在交换机中设置span时,请使用set span <src_mod/src_port><dest_mod/dest_port>命令,并启用两个传入数据包,如下所示。
banana (enable)set span 2/12 3/6 both inpkts enable Overwrote Port 3/6 to monitor transmit/receive traffic of Port 2/12 Incoming Packets enabled. Learning enabled. Multicast enabled. banana (enable) banana (enable) banana (enable)show span Destination : Port 3/6 !--- connect to sniffing interface of the sensor Admin Source : Port 2/12 !--- connect to FastEthernet0/0 of Router House Oper Source : Port 2/12 Direction : transmit/receive Incoming Packets: enabled Multicast : enabled
如果TCP重置正在工作,请检查是否触发了操作类型TCP重置的警报。如果出现警报,请检查签名类型是否设置为TCP重置。
使用服务帐户su登录根并发出此命令。此命令假设传感接口设置为eth0。
[root@sensor1 root]#tcpdump -i eth0 -n
注意:将100tcp重置发送到受害者/目标,然后将100tcp重置发送到攻击者/客户端。
以下是输出示例:
03:06:00.598777 64.104.209.205.1409 > 10.66.79.38.telnet: R 107:107(0) ack 72 win 0 03:06:00.598794 64.104.209.205.1409 > 10.66.79.38.telnet: R 108:108(0) ack 72 win 0 03:06:00.599360 10.66.79.38.telnet > 64.104.209.205.1409: R 72:72(0) ack 46 win 0 03:06:00.599377 10.66.79.38.telnet > 64.104.209.205.1409: R 73:73(0) ack 46 win 0
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
08-Dec-2009 |
初始版本 |