本檔案將討論使用IPS Manager Express(IME)設定入侵防禦系統(IPS)TCP重設。IME和IPS感測器用於管理用於TCP重置的Cisco路由器。檢視此設定時,請記住以下專案:
安裝感測器並確保感測器正常工作。
使監聽介面跨距介面以外的路由器。
本文件沒有特定需求。
本文中的資訊係根據以下軟體和硬體版本:
Cisco IPS管理員Express版本7.0
Cisco IPS感應器7.0(0.88)E3
採用Cisco IOS軟體版本12.4的Cisco IOS®路由器
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
本檔案會使用下圖中所示的網路設定。
本文檔使用此處顯示的配置。
路由器指示燈 |
---|
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 |
路由器外殼 |
---|
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。
選擇Home > Add。
鍵入此資訊並按一下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和Reset TCP Connection。按一下「OK」,然後「Next」以繼續。
輸入正規表示式,本示例中使用testattack。輸入23作為Service Ports,選擇To Service作為Direction,然後按一下Next以繼續。
可以將此資訊保留為預設值。按「Next」(下一步)。
按一下完成以完成嚮導。
選擇Configuration > sig0 > Active Signatures,以便通過簽名ID或簽名找到新建立的簽名。按一下Edit以檢視簽名。
確認後按一下OK,然後按一下Apply按鈕將特徵碼應用到感測器。
完成以下步驟,即可啟動攻擊和TCP重設:
發起攻擊之前,請轉到IME,選擇Event Monitoring > Dropped Attacks View,然後選擇右側的感測器。
從Router Light(路由器指示燈),Telnet至Router House並進入testattack。
按一下<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事件檢視器的控制面板中,一旦發起攻擊,就會出現紅色警報。
本節提供的資訊可用於對組態進行疑難排解。
使用以下故障排除提示:
回撥功能不使用命令和控制埠來重新程式設計路由器訪問控制清單(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登入root並發出此命令。此命令假設感應介面設定為eth0。
[root@sensor1 root]#tcpdump -i eth0 -n
注意:向受害者/目標傳送一百個tcp重置,然後向攻擊者/客戶端傳送一百個tcp重置。
以下是輸出範例:
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 |
初始版本 |