2014年11月17日 星期一

CNP-ISCW Module 05 Cisco Device Harding (1)

Filed under: CCNP-ISCW Module 05 — nkongkimo @ 06:38:05
Reconnaissance Attack(資訊收集攻擊)
項目運作方式備註
1.Ping Sweeps       (IP secan)*無法完全消除
2.Port scans
1.SYN scan: 正常的連線方式,有回應表示port active
2.FIN scan: FIN為連線終止的訊號,當FIN沒回應表示port active
3.UDP scan: 利用ICMP port Unreachable查詢
*查詢IOS設備的類型、版本
*無法完全消除
*用Telnet就可以做了
3.Packet sniffer
(監聽封包)
*安裝sniffer軟體或把網卡設定混亂模式,收集流經的封包並解析封包內容
*需要在同一個collision domain
軟體:Sniffer Ethereal
設備:IPS/IDS
*無法完全消除
4.Internet information queries*上網查詢漏洞
Access attacks(入侵系統竊取資料)
項目備註
1.Password attack
(密碼攻擊)
*利用字典、暴力攻擊法,取得密碼
*密碼長度越長強度越佳
*密碼複雜度越高強不越佳
*密碼需要編碼加密
2.Trust exploitation
3.Port redirection
4.Man-in-the-middle attack
(Clean pipe)

*解決方法利用VPN Tunnel加密
DoS & DDoS(阻斷攻擊)
項目運作狀況備註
1DoS&DDoS
*耗盡頻寬、系統連線的攻擊,造成服務中斷。
*無法完全消除
*搭配IP偽造的功能
*比雙方資源
IP Spoofing
*ACL:在進入的端口設定deny自己的網段
* RFC 3704(包含RFC 2827):以ISP的角度要做到阻擋10.0.0.0/8、172.16.0.0/12、192.168.0.0/16、224.X.X.X(mutlticast的虛擬IP)、127.0.0.0,可以阻擋大部份IP偽造。
IDS/IPS 入侵偵測/入侵防禦系統
入侵偵測系統(IDS)
目的:有效偵測來自內外部網路對單位主機的入侵攻擊行為
分類:入侵偵測系統一般分為主機型(Host)網路型(Network)兩種
1.網路型IDS:會針對網路上的連線狀態及傳輸封包的內容進行監控
2.主機型IDS:可直接與主機伺服器上的作業系統與應用程式做密切的整合,因此可偵測出許多網路型IDS所察覺不出的攻擊模式(如網頁置換、作業系統的kernel竄改)
病毒的種類
項目行為防護
1.Worm(蠕蟲)1.The enabling vulnerability
(掃描系統弱點)
2.Propagation mechanism
(自我修復及擴散能力)
3.Payload
(提升權限)
*運作在一個有弱點的系統
1.Control控制:去區分蠕蟲
2.Inoculate預防:更新Path檔,修補弱點
3.Quarantine隔離:刪除或修補
4.Treat:探討並文件化
2.Virus(病毒)
3.Trojan Horse(木馬)
Management protocol
明文加密備註
HTTPHTTPS
SNMPv1、v2SNMPv3
TELNETSSHIOS需要支援
FTP

CCNP-ISCW Module 05 Cisco Device Harding (2)

