1 / 22

Introduction to Rule Generation System for Malware Network Traffic

Introduction to Rule Generation System for Malware Network Traffic. 黃 能富 教授 國立清華大學資訊工程系 nfhuang@cs.nthu.edu.tw Canaan Kao canaan@totoro.cs.nthu.edu.tw. Outline. 1. Introduction 2. The RuleGen System 3. Reference 4. Q&A. 1. Introduction. 網路入侵偵測到底在偵測什麼? 入侵前有什麼好偵測的?

Download Presentation

Introduction to Rule Generation System for Malware Network Traffic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction toRule Generation System for Malware Network Traffic 黃能富 教授 國立清華大學資訊工程系 nfhuang@cs.nthu.edu.tw Canaan Kao canaan@totoro.cs.nthu.edu.tw Malware Traffic RuleGen

  2. Outline • 1. Introduction • 2. The RuleGen System • 3. Reference • 4. Q&A Malware Traffic RuleGen

  3. 1. Introduction • 網路入侵偵測到底在偵測什麼? • 入侵前有什麼好偵測的? • 什麼叫做入侵(或者說網路攻擊)? • 消耗系統資源 (flooding) • 猜密碼? • 利用程式的 bug/弱點,取得更高的權限。 • Buffer Overflow • 在網路封包中尋找可能造成 Buffer Overflow 的資料或是對系統造成危害的資料。 Malware Traffic RuleGen

  4. 1. Introduction • 在被入侵之後,我們又在偵測什麼? • 對壞人來說: • 戰爭雖然結束了,如何統治才是大問題…. • 對我們來說: • 我們怎麼知道自己被入侵? • AV 會警告? • 怎麼有效地偵測與攔截這些壞人的統治通訊變成一個大難題,因為”在這裡唱歌的不一定都是神經病”。 Malware Traffic RuleGen

  5. 1. Introduction • 在這裡唱歌的,不一定都是神經病  • 用 TCP 80 port 的不一定是HTTP。 • 用UDP 53 port的不一定是 DNS。

  6. 1. Introduction • Botnet/Malware 的通訊經常偽裝成許多既有的協定。 • 例如:IRC、HTTP and P2P • 因為獨創一格的通訊協定反而容易被發現

  7. 1. Introduction • 為什麼我們不在入侵前把壞人的攻擊都檔下來呢? • 因為這世界存在一種東西,叫做 0-day 弱點。 • 其實病毒檔案的偵測也是! • 基本上都是要先有病毒樣本,防毒軟體才有辦法有效偵測。 • 那如果,防毒廠商一直都沒有拿到某個新毒的樣本呢? Malware Traffic RuleGen

  8. 1. Introduction • 弱點週期 (Zero-Day Attack period)。

  9. 1. Introduction • WireShark 是大家的好朋友…. • 無論如何一定要熟悉使用。 • http://www.wireshark.org/download.html • 因為網路安全離不開封包分析….. Malware Traffic RuleGen

  10. 2. The RuleGen System Malware Traffic RuleGen

  11. 2. The RuleGen System • http://140.114.64.226/M2R/ • (這大概是大家今天唯一需要記得東西 ) Malware Traffic RuleGen

  12. 2. The RuleGen System • 在實作上,系統分成兩大塊: • 假設我們有樣本 • 事實上我們很難有所需要的樣本 • VirusTotal不是全然免費…. • Malware2Pcap • 要如何欺騙誘發,才能讓 Malware 樣本心甘情願地把通訊吐露出來? • RuleGen Malware Traffic RuleGen

  13. 2. The RuleGen System • Malware2Pcap 在做些什麼? Malware Traffic RuleGen

  14. 2. The RuleGen System • RuleGen在做些什麼? Malware Traffic RuleGen

  15. 2. The RuleGen System Malware Traffic RuleGen

  16. 2. The RuleGen System • Where is the Pcap file? • Change the tail of URL, you will get it. • #File Info-------------------------------------------------------- fnLog=./rpt/20131017_124220_10356_c70f3f848481aba676d8065ec2ba03b1.txtfnPcap=./rpt/20131017_124220_10356_c70f3f848481aba676d8065ec2ba03b1.pcap Malware Traffic RuleGen

  17. 2. The RuleGen System • WEB_c70f3f848481aba676d8065ec2ba03b1.bin • 注意用 HTTP 傳了什麼回來? MZ 開頭的檔是啥? • VT 上面的 AV 和 IDS 怎麼說? Malware Traffic RuleGen

  18. 2. The RuleGen System • DGA_7040d8a306d4e65f15b5fc06b7ed663a.bin • 注意,命中該 Malware 的 rules 是由多個不同的 MD5 所貢獻…. • 也就是說它跟它們搞不好是同夥? • 新品種? • 關於 MD5/SHA256,這些 checksum 還是會有 collision,不同的檔案還是有可能會有相同的 checksum,現在業界改用 sha256 了。 Malware Traffic RuleGen

  19. 2. The RuleGen System • DNS_8388232857a184ddfaf671c56de41f1c.bin • VT 上面的 AV 和 IDS 怎麼說? Malware Traffic RuleGen

  20. 2. The RuleGen System • IRC_017568f08ac420b48d7c04b5036a6d30.bin • 非標準 port 的 IRC bot Malware Traffic RuleGen

  21. 3. Reference • 1. Buffer Overflow • Smashing The Stack For Fun And Profit • http://www.phrack.org/issues.html?issue=49&id=14#article • 2. Snort Source Code • 盡可能找舊版開始學 • 3. Snort Rule Set • malware-cnc.rules Malware Traffic RuleGen

  22. 4. Q&A • 我有可能拿到空的 pcap 嗎? • 我有可能 gen 不出新的 rule 嗎? • 有任何相關問題都可以 mail 給我 • canaan@totoro.cs.nthu.edu.tw Malware Traffic RuleGen

More Related