DOI QR코드

DOI QR Code

A Fast String Matching Scheme without using Buffer for Linux Netfilter based Internet Worm Detection

리눅스 넷필터 기반의 인터넷 웜 탐지에서 버퍼를 이용하지 않는 빠른 스트링 매칭 방법

  • 곽후근 (숭실대학교 전자공학과 대학원) ;
  • 정규식 (숭실대학교 정보통신전자공학부)
  • Published : 2006.12.31

Abstract

As internet worms are spread out worldwide, the detection and filtering of worms becomes one of hot issues in the internet security. As one of implementation methods to detect worms, the Linux Netfilter kernel module can be used. Its basic operation for worm detection is a string matching where coming packet(s) on the network is/are compared with predefined worm signatures(patterns). A worm can appear in a packet or in two (or more) succeeding packets where some part of worm is in the first packet and its remaining part is in its succeeding packet(s). Assuming that the maximum length of a worm pattern is less than 1024 bytes, we need to perform a string matching up to two succeeding packets of 2048 bytes. To do so, Linux Netfilter keeps the previous packet in buffer and performs matching with a combined 2048 byte string of the buffered packet and current packet. As the number of concurrent connections to be handled in the worm detection system increases, the total size of buffer (memory) increases and string matching speed becomes low In this paper, to reduce the memory buffer size and get higher speed of string matching, we propose a string matching scheme without using buffer. The proposed scheme keeps the partial matching result of the previous packet with signatures and has no buffering for previous packet. The partial matching information is used to detect a worm in the two succeeding packets. We implemented the proposed scheme by modifying the Linux Netfilter. Then we compared the modified Linux Netfilter module with the original Linux Netfilter module. Experimental results show that the proposed scheme has 25% lower memory usage and 54% higher speed compared to the original scheme.

전 세계적으로 큰 피해를 주는 웜을 탐지하고 필터링 하는 것은 인터넷 보안에서 큰 이슈중의 하나이다. 웜을 탐지하는 하나의 방법으로서 리눅스 넷필터 커널 모듈이 사용된다. 웜을 탐지하는 기본 동작으로서 스트링 매칭은 네트웍 상으로 들어오는 패킷을 미리 정의된 웜 시그니쳐(Signature, 패턴)와 비교하는 것이다. 웜은 하나의 패킷 혹은 2개(혹은 그 이상의) 연속된 패킷에 나타난다. 이때, 웜의 일부분은 첫 번째 패킷에 있고 나머지 부분은 연속된 패킷 안에 있다. 웜 패턴의 최대 길이가 1024 바이트를 넘지 않는다고 가정하면, 2048 바이트의 길이를 가지는 2개의 연속된 패킷에 대해서 스트링 매칭을 수행해야만 한다. 이렇게 하기 위해, 리눅스 넷필터는 버퍼에 이전 패킷을 저장하고 버퍼링된 패킷과 현재의 패킷을 조합한 2048 바이트 크기의 스트링에 대해 매칭을 수행한다. 웜 탐지 시스템에서 다루어야 하는 동시 연결 개수의 수가 늘어날수록 버퍼(메모리)의 총 크기가 증가하고 스트링 매칭 속도가 감소하게 된다. 이에 본 논문에서는 메모리 버퍼 크기를 줄이고 스트링 매칭의 속도를 증가시키는 버퍼를 이용하지 않는 스트링 매칭 방식을 제안한다. 제안된 방식은 이전 패킷과 시그니쳐(Signature)의 부분 매칭 결과만을 저장하고 이전 패킷을 버퍼링하지 않는다. 부분 매칭 정보는 연속된 패킷에서 웜을 탐지하는데 사용된다. 제안된 방식은 리눅스 넷필터 모듈을 수정하여 구현하였고, 기존 리눅스 넷필터 모듈과 비교하였다. 실험 결과는 기존 방식에 비해 25%의 적은 메모리 사용량 및 54%의 속도 향상을 가짐을 확인하였다.

Keywords

