4.1 實驗環境
本論文主要是探討不同NAT 網路架構下的可用性與安全性。如前面章節所
述,本次實驗將利用我們設計的Agent 對目前常見的 NAT 網路架構進行可用性 與安全性測試。測試的網路與裝置類別有四種,分為有線網路、行動網路電信商、
智慧型行動裝置、與市售無線基地台。參與測試的網路與裝置如表4.1 所列。
表4.1 NAT 設備可用性與安全性測試列表 ISP 有線網路
No. 項目 No. 項目
1 中華電信 光世代 3 台灣固網
2 中華電信 ADSL 4 第四台 Cable 行動網路電信商
No. 項目 No. 項目
1 中華電信 4G 5 遠傳電信 4G
2 中華電信 3G 6 遠傳電信 4G
3 台灣大哥大 4G 7 台灣之心 4G
4 台灣大哥大 3G 8 台灣之心 3G
智慧型行動裝置
No. 項目 系統 No. 項目 系統
1 ASUS ZenFone 2 6.0.1 16 iPhone 6s 9.35 2 ASUS ZenFone 2 5.1.1 17 iPhone 5s 9.35 3 ASUS ZenFone 2 5.0.1 18 iPhone 4s 9.35 4 ASUS ZenFone 2 4.4.1 19 iPad 2 9.35 5 ASUS ZenFone 2 4.2.1 20 iPhone 6 8.3 6 SONY C5520 6.0.1 21 iPhone 6s 9.35 7 SONY C5520 5.1.1 22 iPhone 5s 9.35 8 SONY C5520 5.0.1 23 iPhone 4s 9.35 9 SONY C5520 4.4.1 24 iPad 2 9.35 10 SONY C5520 4.2.1 25 iPhone 6 8.3 11 小米 紅米手機 6.0.1 26 iPhone 5s 8.1.3 12 小米 紅米手機 5.1.1 27 iPhone 4s 8.1.1 13 小米 紅米手機 5.0.1 28 iPhone 5s 7.1
35
14 小米 紅米手機 4.4.1 29 iPhone 4s 7.1 15 小米 紅米手機 4.2.1 30 iPhone 4 6.1.2
市售無線基地台
No. 項目 No. 項目
1 ARUBA AP-105 16 D-Link DIR-619L 2 ASUS RT-AC54U 17 D-Link DIR-809 3 ASUS RT-N66U 18 D-Link DIR-815 4 ASUS RT-N12 19 EDIMAX DR-6228NS 5 ASUS RT-N16 20 EDIMAX BR-6428nS 6 ASUS RT-N56U 21 Linksys WRT150N 7 BUFALLO WHR-HP-G300N 22 netis WF2409E 8 BUFALLO WHR-HP-G450N 23 小米路由器 mini 9 D-Link DIR-101 24 Sapido BRC65c 10 D-Link DIR-320 25 Sapido GR-1736 11 D-Link DIR-524 26 Tenda FH307
12 D-Link DIR-600M 27 TOTOLINK AC5 AC1200 13 D-Link DIR-612 28 TP-LINK AC720
14 D-Link DIR-615 29 TP-LINK WR841N 15 D-Link DIR-618 30 TP-Link TL-WR740N
本次實驗的可用性與安全性檢測環境架構如圖 4.1 所示。我們在外部網路架 設一台有 Stun Server 功能的 Server C,並設定兩個網路 IP 地址,分別為 219.81.64.94 與 219.81.64.95,並開啟兩個網路埠號為 3478 與 3479。接著在內部
網路與外部網路的中間放置我們要測試的 NAT 設備,最後我們在內部網路內的
Client A 電腦上面運行我們所設計的 Agent 程式去穿透 NAT 網路設備,藉由 Server C 回傳的訊息去分析 NAT 網路設備的可用性與安全性。
36
內部網路 外部網路Internet
Client A 192.168.0.1:1001
NAT安全性
檢測設備 Stun Server C
219.81.64.94 219.81.64.95 Agent
Port 3478 3479
圖4.1 可用性與安全性檢測環境架構圖
4.2 ISP 有線網路可用性與安全性分析
首先我們先針對有線網路進行可用性與安全性分析。我們找了四個不同的有 線網路ISP,分別是中華電信光世代、中華電信 ADSL、台灣固網、有線電視業 者的纜線(Cable)網路。測試結果如表 4.2 所示。我們發現前三者的網路架構都含 有NAT 設備,所測得的可用性與安全性等級皆為 3,是屬於 Port Restricted Cone 類型的NAT。有線電視業者的纜線網路則是屬於 Open Internet。我們分析 Open Internet 傳遞的網路封包後發現封包的對應機制為獨立對應(Independent
Mapping),而過濾機制為獨立過濾(Independent Filtering)。這樣的對應與過濾機
制是最不安全的,因此建議此類型的網路架構可以加裝其他NAT 網路設備來增
加網路的安全性。
表4.2 有線網路可用性與安全性測試結果 ISP 纜線網路
No. 項目 NAT Type 可用性 安全性
1 中華電信 光世代 Port restricted Cone NAT 3 3 2 中華電信 ADSL Port restricted Cone NAT 3 3 3 台灣固網 Port restricted Cone NAT 3 3 4 第四台 Cable Open Internet N/A N/A
37
4.3 行動網路營運商可用性與安全性分析
接著我們針對行動網路營運商的數據網路進行可用性與安全性分析。我們找 了四家不同的行動網路營運商,分別是中華電信、台灣大哥大、遠傳電信、與台
灣之心。因為我們沒有開發手機所使用的App,所以我們下載可以於手機運行的
App 來檢測電信營運商 3G 與 4G 網路的 NAT Type。測試結果如表 4.3 所示。中 華電信與遠傳電信的NAT Type 為 Port restricted Cone NAT,而台灣大哥大與台灣 之心為Full Cone NAT。根據表 3.2 的 NAT 穿透的安全性等級,Full Cone NAT 的可用性等級為3、安全性等級為 1,Port restricted Cone NAT 的可用性與安全性 等級皆為3,兩者相較後 Port restricted Cone NAT 類型的網路較為安全。
表4.3 行動網路營運商可用性與安全性測試結果 行動網路電信商
No. 項目 NAT Type 可用性 安全性
1 中華電信 4G Port restricted Cone NAT 3 3 2 中華電信 3G Port restricted Cone NAT 3 3
3 台灣大哥大 4G Full Cone NAT 3 1
4 台灣大哥大 3G Full Cone NAT 3 1
5 遠傳電信 4G Port restricted Cone NAT 3 3 6 遠傳電信 4G Port restricted Cone NAT 3 3
7 台灣之心 4G Full Cone NAT 3 1
8 台灣之心 3G Full Cone NAT 3 1
4.4 行動裝置的無線基地台可用性與安全性分析
行動裝置是藉由軟體去達到無線基地台的功能。我們此項實驗的目的是要在
同一個行動裝置上面進行不同版本的作業系統安全性分析。我們找了 30 種行動
裝置,作業系統分別為Android 與 iOS,其中 Android 的行動裝置品牌與型號為 ASUS ZenFone 2、Sony C5520、小米紅米手機,作業系統的版本有 6.0.1、5.1.1、
4.4.1、4.2.1,而 iOS 的行動裝置為 iPhone 與 iPad,作業系統為 9.35、8.3、8.1.3、
8.1.1、7.1。在這 30 種行動裝置上所測得的可用性與安全性等級皆為 3,是屬於
38
Port Restricted Cone 類型的 NAT。我們無法在這樣的 NAT 架構下找出不同的安 全性等級。
表4.4 智慧型行動裝置可用性與安全性測試結果 智慧型行動裝置
No. 項目 系統 NAT Type NAT Security Index 1 ASUS ZenFone 2 6.0.1 Port restricted Cone NAT 4
2 ASUS ZenFone 2 5.1.1 Port restricted Cone NAT 4 3 ASUS ZenFone 2 5.0.1 Port restricted Cone NAT 4 4 ASUS ZenFone 2 4.4.1 Port restricted Cone NAT 4 5 ASUS ZenFone 2 4.2.1 Port restricted Cone NAT 4 6 SONY C5520 6.0.1 Port restricted Cone NAT 4 7 SONY C5520 5.1.1 Port restricted Cone NAT 4 8 SONY C5520 5.0.1 Port restricted Cone NAT 4 9 SONY C5520 4.4.1 Port restricted Cone NAT 4 10 SONY C5520 4.2.1 Port restricted Cone NAT 4 11 小米 紅米手機 6.0.1 Port restricted Cone NAT 4 12 小米 紅米手機 5.1.1 Port restricted Cone NAT 4 13 小米 紅米手機 5.0.1 Port restricted Cone NAT 4 14 小米 紅米手機 4.4.1 Port restricted Cone NAT 4 15 小米 紅米手機 4.2.1 Port restricted Cone NAT 4 16 iPhone 6s 9.35 Port restricted Cone NAT 4 17 iPhone 5s 9.35 Port restricted Cone NAT 4 18 iPhone 4s 9.35 Port restricted Cone NAT 4 19 iPad 2 9.35 Port restricted Cone NAT 4 20 iPhone 6 8.3 Port restricted Cone NAT 4 21 iPhone 6s 9.35 Port restricted Cone NAT 4 22 iPhone 5s 9.35 Port restricted Cone NAT 4 23 iPhone 4s 9.35 Port restricted Cone NAT 4 24 iPad 2 9.35 Port restricted Cone NAT 4 25 iPhone 6 8.3 Port restricted Cone NAT 4 26 iPhone 5s 8.1.3 Port restricted Cone NAT 4 27 iPhone 4s 8.1.1 Port restricted Cone NAT 4 28 iPhone 5s 7.1 Port restricted Cone NAT 4 29 iPhone 4s 7.1 Port restricted Cone NAT 4 30 iPhone 4 6.1.2 Port restricted Cone NAT 4
39
4.5 市售無線基地台(AP)可用性與安全性分析
無線基地台(AP)是目前最被廣泛使用的 NAT 設備之一,我們此項實驗的目的 是為了分析市售的無線基地台(AP)的可用性與安全性。我們收集了 30 台無線基 地台,品牌選擇購物網站銷售最好的ASUS 與 D-link 為多數測試目標。這 30 台 無線基地台所測試的結果如表4.5 所示。
表4.5 市售無線基地台可用性與安全性測試結果 市售無線基地台
No. 項目 NAT Type 可用性 安全性
1 ARUBA AP-105 Restricted Cone NAT 3 2 2 ASUS RT-AC54U Port restricted Cone NAT 3 3 3 ASUS RT-N66U Port restricted Cone NAT 3 3 4 ASUS RT-N12 Port restricted Cone NAT 3 3 5 ASUS RT-N16 Port restricted Cone NAT 3 3 6 ASUS RT-N56U Port restricted Cone NAT 3 3 7 BUFALLO WHR-HP-G300N Restricted Cone NAT 3 2 8 BUFALLO WHR-HP-G450N Port restricted Cone NAT 3 3 9 D-Link DIR-101 Full Cone NAT 3 1
10 D-Link DIR-320 N/A 2 2
11 D-Link DIR-524 Port restricted Cone NAT 3 3 12 D-Link DIR-600M Port restricted Cone NAT 3 3 13 D-Link DIR-612 Port restricted Cone NAT 3 3 14 D-Link DIR-615 Port restricted Cone NAT 3 3 15 D-Link DIR-618 Port restricted Cone NAT 3 3 16 D-Link DIR-619L Port restricted Cone NAT 3 3 17 D-Link DIR-809 Port restricted Cone NAT 3 3 18 D-Link DIR-815 Port restricted Cone NAT 3 3 19 EDIMAX DR-6228NS Symmetric NAT 1 3 20 EDIMAX BR-6428nS Port restricted Cone NAT 3 3 21 Linksys WRT150N Port restricted Cone NAT 3 3 22 netis WF2409E Port restricted Cone NAT 3 3 23 小米路由器 mini Port restricted Cone NAT 3 3 24 Sapido BRC65c Port restricted Cone NAT 3 3 25 Sapido GR-1736 Port restricted Cone NAT 3 3 26 Tenda FH307 Port restricted Cone NAT 3 3
40
27 TOTOLINK AC5 AC1200 Port restricted Cone NAT 3 3 28 TP-LINK AC720 Port restricted Cone NAT 3 3 29 TP-LINK WR841N Port restricted Cone NAT 3 3 30 TP-Link TL-WR740N Port restricted Cone NAT 3 3 我們將這30 台 AP 的測試結果利用泡泡圖來表示,如圖 4.2 所示,X 軸為 NAT 的過濾特性,Y 軸為 NAT 對應特性,我們從實驗結果發現大多數的 NAT 網路 設備兼具較好的可用性與較高的安全性。
圖4.2 市售無線基地台可用性與安全性測試結果
最後我們統計所有的NAT 設備的實驗結果。目前 NAT 設備大多數特性是 Independent Mapping (獨立對應)與 Address and Port Dependent Filtering(地址與埠 相依過濾)。這是因為 Independent Mapping (獨立對應)擁有比較高的可用性。在 過濾條件方面,大多數設備則採用安全性較高的Address and Port Dependent Filtering(地址與埠相依過濾)。
41