The security implications of IPv6

28
The security implications of IPv6 author Keith Barker source Network Security, Volume 2013, Issue 6, June 2013, Pages 5-9 speaker 顏顏顏 1

description

The security implications of IPv6. a uthor : Keith Barker source : Network Security, Volume 2013, Issue 6, June 2013,  Pages 5-9 speaker :顏嘉穎. Outline. 一、 abstract 二、 IPv6 ICMP vulnerabilities 三、 Multiple protocol stack vulnerabilities 四、 The lack of experience in countermeasures for - PowerPoint PPT Presentation

Transcript of The security implications of IPv6

Page 1: The security implications of IPv6

1

The security implications of IPv6

author:Keith Barker

source:Network Security, Volume 2013,

Issue 6, June 2013, Pages 5-9speaker :顏嘉穎

Page 2: The security implications of IPv6

2

Outline

一、 abstract二、 IPv6 ICMP vulnerabilities三、Multiple protocol stack vulnerabilities四、 The lack of experience in

countermeasures for IPv6 attacks五、 Increasingly, hacking tools now support

IPv6六、 IPv6 multicast vulnerabilities七、 IPv6 header information vulnerabilities八、 Tunnelling IPv6 through IPv4 network

Page 3: The security implications of IPv6

3

一、摘要• 隨著行動設備的激增, IPv4位址正迅速的消耗。

• 歐洲正式耗盡 IPv4的位址,是在 2012年底,但現在 IPv4仍被 internet廣大的使用。

• 雖然多數企業現在正準備向 IPv6遷移,但從IPv4的切換帶來一系列的安全問題。

Page 4: The security implications of IPv6

4

二、 IPv6的 ICMP漏洞 (1/10)

• 假設某網路的拓樸如下圖:

Page 5: The security implications of IPv6

5

二、 IPv6的 ICMP漏洞 (2/10)

• 鄰居發現協議 (Neighbor Discovery Protocol):ICMPv6的功能之一,負責在鏈路上發現其它節點和相應的地址。

• 當電腦在 IPv6網路上,並在 IPv6的協議棧上執行,他會去嘗試找尋 IPv6網路當前是否正在連接另外的網路。

Page 6: The security implications of IPv6

6

二、 IPv6的 ICMP漏洞 (3/10)

• 若要執行這個動作,他會發送一個路由器請求(RS, Router Solicitation)到網路,藉此詢問訊息。

• 在協定分析器 (protocol analyser)看到的RS內容,如下圖所示。

圖: RS的內容

Page 7: The security implications of IPv6

7

二、 IPv6的 ICMP漏洞 (4/10)

• 為了回應,本地網段上必須回應一個路由器通公告 (RA,Router Advertisement),這個訊息是類型 134。

圖: RA的內容

Page 8: The security implications of IPv6

8

二、 IPv6的 ICMP漏洞 (5/10)

• 任何人發出的回應 RS的 RA,可能可以欺騙客戶端,使其相信這個 RA是在不同的子網路。

• 無狀態定址自動配置 (Stateless Address Auto-configuration):客戶端可以透過 RS/RA的交換,來動態學習網路位址。

• 重複地址檢測 (Duplicate Address Detection,DAD)

Page 9: The security implications of IPv6

9

二、 IPv6的 ICMP漏洞 (6/10)

• 客戶端可以使用DAD來確認介面 ID是不是正在使用中。

Page 10: The security implications of IPv6

10

二、 IPv6的 ICMP漏洞 (7/10)

• 攻擊者 (設備也在 subnet1),運行fake_router6 eth0 2001:db8:6783::/64的命令

• 這個命令會導致使用 Linux的主機執行這個攻擊指令,並且以一個 RS回覆 RA。

• 這個假冒的首碼會被當作命令的一部分來執行,同時會對 RA表示該 RA是最好的(preferred)。

Page 11: The security implications of IPv6

11

二、 IPv6的 ICMP漏洞 (8/10)

• 假冒的 RA:

Page 12: The security implications of IPv6

12

二、 IPv6的 ICMP漏洞 (9/10)

• 在命令列上,可以看到封包傳送的偏好路線已被修改:

• 輸出上指出指標值 (metric)為 16,這是對於流氓 router的狀況。

• 而針對合法的 router(R1),指標值則是256,指標值越低是越好的。

Page 13: The security implications of IPv6

13

二、 IPv6的 ICMP漏洞 (10/10)

fake_router6:• 這種攻擊類似中間人攻擊,在默認的情況下不需要經過任何的驗證。

• 攻擊者會嘗試發送 RA,並且將 PC做為網路上的預設設備。

• 這會導致客戶端發送網路數據,而攻擊者只需要使用Wireshark就可以輕鬆捕獲這些數據。

Page 14: The security implications of IPv6

14

三、多重協議堆疊的漏洞 (1/3)