References

  1. Z. Chen, L. Gao, and K. Kwiat, 'Modeling the spread of active worms,' 22th Annual Joint Conference of the IEEE Computer and Communications Societies, pp.1890-1900, 2003 https://doi.org/10.1109/INFCOM.2003.1209211
  2. F. Stajano and H. Isozaki, 'Security issues for internet appliances,' Symposium on Applications and the Internet Workshops, pp.18-24, 2002 https://doi.org/10.1109/SAINTW.2002.994548
  3. D. Moore, C. Shannon, and J. Brown, 'Code-red: a case study on the spread and victims of an Internet worm,' In Proceedings of the 2002 Internet Measurement Workshop, 2002 https://doi.org/10.1145/637201.637244
  4. N. Weaver, V. Paxson, S. Staniford, and R. Cunningham, 'A Taxonomy of Computer Worms,' In The First ACM Workshop on Rapid Malcode, 2003 https://doi.org/10.1145/948187.948190
  5. J. McHugh, A. Christie, and J. Allen, 'Defending yourself: the role of intrusion detection systems,' IEEE Software, Vol.17, No.5, pp.42-51, 2000 https://doi.org/10.1109/52.877859
  6. S. Axelsson, 'Intrusion Detection Systems: A Survey and Taxonomy,' Technical report 99-15, Department of Computer Engineering, Chalmers University of Technology, Goteborg, Sweden, 2000
  7. Paul E. Proctor, 'Intrusion Detection Handbook,' Prentice-Hall, 2001
  8. IPS, http://www/nss.co.uk/WhitePapers/intrusion_prevention_systems.htm
  9. X. Zhang, C. Li, and W. Zheng, 'Intrusion prevention system design,' The Fourth International Conference on Computer and Information Technology, pp.386-390, 2004 https://doi.org/10.1109/CIT.2004.1357226
  10. IDS and IPS, http://www.kisa.or.kr
  11. IDS (Instrusion Detection System), http://www.helloec.net/network/IDS.htm
  12. M. Yasin and A. Awan, 'A study of host-based IDS using system calls,' International Conference on Networking and Communication, pp.36-41, 2004 https://doi.org/10.1109/INCC.2004.1366573
  13. C. Herringshaw, 'Detecting attacks on network,' IEEE Computer, Vol.30, No.12, pp.16-17, 1997 https://doi.org/10.1109/2.642762
  14. B. Mukherjee, L. Heberlein, and K. Levitt, 'Network intrusion detection,' IEEE Network, Vol.8, No.3, pp.26-41, 1994 https://doi.org/10.1109/65.283931
  15. Network-vs. Host-based Intrusion Detection System, http://www.documents.iss.net/whitepapers/nvh_ids.pdf
  16. Netfilter, http://www.netfilter.org
  17. Snort, http://www.snort.org
  18. N. Desai, 'Increasing Performance in High Speed NIDS - A look at Snort's Internals,' In www.linuxsecurity.com, 2002
  19. C. Coit, S. Staniford, and J. McAlerney, 'Towards Faster String Matching for Intrusion Detection or Exceeding the Speed of Snort,' DARPA Information Survivability Conference and Exposition, 2001 https://doi.org/10.1109/DISCEX.2001.932231
  20. 김형주, 박대철, '고성능 침입탐지 및 대응 시스템의 구현 및 성능 평가', 정보처리학회논문지C, Vol.11-C, No.2, pp.157-162, 2004 https://doi.org/10.3745/KIPSTC.2004.11C.2.157
  21. 강구홍, 김익균, 장종수, '고속 망에 적합한 네트워크 프로세서 기반 인-라인 모드 침입탐지 시스템', 정보과학회논문지 : 정보통신, Vol.31, No.4, pp.363-374, 2004
  22. 이장행, 황성호, 박능수, 'FPGA를 사용한 네트워크 침입탐지 시스템의 문자열 비교', 제32회 추계학술발표회 논문집, 한국정보과학회, Vol.32, No.2, pp.886-888, 2005
  23. 안철수 연구소, http://info.ahnlab.com/securityinfo/virus.jsp
  24. Application Layer Packet Classifier for Linux, http://l7-filter.sourceforge.net