系統識別號 | U0002-2506201115385900 |
---|---|
DOI | 10.6846/TKU.2011.00902 |
論文名稱(中文) | PF_RING封包擷取技術的應用 |
論文名稱(英文) | Application of PF_RING Packet Capturing Technology |
第三語言論文名稱 | |
校院名稱 | 淡江大學 |
系所名稱(中文) | 資訊工程學系碩士班 |
系所名稱(英文) | Department of Computer Science and Information Engineering |
外國學位學校名稱 | |
外國學位學院名稱 | |
外國學位研究所名稱 | |
學年度 | 99 |
學期 | 2 |
出版年 | 100 |
研究生(中文) | 張祐榕 |
研究生(英文) | Yu-Jung Chang |
學號 | 698410668 |
學位類別 | 碩士 |
語言別 | 繁體中文 |
第二語言別 | 英文 |
口試日期 | 2011-06-16 |
論文頁數 | 53頁 |
口試委員 |
指導教授
-
蔡憶佳(eplusplus@gmail.com)
委員 - 蔡憶佳(eplusplus@gmail.com) 委員 - 林慧珍(hjlin@cs.tku.edu.tw) 委員 - 林慶昌 委員 - 林政錦 |
關鍵字(中) |
網路安全 封包擷取 PF_RING 封包過濾 Regex |
關鍵字(英) |
Network Security Packet Capturing PF_RING Packet Filtering Regex |
第三語言關鍵字 | |
學科別分類 | |
中文摘要 |
隨著網路速度越來越快,網路安全的技術也必須隨之提昇,以往的網路安全防衛措施如防火牆、入侵偵測系統等都是先讀入封包,確認接收到的封包為正確而未經竄改之後,再對封包作進一步的處理,因此對於高速網路中的封包擷取就非常重要。在高速網路的環境下擷取封包容易產生封包流失現象,因此我們使用了PF_RING這套封包擷取函式庫來改善這個問題。而PF_RING除了封包擷取之外還能透過撰寫外掛程式來進行封包內容過濾,在本研究即利用PF_RING實做出封包過濾系統,並且將PF_RING核心模組中的封包內容比對機制改寫,加入Regex正則表達式比對函式庫,與原先之PF_RING進行效能的比對分析,希望能夠將高速網路下的封包過濾效能更加提昇。經過我們的實驗證實Regex在比對封包內容所花的時間比PF_RING預設之Textsearch字串比對函式庫來得少,且改成Regex後可用Regular Expression來表示Pattern,效率比單純用字串比對來得更好。 |
英文摘要 |
As the network speed becomes faster, network security technology must be more efficient in dealing with high traffic flow. The traditional security measures such as firewalls, intrusion detection systems must confirm the packets are correct and untampered after receiving them from the network, therefore, the efficiency of packet capturing in high speed network is very important. Packet capturing usually cause packet lose, for that reason, we use the PF_RING packet capturing library to improve this problem. In addition to the packet capture, PF_RING can also do the packet content filtering by writing plug-ins. In this study, we use PF_RING to implement a packet filtering system and rewrite the packet content matching mechanism in kernel module of PF_RING. We add the regular expression compared library Regex, compare and analysis with the original performance of the PF_RING, hoping to enhance the performance of packet filtering in high-speed network. Confirmed after the experiment, the time spend of packet content comparing in Regex is less than the Textsearch which defaults in PF_RING, and after using Regex we can write pattern by regular expression, the performance is better than using simple string matching. |
第三語言摘要 | |
論文目次 |
第一章 緒論 1 1.1 研究動機 1 1.2 研究目的 2 第二章 相關文獻探討 3 2.1 Libpcap探討 3 2.2 PF_RING 探討 4 2.2.1 PF_RING 4 2.2.2 PF_RING plugin 6 2.3 改良封包處理方式 7 2.4 加入TNAPI機制 9 2.5 Textsearch 探討 10 2.5.1 Knuth-Morris-Pratt演算法 11 2.5.2 Boyer-Moore演算法 12 2.6 Regular Expression 探討 14 2.6.1 什麼是Regular Expression 14 2.6.2 正規語言 15 2.6.3 自動機理論 16 2.6.4 正則表達式語法 18 2.7 Regex函式庫 19 第三章 研究方法與進行步驟 24 3.1 環境說明 24 3.1.1 系統環境 24 3.1.2 Libpfring和Libpcap安裝 25 3.1.3 TNAPI驅動程式安裝 25 3.1.4 PF_RING 安裝 26 3.1.5 封包傳送與接收的測試方法 27 3.2 系統架構 29 第四章 結果分析 33 4.1 單一Pattern封包比對30秒分析 33 4.2 多重Pattern封包比對30秒分析 35 4.3 多重封包比對60秒分析 38 第五章 結論與未來展望 43 參考文獻 45 附錄---英文論文 46 圖目錄 圖 1 PF_RING Socket 架構圖 5 圖 2 傳統封包擷取程式之封包傳遞流程圖 8 圖 3 使用PF_RING之封包傳遞流程圖 9 圖 4 使用TNAPI擷取封包流程圖 10 圖 5 a(bb)+a 的DFA圖形 17 圖 6 a(bb)+a 的NFA圖形 17 圖 7 實驗架構圖 27 圖 8 系統架構圖 29 圖 9 程式執行畫面 31 圖 10 核心模組統計報告 32 圖 11 函式庫30秒執行次數比較圖(單一Pattern) 34 圖 12 函式庫30秒執行時間比較圖(單一Pattern) 35 圖 13 函式庫30秒執行次數比較圖(多重Pattern) 37 圖 14 函式庫30秒執行時間比較圖(多重Pattern) 38 圖 15 函式庫60秒執行次數比較圖(多重Pattern) 40 圖 16 函式庫60秒執行次數比較圖(多重Pattern) 41 表目錄 表 1 Percentage of Captured Packets 4 表 2 Failure table 11 表 3 KMP 演算法 12 表 4 Boyer-Moore 演算法 13 表 5 POSIX 常用特殊字元 18 表 6 POSIX 常用量詞特殊字元 18 表 7 regcomp 參數 20 表 8 regexe 參數 21 表 9 regerror 參數 22 表 10 系統環境列表 24 表 11 tcp-client & tcp-server 程式 28 表 12 Textsearch單一Pattern統計平均(30秒) 33 表 13 Regex單一Pattern統計平均(30秒) 33 表 14 Textsearch統計平均(30秒) 35 表 15 Regex統計平均(30秒) 36 表 16 Textsearch統計平均(60秒) 39 表 17 Regex統計平均(60秒) 39 |
參考文獻 |
[1] A. Munoz, A. Ferro, F. Liberal, J. Lopez, “A Kernel-Level Monitor over Multiprocessor Architectures for High-Performance Network Analysis with Commodity Hardware,” International Conference of Sensor Technologies and Applications, SensorComm 2007, pp. 457-462, Oct. 2007. [2] J. Gasparakis, J. Chapman, “Using the PF_RING for Improved Lossless Packet Capturing”, EE Times-India, pp. 1-4, October 2009. [3] L. Gheorghe, More on l7-filter: Designing and Implementing Linux Firewalls and QoS using netfilter, iproute2, NAT and l7-filter, Packt Publishing, 2006. [4] L. M. Garcia, Programming with Libpcap - Sniffing the network from our own application, Hackin9 Magazine, Vol. 3, No. 2/2008, pp. 38-46, 2008. [5] L. Deri, “Improving passive packet capture: Beyond device polling,” Proceedings of the 4th International System Administration and Network Engineering Conference(SANE), Amsterdam, The Netherlands, September 2004. [6] L. Deri, “nCap: Wire-speed Packet Capture and Transmission,” Proceedings of the 3rd IEEE/IFIP , Workshop on End-to End Monitoring Techniques and Services (E2EMON), pp. 47-55, May 2005. [7] L. Deri, F Fusco, “Exploiting Commodity Multicore Systems for Network Traffic Analysis” , Technical Report, July 2009. [8] R. S. Boyer, J. S. Moore (1977). "A fast string searching algorithm". Comm. ACM 20, pp. 762–772, 1977. [9] S. McCanne, V. Jacobson, “The BSD Packet Filter: A New Architecture for User-level Packet Capture,” USENIX Technical Conference , pp. 259-270, 1993. [10] The Open Group, “Regular Expressions.” The Single UNIX Specification, Version 2, Dec 1997. [11] D. E. Knuth, J. H. Morris, V. R. Pratt, “Fast pattern matching in strings,” Society for Industrial and Applied Mathematics Journal on Computing 6, pp. 323-350, 1977. |
論文全文使用權限 |
如有問題,歡迎洽詢!
圖書館數位資訊組 (02)2621-5656 轉 2487 或 來信