• 現在大多數使用 IPv4 桌電或筆電大多數也支援IPv6,並且有多數是默認開啟 IPv6的。

• 正在運作雙架構 (dual stack)的基礎設施,無須任何額外的設備就可以同時使用 IPv4 與IPv6。

• 在針對 IPv6的相關設備進行安全性評估以前,上網是會有安全風險的。

Page 15: The security implications of IPv6

15

三、多重協議堆疊的漏洞 (2/3)

• 如果每一個子網路的客戶端都要能成功連接互聯網,那有兩個前提:

(一 )該公司需要有自己的 IPv6位址,結合 IPv6路由,並使用雙重架構機制。

(二 )IPv6 服務供應商連接到 R3,或者公司使用通道

代理人 (TB)連接到已啟用的 IPv6網路。

Page 16: The security implications of IPv6

16

三、多重協議堆疊的漏洞 (3/3)

• 所有的 IPv4安全防護有漏洞的地方通常是在攻擊者與受害者之間。

• 由於 IPv6使用不同於以往的協議,大量設備開始使用的情況下,可能會比 IPv4 更容易有漏洞。

• 因為對於 IPv6路由協議的認證還沒有被常態配置。

Page 17: The security implications of IPv6

17

四、缺乏對於 IPv6攻擊的對策與經驗 (1/3)

• 大多數的網路工程師、設計師,根據多年來的經驗,都可以對於 IPv4的安全性有一定的觀念。

• 當廠商已經提供了多種解決方案,並將其整合在switch、 router 等設備上時,我們可以簡單的防禦針對 IPv4的攻擊。

• 但許多在 IPv4能被實現的攻擊,仍可用於IPv6,如果廠商所提供的策略或是工程師自身沒有注意到的話,那很容易變成一個漏洞。

Page 18: The security implications of IPv6

18

四、缺乏對於 IPv6攻擊的對策與經驗 (2/3)

• 搭載 IPv6的主機使用舊有的位置做為連接接口(不論是 link-local 或是 global address),他會使用DAD來驗證有無其他人使用這地址。

• 假設有一台惡意主機,接收所有鄰居透過使用DAD發出的NS請求,表明該位置已經被使用的話會如何 ?

Page 19: The security implications of IPv6

19

四、缺乏對於 IPv6攻擊的對策與經驗 (3/3)

圖: linux輸出的 5 項 DAD欺騙內容

圖:協定分析器捕獲到的DAD欺騙內容

Page 20: The security implications of IPv6

20

五、越來越多支援 IPv6的駭客程式 (1/2)

• 更多在關注 IPv6以及實際套用的設施在增加,某些時候 IPv6 甚至成為主要使用的協議。

• 兩個攻擊都是這些工具的例子,還有另一個工具叫做 redir6。

Page 21: The security implications of IPv6

21

五、越來越多支援 IPv6的駭客程式 (2/2)

• 攻擊者可以從 subnet1發出一個命令,如下圖:

• 客戶端上的路由器快取會相信下一節點的目的地是ff80::777。

Page 22: The security implications of IPv6

22

六、 IPv6多點傳輸的弱點 (1/2)

• IPv6的建立是為了避免使用廣播,但其中有很多IPv6是正在使用群播地址。

• 由於 IPv6 很可能有數億台主機,由一個 ping去掃描全部的 subnet是不切實際的。

• 然而,由於全部的主機都加入了某群播群組的話,一個 ping到該地址,就可以顯示該網路上的全部設備。

Page 23: The security implications of IPv6

23

六、 IPv6多點傳輸的弱點 (2/2)

圖: ping的結果

圖:使用Nmap的工具對設備逐個進行掃描

Page 24: The security implications of IPv6

24

七、 IPv6標頭訊息的漏洞 (1/3)

• IPv6能夠使用延伸標頭 (extension headers),以指出 IPv6封包中的下一個標頭。

• 由於這些標頭的靈活性,被惡意製作的標頭可能會消耗過多的資源在路由器的路徑上,進而造成目標位址遭受 DoS攻擊的風險。

Page 25: The security implications of IPv6

25

七、 IPv6標頭訊息的漏洞 (2/3)

圖:封包分析器顯示一個封包指向某個分段的標頭

Page 26: The security implications of IPv6

26

七、 IPv6標頭訊息的漏洞 (3/3)

圖:Hop-by-hop標頭

Page 27: The security implications of IPv6

27

八、從 IPv6到 IPv4的傳輸• 網路安全設備在 IPv4的部分,我們的網路可能不需準備深度封包檢測來測試 IPv6的流量。

• 在隧道的端點 (endpoints),協定或者應用程序的檢查是在交換的過程中就該做的,但是因為核心設備可能需要多餘的計算而忽略的檢查。

Page 28: The security implications of IPv6

28

Q&A