1. The Botnet Traffic Forensics System
Canaan Kao
國立清華大學通訊工程所 博士候選人
canaan@totoro.cs.nthu.edu.tw
2. Who am I?
? A programmer (寫程式的人).
?C/C++, Win32 SDK, Linux Kernel Programming.
? A CEH.
?(傳說中的駭客好人卡)
? 意外地參與了教育部的
Anti-Botnet 計畫,籌備了
三屆的 BoT 研討會。
(還有擔任二屆的講員….)
2012/09/07 The Botnet Traffic Forensics
System
2
3. 大綱
?0. About Anti-Botnet Project
?1. Botnet Detection
?2. Known and Unknown
?3. DEMO
?4. Summary
2012/09/07 The Botnet Traffic Forensics
System
3
5. 0. About Anti-Botnet Project
? 依照行政院研考會規劃,分五類:
?ANA,資安訊息情報,例如:相關攻擊手法與防禦資訊
?INT,入侵事件情報(已確定事件、非網站)
?包含打別人與被打
?需附證據、學校收到要處理。
?EWA,資安預警情報(不確定事件)
?當學校收到這個不一定要處理。
?DEF, Web 相關情報(已確定事件、網站相關)
?需附證據、學校收到要處理。
?FBI,事件回饋情報 (不常用)
2012/09/07 The Botnet Traffic Forensics
System
5
6. 1. Botnet Detection
2012/09/07 The Botnet Traffic Forensics
System
6
1. Compromise
and put some things
2. Social Engineering/SPAM3. Browsing
4. Infection
5. Join Botnet/
Data Leakage
Web Servers/
Landing Site/
跳板 Cracker/Bot Master
C&C Server
End Users
Anti-botnet Mechanism
14. 0. About Anti-Botnet Project
天下武功 無堅不摧 唯快不破
2012/09/07 The Botnet Traffic Forensics
System
14
15. 0. About Anti-Botnet Project
2012/09/07 The Botnet Traffic Forensics
System
? 只能靠火雲邪神了
15
16. 0. About Anti-Botnet Project
2012/09/07 The Botnet Traffic Forensics
System
16
Rule Matching with
Known Rule Set
(snort)
Traffic to Rule
Converter
Rule Matching with the
Known and New Rules
(snort)
Hit/Miss
Hit
Miss
Traffic
Selector
Botnet Detection
Rule Verification
Rule
Optimization
End
Manual
Processing
Known
Rule Set
Input
Adding New
Rules into Known Rule Set
Malign Traffic
Input
Start
Malign Traffic
Input
Hit/Miss
Hit
Miss
End
Need to
Refine?
New Produced
and Integrated
Rule Set
Benign Traffic
Input
Optimized
Rule Set
Produced
Yes
No
17. 0. About Anti-Botnet Project
?RuleGen Demo?
2012/09/07 The Botnet Traffic Forensics
System
17
19. 0. About Anti-Botnet Project
? 製作 Anti-Botnet IDS rule
?目前的 Botnet IDS Rule 組成為(共4,040條Rule)
?1,654 條自製 (由真實bot活體網路行為轉譯)
–至今年止已側錄6,234隻Malware及Bot
? 2,386 條 國外公開的 botnet rule
?格式採用 Snort Rule Format (Open Source)
2012/09/07 The Botnet Traffic Forensics
System
19
20. 0. About Anti-Botnet Project
? Botnet Rule 下載者來源分佈
?2012/1-2012/6來自世界各地 IP 499 個
202012/09/07 The Botnet Traffic Forensics
System
21. 0. About Anti-Botnet Project
? Botnet Rule 下載者來源分佈
?2012/1-2012/6來自台灣 IP 184 個
21
2012/09/07
The Botnet Traffic Forensics
System
22. 1. Botnet Detection
2012/09/07 The Botnet Traffic Forensics
System
22
1. Compromise
and put some things
2. Social Engineering/SPAM3. Browsing
4. Infection
5. Join Botnet/
Data Leakage
Web Servers/
Landing Site/
跳板 Cracker/Bot Master
C&C Server
End Users
Anti-botnet Mechanism
26. 2. Known and Unknown
?如果說,我們對 Malware 進行動態分析,
利用對 memory 的鑑識,可以規避加殼,
取得 Malware 的本相以進行分析與歸類。
?那 Malware 的 Traffic 是否一樣有跡可尋
,可以依照其網路行為對 Malware 進行分
門別類,而無視於其檔案的型態?
?不管這隻 Malware 是否有加殼
?不管是 EXE or PDF.
2012/09/07 The Botnet Traffic Forensics
System
26
27. 2. Known and Unknown
? Botnet/Malware 的通訊經常偽裝成許多既有的協定。
?例如:IRC、HTTP and P2P
?因為獨創一格的通訊協定反而容易被發現
27
2012/09/07 The Botnet Traffic Forensics
System
27
28. 2. Known and Unknown
? 在這裡唱歌的,不一定
都是神經病 ?
?用 TCP 80 port 的
不一定是HTTP。
?用UDP 53 port的不
一定是 DNS。
2012/09/07 The Botnet Traffic Forensics
System
28
29. 2. Known and Unknown
正常的 HTTP Request and Response
2012/09/07 The Botnet Traffic Forensics
System
29
30. 2. Known and Unknown
(1)非對稱式 (Client/Server 只有一邊是用HTTP)
2012/09/07 The Botnet Traffic Forensics
System
30
31. 2012/09/07 31The Botnet Traffic Forensics
System
3. Known and Unknown
(2)對稱式(Server and Client 都用 HTTP)
這不是 RAR~~~~~!
38. 2. Known and Unknown
現在的偵測方式
? 現在的偵測方式: The state of the art
? AV+IDS+VM
?加IDS解決了
?對於已經中毒發作的Host 缺乏偵測能力
?可以偵測 Harmful 行為
?加VM增強了
?對未知型 Malware 的偵測能力.
? 但是
?因為傳統 AV 和 VM 都需要把 packets 還原成檔案才
有辦法動作,所以依然是慢
?對於 Harmless 的 Malware 行為無法偵測
38
2012/09/07 The Botnet Traffic Forensics
System
38
39. 2. Known and Unknown
?我們目前除了能夠建立 “harmful” 的
行為模型外,也能夠建立 “harmless
but malicious” 的行為模型,針對未
知的網路行為進行相似度的比對,可
以發預警防範於未然。
2012/09/07 The Botnet Traffic Forensics
System
39
40. 2. Known and Unknown:網路行為
? 不同的族群
40
2012/09/07 The Botnet Traffic Forensics
System
40
41. 2. Known and Unknown:網路行為
? Based on known Malware to find the unknown ones.
?Old->New
?異中求同
?擱置差異
?共創雙贏?
2012/09/07 The Botnet Traffic Forensics
System
41
42. 2. Known and Unknown:
The Family
? 相同族群
42
2012/09/07 The Botnet Traffic Forensics
System
42
43. 2. Known and Unknown:
The Family
? 四個不同 MD5 的 Malware
?0daf294cb73024bee7312932fa70e997
?Trojan-Downloader.Win32.Agent.solm
?7108b98a3c83022c42ee1375ec569a3b
?Trojan-Downloader.Win32.Agent.sqai
?83d2ab4747ff0d9b47bce98690312680
?Trojan-GameThief.Win32.Frethoq.doh
?C3e7d7960590baaefbc72d601e0b6d73
?Cannot be detected by AV
432012/09/07 The Botnet Traffic Forensics
System
44. 2. Known and Unknown:
The challenge: DGA
? DGA: Domain Generation Algorithm
?簡單地說,就是 Client (bot) 和 Server (bot master)
會依照特定的 time slot或是在特定的條件下,使用特
定(非固定)的domain names 進行轉址通訊。
?這會增加 RuleGen 自動採碼的困難。
?在 A 時間所採到的 domain name / signature 無法
適用於 B 時間。
?對策:
?使用逆向工程找出其 Algorithm
?鎖 IPs, 如果不常換的話….
?其他…
2012/09/07 The Botnet Traffic Forensics
System
44
45. 2. Known and Unknown:
The challenge: DGA
2012/09/07 The Botnet Traffic Forensics
System
45
46. 2. Known and Unknown:
The challenge: DGA
2012/09/07 The Botnet Traffic Forensics
System
46
47. 3. DEMO
? The Botnet Traffic Forensics System (BETA)
? https://solomon.botnet.tw
? Powered by
?The Anti-Botnet Project of TANet
?BroadWeb Corp.
? Please report bugs/problems to
?canaan at totoro.cs.nthu.edu.tw
2012/09/07 The Botnet Traffic Forensics
System
47
50. Thanks for your attention ?
?Q&A
? As the host of heaven cannot be numbered, neither the sand of the
sea measured. Jer33:22
2012/09/07 The Botnet Traffic Forensics
System
50