Honeynet concepts and Honeywall Installa0on 講師 : 鄭毓芹 ( Julia Cheng)
Honeynet concepts and Honeywall Installa0on
講師 : 鄭毓芹 ( Julia Cheng)
課程內容: • 課程目標: 課程介紹Honeynet Project 用於國際部屬的GDH 2 架構,並帶領學員實現學習如何利用誘捕網路誘捕網路攻擊與惡意程式。
• 課程內容: – Hands-‐on training environment – Honeypot and Honeynet Technology – Hand-‐On : Honeywall ROO v.1.4 Introduc0on, Install and Configure – Hand-‐On : Low interac0on honeypots (Nepenthes) – Hand-‐ On : High interac0on honeypots and Sebek – Incident analysis
2
Thanks a lot …
• The training materials refer to “Hands On with the Honeywall and Virtual Honeynets” by David Watson from FIRST TC 02/12/2009 in Kuala Lumpur.
3
Goals for training course
• Learn about honeynet technologies in a safe environment
• Gain an apprecia0on for how tools can help in opera0onal security and incident response
• Ask lots of ques0ons: this is a hands-‐on interac0ve session, so please say if stuck
4
Your Experience?
• Command line UNIX / Linux? • Control and operate in VMWare Server? • IP networking? • Packet sniffing and network forensics? • Malware collec0on and binary analysis • Using Honeypots and honeynets
5
Training Plaborm
• Everyone has the same training environment – WinXP and VMWare Server 1.0.9 – IP Address (140.110.126.x)(eth0) – the desktop PCs – Private VM LAN (vmnet8) – your personal NATed VMs
– Prebuilt VMs • Roo Honeywall v1.4 • Nepenthes v0.2.2 on Ubuntu Desktop 9.10 Honeypot • Ubuntu Server LAMP + Sebek v3 Honeypot • BackTrack agack host • Windows XP Professional SP3 Honeypot
6
Honeynet Training Scenario
7
Honeypot and Honeynet Technology
講師 : 鄭毓芹 ( Julia Cheng)
Honeypot and Honeynet • A honeypot is an informa0on system resource whose value lies in unauthorized or illicit use of that resource
• Has no produc0on value, anything going to or from a honeypot is likely a probe, agack or compromise
• Primary value to most organiza0ons is informa0on
• A honeynet is a network of honeypots 9
Honeypot and Honeynet (Cont.)
• Honeypot General Purpose : – Designed opera0on systems and services around your networks to be probed and hacked.
– All data collected is of high value and unpolluted
• What is Honeypot ? (單點)
– 模擬特定服務/系統弱點/特定功能,誘捕駭客攻擊
– 具資料捕捉機制,可收集攻擊資料,提供分析
– 具安全控管機制,避免被當作跳板。
10
Honeypot and Honeynet (Cont.) • What is a Honeynet ?
– Include Honeywall / Low-‐Interac0on / High-‐interac0on honeypot
– It is an architecture, not a product or soiware – Populate with live systems – Once compromised, data is collected
to learn the tools, tac0cs, and mo0ves of the blackhat community.
• Value of Honeynet – Research : Iden0fy new tools and new
tac0cs, Profiling blackhats – Early warning and predic0on – Incident Response / Forensics – Self-‐defense
11
Honeypot and Honeynet Type
• Low-‐interac0on (LI) – Emulates services, applica0ons, and OS’s – Low risk and easy to deploy/maintain, but – capture limited informa0on
• High-‐interac0on (HI) – Real services, applica0ons, and OS’s – Capture extensive informa0on, but higher risk and 0me intensive to maintain
12
作業系統
Low-‐
InteracMonHoneypot
硬碟
本機其他的資源
高互動式
低互動式
在honeynet中使用防火牆來紀錄、捕捉攻擊行為
Low-‐InteracMon Hpneypot
Honeypot and Honeynet Type (Con.t)
Honeynet Project Tools
• Honeywall CD ROM (高互動式) • Honeys0ck • Honeytrap (低互動式) • HIHAT (高互動式) • Nepenthes (低互動式) • HoneyC • Capture-‐HPC • Capture-‐BAT • Honeysnap • Tracker • Pehunter
• Sebek • PicViz • Honeymole • HoneyBow • Google Hack
Honeypot • Glastopf
14
低互動式誘捕系統 – Honeyd (模擬作業系統與Service)
15
Internet
Router
192.168.0.1Linux
192.168.0.2FreeBSD
192.168.0.3Windows
192.1683.0.4NetBSD
192.168.0.0Honeyd系統
低互動式誘捕系統– Nepenthes (模擬Windows 系統弱點)
16
高互動式誘捕系統—HIHAT (將php套裝程式轉變為Honeypot)
• HIHAT 為一高互動式的網頁誘捕系統,可偵測多種網頁應用程式攻擊。
17
高互動式誘捕系統 –Capture-‐HPC
n 定義: Honeyclient is an ac0ve security devices/applica0on in search of malicious servers that agack clients. n 為一主動式之誘捕系統,能夠模擬用戶端應用
程式與Server進行互動,根據互動結果能夠判斷Server為正常(Benign)或是異常(Malicious)
n Web Browser, FTP, SSH, Email, …
18
互動式誘捕系統 –Capture-‐HPC (Cont.)
• Capture-‐HPC 為一高互動式的Client Honeypot,探測Malicious Web servers (監控Client-‐Side Agacks)
19
足夠了嗎…..???
• Honeypot為單一資料收集點,所能收集到的資料非常有限,如何可以看到全面性且完整的駭客攻擊資訊?
• 多方面收集最新駭客攻擊手法、使用工具與目的
• 安全機制的加強
20
What is Honeynet ? • 誘捕網路為一個完整的真實網路,主要開放給
駭客進行攻擊,並能夠藉由網路學習駭客的攻擊行為
• 誘捕網路(Honeynet)屬於一種高互動性的Honeypots,提供真實系統、應用程式及服務給攻擊者,因此能夠收集到珍貴的攻擊資訊。
• 藉由Honeynet環境建置,能夠對所有進出的流量加以收集與監控,加強安全機制保護
• 誘捕網路能夠收集全面性的攻擊資料,進行分析,進而學習駭客所用的工具與手法,甚至於駭客的攻擊的動機
21
What is Honeynet ? (Cont.)
• 提供不同的設計當作陷阱,並沒有作任何引誘的駭客的額外機制,不會對駭客有一個反制的行為,只是去學習駭客的行為
• Honeynet其價值在於可以提供確實的risk與vulnerabilities給相關的安全組織
22
Honeynet 說明示意圖
router
Host 1 Host N
...
Server 1 Server N
Honey Host 1Honey Host N
...
Management Host
eth1eth0
eth2HoneyWall
HoneyNet
...
23
24
192.168.5.13Windows 2k
192.168.5.11RH7.3
管理者
Honeynet
Fedora code 1橋接式防火牆
1
1
192.168.6.110Data Server
192.168.5.12XP
0
2 1
IPS
Honeywall放大示意圖
Drop Replace
誘捕網路(Honeynet)建構元件
• 防火牆 – 記錄了所有進出的連線並提供安全的保護
• 入侵偵側系統
– 記錄了網路上的流量且尋找攻擊和入侵的線索
• 日誌紀錄
– 所有的遠端連線的指令都能夠被記錄到系統日誌
• Honeypot – 設定好的Honeypot可為任何作業系統
25
Honeynet的架構需求
• 資料捕捉機制 (Data Capture) – 偵測並捕獲所有攻擊流量
• 數據控制機制 (Data Control) – 降低風險,使的honeypot主機不會變成跳板
去攻擊其餘主機
• 數據分析機制 (Data Analysis) – 分析攻擊者到底做了什麼
26
資料捕捉機制 (Data Capture)
• 對在Honeynet中的入侵者所有行為進行監測和記錄的工作
• 安全地記錄和儲存相關系統日誌資訊
• 較常使用元件:iptables、Snort、Sebek、p0f 、tcpdump
27
數據控制機制 (Data Control)
• 對入侵者可能得到的權限及攻擊行為進行限制
• 防止Honeypot被駭客或惡意程式加以利用攻擊第三方
• 當開放的服務越多時,怎樣針對特定服務行為設定限制條件,並能夠學習與發現駭客的攻擊行為操作
• 較常使用元件:Snort_inline、IPtables 28
數據控制機制 (Data Control) (Cont.)
29
No Data Control
Data Control
數據分析機制 (Data Analysis)
• 對所捕獲的所有資料,事後進行分析研究
– Iptables 紀錄資料、Snort Alert 、Snort Log、Sebek鍵擊記錄資料、Snort_inline 紀錄 …. 等
30
Honeywall ROO v.1.4 Introduc0on, Install and Configure
Honeynet Training Scenario
32
Honeywall CDROM ROO
• Honeynet Project所提供,主要將所有架設Honeynet所需要的系統、工具軟體與相關設定檔結合成ㄧ個可開機光碟,幫助使用者進行Honeynet的架設
• hgps://projects.honeynet.org/honeywall/
33
34
Honeywall overview
• Bootable CentOS 5.x CD-‐ROM • U0lizes exis0ng Honeynet data control and data capture technologies
• Iptables (custom Honeywall configura0on via rc.firewall)
• Snort + Snort-‐inline • TCP rate limi0ng + Sebek client
• Menu-‐driven and web based configura0on interfaces for easy remote configura0on
• Single configura0on file for interac0ve or automated configura0on deployment
35
Honeywall Logical Components
36
資料捕捉機制: Firewall Log、Snort、Sebek 數據控制機制: Snort_inline、IPtables 數據分析機制: Walleye (Argus、Hflow2)d
Data Control – Snort_inline與iptables
INTERNET
Honeywall
無設限條件
連線限制 過濾攻擊行為封包
Sendmail Mail Server
Oracle DataBaseServer
DNS Server
MS-SQL DataBase Server
Apache WebServer
Honeynet
37
Data Control – Snort_inline與iptables
eth0
Iptables
eth1
Snort_inline
Honeywall
DropReplace
38
讓駭客能夠進來Honeynet 進行攻擊,但限制其出去 的行為
Honeywall –Data Control ((Snort-‐Inline / Limits)
• Snort_inline (NIPS) – 對流出Honeywall的資料流 (Outbound Traffic)加
以限制
– 規則: Drop、Replace
• IPtables (Firewall) – 以Policy配合Snort_inline 對流出的Traffic加以控
制
39
資料捕捉機制 (Data Capture)
• 資料捕捉是Honeynet的一個重要目的
• 主要捕捉三方面的資料加以記錄:
– Firewall Log:防火牆( IPtables)的日誌記錄
– Network Traffic:以Snort 搭配Tcpdump記錄資料流,並且以pcap格式儲存
– System Ac0vity:以Sebek 捕捉的系统活動
40
Data Capture說明(1/4)
• 網路行為資料 – 網路流資料: Argus – 入侵檢測報警: Snort – 作業系統訊息: p0f
• 系統行為資料: – Process、文件、命令、鍵擊記錄:Sebek
• 網路原始資料 – 完整的資料流:tcpdump
41
Data Capture說明(2/4)
eth0
Iptables
eth1
Snort_inline
Honeywall
Sebek Client
Logs
Standard Snort
Tcpdumplog file
Sebek Server
HoneypotDB
42
Install Vmware
• 安裝Vmware-‐Server-‐1.0.9 版 • What is Vmware :
– VMware實際上也只是一種應用軟體,用於建構出虛擬機器,虛擬機器具有自己的虛擬化了的CPU、RAM、硬碟、光碟,甚至還有自己的BIOS。虛擬機器上可以安裝Windows、Linux等真實的操作系統,及各種應用程式。
• Vmware Networking Mode : • Bridge : 虛擬主機與真實網路連接 (VMnet0) • NAT:虛擬主機以NAT方式連接真實網路(VMnet8)
• Host Only: 虛擬主機網路不能和真實網路連接,而只能與Host Machine(真實主機)連接
43
Honeywall Install
44
45
46
47
48
新增另外兩張網卡
49
第⼀一張網卡: 接受外部Internet來的攻擊流量
50
第⼆二張網卡: 傳送攻擊流量進⼊入Honeypot
51
第三張網卡: 連接Honeywall 管理介⾯面
52
載⼊入安裝印象檔
D:\Honeynet_Training\Image\roo-‐1.4.hw-‐20090425114542.iso
53
54
55
56
57
58
59
60
61
62
63
64
65
66
192.168.13.4 192.168.13. 6
67
68
69
70
71
72
73
74
75
76
77
168.95.1.1
78
79
80
honey
81
honey
82
83
140.110.126.x
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
168.95.1.1
107
108
109
110
111
112
113
114
115
116
117
安裝完成,請先做Snapshot
• Chkconfig是設定係統在不同runlevel之下所執行的服務,Chkconfig Level – Level 0﹕關機
– Level 1﹕單人模式
– Level 2﹕多人模式﹐沒有網路功能
– Level 3﹕完整多人模式﹐文字界面 – Level 4﹕保留 – Level 5﹕完整多人模式﹐圖形界面 – Level 6﹕重新開機
118
Configure
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
Don’t re-‐configure your honeywall
155
Q & A