本文档提供思科入侵检测系统(IDS)的示例配置,通过VPN/安全管理解决方案(VMS)、IDS管理控制台(IDS MC)。 在这种情况下,配置了从IDS传感器到思科路由器的TCP重置。
尝试进行此配置之前,请确保满足以下要求:
传感器已安装并配置为检测必要的流量。
嗅探接口跨到路由器外部接口。
本文档中的信息基于以下软件和硬件版本:
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 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 ! ! ! 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 5 Save the config: (It might take a few minutes for the sensor saving the configuration) [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
完成以下步骤,将传感器导入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(传感器组)。
突出显示“全局”,然后单击“创建子组”。
输入组名并确保选中默认值,然后单击确定将子组添加到IDS MC。
选择Devices > Sensor,突出显示在上一步中创建的子组(在本例中为test),然后单击Add。
突出显示子组,然后单击“下一步”。
根据本例输入详细信息,然后单击Next以继续。
当显示一条消息,指出已成功导入传感器配置时,单击完成以继续。
您的传感器已导入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进行签名更新。
下载网络IDS签名更新(仅限注册客户),并将其保存在VMS服务器的C:\PROGRA~1\CSCOpx\MDC\etc\ids\updates\ 目录中。
在VMS服务器控制台上,选择VPN/Security Management Solution > Management Center > IDS Sensors。
选择“配置”选项卡,然后单击“更新”。
单击“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路由器配置TCP重置,请完成以下步骤。
选择VPN/Security Management Solution > Management Center > IDS Sensors。
选择Configuration(配置)选项卡,从Object Selector(对象选择器)中选择Sensor(传感器),然后单击Settings(设置)。
选择Signatures,单击Custom,然后单击Add以添加新签名。
输入新的签名名称,然后选择引擎(在本例中为STRING.TCP)。
选中适当的单选按钮以自定义可用参数,然后单击Edit。
在本示例中,ServicePorts参数值被编辑更改为23(端口23)。 还编辑RegexString参数以添加值testattack。完成此操作后,单击“确定”继续。
单击签名的名称以编辑签名严重性和操作或启用/禁用签名。
在这种情况下,将严重性更改为“高”,同时选择“操作日志&重置”。单击 OK 以继续。
完整的签名如下所示:
选择Configuration > Pending,检查挂起的配置以确保其正确,然后单击Save。
选择Deployment > Generate,然后单击Apply以将配置更改推送到传感器。
选择部署>部署,然后单击提交。
选中Sensor(传感器)旁边的复选框,然后单击Deploy(部署)。
选中队列中作业的复选框,然后单击Next以继续。
输入作业名称并将作业安排为“立即”,然后单击“完成”。
选择Deployment > Deploy > Pending。
等待几分钟,直到所有待处理作业完成。队列应该为空。
选择Configuration > History以确认部署。
确保配置状态显示为已部署。这意味着传感器配置已成功更新。
使用本部分可确认配置能否正常运行。
发起测试攻击并检查结果,以验证阻止过程是否正常工作。
在攻击启动之前,请选择VPN/Security Management Solution > Monitoring Center > Security Monitor。
从主菜单中选择“监控”,然后单击“事件”。
单击“Launch Event Viewer(启动事件查看器)”。
从一台路由器Telnet至另一台路由器,然后键入testatck以发起攻击。
在本例中,我们从路由器Light(路由器灯)到路由器House(路由器房)进行Telnet连接。只要按<space>或<enter>,键入testattack后,您就应重置Telnet会话。
light#telnet 100.100.100.1 Trying 100.100.100.1 ... Open User Access Verification Password: house>en Password: house#testattack !--- The Telnet session is reset due to the !--- signature "testattack" being triggered. [Connection to 100.100.100.1 lost]
在事件查看器中,单击查询数据库以立即获取新事件。
您会看到之前发起的攻击的警报
在事件浏览器中,突出显示告警,右击鼠标并选择视图上下文缓冲区或查看NSDB,查看更多关于告警的详细信息。
本部分提供的信息可用于对配置进行故障排除。
完成以下步骤以排除故障。
在IDS MC中,选择“报告”>“生成”。
根据问题类型,在七个可用报告中的一个报告中应该能找到更详细的信息。
当阻塞使用命令和控制端口配置路由器access-lists时,从传感器的探测接口发送TCP重置。确保在交换机上使用set span命令跨越了正确的端口,类似于:
set spanbanana (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 !--- In this case, connect to Ethernet1 of Router House. Oper Source : Port 2/12 Direction : transmit/receive Incoming Packets: enabled Learning : enabled Multicast : enabled both inpkts enable
如果TCP重置不工作,请登录传感器并输入show event命令。
启动攻击,并查看是否触发了告警。如果触发告警,检查并确保它为动作类型TCP重置设置。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
17-Oct-2008 |
初始版本 |