KR101470590B1 - Plug-in multi pattern matching apparatus and method thereof - Google Patents

Plug-in multi pattern matching apparatus and method thereof Download PDF

Info

Publication number
KR101470590B1
KR101470590B1 KR1020130046971A KR20130046971A KR101470590B1 KR 101470590 B1 KR101470590 B1 KR 101470590B1 KR 1020130046971 A KR1020130046971 A KR 1020130046971A KR 20130046971 A KR20130046971 A KR 20130046971A KR 101470590 B1 KR101470590 B1 KR 101470590B1
Authority
KR
South Korea
Prior art keywords
map
plug
pattern
unit
pattern matching
Prior art date
Application number
KR1020130046971A
Other languages
Korean (ko)
Other versions
KR20140128153A (en
Inventor
이호석
임헌정
Original Assignee
(주) 시스메이트
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by (주) 시스메이트 filed Critical (주) 시스메이트
Priority to KR1020130046971A priority Critical patent/KR101470590B1/en
Publication of KR20140128153A publication Critical patent/KR20140128153A/en
Application granted granted Critical
Publication of KR101470590B1 publication Critical patent/KR101470590B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/28Enhancement of operational speed, e.g. by using several microcontrol devices operating in parallel
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

플러그인 다중 패턴매칭 장치 및 그 방법이 개시된다. 본 발명의 일 실시 예에 따른 플러그인 다중 패턴매칭 장치는, 시그니처를 다수의 그룹으로 분류하고 분류된 그룹별로 패턴 검사에 사용될 맵을 생성하는 맵 생성기와, 맵 생성기에서 생성된 맵의 적어도 일부를 외부 메모리에 저장하는 맵 적재기와, 외부 메모리에 적재된 맵을 플러그인 방식으로 내부 메모리로 읽어들이고 내부 메모리로 읽어들인 맵을 이용하여 입력 패킷의 패턴을 검사하는 플러그인 탐색기를 포함한다.A plug-in multi-pattern matching apparatus and method thereof are disclosed. A plug-in multi-pattern matching apparatus according to an embodiment of the present invention includes: a map generator for classifying signatures into a plurality of groups and generating a map to be used for pattern inspection for each classified group; And a plug-in searcher that reads the map loaded in the external memory into the internal memory by a plug-in method and inspects the pattern of the input packet using the map read into the internal memory.

Description

플러그인 다중 패턴매칭 장치 및 그 방법 {Plug-in multi pattern matching apparatus and method thereof}[0001] Plug-in multi-pattern matching apparatus and method [0002]

본 발명은 다량의 패턴들에 대한 검색을 고속으로 수행하기 위한 하드웨어 기반의 고성능 패턴매칭 기술에 관한 것이다.The present invention relates to a hardware-based high-performance pattern matching technique for performing a search for a large number of patterns at a high speed.

네트워크를 통한 침입에 대응하기 위해서 다양한 시스템들이 개발되고 있다. 그러나, 기가비트 이더넷 환경과 같은 네트워크의 고속화 및 이를 바탕으로 한 대용량 데이터의 송수신은 기존의 저속 보안 분석기법에 대해 변화를 요구하고 있다.Various systems are being developed to cope with intrusion through a network. However, the speed up of networks such as Gigabit Ethernet environment and the transmission and reception of large amount of data based on them are requiring changes to existing low-speed security analysis techniques.

즉, 갈수록 고속화되고 대용량화하는 네트워크 환경과 보다 다양해지는 침입 시도에 적절히 대응하기 위해서는, 보다 신속한 시간 내에 많은 데이터를 분석할 수 있는 기법이 요구된다. 즉, 이를 고려한 새로운 형태의 보안 시스템에 대한 연구가 요구된다.In other words, in order to cope with increasingly high-speed and high-capacity network environments and more diversified intrusion attempts, techniques for analyzing a large amount of data in a faster time are required. That is, research on a new type of security system considering this is required.

일반적으로 유해 트래픽을 탐지하는 시그니처 탐지 엔진은 소프트웨어 위주로 개발되었다. 네트워크를 지나는 모든 패킷에 대하여 시그니처와 매칭을 하는 경우 시그니처의 개수가 증가하게 되면 유해 트래픽 탐지에 소요되는 시간이 증가하고 탐지 성능이 저하되며, CPU 사용률의 증가로 시스템 전체의 성능이 떨어지게 된다.Generally, the signature detection engine that detects harmful traffic is developed with software. If the number of signatures increases, the time required to detect harmful traffic increases, the detection performance decreases, and the performance of the entire system is deteriorated due to an increase in the CPU utilization rate when matching the signatures to all the packets passing through the network.

일 실시 예에 따라, 하드웨어에 기반하여 고속으로 대용량의 패턴매칭이 가능한 플러그인 다중 패턴매칭 장치 및 그 방법을 제안한다.According to one embodiment, a plug-in multi-pattern matching apparatus and method capable of high-speed large-capacity pattern matching based on hardware are proposed.

일 실시 예에 따른 플러그인 다중 패턴매칭 장치는, 시그니처를 다수의 그룹으로 분류하고 분류된 그룹별로 패턴 검사에 사용될 맵을 생성하는 맵 생성기와, 맵 생성기에서 생성된 맵의 적어도 일부를 외부 메모리에 저장하는 맵 적재기와, 외부 메모리에 적재된 맵을 플러그인 방식으로 내부 메모리로 읽어들이고 내부 메모리로 읽어들인 맵을 이용하여 입력 패킷의 패턴을 검사하는 플러그인 탐색기를 포함한다.A plug-in multi-pattern matching apparatus according to an embodiment of the present invention includes a map generator for classifying signatures into a plurality of groups and generating a map to be used for pattern inspection for each classified group, at least a part of the map generated in the map generator, And a plug-in searcher that reads the map loaded in the external memory into the internal memory by a plug-in method and inspects the pattern of the input packet using the map read into the internal memory.

맵 생성기는, 시그니처 집합에서 분류기준에 따라 시그니처를 그룹별로 분류하는 패턴 분류부와, 시그니처 그룹별로 다중 패턴 검색 맵을 생성하는 패턴 번역부와, 패턴 번역부에서 생성된 다중 패턴 검색 맵을 플러그인 탐색기가 사용 가능한 맵으로 변환하는 맵 변환부를 포함할 수 있다.The map generator includes a pattern classifying unit for classifying signatures in groups according to a classification criterion in a signature set, a pattern translating unit for generating a multi-pattern retrieval map for each signature group, and a multi- To a usable map.

이때, 맵 변환부는, 플러그인 탐색기가 각 상태에서 패턴매칭해야 할 패킷 바이트 수를 알 수 있는 입력 심볼 크기정보를 포함하도록 맵을 구성할 수 있다. 맵 변환부는, 각 상태에서 확장 가능조건에 따라 n(n=2,3,…) 바이트 패턴매칭이 가능한 경우 해당 상태의 크기를 n 바이트로 확장할 수 있다. 확장 가능조건은 N, F, NF 및 FN 상태 중 적어도 하나에서 매치 패턴이 존재하지 않는 경우이며, N은 S에서 s= {s 1 ,…, s i } 입력으로 천이되는 상태이고, S는 현 상태이고, s= {s 1 ,…, s i }는 S에서 입력 가능한 심볼이며, F는 S에서 실패 함수에 의해 천이되는 상태이고, NF는 N에서 실패 함수에 의해 천이되는 상태이고, FN은 F에서 f= {f 1 ,…, f k}에 의해 천이되는 상태이며, f= {f 1 ,…, f k}는 F에서 입력 가능한 심볼이다. n 바이트로 확장된 상태는, 현재 상태 S에서 심볼 셋 E={s·n, s·nf, f·fn}의 입력으로 천이되는 상태이다.At this time, the map conversion unit may configure the map so that the plug-in searcher includes input symbol size information that can know the number of packet bytes to be pattern-matched in each state. The map converter may expand the size of the corresponding state to n bytes when n (n = 2, 3, ...) byte pattern matching is possible according to the expandable condition in each state. The extendable condition is the case where there is no match pattern in at least one of the N, F, NF and FN states and N is s = { s 1 , ... , s i }, S is the current state, s = { s 1 , ... , s i } is a symbol input in S, F is a state transited by a failure function in S, NF is a state transited by a failure function in N, FN is a state in which f = { f 1 , ... , f k }, and f = { f 1 , ... , f k } is a symbol that can be input in F. The state expanded to n bytes is a state in which transition is made to the input of the symbol set E = {s · n, s · nf, f · fn} in the current state S.

맵 적재기는, 맵 생성기에서 생성된 맵을 분석하는 맵 분석부와, 맵 분석부에서 분석된 맵을 분류하는 맵 분류부와, 맵 분류부에서 분류된 맵들을 플러그인 탐색기에 배치할 방법을 결정하는 맵 구성부와, 맵 구성부에서 결정된 배치 방법에 따라 플러그인 탐색기에 맵을 배치하는 맵 배치부와, 플러그인 탐색기가 결정된 배치 방법에 따라 동작할 수 있도록 환경을 설정하는 구성 설정부를 포함할 수 있다.The map loader includes a map analyzer for analyzing the map generated by the map generator, a map classifier for classifying the map analyzed by the map analyzer, and a method for determining how to map the maps classified by the map classifier to the plug- A map arrangement unit for arranging the map in the plug-in searcher according to the arrangement method determined by the map arrangement unit, and a configuration setting unit for setting the environment so that the plug-in searcher can operate according to the determined arrangement method.

플러그인 탐색기는, 입력 패킷에서 시그니처 그룹 분류정보를 읽어들여 입력 심볼들을 추출하여 맵의 종류 및 저장 위치를 탐지하는 맵 탐지부와, 맵 탐지부에 의해 탐지된 맵의 저장주소를 이용하여 외부 메모리로부터 해당 맵을 읽어들이고 읽어들인 맵을 내부 메모리에 저장하는 맵 운반부와, 내부 메모리에 저장된 맵을 이용하여 입력 패킷에 대해 다중 바이트 패턴매칭을 수행하는 다중패턴 검색부를 포함할 수 있다.The plug-in searcher includes a map detector for reading signature group classification information from an input packet and extracting input symbols to detect a type and a storage position of the map, and a map detector for detecting the type and location of the map from the external memory using the stored address of the map detected by the map detector. A map carrier for reading the map and storing the read map in an internal memory, and a multi-pattern search unit for performing multi-byte pattern matching on the input packet using the map stored in the internal memory.

플러그인 탐색기는, 맵 적재기에 의해서 맵들이 적재되는 외부 메모리와, 맵 운반부에 의해 외부 메모리로부터 다중 패턴 검색부가 사용할 다중 패턴 상태 맵이 플러그인 방식으로 추출되어 적재되는 내부 메모리를 더 포함할 수 있다.The plug-in searcher may further include an external memory in which maps are loaded by the map loader, and an internal memory in which a multi-pattern state map to be used by the multi-pattern search unit is extracted and loaded from the external memory in a plug-in manner.

이때, 내부 메모리에는 다중패턴 검색부가 사용할 맵의 크기 또는 예상 사용빈도에 따라 적어도 일부의 맵들이 저장되며, 플러그인 탐색기는 내부 메모리에 저장된 맵들을 이용하여 패턴매칭을 수행할 수 있다.At this time, at least some maps are stored in the internal memory according to the size of the map to be used or the expected frequency of use, and the plug-in searcher can perform pattern matching using maps stored in the internal memory.

맵 탐지부는, 제한된 키워드를 이용하여 맵을 탐지할 수 있다. 다중패턴 검색부는, 맵 내 현재 상태에서 입력 심볼의 크기 정보에 따라 입력 패킷 페이로드에서 해당 크기만큼 읽어들여 패턴매칭을 수행할 수 있다.The map detection unit can detect the map by using a limited keyword. The multi-pattern search unit may perform pattern matching by reading a corresponding amount of the input packet payload according to the size information of the input symbol in the current state in the map.

플러그인 다중 패턴매칭 장치는, 플러그인 탐색기로부터 수행결과를 전달받아 적용할 규칙을 결정한 후 결정된 규칙에 따라 패킷을 처리하는 후 처리부를 더 포함할 수 있다. 이때, 후 처리부는, 플러그인 탐색기의 패턴매칭 결과를 기초로 하여 규칙 저장주소를 이용하여 규칙의 종류 및 저장 위치를 확인하고 소정의 규칙을 선택하는 규칙 선택부와, 규칙 선택부에서 선택된 규칙을 외부 메모리로부터 읽어들여 내부 메모리로 운반하는 규칙 운반부와, 규칙 운반부에 의해 내부 메모리로 운반된 규칙을 이용하여 입력 패킷을 처리하는 규칙 처리부를 포함할 수 있다.The plug-in multi-pattern matching apparatus may further include a post-processing unit that receives the execution result from the plug-in searcher, determines a rule to be applied, and processes the packet according to the determined rule. In this case, the post-processing unit may include a rule selection unit for checking the type and storage position of the rule using the rule storage address based on the pattern matching result of the plug-in search unit and selecting a predetermined rule, And a rule processing unit for processing the input packet using a rule transferred to the internal memory by the rule delivery unit.

일 실시 예에 따르면, 다량의 패턴들에 대한 검색을 고속으로 수행할 수 있다. 즉, 하드웨어 기반의 고성능 패턴매칭 기술을 이용하며, 하드웨어로 처리 시에 내부 메모리 등의 자원에 제약이 있을 수 있으므로, 패턴매칭에 필요한 정보를 그룹별로 분리하여 외부 메모리에 저장한 후 패턴매칭시 필요한 정보만을 플러그인 방식으로 내부 메모리로 적재하여 사용하는 방식을 사용함에 따라, 자원을 효율적으로 이용하며 처리 속도를 향상시킬 수 있다. 나아가, 패턴매칭에 필요한 정보를 그룹으로 분리하고, n(n=2,3,…) byte 까지도 패턴매칭이 가능하도록 패턴을 확장함에 따라 고속 처리가 가능하다.According to one embodiment, a search for a large amount of patterns can be performed at high speed. That is, since hardware-based high-performance pattern matching technology is used and hardware resources may be limited in resources such as internal memory, information necessary for pattern matching may be divided into groups and stored in an external memory. By using the method of loading only the information into the internal memory using the plug-in method, the resource can be efficiently used and the processing speed can be improved. Furthermore, it is possible to divide the information required for pattern matching into groups and expand the pattern so that pattern matching is possible even for n (n = 2, 3, ...) bytes.

도 1은 본 발명의 일 실시 예에 따른 플러그인 다중 패턴매칭 장치의 구성도,
도 2는 본 발명의 일 실시 예에 따른 도 1의 맵 생성기의 세부 구성도,
도 3a 내지 도 3c는 본 발명의 일 실시 예에 따른 1 바이트 패턴매칭이 가능한 맵 제작 예를 도시한 참조도,
도 4 및 도 5는 본 발명의 일 실시 예에 따른 n 바이트 패턴매칭이 가능하도록 패턴을 확장하는 프로세스를 설명하기 위한 참조도,
도 6은 본 발명의 일 실시 예에 따른 도 2의 맵 변환부에 의해서 변환된 맵의 구조도,
도 7은 본 발명의 일 실시 예에 따른 도 1의 맵 적재기의 세부 구성도,
도 8은 본 발명의 일 실시 예에 따른 도 1의 플러그인 탐색기의 세부 구성도,
도 9는 본 발명의 일 실시 예에 따른 맵 탐지부의 맵 탐지 프로세스를 설명하기 위한 참조도,
도 10a 및 도 10b는 본 발명의 일 실시 예에 따른 다중패턴 검색부의 다중 바이트 패턴매칭 프로세스를 설명하기 위한 참조도,
도 11은 본 발명의 일 실시 예에 따른 도 1의 후 처리기의 세부 구성도,
도 12는 본 발명의 일 실시 예에 따른 플러그인 다중 패턴매칭 방법을 도시한 흐름도이다.
1 is a configuration diagram of a plug-in multi-pattern matching apparatus according to an embodiment of the present invention;
FIG. 2 is a detailed configuration diagram of the map generator of FIG. 1 according to an embodiment of the present invention;
FIGS. 3A to 3C are views showing a map production example capable of 1-byte pattern matching according to an embodiment of the present invention;
FIGS. 4 and 5 are views for explaining a process of expanding a pattern to enable n-byte pattern matching according to an embodiment of the present invention;
FIG. 6 is a diagram showing the structure of a map transformed by the map transform unit of FIG. 2 according to an embodiment of the present invention;
FIG. 7 is a detailed configuration diagram of the map loader of FIG. 1 according to an embodiment of the present invention;
FIG. 8 is a detailed configuration diagram of the plug-in searcher of FIG. 1 according to an embodiment of the present invention;
FIG. 9 is a reference diagram for explaining a map detection process of the map detection unit according to an embodiment of the present invention;
FIGS. 10A and 10B are views for explaining a multi-byte pattern matching process of a multi-pattern search unit according to an embodiment of the present invention;
FIG. 11 is a detailed configuration diagram of the post-processor of FIG. 1 according to an embodiment of the present invention;
12 is a flowchart illustrating a plug-in multi-pattern matching method according to an embodiment of the present invention.

이하에서는 첨부한 도면을 참조하여 본 발명의 실시 예들을 상세히 설명한다. 본 발명을 설명함에 있어 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 또한, 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear. In addition, the terms described below are defined in consideration of the functions of the present invention, which may vary depending on the intention of the user, the operator, or the custom. Therefore, the definition should be based on the contents throughout this specification.

도 1은 본 발명의 일 실시 예에 따른 플러그인 다중 패턴매칭 장치(1)의 구성도이다.1 is a configuration diagram of a plug-in multi-pattern matching apparatus 1 according to an embodiment of the present invention.

본 발명에 따르면, 플러그인 다중 패턴매칭 장치(1)는 다량의 패턴들에 대한 검색을 고속으로 수행하기 위해 하드웨어(HW) 기반의 고성능 패턴매칭 기술을 이용한다.  즉, 소프트웨어(SW)로 패턴매칭을 처리하는 데는 처리속도에 한계가 있어, FPGA 등의 하드웨어에서 이를 처리한다. 그런데, 하드웨어로 처리 시에 내부 메모리 등의 자원에 제약이 있을 수 있으므로, 본 발명은 패턴매칭에 필요한 정보를 그룹별로 분리하여 외부 메모리에 저장한 후 패턴매칭시 필요한 정보만을 플러그인 방식으로 내부 메모리로 적재하여 사용하는 방식을 사용한다. 그리고, 고속 처리를 위해 n(n=2,3,…) 바이트(byte) 까지도 패턴매칭이 가능하도록 패턴을 확장할 수 있다.According to the present invention, the plug-in multi-pattern matching apparatus 1 utilizes hardware (HW) -based high-performance pattern matching technology to perform a search for a large amount of patterns at a high speed. That is, the processing speed is limited in processing the pattern matching by the software (SW), and it is processed by the hardware such as the FPGA. However, since resources required for internal memory and the like may be limited at the time of hardware processing, the present invention separates information necessary for pattern matching into groups and stores them in an external memory. Then, only information necessary for pattern matching is plugged into an internal memory It is loaded and used. For high-speed processing, patterns can be extended so that pattern matching is possible even for n (n = 2, 3, ...) bytes.

이하, 전술한 특징을 갖는 플러그인 다중 패턴매칭 장치(1)의 세부 구성에 대해 후술한다. 도 1을 참조하면, 플러그인 다중 패턴매칭 장치(1)는 맵 생성기(Mab Builder)(10), 맵 적재기(Map Loader)(12), 플러그인 탐색기(Plug-in Pattern Search Engine)(14) 및 후 처리기(postprocessor)(16)를 포함한다.The detailed configuration of the plug-in multi-pattern matching device 1 having the above-described characteristics will be described below. 1, the plug-in multi-pattern matching apparatus 1 includes a map generator 10, a map loader 12, a plug-in pattern search engine 14, And a postprocessor 16.

맵 생성기(10)는 시그니처 패턴(signature pattern)을 다수의 그룹으로 분류하고 분류된 그룹별로 패턴 검사에 사용될 맵(map)을 생성한다. 이때, 맵 생성기(10)는 n byte까지도 다중 패턴 검색이 가능하도록 패턴을 확장할 수 있다. 맵 생성기(10)의 세부 구성에 대해서는 도 2에서 후술한다.The map generator 10 classifies a signature pattern into a plurality of groups and generates a map to be used for pattern inspection for each classified group. At this time, the map generator 10 may extend the pattern so that even n bytes can be searched for multiple patterns. The detailed configuration of the map generator 10 will be described later with reference to FIG.

맵 적재기(12)는 맵 생성기(10)에서 생성된 맵의 적어도 일부를 외부 메모리에 저장한다. 맵 적재기(12)의 세부 구성에 대해서는 도 7에서 각각 후술한다.The map loader 12 stores at least a part of the map generated in the map generator 10 in the external memory. Details of the map loader 12 will be described later with reference to FIG.

플러그인 탐색기(14)는 외부 메모리에 적재된 맵을 플러그인 방식으로 내부 메모리로 읽어들인다. 그리고, 내부 메모리로 읽어들인 맵을 이용하여 입력 패킷의 패턴을 검사한다. 플러그인 탐색기(14)는 외부 메모리로부터 내부 메모리로 플러그인 방식을 이용하여 맵을 이동시킨 후, 입력 패킷의 패턴을 검사하는 하드웨어 기반의 패턴 검색 엔진이다. 플러그인 탐색기(14)의 세부 구성에 대해서는 도 8에서 후술한다.The plug-in searcher 14 reads the map loaded in the external memory into the internal memory by a plug-in method. Then, the pattern of the input packet is inspected using the map read into the internal memory. The plug-in searcher 14 is a hardware-based pattern search engine that moves a map from an external memory to an internal memory using a plug-in method and then inspects patterns of input packets. The detailed configuration of the plug-in searcher 14 will be described later with reference to FIG.

후 처리기(16)는 플러그인 탐색기(14)로부터 패턴매칭 수행결과를 전달받아 적용할 규칙(rule)을 결정한 후 결정된 규칙에 따라 패킷을 처리한다. 후 처리기(16)의 세부 구성에 대해서는 도 11에서 후술한다.The post processor 16 receives the pattern matching result from the plug-in searcher 14, determines a rule to be applied, and processes the packet according to the determined rule. The detailed structure of the post processor 16 will be described later with reference to FIG.

도 2는 본 발명의 일 실시 예에 따른 도 1의 맵 생성기(10)의 세부 구성도이다.FIG. 2 is a detailed configuration diagram of the map generator 10 of FIG. 1 according to an embodiment of the present invention.

도 1 및 도 2를 참조하면, 맵 생성기(10)는 패턴 분류부(Pattern Classifier)(100), 패턴 번역부(Pattern complier)(102) 및 맵 변환부(Map Transformer)(104)를 포함한다.1 and 2, the map generator 10 includes a pattern classifier 100, a pattern complier 102, and a map transformer 104 .

패턴 분류부(100)는 시그니처 집합(signature set)에서 분류기준에 따라 시그니처들을 그룹별로 분류한다. 패턴 번역부(102)는 시그니처 그룹별로 다중 패턴 검색 맵(Multi-Pattern Search Map: MPSM)을 생성한다. 이를 위해 Aho-Corasick(AC) 알고리즘을 이용할 수 있다.The pattern classification unit 100 classifies signatures in groups according to a classification criterion in a signature set. The pattern translator 102 generates a multi-pattern search map (MPSM) for each signature group. The Aho-Corasick (AC) algorithm can be used for this purpose.

맵 변환부(104)는 패턴 번역부(102)에서 생성된 다중 패턴 검색 맵을 플러그인 탐색기(14)가 사용 가능한 맵으로 변환한다. 맵 변환부(104)에 의해 변환된 맵의 세부구조에 대해서는 도 6에서 상세히 후술한다.The map conversion unit 104 converts the multi-pattern search map generated by the pattern translation unit 102 into a map that can be used by the plug-in searcher 14. The detailed structure of the map converted by the map conversion unit 104 will be described in detail later with reference to FIG.

일 실시 예에 따라, 맵 변환부(104)는 플러그인 탐색기(14)가 각 상태에서 패턴매칭해야 할 패킷 바이트 수를 알 수 있는 입력 심볼 크기정보를 포함하도록 맵을 구성한다. 맵 변환부(104)는 각 상태에서 확장 가능조건에 따라 n 바이트 패턴매칭이 가능한 경우 해당 상태의 크기를 n 바이트로 확장할 수 있다.According to one embodiment, the map conversion unit 104 configures the map so that the plug-in searcher 14 includes input symbol size information that can know the number of packet bytes to be pattern-matched in each state. The map transforming unit 104 may expand the size of the corresponding state to n bytes if n-byte pattern matching is possible according to the expandable condition in each state.

이하, 도 3 내지 도 6의 맵 제작 시나리오를 참조로 하여, 맵 생성기(10)의 맵 제작 예를 상세히 후술한다. 다만, 도 3 내지 도 6의 맵 제작 시나리오는 본 발명의 이해를 돕기 위한 일 실시 예일 뿐, 본 발명이 이에 한정되지는 않음을 명시한다.Hereinafter, a map production example of the map generator 10 will be described in detail with reference to the map production scenario of FIG. 3 to FIG. However, it should be noted that the map production scenarios of Figs. 3 to 6 are only one embodiment for facilitating understanding of the present invention, and the present invention is not limited thereto.

도 3a 내지 도 3c는 본 발명의 일 실시 예에 따른 1 바이트 패턴매칭이 가능한 맵 제작 예를 도시한 참조도이다.3A to 3C are reference views showing an example of producing a map capable of 1-byte pattern matching according to an embodiment of the present invention.

세부적으로, 도 3a는 일 실시 예에 따른 시그니처 패턴들 {he, she, his, hers}과, 매치 패턴(match pattern)과, 패턴비교 실패시의 상태(state)를 알 수 있는 실패 함수(failure function)를 도시한 것이고, 도 3b는 상태 간의 천이를 알 수 있는 고투 그래프(goto graph)를 도시한 것이며, 도 3c는 도 3b의 고투 그래프에 따라 각 상태에서의 입력 심볼 입력시 다음 상태를 테이블화한 표이다. 도 3c의 테이블에서 입력 심볼은 1 바이트임을 확인할 수 있다. 도 3a에서는 시그니처 패턴이 문자열로 이루어져 있으나, 시그니처 패턴은 문자열뿐만 아니라 정규패턴, 16진수 등 가능한 모든 형태로 적용 가능하다.In detail, FIG. 3A illustrates an example of a failure function in which signature patterns (he, she, his, hers) according to an embodiment, a match pattern, 3B shows a goto graph in which a transition between states can be known. FIG. 3C is a diagram showing a goto graph in which a next state is input when an input symbol is input in each state, It is an angry ticket. In the table of FIG. 3C, it can be confirmed that the input symbol is one byte. In FIG. 3A, although the signature pattern is formed of a character string, the signature pattern is applicable not only to a character string, but also to all possible forms such as a regular pattern, a hexadecimal number, and the like.

Aho-Corasick(AC) 알고리즘에 따르면, 시그니처를 바이트(byte) 단위의 상태 머신(state machine: 이하 SM이라 칭함)으로 구현한다. 이때, SM 상의 각 상태(state)는 다음에 올 상태에 대한 포인터(도 3b의 실선)와 패턴비교 실패시의 상태에 대한 포인터(도 3b의 점선)를 각각 갖는다. 따라서 시그니처의 탐지는 패킷에서 발생하는 각 바이트를 입력으로 하여 SM 상에서 각 상태의 변화를 추적함으로써 수행된다.According to the Aho-Corasick (AC) algorithm, the signature is implemented as a state machine (hereinafter referred to as SM) in byte units. At this time, each state of the SM has a pointer (solid line in FIG. 3B) to the next state and a pointer to the state at the time of pattern comparison failure (dotted line in FIG. 3B). Therefore, the signature detection is performed by tracking the change of each state on the SM, taking each byte generated in the packet as an input.

도 4 및 도 5는 본 발명의 일 실시 예에 따른 n 바이트 패턴매칭이 가능하도록 패턴을 확장하는 프로세스를 설명하기 위한 참조도이다.FIGS. 4 and 5 are reference views for explaining a process of expanding a pattern to enable n-byte pattern matching according to an embodiment of the present invention.

도 4 및 도 5를 참조하면, 기본적으로 주어진 시그니처로 1 바이트용 맵을 구성하는데, 각각의 상태에서 n byte 패턴매칭이 가능한 경우 해당 상태를 n byte로 확장할 수 있다.Referring to FIGS. 4 and 5, basically, a map for one byte is constructed with a given signature. If n byte pattern matching is possible in each state, the state can be extended to n bytes.

n byte로의 확장 예를 설명하기 위해, 우선 용어에 대해 표 1과 같이 정의한다.To illustrate the extension to n bytes, we first define terms as shown in Table 1.


S: 현 상태, s={s 1 ,…, si}: S에서 입력 가능한 심볼
N={N 1 ,…,Ni }: S에서 s 입력으로 천이되는 상태, n={n 1 ,…, n j }: N에서 입력 가능한 심볼
F: S에서 Failure function에 의해 천이되는 상태, f={f 1 ,…, f k }: F에서 입력 가능한 심볼
NN={NN 1 ,…,NN l }: N에서 n에 의해 천이되는 상태
NF: N에서 Failure function에 의해 천이되는 상태, nf={nf 1 ,…, nf o }: NF에서 입력 가능한 심볼
NFN: NF에서 nf에 의해 천이되는 상태
FN: F에서 f에 의해 천이되는 상태, fn={fn 1 ,…, fn k }: FN에서 입력 가능한 심볼
FNN: FN에서 fn에 의해 천이되는 상태,
j: S에서 입력심볼 길이

S: current state, s = { s 1 , ... , si }: Symbols that can be input in S
N = {N 1 , ... , N i }: State transition from S to s input, n = { n 1 , ... , n j }: symbols that can be input in N
F: state transitioned by failure function in S, f = { f 1 , ... , F k}: input symbol, the F
NN = {NN 1 , ... , NN l }: State transitioned from n to n
NF: a state transited by a failure function in N, nf = { nf 1 , ... , nf o }: symbols that can be input in NF
NFN: state transited by nf in NF
FN: the state transited by f in f, fn = { fn 1 , ... , fn k }: Symbols that can be input in FN
FNN: a state transited by fn in FN,
j : Input symbol length in S

본 발명에 따르면, 확장 가능조건은 N, F, NF, FN에서 매치 패턴이 존재하지 않는 경우이며, 해당 확장 가능조건에서의 확장은 다음의 표 2에 도시된 바와 같이 이루어질 수 있다.According to the present invention, the expandable condition is a case where there is no match pattern in N, F, NF, FN, and the expansion in the expandable condition can be made as shown in Table 2 below.


E= s·n, s·nf, f·fn: S의 새로운 symbol set (우선순위: s·n > s·nf > f·fn),
j + 1: S에서 입력심볼 길이,
T={NN, NFN, FNN}: S에서 E 입력으로 천이되는 상태 집합,
만일 F, NF 가 0이 아닌 경우 F, NF를 현상태로 놓고 F, NF가 0 상태가 될 때까지 반복,
S에서 확장가능조건에 해당하면 반복

E = s · n, s · nf, f · fn: new symbol set of S (priority : s · n > s · nf > f · fn)
j + 1 : Input symbol length in S,
T = {NN, NFN, FNN}: state set to transition from S to E input,
If F and NF are not 0, F and NF are in the current state, and F and NF are repeated until 0,
Repeat if S meets expandable criteria in S

이하, 도 4 및 도 5를 참조로 하여 n byte로의 확장 예를 설명한다. 이때, 도 3a 및 도 3b에서 가정한 시나리오가 도 4 및 도 5에서도 동일하게 적용된다.An example of expansion into n bytes will now be described with reference to FIGS. 4 and 5. FIG. In this case, scenarios assumed in FIGS. 3A and 3B are also applied to FIG. 4 and FIG.

우선, 도 3b의 고투 그래프에 따라, 각 상태에서의 N, F, NF, FN와 이때 입력 가능한 심볼 n, f, nf, fn은 도 4a의 표와 같다. 도 4a의 표를 살펴보면, 확장 가능 조건인, N, F, NF 또는 FN에서 매치 패턴이 존재하지 않는 상태 S는 {0, 2, 3, 7, 9}임을 확인할 수 있다. 이는 도 3a에서 가정한 바와 같이, 매치 패턴은 output(2)= {he}, output(5)= {she, he}, output(7)= {his}, output(9)= {hers}이기 때문이다. 그리고, 매치 패턴이 존재하지 않는 상태에서 F 또는 NF 가 0이 아닌 상태 S는 {3, 7, 9}이며, 이 경우 F 또는 NF를 현 상태 S로 놓고 F 또는 NF가 0 상태가 될 때까지 반복 수행한다.First, according to the stratified graph of FIG. 3B, N, F, NF, and FN in each state and input symbols n, f, nf, and fn are shown in the table of FIG. Referring to the table of FIG. 4A, it can be seen that a state S in which there is no match pattern in N, F, NF, or FN that is an expandable condition is {0, 2, 3, 7, 9}. This is because the match pattern is output (2) = {he}, output (5) = {she, he}, output (7) = {his}, output (9) = {hers} Because. A state S in which F or NF is not 0 in a state where there is no match pattern is {3, 7, 9}. In this case, F or NF is set to the current state S, and until F or NF becomes 0 state Repeat this.

도 5a 및 도 5b는 확장 가능 조건인 {0, 2, 3, 7, 9} 상태에서, n byte 확장 예를 도시한 것이다. 세부적으로, 도 5a는 확장 가능한 상태에서 조합 s·n, s·nf, f·fn에서의 입력 심볼을 각각 나타낸 것이고, 도 5b는 확장 가능한 상태에서의 입력 심볼과 다음 상태를 테이블화한 것이다. 도 5b의 테이블은 2 바이트로 확장되었음을 확인할 수 있다.Figures 5A and 5B illustrate an n byte extension example in the expandable condition {0, 2, 3, 7, 9}. More specifically, FIG. 5A shows the input symbols in the combination s. N, s. Nf and f. Fn in the expandable state, and FIG. 5B shows the input symbol and the next state in the expandable state as a table. It can be confirmed that the table of FIG. 5B is extended to 2 bytes.

도 5a에서 삭제 표시된 입력 심볼은, 앞선 입력 심볼이 있어 우선순위에 밀려 삭제됨을 의미한다. 예를 들어, 표 2에서와 같이, 상태 2에서의 조합 s·nf의 입력 심볼 rs는 우선순위에서 s·n의 입력 심볼 rs에 밀려 삭제된다. 도 5b에서 2 바이트로 확장된 상태는, 현재 상태 S에서 새로운 심볼 셋 E={s·n, s·nf, f·fn}의 입력으로 천이되는 상태 T’= {NN, NFN, FNN}을 의미한다.In FIG. 5A, an input symbol marked for deletion means that there is a preceding input symbol and is pushed to a priority and deleted. For example, as shown in Table 2, the input symbol rs of the combination s · nf in state 2 is pushed away by the input symbol rs of s · n in priority order. 5B shows a state T '= {NN, NFN, FNN} transited to the input of a new symbol set E = {s · n, s · nf, f · fn} in the current state S it means.

도 6은 본 발명의 일 실시 예에 따른 도 2의 맵 변환부(104)에 의해서 변환된 맵의 구조도이다.6 is a structural diagram of a map converted by the map conversion unit 104 of FIG. 2 according to an embodiment of the present invention.

도 2 및 도 6을 참조하면, 맵 변환부(104)에 의해 변환된 맵은 각종 정보를 포함하는데, 각종 정보에 대한 설명은 다음 표 3에 도시된 바와 같다.Referring to FIG. 2 and FIG. 6, the map converted by the map transforming unit 104 includes various kinds of information.


numOfStates: 해당 Map내 존재하는 총 State 수(Offset : 0)
NextStateOffs: 각각의 state에 대해 NextState 정보가 들어있는 곳의 Offset값(총 state 수만큼 존재)
sizeOfInputSymbol: 해당 State에서 입력될 input symbol 크기
Match: 해당 state에서 Match되는 패턴의 존재 여부
nextStateCount: 해당 state에서 0이 아닌 다음 상태로 천이 가능한 input Symbol 갯수
inputSymbol/nextState: 해당 state에서 input Symbol이 입력되었을 때 천이되는 nextState
MatchOffs: 각각의 state에 대해 Match Table이 위치한 곳의 Offset값(총 state수 만큼 존재)
mCount: 각 state에서 match된 패턴의 개수
mSize: match된 패턴에 대한 정보들의 크기

numOfStates: The total number of states in the map (Offset: 0)
NextStateOffs: Offset value of NextState information for each state (there are total number of states)
sizeOfInputSymbol: size of input symbol to be input in the corresponding state
Match: Presence of matching pattern in the corresponding state
nextStateCount: the number of input symbols that can transition from the state to the next non-zero state
inputSymbol / nextState: nextState that will transition when input Symbol is entered in the corresponding state
MatchOffs: Offset value where the Match Table is located for each state (exists for the total number of states)
mCount: number of patterns matched in each state
mSize: Size of information about the matched pattern

도 7은 본 발명의 일 실시 예에 따른 도 1의 맵 적재기(12)의 세부 구성도이다.FIG. 7 is a detailed configuration diagram of the map stacker 12 of FIG. 1 according to an embodiment of the present invention.

도 1 및 도 7을 참조하면, 맵 적재기(12)는 맵 분석부(Map Analyzer)(120), 맵 분류부(Map Classifier)(122), 맵 구성부(Map Composer)(124), 맵 배치부(Map Poster)(126) 및 구성 설정부(Config setter)(128)를 포함한다.1 and 7, the map loader 12 includes a map analyzer 120, a map classifier 122, a map composer 124, A Map Poster 126 and a Config Setter 128. [

맵 분석부(120)는 맵 생성기(10)에서 생성된 맵을 분석하고, 맵 분류부(122)는 맵 분석부(120)에서 분석된 맵을 분류한다. 맵 구성부(124)는 맵 분류부(122)에서 분류된 맵들을 플러그인 탐색기(14)에 배치할 방법을 결정하고, 맵 배치부(126)는 맵 구성부(124)에서 결정된 배치 방법에 따라 플러그인 탐색기(14)에 맵을 배치한다. 또한, 구성 설정부(128)는 플러그인 탐색기(14)가 결정된 배치 방법에 따라 동작할 수 있도록 환경을 설정한다.The map analyzer 120 analyzes the map generated by the map generator 10 and the map classifier 122 classifies the analyzed map by the map analyzer 120. The map construction unit 124 determines how to arrange the maps classified by the map classification unit 122 in the plug-in searcher 14 and the map arrangement unit 126 arranges the map based on the arrangement method determined by the map construction unit 124 The map is placed in the plug-in searcher 14. In addition, the configuration setting unit 128 sets the environment so that the plug-in searcher 14 can operate according to the determined placement method.

도 8은 본 발명의 일 실시 예에 따른 도 1의 플러그인 탐색기(14)의 세부 구성도이다.FIG. 8 is a detailed configuration diagram of the plug-in searcher 14 of FIG. 1 according to an embodiment of the present invention.

도 1 및 도 8을 참조하면, 플러그인 탐색기(14)는 맵 탐지부(Map Finder)(140), 맵 운반부(Map Putter)(142) 및 다중패턴 검색부(Multi-Pattern Search Engine)(144)를 포함한다.Referring to FIGS. 1 and 8, the plug-in searcher 14 includes a map finder 140, a map putter 142, and a multi-pattern search engine 144 ).

맵 탐지부(140)는 입력 패킷에서 시그니처 그룹 분류정보를 읽어들여 입력 심볼들을 추출하여 어떤 맵을 사용하고 어디에 저장되어 있는지를 확인한다. 이때, 맵 탐지부(140)는 제한된 키워드(keyword)를 이용하여 맵을 탐지할 수 있는데, 이에 대한 실시 예는 도 9에서 후술한다.The map detection unit 140 reads signature group classification information from the input packet, extracts input symbols, and confirms which map is used and where it is stored. At this time, the map detecting unit 140 can detect the map using a limited keyword. An embodiment of this will be described later with reference to FIG.

맵 운반부(142)는 맵 탐지부(140)에 의해 탐지된 맵의 저장주소를 이용하여 외부 메모리(146)로부터 해당 맵을 읽어들이고 읽어들인 맵을 내부 메모리(148)에 운반한다. 이때, 외부 메모리(146)는 맵 적재기(12)에 의해서 맵들이 적재되며, 내부 메모리(148)는 맵 운반부(142)에 의해 외부 메모리(146)로부터 다중패턴 검색부(144)가 사용할 다중 패턴 상태 맵이 플러그인 방식으로 추출되어 적재된다. 외부 메모리(146)는 예를 들어 DDR일 수 있는데, DDR로부터 내부 메모리(148)의 맵 버퍼로 맵이 이동되게 된다. 맵 운반부(142)는 맵 내 다음 상태 주소(NextStateAddr)와 매치 주소(MatchAddr)에 현 맵 버퍼의 베이스 주소(base Addr)를 더할 수 있다.The map carrying unit 142 reads the map from the external memory 146 using the storage address of the map detected by the map detecting unit 140 and carries the read map to the internal memory 148. [ In this case, the external memory 146 is loaded with maps by the map loader 12, and the internal memory 148 is loaded by the map carrying unit 142 from the external memory 146 to the multi- The pattern state map is extracted and loaded in a plug-in fashion. The external memory 146 may be, for example, DDR, and the map is moved from the DDR to the map buffer of the internal memory 148. The map carrying unit 142 may add the base address (base Addr) of the current map buffer to the next state address (NextStateAddr) and the match address (MatchAddr) in the map.

다중패턴 검색부(144)는 내부 메모리(148)에 저장된 맵을 이용하여 입력 패킷에 대해 다중 바이트 패턴매칭을 수행한다. 이때, 맵은 다중 패턴 상태 맵(multi-pattern state map: MPSM)이다.The multi-pattern search unit 144 performs multi-byte pattern matching on the input packet using the map stored in the internal memory 148. [ At this time, the map is a multi-pattern state map (MPSM).

일 실시 예에 따라, 외부 메모리(146)에 모든 맵이 저장되는 것이 아니라, 내부 메모리(148)에 일부 맵이 분산 저장된다. 이 경우, 다중패턴 검색부(144)가 사용할 맵의 크기가 크거나 예상 사용빈도가 높은 맵들이 내부 메모리(148)에 저장될 수 있다. 그러면, 플러그인 탐색기(14)는 내부 메모리(148)에 저장된 맵들을 이용하여 패턴매칭을 수행할 수 있다.According to one embodiment, not all maps are stored in the external memory 146, but some maps are stored in the internal memory 148 in a distributed manner. In this case, maps in which the size of a map to be used by the multi-pattern search unit 144 is large or which are expected to be used frequently can be stored in the internal memory 148. Then, the plug-in searcher 14 can perform pattern matching using the maps stored in the internal memory 148. [

일 실시 예에 따라, 다중패턴 검색부(144)는 맵 내 현재 상태에서 입력 심볼의 크기 정보에 따라 입력 패킷의 페이로드에서 해당 크기만큼을 읽어들여 패턴매칭을 수행한다. 이에 대한 실시 예는 도 10에서 후술한다.According to one embodiment, the multi-pattern search unit 144 reads a corresponding amount of the payload of the input packet according to the size information of the input symbol in the current state in the map, and performs pattern matching. An embodiment of this will be described later with reference to FIG.

도 9는 본 발명의 일 실시 예에 따른 맵 탐지부(140)의 맵 탐지 프로세스를 설명하기 위한 참조도이다.9 is a reference diagram for explaining a map detection process of the map detection unit 140 according to an embodiment of the present invention.

도 8 및 도 9를 참조하면, 맵 탐지부(140)는 초기화 시 맵을 찾을 수 있는 DFA(Deterministic Finite Automaton) 엔진을 포함한다. 이때, DFA 엔진 구성 파일만 변경함으로써 FPGA의 수정 없이 맵을 확장 및 조정 가능하다. 맵 탐지부(140)는 FIFO에 입력된 패킷에서 그룹을 구별할 수 있는 정보들을 읽어들여 입력 심볼들을 추출하고 DFA 엔진을 구동하여 해당 맵을 탐지한다. 이때, 해당 맵이 없으면 패턴매칭 수행 없이 다음 블록인, 후 처리기로 결과를 통보한다.Referring to FIGS. 8 and 9, the map detection unit 140 includes a deterministic finite automaton (DFA) engine that can find a map at the time of initialization. At this time, the map can be expanded and adjusted without modifying the FPGA by changing only the DFA engine configuration file. The map detecting unit 140 reads information that can distinguish a group from a packet input to the FIFO, extracts input symbols, and drives the DFA engine to detect the corresponding map. At this time, if there is no corresponding map, the result is notified to the post-processor, which is the next block, without performing pattern matching.

일 실시 예에 따라, 맵 탐지부(140)는 도 9에 도시된 바와 같이 제한된 키워드(Keywords)를 이용하여 맵을 탐지한다. 제한된 키워드는 ETHERNET_TYPE_IP, ETHERNET_TYPE_IPV6, IPPROTO_TCP, IPPROTO_UDP, IPPROTO_ICMP, PORT_HTTP 등일 수 있다. 이때, 출력 함수는 예를 들어, output(2)= TCP-SRC-HTTP, output(5)= TCP-SRC-ANY, output(7)= TCP-SRC-FTP, output(9)= UDP-DST-TFTP일 수 있다.According to one embodiment, the map detection unit 140 detects a map using limited keywords as shown in FIG. The restricted keywords may be ETHERNET_TYPE_IP, ETHERNET_TYPE_IPV6, IPPROTO_TCP, IPPROTO_UDP, IPPROTO_ICMP, PORT_HTTP, and the like. (5) = TCP-SRC-ANY, output (7) = TCP-SRC-FTP, output (9) = UDP-DST -TFTP.

도 10a 및 도 10b는 본 발명의 일 실시 예에 따른 다중패턴 검색부(144)의 다중 바이트 패턴매칭 프로세스를 설명하기 위한 참조도이다.10A and 10B are reference views for explaining a multi-byte pattern matching process of the multi-pattern search unit 144 according to an embodiment of the present invention.

도 8, 도 10a 및 도 10b를 참조하면, 다중패턴 검색부(144)는 도 10a에 도시된 바와 같이, 맵 내 현재 상태에서 입력 심볼로 취해야 할 바이트 수(sizeOfInputSymbol) 정보를 가져와 입력 패킷의 페이로드(1000)에서 해당 바이트 수만큼을 읽어 패턴매칭을 수행한다. 그리고, 패턴 매치 결과(Output)가 존재하면 이를 후 처리기에 전달한다. 도 10b는 패턴 매치 결과(Output)를 도시한 것이다.Referring to FIGS. 8, 10A, and 10B, the multi-pattern search unit 144 obtains the number of bytes (sizeOfInputSymbol) to be taken as an input symbol in the current state in the map, The pattern matching is performed by reading the number of bytes corresponding to the number of bytes from the load 1000. If there is a pattern match result (Output), the pattern match result is transmitted to the post-processor. FIG. 10B shows a pattern match result (Output).

도 11은 본 발명의 일 실시 예에 따른 도 1의 후 처리기(16)의 세부 구성도이다.11 is a detailed configuration diagram of the post processor 16 of FIG. 1 according to an embodiment of the present invention.

도 1 및 도 11을 참조하면, 후 처리기(16)는 규칙 선택부(160), 규칙 운반부(162) 및 규칙 처리부(164)를 포함한다.1 and 11, the post-processor 16 includes a rule selector 160, a rule carrier 162, and a rule processor 164.

규칙 선택부(160)는 플러그인 탐색기(14)의 패턴매칭 결과를 기초로 하여 TCAM(165)을 이용하여 어떤 규칙(rule)을 사용하고 어디에 저장되어 있는지를 확인한다. 그리고, 플러그인 탐색기(14)로부터 수신한 결과를 패킷별로 저장하고 패킷의 페이로드 종료신호를 수신하면 매치 정보 중 가장 우선순위가 높은 결과값을 갖는 규칙을 선택한다.The rule selecting unit 160 determines which rule is used and where the rule is stored using the TCAM 165 based on the pattern matching result of the plug-in searcher 14. [ Then, when the result received from the plug-in searcher 14 is stored for each packet and the payload end signal of the packet is received, the rule having the highest priority value of the match information is selected.

규칙 운반부(162)는 규칙 선택부(160)에서 선택된 규칙을 외부 메모리(166)로부터 읽어들여 내부 메모리(168)로 운반한다. 외부 메모리(166)는 예를 들어 SRAM일 수 있다.The rule carrier 162 reads a rule selected by the rule selector 160 from the external memory 166 and carries it to the internal memory 168. The external memory 166 may be, for example, an SRAM.

규칙 처리부(164)는 규칙 운반부(162)에 의해 내부 메모리(168)로 운반된 규칙들을 이용하여 입력 패킷을 처리한다. 예를 들어, 입력 패킷을 폐기(drop)하거나 해당 패킷의 입력을 경고(alert)할 수 있다.The rule processing unit 164 processes the input packet using the rules conveyed to the internal memory 168 by the rule delivery unit 162. [ For example, an input packet may be dropped or an input of the packet may be alerted.

도 12는 본 발명의 일 실시 예에 따른 플러그인 다중 패턴매칭 방법을 도시한 흐름도이다.12 is a flowchart illustrating a plug-in multi-pattern matching method according to an embodiment of the present invention.

도 1 및 도 12를 참조하면, 맵 생성기(10)가 시그니처를 다수의 그룹으로 분류하고 분류된 그룹별로 패턴 검사에 사용될 맵을 생성한다(1200). 일 실시 예에 따라 맵 생성기(10)는 시그니처 집합에서 분류기준에 따라 시그니처를 그룹별로 분류하고, 시그니처 그룹별로 다중 패턴 검색 맵을 생성하며, 생성된 다중 패턴 검색 맵을 플러그인 탐색기(14)가 사용 가능한 맵으로 변환한다.Referring to FIG. 1 and FIG. 12, the map generator 10 classifies signatures into a plurality of groups and generates a map 1200 to be used for pattern inspection for each classified group. According to an embodiment, the map generator 10 classifies signatures in groups according to classification criteria in a signature set, generates a multi-pattern search map for each signature group, and uses the generated multi-pattern search map by the plug- Converts to a possible map.

이어서, 맵 적재기(12)가 맵 생성기(10)에서 생성된 맵의 적어도 일부를 외부 메모리에 저장한다(1210). 일 실시 예에 따라, 맵 적재기(12)는 맵 생성기(10)에서 생성된 맵을 분석 및 분류하고, 분류된 맵들을 플러그인 탐색기(14)에 배치할 방법을 결정하여 결정된 배치 방법에 따라 플러그인 탐색기(14)에 맵을 배치한다. 그리고, 플러그인 탐색기(14)가 결정된 배치 방법에 따라 동작할 수 있도록 환경을 설정한다.Then, the map loader 12 stores at least a part of the map generated in the map generator 10 in the external memory (1210). According to one embodiment, the map loader 12 analyzes and classifies the maps generated in the map generator 10, determines how to arrange the classified maps in the plug-in explorer 14 and, according to the determined placement method, (14). Then, the environment is set so that the plug-in searcher 14 can operate according to the determined placement method.

이어서, 플러그인 탐색기(14)가 외부 메모리에 적재된 맵을 플러그인 방식으로 내부 메모리로 읽어들이고 내부 메모리로 읽어들인 맵을 이용하여 입력 패킷의 패턴을 검사한다(1220). 일 실시 예에 따라, 플러그인 탐색기(14)는 입력 패킷에서 시그니처 그룹 분류정보를 읽어들여 입력 심볼들을 추출하여 맵의 종류 및 저장 위치를 탐지하고, 탐지된 맵의 저장주소를 이용하여 외부 메모리로부터 해당 맵을 읽어들이고 읽어들인 맵을 내부 메모리에 저장한다. 그리고, 내부 메모리에 저장된 맵을 이용하여 입력 패킷에 대해 다중 바이트 패턴매칭을 수행한다.Next, the plug-in searcher 14 reads the map loaded in the external memory into the internal memory by a plug-in method and inspects the pattern of the input packet using the map loaded into the internal memory (operation 1220). According to one embodiment, the plug-in searcher 14 reads the signature group classification information from the input packet, extracts input symbols, detects the type and storage location of the map, Reads the map and stores the read map in internal memory. Then, multi-byte pattern matching is performed on the input packet using the map stored in the internal memory.

추가적으로, 후 처리부(16)가 플러그인 탐색기(14)로부터 수행결과를 전달받아 적용할 규칙을 결정한 후 결정된 규칙에 따라 패킷을 처리할 수 있다. 일 실시 예에 따라, 후 처리부(16)는 플러그인 탐색기(14)의 패턴매칭 결과를 기초로 하여 규칙 저장주소를 이용하여 규칙의 종류 및 저장 위치를 확인하고 소정의 규칙을 선택하고, 선택된 규칙을 외부 메모리로부터 읽어들여 내부 메모리로 운반한다. 그리고, 내부 메모리로 운반된 규칙을 이용하여 입력 패킷을 처리한다.In addition, the post-processing unit 16 may receive the execution result from the plug-in searcher 14, determine a rule to be applied, and process the packet according to the determined rule. According to one embodiment, the post-processing unit 16 confirms the type and storage location of the rule using the rule storage address based on the pattern matching result of the plug-in searcher 14, selects a predetermined rule, It reads from external memory and carries it to internal memory. Then, the input packet is processed using a rule transferred to the internal memory.

이제까지 본 발명에 대하여 그 실시 예들을 중심으로 살펴보았다. 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시 예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The embodiments of the present invention have been described above. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

1 : 플러그인 다중 패턴매칭 장치 10 : 맵 생성기
12 : 맵 적재기 14 : 플러그인 탐색기
16 : 후 처리기 100 : 패턴 분류부
102 : 패턴 번역부 104 : 맵 변환부
120 : 맵 분석부 122 : 맵 분류부
124 : 맵 구성부 126 : 맵 배치부
128 : 구성 설정부 140 : 맵 탐지부
142 : 맵 운반부 144 : 다중패턴 검색부
160 : 규칙 선택부 162 : 규칙 운반부
164 : 규칙 처리부
1: plug-in multi-pattern matching device 10: map generator
12: Map Stacker 14: Plug-in Explorer
16: Post-processor 100: Pattern classifier
102: pattern translation unit 104: map conversion unit
120: map analyzing unit 122: map classifying unit
124: Map construction unit 126: Map placement unit
128: Configuration setting unit 140: Map detection unit
142: map carrier unit 144: multi-pattern search unit
160: Rule selecting unit 162: Rule carrying unit
164:

Claims (14)

시그니처를 다수의 그룹으로 분류하고 분류된 그룹별로 패턴매칭해야 할 패킷 바이트 수를 알 수 있는 입력심볼 크기정보를 포함하도록 맵을 생성하는 맵 생성기;
상기 맵 생성기에서 생성된 맵의 적어도 일부를 외부 메모리에 저장하는 맵 적재기; 및
상기 외부 메모리에 저장된 맵을 읽어들여 내부 메모리에 저장하며 맵의 입력심볼 크기정보를 이용하여 해당 크기를 가진 입력 패킷에 대한 다중 패턴매칭을 수행하는 플러그인 탐색기;
를 포함하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
A map generator for classifying the signatures into a plurality of groups and generating a map to include input symbol size information indicating the number of packet bytes to be pattern-matched for each classified group;
A map loader for storing at least a part of the map generated in the map generator in an external memory; And
A plug-in searcher for reading a map stored in the external memory, storing the map in an internal memory, and performing a multi-pattern matching on an input packet having a corresponding size using the input symbol size information of the map;
Pattern matching device.
제 1 항에 있어서, 상기 맵 생성기는,
시그니처 집합에서 분류기준에 따라 시그니처를 그룹별로 분류하는 패턴 분류부;
시그니처 그룹별로 다중 패턴 검색 맵을 생성하는 패턴 번역부; 및
상기 패턴 번역부에서 생성된 다중 패턴 검색 맵을 상기 플러그인 탐색기가 사용 가능한 맵으로 변환하는 맵 변환부;
를 포함하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
2. The map generator according to claim 1,
A pattern classifier for classifying signatures in groups according to classification criteria in a signature set;
A pattern translation unit for generating a multi-pattern search map for each signature group; And
A map conversion unit for converting the multi-pattern search map generated by the pattern translation unit into a map usable by the plug-in searcher;
Pattern matching device.
제 2 항에 있어서, 상기 맵 변환부는,
상기 플러그인 탐색기가 각 상태에서 패턴매칭해야 할 패킷 바이트 수를 알 수 있는 입력 심볼 크기정보를 포함하도록 맵을 구성하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
3. The apparatus according to claim 2,
Wherein the plug-in searcher constructs a map so as to include input symbol size information that indicates the number of packet bytes to be pattern-matched in each state.
제 2 항에 있어서, 상기 맵 변환부는,
각 상태에서 확장 가능조건에 따라 n(n=2,3,…) 바이트 패턴매칭이 가능한 경우 해당 상태의 크기를 n 바이트로 확장하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
3. The apparatus according to claim 2,
Wherein the size of the state is expanded to n bytes when n (n = 2, 3, ...) byte pattern matching is possible according to the expandable condition in each state.
제 4 항에 있어서,
상기 확장 가능조건은 N, F, NF 및 FN 상태 중 적어도 하나에서 매치 패턴이 존재하지 않는 경우이며, 상기 N은 S에서 s= {s 1 ,…, s i } 입력으로 천이되는 상태이고, 상기 S는 현 상태이고, 상기 s= {s 1 ,…, s i }는 S에서 입력 가능한 심볼이며, 상기 F는 S에서 실패 함수에 의해 천이되는 상태이고, 상기 NF는 N에서 실패 함수에 의해 천이되는 상태이고, 상기 FN은 F에서 f= {f 1 ,…, f k}에 의해 천이되는 상태이며, 상기 f= {f 1 ,…, f k}는 F에서 입력 가능한 심볼인 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
5. The method of claim 4,
Wherein the expandable condition is a case where there is no match pattern in at least one of N, F, NF and FN states, and N is s = { s 1 , ... , s i }, S is the current state, and s = { s 1 , ... , s i } , s i } is a symbol input in S, F is a state transited by a failure function in S, NF is a state transited by a failure function in N, and FN is f = { f 1 , ... , f k }, and f = { f 1 , ..., , f k } is an input symbol in F.
제 5항에 있어서,
상기 n 바이트로 확장된 상태는, 현재 상태 S에서 심볼 셋 E={s·n, s·nf, f·fn}의 입력으로 천이되는 상태인 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
6. The method of claim 5,
Wherein the state extended to the n bytes is a state of transitioning to an input of a symbol set E = {s · n, s · nf, f · fn} in the current state S.
제 1 항에 있어서, 상기 맵 적재기는,
상기 맵 생성기에서 생성된 맵을 분석하는 맵 분석부;
상기 맵 분석부에서 분석된 맵을 분류하는 맵 분류부;
상기 맵 분류부에서 분류된 맵들을 상기 플러그인 탐색기에 배치할 방법을 결정하는 맵 구성부;
상기 맵 구성부에서 결정된 배치 방법에 따라 상기 플러그인 탐색기에 맵을 배치하는 맵 배치부; 및
상기 플러그인 탐색기가 상기 결정된 배치 방법에 따라 동작할 수 있도록 환경을 설정하는 구성 설정부;
를 포함하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
2. The map loader according to claim 1,
A map analyzer for analyzing the map generated by the map generator;
A map classifier for classifying the map analyzed by the map analyzer;
A map construction unit for determining a method of arranging maps classified by the map classification unit in the plug-in searcher;
A map arrangement unit for arranging a map in the plug-in searcher according to the arrangement method determined by the map construction unit; And
A configuration setting unit configured to set an environment in which the plug-in searcher can operate according to the determined placement method;
Pattern matching device.
제 1 항에 있어서, 상기 플러그인 탐색기는,
입력 패킷에서 시그니처 그룹 분류정보를 읽어들여 입력 심볼들을 추출하여 맵의 종류 및 저장 위치를 탐지하는 맵 탐지부;
상기 맵 탐지부에 의해 탐지된 맵의 저장주소를 이용하여 외부 메모리로부터 해당 맵을 읽어들이고 읽어들인 맵을 내부 메모리에 저장하는 맵 운반부; 및
상기 내부 메모리에 저장된 맵을 이용하여 입력 패킷에 대해 다중 바이트 패턴매칭을 수행하는 다중패턴 검색부;
를 포함하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
2. The plug-in searcher according to claim 1,
A map detection unit that reads signature group classification information from an input packet and extracts input symbols to detect a type and storage location of the map;
A map carrying unit for reading the map from the external memory using the storage address of the map detected by the map detection unit and storing the read map in the internal memory; And
A multi-pattern search unit for performing multibyte pattern matching on an input packet using a map stored in the internal memory;
Pattern matching device.
제 8 항에 있어서, 상기 플러그인 탐색기는,
상기 맵 적재기에 의해서 맵들이 적재되는 외부 메모리; 및
상기 맵 운반부에 의해 상기 외부 메모리로부터 다중 패턴 검색부가 사용할 다중 패턴 상태 맵이 플러그인 방식으로 추출되어 적재되는 내부 메모리;
를 더 포함하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
9. The plug-in search apparatus according to claim 8,
An external memory on which maps are loaded by the map loader; And
An internal memory in which a multi-pattern state map to be used by the multi-pattern search unit is extracted and loaded from the external memory by a plug-in method by the map carrying unit;
Wherein the plug-in multi-pattern matching device further comprises:
제 9 항에 있어서,
상기 내부 메모리에는 상기 다중패턴 검색부가 사용할 맵의 크기 또는 예상 사용빈도에 따라 적어도 일부의 맵들이 저장되며,
상기 플러그인 탐색기는 상기 내부 메모리에 저장된 맵들을 이용하여 패턴매칭을 수행하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
10. The method of claim 9,
At least some maps are stored in the internal memory according to the size of the map to be used or the expected frequency of use,
Wherein the plug-in searcher performs pattern matching using maps stored in the internal memory.
제 8 항에 있어서, 상기 맵 탐지부는,
제한된 키워드를 이용하여 맵을 탐지하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
9. The apparatus according to claim 8,
And detects the map using a limited keyword.
제 8 항에 있어서, 상기 다중패턴 검색부는,
맵 내 현재 상태에서 입력 심볼의 크기 정보에 따라 입력 패킷 페이로드에서 해당 크기만큼 읽어들여 패턴매칭을 수행하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
9. The apparatus of claim 8, wherein the multi-
Wherein the pattern matching is performed by reading the input packet payload of the size corresponding to the size information of the input symbol in the current state of the map.
제 1 항에 있어서, 상기 플러그인 다중 패턴매칭 장치는,
상기 플러그인 탐색기로부터 수행결과를 전달받아 적용할 규칙을 결정한 후 결정된 규칙에 따라 패킷을 처리하는 후 처리부;
를 더 포함하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
2. The apparatus of claim 1, wherein the plug-
A post-processing unit for receiving a result of the plug-in search from the plug-in searcher to determine a rule to be applied and processing the packet according to a determined rule;
Wherein the plug-in multi-pattern matching device further comprises:
제 13 항에 있어서, 상기 후 처리부는,
상기 플러그인 탐색기의 패턴매칭 결과를 기초로 하여 규칙 저장주소를 이용하여 규칙의 종류 및 저장 위치를 확인하고 소정의 규칙을 선택하는 규칙 선택부;
상기 규칙 선택부에서 선택된 규칙을 상기 외부 메모리로부터 읽어들여 내부 메모리로 운반하는 규칙 운반부; 및
상기 규칙 운반부에 의해 상기 내부 메모리로 운반된 규칙을 이용하여 입력 패킷을 처리하는 규칙 처리부;
를 포함하는 것을 특징으로 하는 플러그인 다중 패턴매칭 장치.
14. The apparatus of claim 13, wherein the post-
A rule selector for checking the type and storage location of the rule using the rule storage address based on the pattern matching result of the plug-in searcher and selecting a predetermined rule;
A rule-handling unit for reading a rule selected by the rule selection unit from the external memory and transferring the rule to the internal memory; And
A rule processing unit for processing an input packet using rules transmitted to the internal memory by the rule carrier unit;
Pattern matching device.
KR1020130046971A 2013-04-26 2013-04-26 Plug-in multi pattern matching apparatus and method thereof KR101470590B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130046971A KR101470590B1 (en) 2013-04-26 2013-04-26 Plug-in multi pattern matching apparatus and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130046971A KR101470590B1 (en) 2013-04-26 2013-04-26 Plug-in multi pattern matching apparatus and method thereof

Publications (2)

Publication Number Publication Date
KR20140128153A KR20140128153A (en) 2014-11-05
KR101470590B1 true KR101470590B1 (en) 2014-12-10

Family

ID=52452095

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130046971A KR101470590B1 (en) 2013-04-26 2013-04-26 Plug-in multi pattern matching apparatus and method thereof

Country Status (1)

Country Link
KR (1) KR101470590B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101630383B1 (en) 2015-04-02 2016-06-27 한국과학기술원 Multi-pattern matching algorithm and processing apparatus using thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100937217B1 (en) * 2007-12-07 2010-01-20 한국전자통신연구원 Optimizing system and method of signature
KR100960120B1 (en) * 2007-12-17 2010-05-27 한국전자통신연구원 Signature String Storing Memory Structure and the Storing Method for the Same, Signature String Pattern Matching Method
KR20120096983A (en) * 2011-02-24 2012-09-03 삼성전자주식회사 Malware detection method and mobile terminal therefor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100937217B1 (en) * 2007-12-07 2010-01-20 한국전자통신연구원 Optimizing system and method of signature
KR100960120B1 (en) * 2007-12-17 2010-05-27 한국전자통신연구원 Signature String Storing Memory Structure and the Storing Method for the Same, Signature String Pattern Matching Method
KR20120096983A (en) * 2011-02-24 2012-09-03 삼성전자주식회사 Malware detection method and mobile terminal therefor

Also Published As

Publication number Publication date
KR20140128153A (en) 2014-11-05

Similar Documents

Publication Publication Date Title
EP3716110B1 (en) Computer-security event clustering and violation detection
US11899786B2 (en) Detecting security-violation-associated event data
EP3716111B1 (en) Computer-security violation detection using coordinate vectors
US9495479B2 (en) Traversal with arc configuration information
KR101615915B1 (en) GENERATING A NFA (Non-Deterministic finite automata) GRAPH FOR REGULAR EXPRESSION PATTERNS WITH ADVANCED FEATURES
US9275224B2 (en) Apparatus and method for improving detection performance of intrusion detection system
US8756170B2 (en) Regular expression matching method and system
US10313240B2 (en) Technologies for efficient network flow classification with vector bloom filters
US7602780B2 (en) Scalably detecting and blocking signatures at high speeds
US20140269307A1 (en) Content Addressable Memory with Reduced Power Consumption
WO2003023548A2 (en) High speed data stream pattern recognition
US8543528B2 (en) Exploitation of transition rule sharing based on short state tags to improve the storage efficiency
KR100772523B1 (en) Apparatus for detecting intrusion using pattern and method thereof
JP2020174257A (en) Registration system, registration method, and registration program
CN103154884A (en) Pattern detection
Thinh et al. A FPGA-based deep packet inspection engine for network intrusion detection system
US20170277811A1 (en) Efficient conditional state mapping in a pattern matching automaton
TW200921435A (en) Apparatus, method and system for performing a rule matching on a datastream
KR101470590B1 (en) Plug-in multi pattern matching apparatus and method thereof
US11496394B2 (en) Internet of things (IoT) device identification on corporate networks via adaptive feature set to balance computational complexity and model bias
US11870693B2 (en) Kernel space based capture using intelligent packet selection paradigm and event output storage determination methodology
US11025650B2 (en) Multi-pattern policy detection system and method
Shen et al. IoT eye an efficient system for dynamic IoT devices auto-discovery on organization level
US20170371801A1 (en) Information processing apparatus and information processing method
KR101519619B1 (en) Advanced packet searching apparatus and method for classifying packet based on signature searching

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20171204

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20181203

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20191202

Year of fee payment: 6