Filed under: CCNP-ISCW Module 05 — nkongkimo @ 06:33:44
IOS Unused 的服務
ServiceDescriptionDefaultDisable備註
Router InterfaceIf cable accidentally or maliciously connectedDisabled(config-if)#shutdown不必要的介面建議要關掉
BOOTP serverService is rarely needed in modern networks
*與DHCP功能相似,封包與DHCP相同
Enabled(config-if)#no ip bootp server*bootp須手動指定mac與IP的關係
*可以使用此功能來網路開機
*到server走68/UDP
*到client走67/UDP
CDPUnless needed inside the network,disable globally or per interfaceEnabled(config)# no cdp run 整個關閉
(config-if)# no cdp enable  介面關閉
Cisco預設開啟,若不需要可關閉
Config auto loadingPermits router to automatically load a config file from a network server. Remain disabled when not neededDisabled
(config)# no service config
開機時找尋設備的設定檔並載入
FTP serverAllows router to act as an FTP server. Remain disabled when not neededDisabled(config)# no ftp-server enable*router也是一台server,但功能較陽春,只支援匿名登入。
TFTP serverAllows router to act as an TFTP server. Remain disabled when not neededDisabled(config)# no tftp-server file-sys:image-name*router也是一台server,但功能較陽春
NTP service
Correct time important for logging. Disable if not needed or restrict to only devices that require NTP
(config)# no ntp server ip-address
*NTP對時的協定,建議要有一台Router當作校時的主機。
*不建議全關掉
PAD
(Packet Assem Disassem)
Allows access to X.25 PAD commands. Rarely needed in modern networks. DisableEnabled
(config)# no service pad
*目前已無X.25的服務,可直接關閉
TCP and UDP minor servicesSmall servers (daemons) used for diagnostics. Rarely used. DisabledEnabled (before 11.3)
Disabled (11.3 and later)
(config)# no service tcp-small server
(config)# no service udp-small server
*檢查網路設備的介面是否正常
*不實用故可關閉。
Maint. Oper. Protocol (MOP)DEC maintenance protocol, rarely used. DisableEnabled
(most Ethernet interfaces)
(config-if)# no mop enabled*在Ethernet之前的網路
*目前已無此服務,可直接關閉

SNMPIf not used, disable. If needed, restrict access using ACL and use SNMPv3
Enabled
(config)# no snmp-server enabled*要有限制的開放,不可全部開放
*建議ACL限制存取的範圍
HTTP Config and MonitoringADM uses HTTP (HTTPS). If not used, disable. If needed, restrict access with ACLs and use HTTPS
Device dependent
(config)# no iphttp sever
(config)# no ip http secure-server
*要有限制的開放,不可全部開放
*建議ACL限制存取的範圍
DNSCisco routers use 255.255.255.255 as default add to reach DNS server. If not use disable or explicitly set DNS serverEnabled(config)# no ip domain-lookup
(config)# ipdomain-name
*建議關閉
ICMP RedirectsDisable if not neededEnabled
(config)# no ip icmp redirect
*不要讓route自己去決定client端連上來的路徑
*建議關閉
IP Source Routing
Rarely used, disable
Enabled
(config)# no source-route
*是封包中的option欄位,可以讓client變更自己的路由,造成無法管理
*建議關閉
Finger Service
Finger protocol (port 79) retrieves list of users from a network device (show users). Should be disabled when not needed
Enabled
(config)# no service finger
*與who的指令一樣
*建議關閉
ICMP unreach
Should be disabled.
Enabled
(config-if)# no ip unreachables*避免被port scan
*建議關閉
ICMP mask replyDisable on interfaces to untrusted networksDisabled(config)# no ip mask-reply*Router會回應自己遮罩是多少
*建議關閉
IP directed broadcast
Unicast until it reaches router for that segment, than it becomes a broadcast. Should be disabledEnabled (before 12.0)
Disabled (12.0 and later)
(config)# no ip directed-broadcast*ping broadcast的位址在broadcast的電腦全部都會回應
*建議關閉
IP ID service
RFC 1413 reports the identity of the TCP connection initiator
Enabled
(config)# no ip identd
*建議關閉
TCP keepalives
Helps clean up TCP connections when a host has stopped processing TCP packets. Should beenabled to help prevent DoS attacks
Disabled
(config)# service tcp-keepalives-in
(config)# service tcp-keepalives-out
*TCP預設連線為30分鐘若都沒有動作會自動中斷連線
*建議啟動
Gratuitous ARP
Unless needed, disable
Enabled
(config)# no ip arp ratutous
*Gratuitous ARP會送出一個來源及目的地IP都是自己的封包,去告知區網內PC目前IP已經更換其他PC,使區網PC去更新ARP table。
*主要功能去偵測是否IP衝突
*在區域網中容易遭到攻
*建議關閉
Proxy ARP
Only used if router is acting as a layer 2 bridge. Should be disabled
Enabled
(config-if)# no ip arp proxy
*在區域網中容易遭到攻擊
*主要功能為代回主機IP資訊
*建議關閉

