通过VPN/安全管理解决方案(VMS)、IDS管理控制台(IDS MC),本文为Cisco入侵检测系统(IDS)的配置提供一个示例。 在这种情况下,配置了从IDS传感器到思科路由器的阻塞。
在配置Blocking之前,请确保您已满足这些条件。
传感器已安装并配置为检测必要的流量。
嗅探接口跨到路由器外部接口。
本文档中的信息基于以下软件和硬件版本。
VMS 2.2,带IDS MC和安全监控器1.2.3
思科IDS传感器4.1.3S(63)
运行Cisco IOS®软件版本12.3.5的思科路由器
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
有关文档规则的详细信息,请参阅 Cisco 技术提示规则。
本部分提供有关如何配置本文档所述功能的信息。
注:要查找有关本文档中使用的命令的其他信息,请使用命令查找工具(仅注册客户)。
本文档使用此图所示的网络设置。
本文档使用此处所示的配置。
路由器灯 |
---|
Current configuration : 906 bytes ! version 12.3 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 100.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 100.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 |
---|
Building configuration... Current configuration : 797 bytes ! version 12.3 no service pad service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname House ! logging queue-limit 100 enable password cisco ! ip subnet-zero no ip domain lookup ! ! interface Ethernet0 ip address 10.66.79.210 255.255.255.224 hold-queue 100 out ! interface Ethernet1 ip address 100.100.100.1 255.255.255.0 !--- After Blocking is configured, the IDS Sensor !--- adds this access-group ip access-group. IDS_Ethernet1_in_0 in 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 100.100.100.2 ip http server no ip http secure-server ! !--- After Blocking is configured, the IDS Sensor !--- adds this access list. ip access-list extended IDS_Ethernet1_in_0. permit ip host 10.66.79.195 any permit ip any any ! line con 0 stopbits 1 line vty 0 4 password cisco login ! scheduler max-task-time 5000 end |
完成以下步骤以初始配置传感器。
注:如果已执行传感器的初始设置,请继续参阅将传感器导入IDS MC一节。
通过控制台连接到传感器。
系统会提示您输入用户名和密码。如果这是您第一次控制传感器,您必须使用用户名cisco和密码cisco进行登录。
系统将提示您更改密码,然后重新键入新密码以进行确认。
键入setup并在每个提示符处输入相应信息,以设置传感器的基本参数,如以下示例所示:
sensor5#setup --- System Configuration Dialog --- At any point you may enter a question mark '?' for help. User ctrl-c to abort 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 sensor5 telnetOption enabled 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
按2保存配置。
完成以下步骤,将传感器导入IDS MC。
浏览到传感器。
在这种情况下,请浏览到http://10.66.79.250:1741或https://10.66.79.250:1742。
使用适当的用户名和密码登录。
在本示例中,使用了用户名admin和密码cisco。
选择VPN/Security Management Solution > Management Center,然后选择IDS Sensors。
单击“Devices(设备)”选项卡,选择“Sensor Group(传感器组)” ,突出显示“Global(全局)” ,然后单击“Create Subgroup(创建子组)”。
输入组名,并保证默认单选按钮已选,然后点击OK,添加子群到IDS MC。
选择设备>传感器,突出显示先前步骤(如测试)创建的子群,并点击Add。
突出显示子组,然后单击“下一步”。
根据本例输入详细信息,然后单击“下一步”继续。
显示一条消息,指出已成功导入传感器配置后,单击完成继续。
您的传感器已导入IDS MC。在这种情况下,会导入传感器5。
完成此步骤,将传感器导入安全监控器。
在VMS Server菜单中,选择VPN/Security Management Solution > Monitoring Center > Security Monitor。
选择Devices选项卡,然后单击Import并根据本示例输入IDS MC服务器信息。
选择Sensor(本例中为Sensor5),然后单击Next(下一步)继续。
如果需要,更新您的传感器的网络地址转换(NAT)地址,然后点击Finish,继续。
单击OK完成将传感器从IDS MC导入安全监控。
传感器已成功导入。
完成此步骤以使用IDS MC进行签名更新。
从“Downloads(下载)”下载“Network IDS Signature(网络IDS签名)”更新(仅限注册的客户),并将其保存在C:\PROGRA~1\CSCOpx\MDC\etc\ids\updates\ directory on your VMS。服务器中。
在VMS服务器控制台上,选择VPN/Security Management Solution > Management Center > Sensors。
单击Configuration(配置)选项卡,选择Updates(更新),然后单击Update Network IDS Signatures(更新网络IDS签名)。
选择您想要从下拉菜单升级的签名,然后点击Apply继续。
选择要更新的传感器,然后单击“下一步”继续。
提示您更新管理中心以及传感器之后,点击Finish,继续。
通过Telnet或控制台连接到传感器命令行界面。系统将显示类似以下信息:
sensor5# Broadcast message from root (Mon Dec 15 11:42:05 2003): Applying update IDS-sig-4.1-3-S63. This may take several minutes. Please do not reboot the sensor during this update. Broadcast message from root (Mon Dec 15 11:42:34 2003): Update complete. sensorApp is restarting This may take several minutes.
请等待几分钟,以完成升级,然后输入show version 进行 验证。
sensor5#show version Application Partition: Cisco Systems Intrusion Detection Sensor, Version 4.1(3)S63 Upgrade History: * IDS-sig-4.1-3-S62 07:03:04 UTC Thu Dec 04 2003 IDS-sig-4.1-3-S63.rpm.pkg 11:42:01 UTC Mon Dec 15 2003
完成此步骤为IOS路由器配置Blocking。
在VMS服务器控制台上,选择VPN/Security Management Solution > Management Center > IDS Sensors。
选择Configuration(配置)选项卡,从Object Selector(对象选择器)中选择Sensor(传感器),然后单击Settings(设置)。
选择Signatures,单击Custom,然后单击Add以添加新签名。
输入新的签名名称,然后选择引擎(在本例中为STRING.TCP)。
可以通过选中相应的单选按钮并单击编辑来自定义可用参数。
在本示例中,ServicePorts参数值被编辑更改为23(端口23)。 还编辑RegexString参数以添加值testattack。完成此操作后,单击“确定”继续。
编辑Signature Severity和Actions,或者启用/禁用签名,点击签名的名字。
在这种情况下,严重性应更改为“高”,同时选中块主机动作。单击 OK 继续。
Block Host阻止攻击IP主机或IP子网。
块连接阻塞TCP或UDP端口(根据攻击TCP或UDP连接)。
完整的签名如下所示:
要配置阻止设备,请从对象选择器(屏幕左侧的菜单)中选择阻止> 阻止设备,然后单击添加以输入以下信息:
单击编辑接口(请参阅上一屏幕截图),单击添加,输入此信息,然后单击确定继续。
单击OK两次以完成阻止设备的配置。
要配置阻塞属性,请选择阻塞>阻塞属性。
可以修改“自动块的长度”(Length of Automatic Block)。在本例中,更改为15分钟。单击Apply(应用)继续。
从主菜单选择Configuration,然后选择Pending,检查待定配置,确保其正确,并点击Save。
要推动配置更改到传感器,选择Deployment>Generate,并点击Apply,生成并部署更改。
选择Deployment > Deploy,然后单击Submit。
选中Sensor(传感器)旁边的复选框,然后单击Deploy。
选中队列中作业的复选框,然后单击“下一步”继续。
输入作业名称并将作业安排为立即,然后单击完成。
选择Deployment > Deploy > Pending。
等待几分钟,直到所有待处理作业完成。然后队列为空。
要确认部署,请选择Configuration> History。
确保配置状态显示为已部署。这意味着传感器配置已成功更新。
本部分所提供的信息可用于确认您的配置是否正常工作。
命令输出解释程序工具(仅限注册用户)支持某些 show 命令,使用此工具可以查看对 show 命令输出的分析。
验证阻塞流程在正常地运作,请发送一个测试攻击,并检查结果。
在发起攻击之前,请选择VPN/Security Management Solution > Monitoring Center > Security Monitor。
从主菜单中选择“Monitor”,单击“Events”,然后单击“Launch Event Viewer”。
远程登录到路由器(在这种情况下,远程登录到House路由器),验证传感器的通信。
house#show user Line User Host(s) Idle Location * 0 con 0 idle 00:00:00 226 vty 0 idle 00:00:17 10.66.79.195 house#show access-list Extended IP access list IDS_Ethernet1_in_0 10 permit ip host 10.66.79.195 any 20 permit ip any any (20 matches) House#
如果要发送攻击,请从一个路由器远程登录另一个路由器,同时输入testattack。
在这种情况下,我们使用Telnet从光路由器连接到房间路由器。当您输入testattack,并按<space>或<enter>之后,您的Telnet会话将重置。
light#telnet 100.100.100.1 Trying 100.100.100.1 ... Open User Access Verification Password: house>en Password: house#testattack !--- Host 100.100.100.2 has been blocked due to the !--- signature "testattack" being triggered. [Connection to 100.100.100.1 lost]
Telnet至路由器(House)并输入命令show access-list。
house#show access-list Extended IP access list IDS_Ethernet1_in_1 10 permit ip host 10.66.79.195 any !--- You will see a temporary entry has been added to !--- the access list to block the router from which you connected via Telnet previously. 20 deny ip host 100.100.100.2 any (37 matches) 30 permit ip any any
从Event Viewer,点击Query Database,查询新事件,查看以前发出的警报。
在Event Viewer中,高亮显示并右击告警,然后选择View Context Buffer或View NSDB,查看告警的更多详细信息。
注意:NSDB也可在思科安全百科全书(仅限注册客户)上联机访问。
请按照以下步骤进行故障排除。
在IDS MC中,选择“报告”>“生成”。
根据问题类型,可以从七个可用报告中的一个报告中找到更详细的资料。
在传感器控制台上,输入show statistics networkaccess 命令,然后检查输出,以保证"状态"是活跃状态。
sensor5#show statistics networkAccess Current Configuration AllowSensorShun = false ShunMaxEntries = 100 NetDevice Type = Cisco IP = 10.66.79.210 NATAddr = 0.0.0.0 Communications = telnet ShunInterface InterfaceName = FastEthernet0/1 InterfaceDirection = in State ShunEnable = true NetDevice IP = 10.66.79.210 AclSupport = uses Named ACLs State = Active ShunnedAddr Host IP = 100.100.100.2 ShunMinutes = 15 MinutesRemaining = 12 sensor5#
保证通信参数显示正确协议正在使用,例如Telnet或带有3DES的Secure Shell (SSH)。
您可以从PC上的SSH/Telnet客户端,尝试SSH或远程登陆,检查用户名和秘密是否正确。您可以从传感器本身尝试远程登陆或SSH到路由器,保证您能够成功登录。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
16-Jun-2008 |
初始版本 |