CCNP-ISCW Module 05 Cisco Device Harding (3)

Filed under: CCNP-ISCW Module 05 — nkongkimo @ 05:28:35
Auto-Secure
Control plan
CPU
控制
Forwarding Plan

*啟動CEF
*加入ACL
*啟動Firewall
IOS 12.3(8)T後開始支援
Interactive mode(互動模式) 建議使用此功能
NonInteractive mode(懶人模式) cisco建議值沒有詢問直接寫入設定
Auto secure設定方式
Auto Secure SDM 設定方式
1.選擇使用security Audit的方式orOne-step lockdown的方式。

Secutity Audit
等同Interactive mode*檢查目前設定檔裡面哪些與cisco設定的參數符合與不符何
One-step lockdown等同Noninteractive mode*全部自動執行沒有互動
2.選擇連接到internet的介面及LAN的介面、並啟動防火牆
3.檢查目前設定檔裡面是否符合cisco預設的安全規則
4.列出目前與cisco不符合的設定,要求是否修改 
5.使用One-step lockdown
6.直接執行不在查詢執行檔
 Router password的相關設定
*不可以使用字典的字
*不可開頭為數字及空白鍵
*建議還需要設定ACL去管理存取的IP
image
image
若使用service password-encryption會把密碼都用cisco的方式加密,但若要取消要注意密碼一變成亂碼,所以建議取消service password-encryption後要變更密碼。
image
image
設定帳號密碼的方式
image
限制進入RUN montior的方式(不建議用)
image
Login 相關防護的設定
image
image
image
設定Banner警告
image
image
image
image
image
image
image  
image
SNMP
Community strings
Read only只可以詢問
Read write可以詢問及修改*建議關閉
*搭配ACL管制
image
SNMPv3優點:
1.Each User belong to a Group(每一個User會被定義在一個Group)
2.Each Group defnes a access policy(每一個群組被定義哪些policy)
3.Each access policy what SNMP object can accessed、read、wirte
4.定義一個notification(通知)的清單,定義哪些群組會收到特定的資訊(利用trap&infoem)
5.每一個群組會被定義為哪一個mode及Level的等級
MO(Managed Object):被管理的物件
OID(Object ID):被管理物件的ID
MIB(Manages information base):被管理物件的資料庫
SNMP 設定
Step1.設定EngineID
Step2.設定Group
Step3.設定User再哪一個群組
Step4.設定Host
範例: image
NTP (network time protocol)設定
System calendar硬體(主機板)的時間
本機時間(用電池的方式)
System clock軟體(IOS)的時間
重開機會向system calwndar做同步
*走123/UDP
*很有效率,只要一個封包就完成同步的動作
*NTPv4才在RFC文件中規範
image
image
image
image
image
AAA
Authentication(認證)
Authorization(授權)
Accounting and auditing(計量管理)
RADIUS V.S TACACS+
AAA ProtocolTACACS+RADIUS
Layer 3 ProtocolTCP/IPUDP/IP
EncrypationEntire bodyPassword only
StandardCiscoOpen/IETF
Port49/TCPACS:Cisco專用,1645/UDP 用來認證及授權,1646/UDP用來做計量
1812/UDP 用來認證及授權、1813/UDP用來做計量
*認證 授權 計量都是獨立
*可以把TACAS+的傳輸都加密
*認證 授權放在一個封包完成  計量的封包分開傳送
*只有密碼加密
image
image
AAA的設定
image
image
1.一定要設定一個local的方法登入,若沒有會導致第一種方法失效就完全無法登入的狀況
2.當方法一失效會使用方法2,以此列推
AAA SDM設定的方法
1.進入AAA設定選項
image
2.啟動AAA
image
3.RADUIS & TACACS+設定方式
image
image
4.建立login list
image
5.建立user DB
image
6.變更VTY認證、授權、計量的login list
image
image
image
image

沒有留言:

張貼留言