KR101519619B1 - Advanced packet searching apparatus and method for classifying packet based on signature searching - Google Patents

Advanced packet searching apparatus and method for classifying packet based on signature searching Download PDF

Info

Publication number
KR101519619B1
KR101519619B1 KR1020130126182A KR20130126182A KR101519619B1 KR 101519619 B1 KR101519619 B1 KR 101519619B1 KR 1020130126182 A KR1020130126182 A KR 1020130126182A KR 20130126182 A KR20130126182 A KR 20130126182A KR 101519619 B1 KR101519619 B1 KR 101519619B1
Authority
KR
South Korea
Prior art keywords
signature
fingerprint
packet
map
fingerprint signature
Prior art date
Application number
KR1020130126182A
Other languages
Korean (ko)
Other versions
KR20150046671A (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 KR1020130126182A priority Critical patent/KR101519619B1/en
Publication of KR20150046671A publication Critical patent/KR20150046671A/en
Application granted granted Critical
Publication of KR101519619B1 publication Critical patent/KR101519619B1/en

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)

Abstract

패킷 분류를 위한 시그니처 탐색 기반 패킷 탐색 장치 및 그 방법이 개시된다. 본 발명의 일 실시 예에 따른 패킷 탐색 장치는, 각각의 시그니처로부터 다른 시그니처들과 구분될 수 있는 지문 시그니처를 추출하고 지문 시그니처 탐색을 위한 맵을 생성하는 맵 생성부와, 생성된 맵을 이용하여 입력 패킷에 대한 지문 시그니처 패턴 매칭을 수행하는 지문 시그니처 탐색부와, 지문 시그니처 탐색부에서 지문 시그니처 패턴 매칭된 입력 패킷을 대상으로 시그니처 패턴 매칭을 수행하는 클래스 탐색부를 포함한다.A signature search based packet search apparatus and method for packet classification are disclosed. A packet search apparatus according to an embodiment of the present invention includes a map generator for extracting a fingerprint signature that can be distinguished from other signatures from each signature and generating a map for fingerprint signature search, A fingerprint signature search unit for performing fingerprint signature pattern matching on the input packet; and a class search unit for performing signature pattern matching on the input packet matched with the fingerprint signature pattern in the fingerprint signature search unit.

Description

패킷 분류를 위한 시그니처 탐색 기반 패킷 탐색 장치 및 그 방법 {Advanced packet searching apparatus and method for classifying packet based on signature searching}TECHNICAL FIELD [0001] The present invention relates to a packet search apparatus based on signature search for classifying packets,

본 발명은 패킷 처리 기술에 관한 것으로, 보다 상세하게는 입력 패킷으로부터 시그니처를 탐색하여 고속으로 패킷 분류 및 처리를 수행하는 기술에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a packet processing technique, and more particularly, to a technique for performing packet classification and processing at a high speed by searching for a signature from an input packet.

최근 초고속 네트워크의 보급에 따른 보안 장비의 성능 요구 사항은 점점 높아가고 있다. 네트워크 장치는 패킷 내에 특정 시그니처 매칭(signature matching)을 통해 침입탐지, 패킷 필터 기능들을 수행한다. 이러한 기능은 소프트웨어 방식, 하드웨어 방식, 하드웨어와 소프트웨어 조합 방식 등을 통해 구현될 수 있다. 네트워크 속도의 증가 및 침입 방식의 다양화에 따라 시그니처 매칭에 관한 여러 요구사항들이 나오고 있고, 특히 고속 시그니처 매칭 처리 및 패킷 내의 특정 위치와 특정 범위에 따른 시그니처 매칭 기술이 요구되고 있으며, 이러한 요구사항을 만족시키기 위하여 다양한 방법들이 요구된다.Recently, the performance requirements of security equipment due to the spread of high-speed networks are gradually increasing. The network device performs intrusion detection, packet filter functions through specific signature matching in the packet. Such functions can be implemented by a software method, a hardware method, a combination of hardware and software, and the like. With increasing network speed and diversity of intrusion methods, various requirements for signature matching are emerging. In particular, there is a demand for high-speed signature matching processing and signature matching technology according to specific location and specific range in a packet. Various methods are required to satisfy them.

소프트웨어 기반으로 패턴 매칭을 수행하는 데는 규칙 변경이 용이하지만 처리 속도가 저하되는 한계가 있다. 따라서, 고속의 패턴 매칭을 위해서는 FPGA 등의 하드웨어 기반으로 패턴 매칭을 수행한다. 그런데, 내부 메모리 등의 자원에 있어서 제약이 따라고, 외부 TCAM(Ternary Content Addressable Memory) 등을 이용하는 경우에도 외부 TCAM의 단가가 높고 전력 소모가 많아 비효율적이다.Software-based pattern matching is easy to change rules, but there is a limit to processing speed. Therefore, pattern matching is performed based on hardware such as FPGA for high-speed pattern matching. However, even when an external TCAM (Ternary Content Addressable Memory) or the like is used due to restrictions on resources such as internal memory, the cost of the external TCAM is high and power consumption is large, which is inefficient.

일 실시 예에 따라, 메모리의 사용량을 줄이면서 동시에 고속으로 정확한 패턴 매칭이 가능한 하드웨어 기반 패킷 탐색 장치 및 그 방법을 제안한다.According to one embodiment, a hardware-based packet search apparatus and method are provided that can reduce the amount of memory usage and can perform accurate pattern matching at high speed.

일 실시 예에 따른 패킷 탐색 장치는, 각각의 시그니처로부터 다른 시그니처들과 구분될 수 있는 지문 시그니처를 추출하고 지문 시그니처 탐색을 위한 맵을 생성하는 맵 생성부와, 생성된 맵을 이용하여 입력 패킷에 대한 지문 시그니처 패턴 매칭을 수행하는 지문 시그니처 탐색부와, 지문 시그니처 탐색부에서 지문 시그니처 패턴 매칭된 입력 패킷을 대상으로 시그니처 패턴 매칭을 수행하는 클래스 탐색부를 포함한다.The packet search apparatus according to an embodiment includes a map generator for extracting a fingerprint signature that can be distinguished from other signatures from each signature and generating a map for fingerprint signature search, And a class search unit for performing signature pattern matching on an input packet matched with the fingerprint signature pattern in the fingerprint signature search unit. The fingerprint signature matching unit performs fingerprint signature matching on the fingerprint signature pattern.

다른 실시 예에 따른 패킷 탐색 방법은, 각각의 시그니처로부터 다른 시그니처들과 구분될 수 있는 지문 시그니처를 추출하고 지문 시그니처 탐색을 위한 맵을 생성하는 단계와, 생성된 맵을 이용하여 입력 패킷에 대한 지문 시그니처 패턴 매칭을 수행하는 단계와, 지문 시그니처 패턴 매칭된 입력 패킷을 대상으로 시그니처 패턴 매칭을 수행하는 단계를 포함한다.A packet search method according to another embodiment includes extracting a fingerprint signature that can be distinguished from other signatures from each signature and generating a map for fingerprint signature search, Performing signature pattern matching, and performing signature pattern matching on the input packet matched with the fingerprint signature pattern.

일 실시 예에 따르면, 하드웨어 기반의 패킷 탐색에 있어서, 메모리의 사용량을 줄이면서 동시에 고속으로 패턴 매칭이 가능하다.According to one embodiment, in the hardware-based packet search, pattern matching is possible at a high speed while reducing the amount of memory used.

즉, 패턴 매칭을 두 단계의 스테이지로 분리하여, 1차 패턴 매칭 스테이지에서는 대략적으로 입력 패킷의 페이로드에서 지문 시그니처를 고속으로 탐색하고, 2차 패턴 매칭 스테이지에서는 지문 시그니처 탐색 결과를 기초로 하여 입력 패킷의 페이로드에서 시그니처를 정밀하고 정확하게 탐색함에 따라 고속으로 정확한 패킷 탐색이 가능하다.That is, the pattern matching is divided into two stages. In the primary pattern matching stage, the fingerprint signature is roughly searched in the payload of the input packet at high speed. In the secondary pattern matching stage, Accurate and accurate detection of the signature in the payload of the packet allows accurate packet searching at high speed.

또한, 메모리의 전체용량의 큰 부분을 차지하는 맵의 스테이트 테이블과 넥스트 무브 테이블을 분리하고, 스테이트 테이블은 내부 메모리에 저장하고, 넥스트 무브 테이블은 외부 메모리에 저장함에 따라 내부 메모리의 용량을 줄일 수 있다.In addition, the capacity of the internal memory can be reduced by separating the state table and the next move table, which occupy a large portion of the total capacity of the memory, and storing the state table in the internal memory and the next move table in the external memory .

나아가, 가변 길이를 갖는 지문 시그니처를 추출하여 맵을 생성함에 따라 하드웨어 자원의 제약으로 인한 메모리의 사용 가능한 용량에 따라 적응적인 패턴 매칭이 가능하다.Further, as the map is generated by extracting the fingerprint signature having the variable length, adaptive pattern matching is possible according to the usable capacity of the memory due to the restriction of the hardware resources.

도 1은 본 발명의 이해를 돕기 위한 패턴 매칭 원리를 도시한 참조도,
도 2는 하드웨어 기반 패턴 매칭 방식에서 메모리의 용량을 차지하는 넥스트 무브 테이블(NT)의 스테이트 엔트리 사이즈를 정리한 표 및 그래프,
도 3은 본 발명의 일 실시 예에 따라 두 스테이지(stage)로 구분되는 하드웨어 기반 패턴 매칭 개념을 설명하는 참조도,
도 4는 본 발명의 일 실시 예에 따른 하드웨어 기반 패킷 탐색 장치의 구성도,
도 5는 본 발명의 일 실시 예에 따른 도 4의 맵 생성부의 세부 구성도,
도 6a 및 도 6b는 본 발명의 일 실시 예에 따른 스테이트 테이블(ST)과 넥스트 무브 테이블(NT)의 구조도,
도 7은 본 발명의 일 실시 예에 따른 도 4의 지문 시그니처 탐색부의 세부 구성도,
도 8은 본 발명의 일 실시 예에 따른 지문 시그니처 매치 프로세서(FMP)에서의 동작을 도시한 참조도,
도 9는 본 발명의 일 실시 예에 따른 도 8의 다중 지문 시그니처 테이블(MFT)과 매치 식별자 번역 테이블(MTT)의 구조도,
도 10은 본 발명의 일 실시 예에 따른 지문 시그니처 매치 프로세서(FMP)가 클래스 탐색부(CSP)에 전송하는 시그니처 매칭 결과의 구조도,
도 11은 본 발명의 일 실시 예에 따른 입력 패킷에 대한 탐색이 종료될 때까지 시그니처 매칭 결과가 없는 경우, 지문 시그니처 매치 프로세서(FMP)가 후 처리부(PP)로 전송하는 시그니처 매칭 결과 구조도,
도 12는 본 발명의 일 실시 예에 따른 클래스 탐색부(CSP)에서의 동작을 도시한 참조도,
도 13은 본 발명의 일 실시 예에 따른 후 처리부(PP)의 동작을 설명하는 참조도,
도 14는 본 발명의 일 실시 예에 따른 패킷 탐색 방법을 도시한 흐름도이다.
BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a reference diagram showing a pattern matching principle for facilitating understanding of the present invention; Fig.
FIG. 2 is a table and a graph of a state entry size of a next move table NT occupying a memory capacity in a hardware-based pattern matching method,
FIG. 3 is a reference diagram illustrating a hardware-based pattern matching concept divided into two stages according to an embodiment of the present invention;
4 is a configuration diagram of a hardware-based packet search apparatus according to an embodiment of the present invention;
FIG. 5 is a detailed configuration diagram of the map generating unit of FIG. 4 according to an embodiment of the present invention;
6A and 6B are structural diagrams of a state table ST and a next move table NT according to an embodiment of the present invention,
FIG. 7 is a detailed configuration diagram of the fingerprint signature search unit of FIG. 4 according to an embodiment of the present invention;
8 is a reference diagram illustrating operation in a fingerprint signature match processor (FMP) according to an embodiment of the present invention;
FIG. 9 is a structure diagram of a multiple fingerprint signature table (MFT) and a match identifier translation table (MTT) in FIG. 8 according to an embodiment of the present invention;
FIG. 10 is a diagram illustrating a structure of a signature matching result transmitted from a fingerprint signature match processor (FMP) to a class searching unit (CSP) according to an embodiment of the present invention.
11 is a schematic diagram illustrating a signature matching result structure transmitted from a fingerprint signature match processor (FMP) to a post-processing unit (PP) when there is no signature matching result until the search for an input packet is completed according to an embodiment of the present invention.
12 is a reference diagram showing an operation in a class search unit (CSP) according to an embodiment of the present invention;
13 is a reference diagram for explaining the operation of the post-processing unit PP according to the embodiment of the present invention,
14 is a flowchart illustrating a packet search 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 is a reference diagram showing a pattern matching principle for facilitating understanding of the present invention.

도 1을 참조하면, 일 실시 예에 따른 패턴 매칭(pattern matching)은 입력되는 패킷의 페이로드(payload)에서 바이트(byte) 단위로 시그니처 패턴(signature pattern)을 탐색(search)하는 것으로, 시그니처 패턴을 설정하고 설정된 시그니처 패턴과 패킷의 페이로드를 매칭시킴으로 시그니처 패턴을 탐색할 수 있다.Referring to FIG. 1, a pattern matching according to an exemplary embodiment searches for a signature pattern in units of bytes in a payload of an input packet, And the signature pattern can be searched by matching the set signature pattern with the payload of the packet.

도 1에서는 일 실시 예에 따른 시그니처 패턴들 {he, she, his, hers}과, 출력함수 Output(i)를 나타내는 매치 패턴(match pattern)과, 패턴비교 실패시의 스테이트(state)를 알 수 있는 실패 함수(failure function)와, 스테이트 간의 천이를 알 수 있는 고투 그래프(goto graph)와, 고투 그래프에 따라 현재 스테이트에서의 입력 심볼 입력시 다음 스테이트를 테이블화한 넥스트 무브 테이블(Next Move Table)을 도시하였다.In FIG. 1, a signature pattern (he, she, his, hers) according to an embodiment, a match pattern indicating an output function Output (i), and a state A goto graph for indicating a transition between states, and a next move table in which the next state is tabulated when an input symbol in the current state is input according to a stratification graph, Respectively.

Aho-Corasick(AC) 알고리즘에 따르면, 시그니처를 바이트(byte) 단위의 상태 머신(state machine: SM)으로 구현한다. 이때, 상태 머신 상의 각 스테이트는 고투 그래프에서 다음에 올 스테이트에 대한 포인터(고투 그래프의 실선)와 패턴비교 실패시의 스테이트에 대한 포인터(고투 그래프의 점선)를 각각 갖는다. 따라서 시그니처의 탐색은 패킷에서 발생하는 각 바이트를 입력으로 하여 상태 머신 상에서 각 스테이트의 변화를 추적함으로써 수행된다.According to the Aho-Corasick (AC) algorithm, the signature is implemented as a byte-by-byte state machine (SM). At this time, each state on the state machine has a pointer (a solid line of a high-throughput graph) to the next state in the strat- ing graph and a pointer (a dotted line of the high-throughput graph) to the state at the time of the pattern comparison failure. Thus, the signature search is performed by tracking each state change on the state machine with each byte occurring in the packet as input.

도 2는 하드웨어 기반 패턴 매칭 방식에서 메모리의 용량을 차지하는 넥스트 무브 테이블(Next Move Table)의 스테이트 엔트리 사이즈(state entry size)를 정리한 표 및 그래프이다.FIG. 2 is a table and a graph summarizing a state entry size of a Next Move Table occupying a memory capacity in a hardware-based pattern matching method.

도 2를 참조하면, 소프트웨어 기반으로 패턴 매칭을 수행하는 데는 처리속도가 저하되는 한계가 있어, 고속의 패턴 매칭을 위해서 FPGA 등의 하드웨어 기반으로 패턴 매칭을 수행한다. 그런데, 하드웨어 기반의 패턴 매칭 방식은 패턴 매칭을 위해 참조하는 스테이트 테이블(State Table: ST)과 넥스트 무브 테이블(Next Move Table: NT)의 크기(size)가 매우 커서 비효율적일 수 있다.Referring to FIG. 2, pattern matching is performed based on hardware such as an FPGA for high-speed pattern matching because there is a limitation that the processing speed is lowered in performing software-based pattern matching. However, the hardware-based pattern matching method may be inefficient because the size (size) of the state table (ST) and the next move table (NT) referencing for pattern matching is very large.

세부적으로 스테이트 테이블(ST)의 최대 크기는 최대 스테이트(Max. states)의 수 × 출력 엔트리 사이즈(output entry size)이다. 넥스트 무브 테이블(NT)의 최대 크기는 스테이트 엔트리 사이즈(state entry size) × 아스키 코드 사이즈(ASCII code size)(256)이다. 예를 들어, 도 2에 도시된 바와 같이 시그니처의 수가 1751개이고, 하나의 시그니처의 최대 길이가 64 바이트인 경우 스테이트 엔트리 사이즈(state entry size)는 24,080이고, 넥스트 무브 테이블(NT)의 최대 크기는 24,080 × 256 = 6,164,480이며, 이를 비트로 나타내면 6,164,480 × 15(bit) = 92,467,200 비트이다. 이처럼, 스테이트 테이블(ST)과 넥스트 무브 테이블(NT)의 사이즈가 매우 커져 스테이트 테이블(ST)과 넥스트 무브 테이블(NT)을 저장하는 메모리의 크기 또한 커져야 한다. 따라서, 본 발명은 하드웨어 기반 패턴 매칭에 있어서, 메모리의 전체용량의 큰 부분을 차지하는 스테이트 테이블(ST)과 넥스트 무브 테이블(NT)의 크기를 감소시킴에 따라 메모리의 전체용량을 감소시켜 고속의 패턴 매칭이 가능한 기술을 제안한다.In detail, the maximum size of the state table ST is the number of maximum states (states) × output entry size. The maximum size of the next move table (NT) is the state entry size (ASCII code size) (256). For example, if the number of signatures is 1751 and the maximum length of one signature is 64 bytes as shown in FIG. 2, the state entry size is 24,080, and the maximum size of the next move table (NT) is 24,080 x 256 = 6,164,480, and if it is expressed in bits, 6,164,480 x 15 (bits) = 92,467,200 bits. As described above, the sizes of the state table ST and the next move table NT become very large, and the size of the memory for storing the state table ST and the next move table NT also needs to be large. Therefore, in the hardware-based pattern matching, the present invention reduces the size of the state table (ST) and the next move table (NT), which occupy a large portion of the total capacity of the memory, We propose a technology that can be matched.

한편, 도 2에서의 패턴 개수/바이트 수에 따른 엔트리 사이즈는 시그니처들에 따라 달라질 수 있고, 전술한 넥스트 무브 테이블(NT)은 1751개의 실제 시그니처 셋과 임의로 생성한 시그니처 셋을 가정하여 계산된 것으로, 고정된 값을 갖는 것이 아님을 명시한다.Meanwhile, the entry size according to the number of patterns / bytes in FIG. 2 may vary depending on the signatures, and the above-described Next Move Table (NT) is calculated assuming 1751 actual signature sets and arbitrarily generated signature sets , And does not have a fixed value.

도 3은 본 발명의 일 실시 예에 따라 두 스테이지(stage)로 구분되는 하드웨어(HW) 기반 패턴 매칭(Pattern Matching: PM) 개념을 설명하는 참조도이다.3 is a reference diagram illustrating hardware (HW) -based Pattern Matching (PM) concept divided into two stages according to an embodiment of the present invention.

도 3을 참조하면, 일 실시 예에 따른 패킷 탐색 장치는 각 시그니처 (signature)(30)로부터 지문 시그니처(fingerPrint)(32)를 추출한다. 지문 시그니처(32)는 각각의 시그니처(30)로부터 다른 시그니처들과 구분될 수 있는 시그니처로서, 각 시그니처(30)의 일부분이다. 그리고, 지문 시그니처(32)를 이용하여 입력 패킷에서 지문 시그니처 탐색을 위한 맵을 생성하는데, 맵은 스테이트 테이블(ST)과 넥스트 무브 테이블(NT)을 포함한다. 지문 시그니처(32)를 이용한 맵 생성을 통해 스테이트 테이블(ST)과 넥스트 무브 테이블(NT)의 크기를 줄여 메모리의 전체용량을 줄일 수 있다.Referring to FIG. 3, a packet search apparatus according to an embodiment extracts a fingerprint signature (32) from each signature (30). The fingerprint signature 32 is a signature that can be distinguished from other signatures from each signature 30, and is part of each signature 30. Then, the fingerprint signature 32 is used to generate a map for fingerprint signature search in the input packet. The map includes a state table ST and a next move table NT. The size of the state table ST and the next move table NT can be reduced by generating a map using the fingerprint signature 32, thereby reducing the total capacity of the memory.

이어서, 패킷 탐색 장치는 1차 패턴 매칭 스테이지(Stage #1)와 2차 패턴 매칭 스테이지(Stage #2)로 구분되는 두 단계의 스테이지(2 Stage)를 수행한다. 즉, 패킷 탐색 장치는 1차 패턴 매칭 스테이지(Stage #1)에서 맵(Map #1)을 이용하여 입력 패킷에 대한 지문 시그니처 패턴 매칭을 수행하고, 2차 패턴 매칭 스테이지(Stage #2)에서 지문 시그니처 패턴 매칭 결과를 이용하여 입력 패킷에 대한 정확한 시그니처 패턴 매칭을 수행한다. 1차 패턴 매칭 스테이지(Stage #1)는 대략적으로 입력 패킷의 페이로드에서 지문 시그니처를 고속으로 탐색하는 것이고, 2차 패턴 매칭 스테이지(Stage #2)는 지문 시그니처 탐색 결과를 기초로 하여 입력 패킷의 페이로드에서 시그니처를 정밀하고 정확하게 탐색하는 것이다.Next, the packet search apparatus performs two stages of a stage, which is divided into a primary pattern matching stage (Stage # 1) and a secondary pattern matching stage (Stage # 2). That is, the packet search apparatus performs fingerprint signature pattern matching on the input packet using the map (Map # 1) in the primary pattern matching stage (Stage # 1) And performs accurate signature pattern matching on the input packet using the signature pattern matching result. The primary pattern matching stage (Stage # 1) roughly searches the fingerprint signature in the payload of the input packet at a high speed, and the secondary pattern matching stage (Stage # 2) searches the input packet It is precisely and precisely exploring the signature in the payload.

1차 패턴 매칭 스테이지(Stage #1)에서는 입력 패킷에서 시그니처의 일부분인 지문 시그니처를 탐색하므로 고속으로 패턴 매칭이 이루어진다. 그런데, 지문 시그니처는 시그니처의 일 부분이므로 중복되는 여러 개의 지문 시그니처가 탐색될 수 있다. 따라서, 정확한 패턴 매칭을 위해 1차 패턴 매칭 스테이지(Stage #1)의 1차 패턴 매칭 결과가 2차 패턴 매칭 스테이지(Stage #2)에 전달되며, 2차 패턴 매칭 스테이지(Stage #2)에서는 여러 개의 지문 시그니처가 탐색된 1차 패턴 매칭 결과 내에서 시그니처를 정밀 탐색하는 2차 패턴 매칭을 수행한다.In the primary pattern matching stage (Stage # 1), pattern matching is performed at a high speed because the fingerprint signature that is a part of the signature is searched in the input packet. However, since the fingerprint signature is a part of the signature, multiple fingerprint signatures that overlap can be searched. Therefore, for accurate pattern matching, the primary pattern matching result of the primary pattern matching stage (Stage # 1) is transferred to the secondary pattern matching stage (Stage # 2). In the secondary pattern matching stage (Stage # 2) The fingerprint signatures perform a second-order pattern matching in which the signatures are searched in the first pattern matching result searched for.

일 실시 예에 따른 2차 패턴 매칭 스테이지(Stage #2)는 1차 패턴 매칭 스테이지(Stage #1)의 지문 시그니처 패턴 매칭 결과를 이용하여 원 시그니처(original signature)와 비교할 시그니처를 결정한 후, 결정된 시그니처로 입력 패킷의 페이로드에서 정밀 탐색한다. 이때, 지문 시그니처 별로 우선순위가 할당되어 있어서, 우선순위가 앞선 순서대로 해당 지문 시그니처를 갖는 시그니처가 원 시그니처와 일치하는지 여부를 비교 판단하여, 일치하는 경우에는 다음으로 우선순위가 앞선 지문 시그니처에 대해서는 비교 판단을 할 필요가 없어 패턴 매칭 속도를 단축할 수 있다.The secondary pattern matching stage (Stage # 2) according to an embodiment uses a fingerprint signature pattern matching result of the primary pattern matching stage (Stage # 1) to determine a signature to be compared with an original signature, Lt; / RTI > in the payload of the input packet. At this time, priority is assigned to each fingerprint signature, and it is determined whether or not the signature having the fingerprint signature coincides with the original signature in the order of priority, and if they match, the fingerprint signature It is not necessary to make a comparison judgment and the pattern matching speed can be shortened.

도 4는 본 발명의 일 실시 예에 따른 하드웨어 기반 패킷 탐색 장치(1)의 구성도이다.4 is a configuration diagram of a hardware-based packet search apparatus 1 according to an embodiment of the present invention.

도 4를 참조하면, 패킷 탐색 장치(1)는 맵 생성부(Map Builder)(10), 지문 시그니처 탐색부(FingerPrint Search Engine)(14) 및 클래스 탐색부(Class Search Processor: CSP)(16)를 포함하며, 맵 저장부(Map Loader)(12)와 후 처리부(Post Processor: PP)(18)를 더 포함할 수 있다.4, the packet search apparatus 1 includes a map builder 10, a fingerprint search engine 14, and a class search processor (CSP) 16, And may further include a map loader 12 and a post processor (PP) 18.

맵 생성부(10)는 시그니처 셋으로부터 다른 시그니처들과 구분될 수 있는 지문 시그니처를 추출하고, 추출된 지문 시그니처에 기반하여 지문 시그니처 탐색부(14)가 지문 시그니처 탐색을 위해 참조하는 맵을 생성한다. 이때, 맵 생성부(10)는 가변 길이의 지문 시그니처를 추출하여 맵을 생성할 수 있다. 맵 생성부(10)의 세부 구성과, 가변 길이의 지문 시그니처 추출 프로세스에 대해서는 도 5에서 상세히 후술한다.The map generating unit 10 extracts fingerprint signatures that can be distinguished from other signatures from the signature set and generates a map that the fingerprint signature searching unit 14 refers to for fingerprint signature search based on the extracted fingerprint signatures . At this time, the map generating unit 10 can extract a fingerprint signature of variable length and generate a map. The detailed configuration of the map generating unit 10 and the variable-length fingerprint signature extraction process will be described in detail later with reference to FIG.

맵 저장부(12)는 맵 생성부(10)에서 생성된 맵을 지문 시그니처 탐색부(14)에 배치할 방식을 결정하고 결정된 방식에 맞추어 지문 시그니처 탐색부(14)에 맵을 저장하고 지문 시그니처 탐색부(14)의 구성(configuration)을 설정한다. 일 실시 예에 따른 맵 저장부(12)는 맵을 구성하는 스테이트 테이블(ST)은 지문 시그니처 탐색부(14)의 내부 메모리에 저장되고, 맵을 구성하는 넥스트 무브 테이블(NT)은 지문 시그니처 탐색부(14)의 외부 메모리에 저장된다. 이는 내부 메모리의 크기를 줄이기 위함이다.The map storage unit 12 determines a method of arranging the map generated by the map generation unit 10 in the fingerprint signature search unit 14, stores the map in the fingerprint signature search unit 14 in accordance with the determined method, The configuration of the search unit 14 is set. In the map storage unit 12 according to the embodiment, the state table ST constituting the map is stored in the internal memory of the fingerprint signature searching unit 14, and the next move table NT constituting the map stores the fingerprint signature search (14). This is to reduce the size of the internal memory.

지문 시그니처 탐색부(14)는 맵 저장부(12)에 저장된 맵과 구성 정보를 이용하여 입력 패킷에 대한 지문 시그니처 패턴 매칭을 수행하고, 수행 결과를 클래스 탐색부(16)에 전달한다.The fingerprint signature search unit 14 performs fingerprint signature pattern matching on the input packet using the map and configuration information stored in the map storage unit 12 and transmits the result of the matching to the class search unit 16. [

클래스 탐색부(16)는 지문 시그니처 탐색부(14)의 지문 시그니처 패턴 매칭 결과를 수신하고, 수신된 지문 시그니처 패턴 매칭 결과를 이용하여 원 시그니처와 비교할 시그니처를 결정한 후, 결정된 시그니처로 입력 패킷의 페이로드에서 정밀 탐색하는 2차 패턴 매칭을 수행한다.The class searching unit 16 receives the fingerprint signature pattern matching result of the fingerprint signature searching unit 14, determines a signature to be compared with the original signature using the received fingerprint signature pattern matching result, and outputs the signature of the input packet to the determined signature Performs a second-order pattern matching with precise search on the load.

후 처리부(18)는 지문 시그니처 탐색부(14)와 클래스 탐색부(16) 등으로부터 수신된 정보를 가공하여 최종적으로 패킷을 처리하는 곳으로 정보를 전달한다.The post-processing unit 18 processes the information received from the fingerprint signature searching unit 14 and the class searching unit 16 and transfers the information to a place where the packet is finally processed.

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

도 4와 도 5를 참조하면, 맵 생성부(10)는 지문 시그니처 추출부(FingerPrint Extractor)(100), 지문 시그니처 컴파일러(FingerPrint Compiler)(102) 및 맵 변환부(Map Transformer)(104)를 포함한다.4 and 5, the map generating unit 10 includes a fingerprint extractor 100, a fingerprint compiler 102, and a map transformer 104 .

지문 시그니처 추출부(100)는 시그니처 셋으로부터 지문 시그니처를 추출한다. 지문 시그니처는 각각의 시그니처로부터 다른 시그니처들과 구분될 수 있는 시그니처이다.The fingerprint signature extraction unit 100 extracts fingerprint signatures from the signature set. A fingerprint signature is a signature that can be distinguished from other signatures from each signature.

지문 시그니처 컴파일러(102)는 지문 시그니처 추출부(100)에서 추출된 지문 시그니처를 이용하여 다중 패턴 탐색 맵(Multi-Pattern Search Map: MPSM)을 생성한다. 이때, AC 알고리즘을 이용할 수 있다.The fingerprint signature compiler 102 generates a multi-pattern search map (MPSM) using the fingerprint signature extracted by the fingerprint signature extracting unit 100. At this time, an AC algorithm can be used.

맵 변환부(104)는 지문 시그니처 컴파일러(102)에서 생성된 다중 패턴 탐색 맵(MPSM)을 지문 시그니처 탐색부(14)가 사용 가능한 맵으로 변환한다. 맵 변환부(104)에서 생성되는 맵은 스테이트 테이블(ST)과 넥스트 무브 테이블(NT)을 포함한다. 스테이트 테이블(ST)과 넥스트 무브 테이블(NT)에 대해서는 각각 도 6a 및 도 6b를 참조로 후술한다. 일 실시 예에 따른 맵 변환부(104)는 시그니처 셋과 지문 시그니처를 이용하여 후 처리부(18)가 사용할 수 있는 맵을 생성할 수 있다.The map conversion unit 104 converts the multi-pattern search map (MPSM) generated by the fingerprint signature compiler 102 into a map usable by the fingerprint signature search unit 14. [ The map generated by the map conversion unit 104 includes a state table ST and a next move table NT. The state table ST and the next move table NT will be described later with reference to Figs. 6A and 6B, respectively. The map transforming unit 104 according to an embodiment can generate a map that can be used by the post-processing unit 18 using the signature set and the fingerprint signature.

일 실시 예에 따른 맵 생성부(10)는 하드웨어 자원의 제약으로 인한 메모리의 사용 가능한 용량에 따라 가변 길이의 지문 시그니처를 추출하여 맵을 생성한다. 이하, 일 실시 예에 따른 가변 길이의 지문 시그니처를 이용한 맵 생성 예를 들면, 지문 시그니처 추출부(100)는 지문 시그니처의 최대 길이를 미리 설정한다. 예를 들어, 지문 시그니처의 최대 길이를 15Byte로 Default 설정할 수 있으며, 이하 지문 시그니처의 최대 길이를 15Byte로 가정한다. 이어서, 지문 시그니처 추출부(100)는 시그니처로부터 15Byte의 최대 길이에 맞추어 지문 시그니처를 추출하고, 지문 시그니처 컴파일러(102)가 지문 시그니처 추출부(100)에서 추출된 지문 시그니처를 이용하여 다중 패턴 탐색 맵(MPSM)을 생성하며, 맵 변환부(104)가 다중 패턴 탐색 맵(MPSM)을 지문 시그니처 탐색부(14)가 사용할 수 있는 맵으로 변환한다. 맵은 스테이트 테이블(ST)과 넥스트 무브 테이블(NT)을 포함한다.The map generating unit 10 according to an embodiment extracts variable length fingerprint signatures according to the usable capacity of the memory due to restriction of hardware resources, and generates a map. For example, the fingerprint signature extracting unit 100 sets a maximum length of the fingerprint signature in advance using the variable length fingerprint signature according to an exemplary embodiment. For example, the maximum length of the fingerprint signature can be set to 15 bytes as default, and the maximum length of the fingerprint signature is assumed to be 15 bytes. Then, the fingerprint signature extracting unit 100 extracts the fingerprint signature in accordance with the maximum length of 15 bytes from the signature, and the fingerprint signature compiler 102 extracts the fingerprint signature using the fingerprint signature extracted from the fingerprint signature extracting unit 100, (MPSM), and the map conversion unit 104 converts the multi-pattern search map (MPSM) into a map that can be used by the fingerprint signature search unit 14. The map includes a state table ST and a next move table NT.

맵 변환부(104)는 맵에 포함되는 스테이트 테이블(ST)의 크기가 하드웨어 자원의 제약으로 인해 용량이 제한된 메모리에서 사용 가능한 크기가 아닌지 여부를 판단한다. 이때, 메모리에서 사용 가능한 크기이면, 시그니처와 지문 시그니처를 이용하여 후 처리부(18)가 사용할 수 있는 맵을 생성한다. 그러나, 메모리에서 사용 가능한 크기가 아니면, 미리 설정된 지문 시그니처의 최대 길이를 감소시킨 후, 예를 들어 15Byte에서 1Byte 감소시킨 후 감소된 최대 길이에 맞추어 지문 시그니처 추출부(100)를 통해 지문 시그니처를 다시 추출하고, 지문 시그니처 컴파일러(102)의 지문 시그니처를 이용한 다중 패턴 탐색 맵(MPSM) 생성 및 맵 변환부(104)의 다중 패턴 탐색 맵(MPSM)에서 지문 시그니처 탐색부(14)가 사용할 수 있는 맵으로의 변환을 재수행하게 된다.The map conversion unit 104 determines whether or not the size of the state table ST included in the map is not a usable size in a memory whose capacity is limited due to restriction of hardware resources. At this time, if the size is usable in the memory, the post-processing unit 18 generates a map that can be used by the post-processing unit 18 using the signature and the fingerprint signature. However, if the size is not a usable size in the memory, the maximum length of the preset fingerprint signature is reduced, for example, reduced by 1 byte from 15 bytes, and then the fingerprint signature is re- And generates a multi-pattern search map (MPSM) using the fingerprint signature of the fingerprint signature compiler 102 and a map that can be used by the fingerprint signature search unit 14 in the multi-pattern search map (MPSM) As shown in FIG.

도 6a 및 도 6b는 본 발명의 일 실시 예에 따른 스테이트 테이블(ST)(1400)과 넥스트 무브 테이블(NT)(1402)의 구조도이다.6A and 6B are structural diagrams of a state table (ST) 1400 and a next move table (NT) 1402 according to an embodiment of the present invention.

도 6a을 참조하면, 스테이트 테이블(ST)(1400)은 현재 입력되는 패킷의 페이로드를 대상으로 지문 시그니처와 비교하여 매칭 여부를 검사하기 위해서 각 스테이트에서의 아스키 코드 비트(ASCII code bit)와 넥스트 무브 테이블 오프셋(Next Move Table offset)과 매치 성공 여부를 나타내는 비트(S)를 포함한다. 도 6b를 참조하면, 넥스트 무브 테이블(NT)(1402)은 현재 스테이트에서 입력 심볼 입력시의 다음 스테이트 정보를 포함한다.Referring to FIG. 6A, the state table (ST) 1400 compares the payload of the packet currently input with the fingerprint signature to check whether the payload matches the ASCII code bit in each state, A move table offset (Next Move Table offset) and a bit (S) indicating whether or not the match is successful. Referring to FIG. 6B, the next move table (NT) 1402 includes next state information at the time of input symbol input in the current state.

도 7은 본 발명의 일 실시 예에 따른 도 4의 지문 시그니처 탐색부(14)의 세부 구성도이다.FIG. 7 is a detailed configuration diagram of the fingerprint signature search unit 14 of FIG. 4 according to an embodiment of the present invention.

도 7을 참조하면, 지문 시그니처 탐색부(14)는 부분 DFA 엔진(Partial Deterministic finite automaton Engine: PDE)(140)과 지문 시그니처 매치 프로세서(Fingerprint Match Processor: FMP)(142)를 포함한다. 부분 DFA 엔진(PDE)(140)은 도 7에 도시된 바와 같이 다수 개(PDE #0,…,PDE #n)가 그룹핑될 수 있고, 지문 시그니처 매치 프로세서(FMP)(142) 역시 도 7에 도시된 바와 같이 다수 개(FMP #0,…,FMP #n)가 그룹핑될 수 있다.7, the fingerprint signature search unit 14 includes a partial DFA engine 140 and a Fingerprint Match Processor (FMP) 142. (PDE # 0, ..., PDE #n) may be grouped as shown in FIG. 7, and the fingerprint signature match processor (FMP) 142 may also be grouped as shown in FIG. 7 As shown, a plurality of FMP # 0, ..., FMP #n may be grouped.

부분 DFA 엔진(140)은 입력 패킷을 대상으로 맵에 포함된 스테이트 테이블(ST)(1400)과 넥스트 무브 테이블(NT)(1402)을 참조하여 지문 시그니처들을 탐색한다. 우선, 부분 DFA 엔진(140)은 패킷 버퍼(Packet Buffer: PB)(60)에 패킷이 있는지 여부를 검사하고, 패킷이 있으면 패킷 버퍼(60)에서 패킷의 페이로드를 읽어들여 바이트(byte) 단위로 지문 시그니처를 탐색한다. 이때, 페이로드의 첫 데이터 바이트 값의 내용을 오프셋(offset)으로 스테이트 테이블(ST)(1400)에서 0번 스테이트의 아스키 코드 비트를 검사한다. 검사한 0번 스테이트의 아스키 코드 비트 값이 0이면, 페이로드의 다음 데이터 바이트를 대상으로 0번 스테이트의 아스키 코드 비트를 검사한다.The partial DFA engine 140 searches fingerprint signatures with reference to the state table (ST) 1400 and the next move table (NT) 1402 included in the map with respect to the input packet. First, the partial DFA engine 140 checks whether there is a packet in the packet buffer (PB) 60. If there is a packet, the partial DFA engine 140 reads the payload of the packet from the packet buffer 60, To search fingerprint signatures. At this time, the content of the first data byte value of the payload is checked as an offset, and the ASCII code bit of the 0th state is checked in the state table (ST) 1400. If the value of the ASCII code bit of the checked state 0 is 0, the ASCII code bit of the 0th state is checked on the next data byte of the payload.

이에 비해, 검사한 0번 스테이트의 아스키 코드 비트 값이 1이면 스테이트 테이블(ST)(1400)의 0번 스테이트에서 검사한 아스키 코드 비트의 하위 비트들 중에 값이 1인 비트의 수를 계산하고, 계산된 값과 넥스트 무브 테이블 오프셋 값을 더한 주소에서 넥스트 무브 테이블(NT)(1402) 값을 읽어오고, 읽어들인 값을 다음 스테이트로 설정한 후 페이로드의 다음 데이터 바이트를 검사한다.On the other hand, if the ASCII code bit value of the checked 0th state is 1, the number of bits having a value of 1 among the lower bits of the ASCII code bit examined in the 0th state of the state table (ST) 1400 is calculated, The value of the next move table (NT) 1402 is read at the address plus the calculated value and the next move table offset value, the read value is set to the next state, and the next data byte of the payload is checked.

검사한 아스키 코드 비트 값이 1이고 현재 스테이트의 매치가 성공적인 것으로 판단되면(S=1) 메모리에 현재 스테이트 식별자(State ID)를 기록한다. 전술한 현재 스테이트의 아스키 코드 비트를 검사하여 값이 1인지를 판별하여 메모리에 현재 스테이트 식별자(State ID)를 기록하는 프로세스를 페이로드의 데이터 끝까지 반복 수행한다. If the value of the checked ASCII code bit is 1 and it is determined that the match of the current state is successful (S = 1), the current state identifier is recorded in the memory. The process of checking the ASCII code bit of the current state to determine whether the value is 1 and recording the current state ID in the memory is repeatedly performed to the end of the data of the payload.

일 실시 예에 따른 스테이트 테이블(ST)(1400)은 지문 시그니처 탐색부(14)의 내부 메모리에 위치하고, 넥스트 무브 테이블(NT)(1402)은 내부 메모리의 크기를 줄이기 위해 지문 시그니처 탐색부(14)의 외부 메모리에 위치한다. 이때, 스테이트 테이블(ST)(1400)과 넥스트 무브 테이블(NT)(1402)에 대한 관리 및 제어는 메모리 제어부(Memory Controller)(1404)에 의해 이루어진다.The state table (ST) 1400 according to one embodiment is located in the internal memory of the fingerprint signature searching unit 14 and the next move table (NT) 1402 is located in the fingerprint signature searching unit 14 Lt; / RTI > At this time, management and control of the state table (ST) 1400 and the next move table (NT) 1402 are performed by a memory controller (1404).

지문 시그니처 매치 프로세서(FMP)(142)는 부분 DFA 엔진(PDE)(140)을 통해 탐색된 지문 시그니처를 이용하여 입력 패킷에 대한 시그니처 매칭을 수행하고 시그니처 매칭 결과를 클래스 탐색부(CSP)(16)에 전송한다. 지문 시그니처 매치 프로세서(FMP)(142)의 세부 동작에 대해서는 도 8을 참조로 상세히 후술한다.The fingerprint signature match processor (FMP) 142 performs signature matching on the input packet using the fingerprint signature searched through the partial DFA engine (PDE) 140 and outputs the signature matching result to the class searching unit (CSP) 16 . The detailed operation of the fingerprint signature match processor (FMP) 142 will be described later in detail with reference to FIG.

도 8은 본 발명의 일 실시 예에 따른 지문 시그니처 매치 프로세서(FMP)(142)에서의 동작을 도시한 참조도이다.FIG. 8 is a reference diagram illustrating operation in a fingerprint signature match processor (FMP) 142 according to an embodiment of the present invention.

도 7 및 도 8을 참조하면, 지문 시그니처 매치 프로세서(FMP)(142)는 부분 DFA 엔진(PDE)(140)을 통해 탐색된 지문 시그니처를 이용하여 입력 패킷에 대한 패턴 매칭 수행 시에, 다중 지문 시그니처 테이블(Multi-Fingerfrint Table: MFT)과 매치 식별자 번역 테이블(Match ID Translation Table: MTT)을 참조한다.7 and 8, a fingerprint signature match processor (FMP) 142, when performing pattern matching for an input packet using fingerprint signatures discovered through a partial DFA engine (PDE) 140, See the Multi-Fingerprint Table (MFT) and the Match ID Translation Table (MTT).

구체적으로, 지문 시그니처 매치 프로세서(FMP)(142)는 메모리에 {State ID[10:0], State Match offset[10:0]} 정보가 있으면 이를 읽어들인다. 그리고, 읽어들인 스테이트 식별자(State ID)에 해당하는 패턴 테이블 엔트리와 패턴 테이블 오프셋 값을 다중 지문 시그니처 테이블(MFT)(1420)로부터 읽어온다. 다중 지문 시그니처 테이블(MFT)(1420)은 {PatternTable Entry[4:0], PatternTable Offset[12:0]}으로 구성된다.Specifically, the fingerprint signature match processor (FMP) 142 reads {State ID [10: 0], State Match offset [10: 0] Then, the pattern table entry and the pattern table offset value corresponding to the read state identifier (State ID) are read from the multiple fingerprint signature table (MFT) 1420. The multiple fingerprint signature table (MFT) 1420 is composed of {PatternTable Entry [4: 0], PatternTable Offset [12: 0]}.

그리고, 지문 시그니처 매치 프로세서(FMP)(142)는 매치 식별자 번역 테이블(MTT)(1422)로부터 {Pattern ID[11:0], 14B, PreMatch Offset[5:0], Rule Length Bytes[5:0]} 정보를 읽어온다. 매치 식별자 번역 테이블(MTT)(1422)은 원 시그니처(Original Signature)의 총 길이가 미리 설정된 지문 시그니처의 길이, 예를 들어 14 Bytes 이내인지 여부를 나타내는 비트(14B)와, 페이로드 오프셋에서 차감해줘야 할 오프셋인 이전 매치 오프셋(PreMatch Offset)과, 원 시그니처의 총 길이 정보(Rule Length)를 포함한다. 원 시그니처의 총 길이가 미리 설정된 길이, 예를 들어 14 Bytes 이내인지 여부를 나타내는 비트(14B) 값은, 원 시그니처의 총 길이가 미리 설정된 길이 이내인 경우 1로 설정된다. 이때, 지문 시그니처 매치 프로세서(FMP)(142)에서는 더 이상의 패턴 매칭을 진행하지 않는다.Then, the fingerprint signature match processor (FMP) 142 extracts {Pattern ID [11: 0], 14B, PreMatch Offset [5: 0], Rule Length Bytes [5: 0] from the match identifier translation table ]} Read the information. The match identifier translation table (MTT) 1422 includes a bit 14B indicating whether the total length of the original signature is a length of a predetermined fingerprint signature, for example, 14 bytes or less, A previous match offset (PreMatch Offset) which is an offset to be performed, and a total length information (Rule Length) of the original signature. The value of the bit 14B indicating whether the total length of the original signature is within a predetermined length, for example 14 Bytes, is set to 1 if the total length of the original signature is within a predetermined length. At this time, the fingerprint signature match processor (FMP) 142 does not proceed any further pattern matching.

이어서, 지문 시그니처 매치 프로세서(FMP)(142)는 매치 식별자 번역 테이블(MTT)(1422)로부터 얻어진 시그니처 총 길이(Rule length)가 미리 설정된 지문 시그니처의 길이, 예를 들어 14 Bytes보다 작거나 동일한 경우 시그니처 매칭이 성공한 것으로 판단하여 시그니처 매칭 결과(1426)를 클래스 탐색부(CSP)(16)에 전송한다.Subsequently, the fingerprint signature match processor (FMP) 142 determines whether the total signature length (Rule length) obtained from the match identifier translation table (MTT) 1422 is smaller than or equal to the length of the predetermined fingerprint signature, for example, 14 Bytes And transmits the signature matching result 1426 to the class searching unit (CSP) 16.

이에 비해, 시그니처 총 길이(Rule length)가 미리 설정된 지문 시그니처의 길이, 예를 들어 14 Bytes보다 큰 경우, 입력 패킷으로부터 시그니처 총 길이(Rule length)만큼의 비교 대상 시그니처(comparable signature)를 읽어온다. 그리고, 클래스 탐색부(CSP)(16)의 시그니처 테이블(signature table)로부터 원 시그니처(original signature)(1425)를 수신하여, 읽어온 비교 대상 시그니처와 클래스 탐색부(CSP)(16)로부터 수신된 원 시그니처(1425)를 비교한다. 비교 결과, 일치하면 시그니처 매칭 결과(1426)를 클래스 탐색부(CSP)(16)에 전송한다.On the other hand, if the total length of the signature is larger than the predetermined length of the fingerprint signature, for example, 14 bytes, the comparable signature is read from the input packet by the total length of the signature (Rule length). The CSP 16 receives the original signature 1425 from the signature table of the class searching unit 16 and transmits the original signature 1425 received from the class searching unit CSP 16, The original signatures 1425 are compared. If they match, the result of signature comparison 1426 is transmitted to the class search unit (CSP) 16.

지문 시그니처 매치 프로세서(FMP)(142)가 클래스 탐색부(CSP)(16)에 전송하는 시그니처 매칭 결과(1426)는 시그니처 총 길이가 미리 설정된 지문 시그니처의 길이 이상인지 여부를 나타내는 비트(14Byte Upper), 클래스 탐색부(CSP)(16)에서 룰 레인지 테이블(Rule Range Table: RRT)을 인덱스하기 위해 사용되는 매치 식별자 키(identity key), 입력 패킷의 페이로드에서 지문 시그니처와 매칭된 시작 위치를 나타내는 매치 위치정보(Match Position) 및 패킷 파싱 프로세서(Packet Parsing Processor: PPP)로 입력된 패킷의 순서를 나타내는 패킷 넘버(Inner PktNum)을 포함한다. 이때, 패킷 넘버는 0부터 시작한다. 시그니처 매칭 결과(1426) 구조는 도 10에 도시된 바와 같다.The signature matching result 1426 transmitted by the fingerprint signature match processor (FMP) 142 to the class search unit (CSP) 16 includes a bit (14 Byte Upper) indicating whether the total signature length is longer than or equal to the length of the predetermined fingerprint signature, A match identifier key used for indexing a RRR (RR Range Table) in a class searching unit (CSP) 16, a start position matched with a fingerprint signature in a payload of an input packet A match position, and a packet number Inner PktNum indicating the order of packets input to the packet parsing processor (PPP). At this time, the packet number starts from zero. The signature matching result 1426 structure is as shown in FIG.

한편, 입력 패킷에 대한 바이트 단위의 탐색이 종료될 때까지 시그니처 매칭 결과가 없는 경우, 지문 시그니처 매치 프로세서(FMP)(142)는 후 처리부(PP)(18)로 시그니처 매칭 결과(1428)를 전송한다. 이때, 시그니처 매칭 결과(1428)는 패킷 파싱 프로세서(Packet Parsing Processor: PPP)로 입력된 패킷의 순서를 나타내는 패킷 넘버(Inner PktNum)(패킷 넘버는 0부터 시작함)와, 시그니처 매칭 결과를 나타내는 Match Result(MR)(1: Match, 0: Not Match로서 항상 0임)와, 시그니처 매칭 수행 여부를 나타내는 Execute Match(EM)(1: Match 수행, 0: Match 수행하지 않음을 나타내며, 항상 1임)를 포함한다.On the other hand, if there is no signature matching result until the byte-by-byte search for the input packet is completed, the fingerprint signature match processor 142 sends a signature matching result 1428 to the post-processing unit (PP) do. At this time, the signature matching result 1428 includes a packet number (Inner PktNum) (the packet number starts from 0) indicating the order of packets input to the packet parsing processor (PPP) and a Match (1: Match, 0: Not Match), and Execute Match (EM) indicating whether signature matching is performed (1: Match, 0: .

도 9는 본 발명의 일 실시 예에 따른 도 8의 다중 지문 시그니처 테이블(MFT)과 매치 식별자 번역 테이블(MTT)의 구조도이다.FIG. 9 is a structural diagram of a multiple fingerprint signature table (MFT) and a match identifier translation table (MTT) in FIG. 8 according to an embodiment of the present invention.

도 9를 참조하면, 다중 지문 시그니처 테이블(MFT)(1420)은 입력 패킷에서 매칭된 지문 시그니처의 갯수를 나타내는 패턴 테이블 엔트리(PatternTable Entry)와 패턴 테이블 오프셋(PatternTable Offset)을 포함한다.Referring to FIG. 9, the multiple fingerprint signature table (MFT) 1420 includes a pattern table entry (PatternTable Entry) and a pattern table offset (PatternTable Offset) indicating the number of fingerprint signatures matched in the input packet.

매치 식별자 번역 테이블(MTT)(1422)은 원 시그니처(Original Signature)의 총 길이가 미리 설정된 지문 시그니처의 길이, 예를 들어 14 Bytes 이내인지 여부를 나타내는 비트(14B)와, 페이로드 오프셋에서 차감해줘야 할 오프셋인 이전 매치 오프셋(PreMatch Offset) 및 원 시그니처의 총 길이 정보(Rule Length)를 포함한다. 원 시그니처의 총 길이가 미리 설정된 길이, 예를 들어 14 Bytes 이내인지 여부를 나타내는 비트(14B) 값은, 원 시그니처의 총 길이가 미리 설정된 길이 이내이면 1로 설정된다. 이 경우, 지문 시그니처 매치 프로세서(FMP)(142)에서 더 이상의 패턴 매칭을 진행하지 않는다.The match identifier translation table (MTT) 1422 includes a bit 14B indicating whether the total length of the original signature is a length of a predetermined fingerprint signature, for example, 14 bytes or less, A previous match offset (PreMatch Offset) which is an offset to be performed, and a total length information (Rule Length) of the original signature. The value of the bit 14B indicating whether the total length of the original signature is within a predetermined length, for example 14 Bytes, is set to 1 if the total length of the original signature is within a predetermined length. In this case, the fingerprint signature match processor (FMP) 142 does not proceed any further pattern matching.

도 9를 참조로 하여, 다중 지문 시그니처 테이블(MFT)(1420)과 매치 식별자 번역 테이블(MTT)(1422)의 연관성에 대해 설명하면, 다중 지문 시그니처 테이블(MFT)(1420)의 입력 패킷의 페이로드에서 패턴 매칭되는 지문 시그니처가 3개인 경우(PatternTable Entry = 3), 다중 지문 시그니처 테이블(MFT)(1420)과 연관된 매치 식별자 번역 테이블(MTT)(1422)에는 소정의 우선순위 등급을 갖는 3개의 패턴, 예를 들어, Pattern #161(High 등급), Pattern #171(Low 등급), Pattern #255(Low 등급)가 존재한다.Referring to FIG. 9, the association between the multiple fingerprint signature table (MFT) 1420 and the match identifier translation table (MTT) 1422 will be described with reference to an input packet of the multiple fingerprint signature table (MFT) 1420 (MTT) 1422 associated with the multiple fingerprint signature table (MFT) 1420, if there are three fingerprint signatures that are pattern-matched on the load (PatternTable Entry = 3) Pattern # 161 (High grade), Pattern # 171 (Low grade), and Pattern # 255 (Low grade) exist.

도 10은 본 발명의 일 실시 예에 따른 지문 시그니처 매치 프로세서(FMP)(142)가 클래스 탐색부(CSP)(16)에 전송하는 시그니처 매칭 결과(1426)의 구조도이다.FIG. 10 is a structural diagram of a signature matching result 1426 transmitted by a fingerprint signature match processor (FMP) 142 according to an embodiment of the present invention to a class search unit (CSP)

도 8과 도 10을 참조하면, 지문 시그니처 매치 프로세서(FMP)(142)가 클래스 탐색부(CSP)(16)에 전송하는 시그니처 매칭 결과(1426)는 시그니처 총 길이가 미리 설정된 지문 시그니처의 길이 이상인지 여부를 나타내는 비트(14Byte Upper), 클래스 탐색부(CSP)(16)에서 룰 레인지 테이블(Rule Range Table: RRT)을 인덱스하기 위해 사용되는 매치 식별자 키(identity key), 입력 패킷의 페이로드에서 지문 시그니처와 매칭된 시작 위치를 나타내는 매치 위치정보(Match Position) 및 패킷 파싱 프로세서(Packet Parsing Processor: PPP)로 입력된 패킷의 순서를 나타내는 패킷 넘버(Inner PktNum)을 포함한다. 이때, 패킷 넘버는 0부터 시작한다.8 and 10, a signature matching result 1426 transmitted by the fingerprint signature match processor (FMP) 142 to the class search unit (CSP) 16 indicates that the total signature length is greater than or equal to the length of the predetermined fingerprint signature (14 bytes Upper) indicating whether or not the RSP message is received, a match identifier key used for indexing a Rule Range Table (RRT) in the class searching unit (CSP) 16, A match position indicating a matching start position with a fingerprint signature, and a packet number Inner PktNum indicating a sequence of packets input to a packet parsing processor (PPP). At this time, the packet number starts from zero.

도 11은 본 발명의 일 실시 예에 따른 입력 패킷에 대한 탐색이 종료될 때까지 시그니처 매칭 결과가 없는 경우, 지문 시그니처 매치 프로세서(FMP)(142)가 후 처리부(PP)로 전송하는 시그니처 매칭 결과 구조도이다.FIG. 11 is a diagram illustrating a signature matching result transmitted to the post-processing unit PP by the Fingerprint Signature Match Processor (FMP) 142 when there is no signature matching result until the search for the input packet ends according to the embodiment of the present invention. It is a structural diagram.

도 8과 도 11을 참조하면, 입력 패킷에 대한 탐색이 종료될 때까지 시그니처 매칭 결과가 없는 경우, 지문 시그니처 매치 프로세서(FMP)(142)는 후 처리부(PP)로 시그니처 매칭 결과(1429)를 전송한다. 이때, 시그니처 매칭 결과(1429)는 패킷 파싱 프로세서(Packet Parsing Processor: PPP)로 입력된 패킷의 순서를 나타내는 패킷 넘버(Inner PktNum)(패킷 넘버는 0부터 시작함)와, 시그니처 매칭 결과를 나타내는 Match Result(MR)(1: Match, 0: Not Match로서 항상 0임)와, 시그니처 매칭 수행 여부를 나타내는 Execute Match(EM)(1: Match 수행, 0: Match 수행하지 않음을 나타내며, 항상 1임)를 포함한다.Referring to FIGS. 8 and 11, if there is no signature matching result until the search for the input packet is completed, the FMP 142 outputs a signature matching result 1429 to the post-processing unit PP send. At this time, the signature matching result 1429 includes a packet number (Inner PktNum) (the packet number starts from 0) indicating the order of packets input to the packet parsing processor (PPP) and a Match (1: Match, 0: Not Match), and Execute Match (EM) indicating whether signature matching is performed (1: Match, 0: .

도 12는 본 발명의 일 실시 예에 따른 클래스 탐색부(CSP)(16)에서의 동작을 도시한 참조도이다.FIG. 12 is a reference diagram showing an operation in a class searching unit (CSP) 16 according to an embodiment of the present invention.

도 7과 도 12를 참조하면, 클래스 탐색부(CSP)(16)는 시그니처를 포함하는 시그니처 테이블(Signature Table)(162)과, 시그니처 길이정보를 포함하는 룰 레인지 테이블(Rule Range Table)(164)을 참조하여 입력 패킷을 대상으로 정확한 시그니처 기반 패턴 매칭을 수행한다.7 and 12, the class searching unit (CSP) 16 includes a signature table 162 including a signature, a rule range table 164 including signature length information, ) To perform accurate signature-based pattern matching on the input packet.

지문 시그니처 탐색부(14)가 입력 패킷의 페이로드에서 지문 시그니처를 탐색하는 1차 패턴 매칭을 수행한다고 하면, 클래스 탐색부(CSP)(16)는 지문 시그니처 탐색부(14)로부터 지문 시그니처 탐색 결과를 수신하고, 수신된 지문 시그니처 탐색 결과로부터 입력 패킷의 페이로드에서 시그니처로 정밀 탐색하는 2차 패턴 매칭을 수행한다.Assuming that the fingerprint signature searching unit 14 performs primary pattern matching for searching the fingerprint signature in the payload of the input packet, the class searching unit (CSP) 16 searches the fingerprint signature searching unit 14 for the fingerprint signature search result And performs a secondary pattern matching in which a signature is searched for precisely from the payload of the input packet from the received fingerprint signature search result.

클래스 탐색부(CSP)(16)는 지문 시그니처 매치 프로세서(FMP)(142)로부터 시그니처 매칭 결과(1426)를 수신할 수 있다. 시그니처 매칭 결과(1426)는 도 12에 도시된 바와 같이, 시그니처 총 길이가 미리 설정된 지문 시그니처의 길이 이상인지 여부를 나타내는 비트(14 Byte Upper), 클래스 탐색부(CSP)(16)에서 룰 레인지 테이블(Rule Range Table: RRT)을 인덱스하기 위해 사용되는 매치 식별자 키(identity key), 입력 패킷의 페이로드에서 지문 시그니처와 매칭된 시작 위치를 나타내는 매치 위치정보(Match Position) 및 패킷 파싱 프로세서(Packet Parsing Processor: PPP)로 입력된 패킷의 순서를 나타내는 패킷 넘버(Inner PktNum)를 포함한다.The class searching unit (CSP) 16 may receive the signature matching result 1426 from the fingerprint signature match processor (FMP) As shown in FIG. 12, the signature matching result 1426 includes a bit (14 Byte Upper) indicating whether the total signature length is equal to or longer than a predetermined length of a fingerprint signature, a rule range table (CSP) A match position indicating a starting position matched with a fingerprint signature in a payload of an input packet, and a packet parsing processor (Packet Parsing), which are used to index a RRT (RRT) (Inner PktNum) indicating the order of packets input to the processor (PPP).

클래스 탐색부(CSP)(16)는 자신의 시그니처 매칭 결과(1660)를 후 처리부(PP)(18)에 전송할 수 있다. 클래스 탐색부(CSP)(16)가 후 처리부(PP)(18)에 전송하는 시그니처 매칭 결과(1660)는 패킷 파싱 프로세서(Packet Parsing Processor: PPP)로 입력된 패킷의 순서를 나타내는 패킷 넘버(Inner PktNum)(패킷 넘버는 0부터 시작함)와, 매치 식별자(Match ID), 클래스 탐색부(CSP)(16)에서의 시그니처 매칭 수행 여부를 나타내는 Class Match(CM)(1: Match 수행, 0: Match 수행하지 않음을 나타내며, 항상 1임)를 포함한다.The class searching unit (CSP) 16 may transmit its signature matching result 1660 to the post processing unit (PP) The signature matching result 1660 transmitted from the class searching unit 16 to the post processor 18 includes a packet number indicating the order of packets input to the packet parsing processor (PPP) (1: Match execution, 0: No match) indicating whether signature matching is performed in the class search unit (CSP) 16, Match is not performed and is always 1).

도 13은 본 발명의 일 실시 예에 따른 후 처리부(PP)(18)의 동작을 설명하는 참조도이다.13 is a reference diagram illustrating the operation of the post processor (PP) 18 according to an embodiment of the present invention.

도 13을 참조하면, 후 처리부(PP)(18)는 패킷 파싱 프로세서(PPP)(2)에서의 처리 결과, 지문 시그니처 매치 프로세서(FMP)(142)에서의 처리 결과(1428) 및 클래스 탐색부(CSP)(16)에서의 처리 결과(1660)를 수신한 후, 재 시퀀싱 엔진(ReSequencing Engine)(180)을 통해 가공하여 최종적으로 패킷을 처리하고, 처리 결과(1800)를 후 단, 예를 들어 애그리게이터(Aggregator)(19)에 전송한다.13, the post-processing unit (PP) 18 outputs the result of processing in the packet parsing processor (PPP) 2, the processing result 1428 in the fingerprint signature match processor (FMP) 142, (ReSequencing Engine) 180 to finally process the packet and receive the processing result 1800 later, for example, after receiving the processing result 1660 in the CSP 16, And transmits it to an aggregator 19.

도 14는 본 발명의 일 실시 예에 따른 패킷 탐색 방법을 도시한 흐름도이다.14 is a flowchart illustrating a packet search method according to an embodiment of the present invention.

도 4 및 도 14를 참조하면, 패킷 탐색 장치는 각각의 시그니처로부터 다른 시그니처들과 구분될 수 있는 지문 시그니처를 추출하고 지문 시그니처 탐색을 위한 맵을 생성한다(1400). 맵 생성 단계(1400)에서, 패킷 탐색 장치는 하드웨어 자원의 제약으로 인해 메모리의 사용 가능한 용량에 따라 가변 길이를 갖는 지문 시그니처를 추출하여 맵을 생성할 수 있다.Referring to FIGS. 4 and 14, the packet search apparatus extracts fingerprint signatures that can be distinguished from other signatures from each signature, and generates a map for fingerprint signature search (1400). In the map generation step 1400, the packet search apparatus can generate a map by extracting a fingerprint signature having a variable length according to available capacity of the memory due to restriction of hardware resources.

이어서, 패킷 탐색 장치는 맵 생성 단계(1400)에서 생성된 맵을 이용하여 입력 패킷에 대한 지문 시그니처 패턴 매칭을 수행한다(1410). 이어서, 패킷 탐색 장치는 지문 시그니처 패턴 매칭된 입력 패킷을 대상으로 시그니처 패턴 매칭을 수행한다(1420). 지문 시그니처 패턴 매칭 단계(1410)에서는 입력 패킷의 페이로드에서 지문 시그니처를 탐색하는 1차 패턴 매칭을 수행하고, 시그니처 패턴 매칭 단계(1420)에서는 지문 시그니처 탐색 결과를 수신하고, 탐색된 지문 시그니처를 이용하여 입력 패킷의 페이로드에서 원 시그니처와 비교할 비교 대상 시그니처를 결정한 후, 비교 대상 시그니처로 입력 패킷의 페이로드에서 정밀 탐색한다.Then, the packet search device performs fingerprint signature pattern matching on the input packet using the map generated in the map generation step 1400 (1410). Subsequently, the packet search device performs signature pattern matching on the input packet matched with the fingerprint signature pattern (1420). In the fingerprint signature pattern matching step 1410, primary pattern matching is performed to search for a fingerprint signature in the payload of the input packet. In the signature pattern matching step 1420, a fingerprint signature search result is received, and the detected fingerprint signature is used Determines the comparison target signature to be compared with the original signature in the payload of the input packet, and then performs a precise search in the payload of the input packet with the comparison target signature.

나아가, 맵 생성 단계(1400)에서 생성된 맵을 지문 시그니처 탐색을 위해 배치할 방식을 결정하고 결정된 방식에 맞추어 맵을 저장하는 단계를 포함할 수 있다. 이때, 맵을 구성하는 스테이트 테이블은 내부 메모리에 저장하고, 맵을 구성하는 넥스트 무브 테이블은 내부 메모리의 크기를 줄이기 위해 외부 메모리에 저장할 수 있다. 나아가, 지문 시그니처 패턴 매칭 단계(1410)에서의 지문 시그니처 탐색 결과와, 시그니처 패턴 매칭 단계(1420)에서의 시그니처 탐색 결과를 가공하여 최종적으로 패킷을 처리하는 단계를 포함할 수 있다.Further, the method may include determining a method of arranging the map generated in the map generation step 1400 for the fingerprint signature search, and storing the map according to the determined method. At this time, the state table constituting the map may be stored in the internal memory, and the next move table constituting the map may be stored in the external memory in order to reduce the size of the internal memory. Further, the fingerprint signature search result in the fingerprint signature pattern matching step 1410 and the signature search result in the signature pattern matching step 1420 may be processed to finally process the packet.

이제까지 본 발명에 대하여 그 실시 예들을 중심으로 살펴보았다. 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시 예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.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: 클래스 탐색부 18: 후 처리부
100: 지문 시그니처 추출부 102: 지문 시그니처 컴파일러
104: 맵 변환부
1: packet search apparatus 10: map generating unit
12: map storage unit 14: fingerprint signature search unit
16: class search unit 18: post-processing unit
100: fingerprint signature extracting unit 102: fingerprint signature compiler
104: map conversion unit

Claims (19)

각각의 시그니처로부터 다른 시그니처들과 구분될 수 있는 지문 시그니처를 추출하고 지문 시그니처 탐색을 위한 맵을 생성하는 맵 생성부;
상기 생성된 맵을 이용하여 입력 패킷에 대한 지문 시그니처 패턴 매칭을 수행하는 지문 시그니처 탐색부; 및
상기 지문 시그니처 탐색부에서 지문 시그니처 패턴 매칭된 입력 패킷을 대상으로 시그니처 패턴 매칭을 수행하는 클래스 탐색부;
를 포함하는 것을 특징으로 하는 패킷 탐색 장치.
A map generator for extracting fingerprint signatures that can be distinguished from other signatures from the respective signatures and generating a map for fingerprint signature search;
A fingerprint signature search unit for performing fingerprint signature pattern matching on an input packet using the generated map; And
A class search unit for performing signature pattern matching on an input packet matched with a fingerprint signature pattern in the fingerprint signature search unit;
The packet search apparatus comprising:
제 1 항에 있어서,
상기 지문 시그니처 탐색부는 입력 패킷의 페이로드에서 지문 시그니처를 탐색하는 1차 패턴 매칭을 수행하고,
상기 클래스 탐색부는 상기 지문 시그니처 탐색부로부터 지문 시그니처 탐색 결과를 수신하고, 상기 지문 시그니처 탐색부에서 탐색된 지문 시그니처를 이용하여 입력 패킷의 페이로드에서 원 시그니처와 비교할 비교 대상 시그니처를 결정한 후, 비교 대상 시그니처로 입력 패킷의 페이로드에서 정밀 탐색하는 2차 패턴 매칭을 수행하는 것을 특징으로 하는 패킷 탐색 장치.
The method according to claim 1,
The fingerprint signature search unit performs a primary pattern matching for searching a fingerprint signature in a payload of an input packet,
The class searching unit receives a fingerprint signature search result from the fingerprint signature searching unit, determines a comparison target signature to be compared with the original signature in the payload of the input packet using the fingerprint signature detected by the fingerprint signature searching unit, And performs a secondary pattern matching in which a signature is searched precisely in a payload of an input packet.
제 1 항에 있어서, 상기 맵 생성부는,
하드웨어 자원의 제약으로 인해 메모리의 사용 가능한 용량에 따라 가변 길이를 갖는 지문 시그니처를 추출하여 맵을 생성하는 것을 특징으로 하는 패킷 탐색 장치.
The map generation system according to claim 1,
Wherein a map is generated by extracting a fingerprint signature having a variable length according to a usable capacity of the memory due to restriction of hardware resources.
제 1 항에 있어서, 상기 맵 생성부는,
시그니처로부터 지문 시그니처를 추출하는 지문 시그니처 추출부;
상기 지문 시그니처 추출부에서 추출된 지문 시그니처를 이용하여 다중 패턴 탐색 맵을 생성하는 지문 시그니처 컴파일러; 및
상기 지문 시그니처 컴파일러에서 생성된 다중 패턴 탐색 맵을 상기 지문 시그니처 탐색부가 사용 가능한 맵으로 변환하여 상기 지문 시그니처 탐색부에 제공하는 맵 변환부;
를 포함하는 것을 특징으로 하는 패킷 탐색 장치.
The map generation system according to claim 1,
A fingerprint signature extracting unit for extracting a fingerprint signature from the signature;
A fingerprint signature compiler for generating a multi-pattern search map using the fingerprint signature extracted by the fingerprint signature extracting unit; And
A map conversion unit converting the multi-pattern search map generated by the fingerprint signature compiler into a usable map of the fingerprint signature search unit and providing the map to the fingerprint signature search unit;
The packet search apparatus comprising:
제 4 항에 있어서,
상기 맵 변환부에서 생성되는 맵은 스테이트 테이블과 넥스트 무브 테이블로 분리되고,
상기 스테이트 테이블은 현재 입력되는 패킷의 페이로드를 대상으로 지문 시그니처와 비교하여 매칭 여부를 검사하기 위해서 각 스테이트에서의 아스키 코드 비트와 넥스트 무브 테이블 오프셋 값과 매치 성공 여부에 대한 정보를 포함하고, 상기 넥스트 무브 테이블은 현재 스테이트에서 입력 심볼 입력시의 다음 스테이트 정보를 포함하는 것을 특징으로 하는 패킷 탐색 장치.
5. The method of claim 4,
Wherein the map generated by the map conversion unit is divided into a state table and a next move table,
Wherein the state table includes information on an ASCII code bit, a next move table offset value, and a match success or a failure in each state in order to check whether a payload of a currently input packet is compared with a fingerprint signature, Wherein the next move table includes next state information when the input symbol is input in the current state.
제 4 항에 있어서, 상기 지문 시그니처 추출부는,
지문 시그니처의 최대 길이를 미리 설정하고, 시그니처로부터 상기 미리 설정된 최대 길이에 맞추어 지문 시그니처를 추출하며, 맵에 포함되는 스테이트 테이블의 크기가 하드웨어 자원의 제약으로 인해 용량이 제한된 메모리에서 사용 가능한 크기가 아니면 미리 설정된 지문 시그니처의 최대 길이를 감소시킨 후 상기 감소된 최대 길이에 맞추어 지문 시그니처를 다시 추출하는 것을 특징으로 하는 패킷 탐색 장치.
The fingerprint authentication system according to claim 4,
If the size of the state table included in the map is not a usable size in a memory having a limited capacity due to a constraint of hardware resources, Decreasing a maximum length of a preset fingerprint signature, and re-extracting the fingerprint signature according to the reduced maximum length.
제 1 항에 있어서, 상기 지문 시그니처 탐색부는,
입력 패킷을 대상으로 맵에 포함된 스테이트 테이블과 넥스트 무브 테이블을 참조하여 지문 시그니처들을 탐색하는 부분 DFA 엔진; 및
상기 부분 DFA 엔진을 통해 탐색된 지문 시그니처를 이용하여 입력 패킷에 대한 시그니처 매칭을 수행하고 시그니처 매칭 결과를 상기 클래스 탐색부에 전송하는 지문 시그니처 매치 프로세서;
를 포함하는 것을 특징으로 하는 패킷 탐색 장치.
The fingerprint authentication system according to claim 1,
A partial DFA engine for searching fingerprint signatures with reference to a state table and a next move table included in a map with respect to an input packet; And
A fingerprint signature match processor for performing signature matching on the input packet using the fingerprint signature searched through the partial DFA engine and transmitting the signature matching result to the class searching unit;
The packet search apparatus comprising:
제 7 항에 있어서, 상기 부분 DFA 엔진은,
패킷 버퍼에 패킷이 있는지 여부를 검사하고 패킷이 있으면 패킷의 페이로드를 읽어들여 바이트 단위로 지문 시그니처를 탐색하되, 페이로드의 현재 데이터 바이트 값의 내용을 오프셋으로 스테이트 테이블에서 현재 스테이트의 아스키 코드 비트를 검사하고,
검사한 아스키 코드 비트 값이 0이면 페이로드의 다음 데이터 바이트를 대상으로 현재 스테이트의 아스키 코드 비트를 검사하고,
검사한 아스키 코드 비트 값이 1이면 스테이트 테이블의 현재 스테이트에서 검사한 아스키 코드 비트의 하위 비트들 중에 값이 1인 비트의 수를 계산하고, 계산된 값과 넥스트 무브 테이블 오프셋 값을 더한 주소에서 넥스트 무브 테이블 값을 읽어오고, 읽어들인 값을 다음 스테이트로 설정한 후 페이로드의 다음 데이터 바이트를 검사하며,
검사한 아스키 코드 비트 값이 1이고 현재 스테이트의 매치가 성공적인 것으로 판단되면 메모리에 현재 스테이트 식별자를 기록하는 것을 특징으로 하는 패킷 탐색 장치.
8. The DFA engine of claim 7,
The payload of the packet is read to read the payload of the packet and the contents of the current data byte value of the payload are detected as an offset, and the offset of the current state of the ascii code bit Lt; / RTI >
If the checked ASCII bit value is 0, the ASCII code bit of the current state is checked on the next data byte of the payload,
If the value of the checked ASCII code bit is 1, the number of bits having a value of 1 among the lower bits of the ASCII code bit checked in the current state of the state table is calculated. Then, at the address obtained by adding the calculated value and the next move table offset value, Reads the move table value, sets the read value to the next state, checks the next data byte of the payload,
And if the ascertained ASCII code bit value is 1 and the match of the current state is determined to be successful, the current state identifier is recorded in the memory.
제 7 항에 있어서, 상기 지문 시그니처 매치 프로세서는,
상기 부분 DFA 엔진을 통해 탐색된 지문 시그니처를 이용하여 입력 패킷에 대한 패턴 매칭 수행 시에, 다중 지문 시그니처 테이블과 매치 식별자 번역 테이블을 참조하며,
상기 다중 지문 시그니처 테이블은 입력 패킷에서 매칭된 지문 시그니처의 갯수를 나타내는 패턴 테이블 엔트리와 패턴 테이블 오프셋 값을 포함하고, 상기 매치 식별자 번역 테이블은 원 시그니처의 총 길이가 미리 설정된 지문 시그니처의 길이 이내인지 여부를 나타내는 비트와, 페이로드 오프셋에서 차감해줘야 할 오프셋인 이전 매치 오프셋 및 원 시그니처의 총 길이 정보를 포함하는 것을 특징으로 하는 패킷 탐색 장치.
The fingerprint signature match processor according to claim 7,
When performing pattern matching on an input packet using the fingerprint signature detected through the partial DFA engine, referring to the multiple fingerprint signature table and the match identifier translation table,
Wherein the multiple fingerprint signature table includes a pattern table entry and a pattern table offset value indicating the number of fingerprint signatures matched in the input packet and the match identifier translation table is a table indicating whether the total length of the original signatures is within a predetermined length of the fingerprint signature And a total length information of the previous match offset and the original signature which are offsets to be subtracted from the payload offset.
제 9 항에 있어서, 상기 지문 시그니처 매치 프로세서는,
메모리에서 스테이트 식별자를 읽어들이고 읽어들인 스테이트 식별자에 해당하는 패턴 테이블 엔트리와 패턴 테이블 오프셋 값을 다중 지문 시그니처 테이블로부터 읽어오고,
매치 식별자 번역 테이블로부터 시그니처의 총 길이 정보를 읽어들이고 시그니처 총 길이가 미리 설정된 지문 시그니처의 길이보다 작거나 동일한 경우 시그니처 매칭이 성공한 것으로 판단하여 시그니처 매칭 결과를 상기 클래스 탐색부에 전송하며,
시그니처 총 길이가 미리 설정된 지문 시그니처의 길이보다 큰 경우 입력 패킷으로부터 시그니처 총 길이만큼의 비교 대상 시그니처를 읽어오고 상기 클래스 탐색부로부터 원 시그니처를 수신하여, 읽어온 비교 대상 시그니처와 상기 클래스 탐색부로부터 수신된 원 시그니처를 비교한 후 일치하면 시그니처 매칭 결과를 상기 클래스 탐색부에 전송하는 것을 특징으로 하는 패킷 탐색 장치.
10. The fingerprint signature match processor of claim 9,
Reads the state identifier from the memory, reads the pattern table entry and the pattern table offset value corresponding to the read state identifier from the multiple fingerprint signature table,
The total length information of the signature is read from the match identifier translation table and if the total signature length is less than or equal to the length of the preset fingerprint signature, it is determined that signature matching is successful and the signature matching result is transmitted to the class search unit,
When the total signature length is longer than the length of the fingerprint signature that is set in advance, the comparison target signatures corresponding to the total signature length are read from the input packet, the original signature is received from the class searching unit, And transmits the signature matching result to the class search unit if the identical signatures match.
제 10 항에 있어서,
상기 지문 시그니처 매치 프로세서가 상기 클래스 탐색부에 전송하는 시그니처 매칭 결과는 시그니처 총 길이가 미리 설정된 길이 이상인지 여부를 나타내는 비트, 매치 식별자, 입력 패킷의 페이로드에서 지문 시그니처와 매칭된 시작 위치 및 패킷 파싱 엔진으로 입력된 패킷 순서를 포함하는 것을 특징으로 하는 패킷 탐색 장치.
11. The method of claim 10,
The signature matching result transmitted from the fingerprint signature match processor to the class search unit includes a bit indicating whether the total signature length is greater than or equal to a preset length, a match identifier, a start position matched with the fingerprint signature in the payload of the input packet, And an order of packets input to the engine.
제 1 항에 있어서, 상기 클래스 탐색부는,
시그니처를 포함하는 시그니처 테이블과, 시그니처 길이정보를 포함하는 룰 레인지 테이블을 참조하여 입력 패킷을 대상으로 시그니처 기반 패턴 매칭을 수행하는 것을 특징으로 하는 패킷 탐색 장치.
2. The apparatus according to claim 1,
Wherein the signature-based pattern matching is performed on the input packet by referring to a signature table including a signature and a rule-range table including signature length information.
제 1 항에 있어서, 상기 패킷 탐색 장치는,
상기 맵 생성부에서 생성된 맵을 지문 시그니처 탐색부에 배치할 방식을 결정하고 결정된 방식에 맞추어 상기 지문 시그니처 탐색부에 맵을 저장하고 상기 지문 시그니처 탐색부의 구성을 설정하는 맵 저장부;
를 더 포함하는 것을 특징으로 하는 패킷 탐색 장치.
The packet search apparatus according to claim 1,
A map storage unit for determining a method of arranging the map generated by the map generation unit in the fingerprint signature search unit, storing the map in the fingerprint signature search unit in accordance with the determined method, and setting the configuration of the fingerprint signature search unit;
Further comprising: means for receiving a packet from the packet search apparatus.
제 13 항에 있어서, 상기 맵 저장부는,
맵을 구성하는 스테이트 테이블은 상기 지문 시그니처 탐색부의 내부 메모리에 저장하고, 맵을 구성하는 넥스트 무브 테이블은 상기 내부 메모리의 크기를 줄이기 위해 상기 지문 시그니처 탐색부의 외부 메모리에 저장하는 것을 특징으로 하는 패킷 탐색 장치.
14. The apparatus of claim 13,
Wherein the state table storing the map is stored in the internal memory of the fingerprint signature searching unit and the next move table constituting the map is stored in the external memory of the fingerprint signature searching unit to reduce the size of the internal memory. Device.
제 1 항에 있어서, 상기 패킷 탐색 장치는,
상기 지문 시그니처 탐색부 및 상기 클래스 탐색부로부터 수신된 정보를 가공하여 최종적으로 패킷을 처리하는 후 처리부;
를 더 포함하는 것을 특징으로 하는 패킷 탐색 장치.
The packet search apparatus according to claim 1,
A post-processing unit for processing the information received from the fingerprint signature searching unit and the class searching unit and finally processing the packet;
Further comprising: means for receiving a packet from the packet search apparatus.
패킷 탐색 장치의 패킷 탐색 방법에 있어서, 상기 패킷 탐색 장치가:
각각의 시그니처로부터 다른 시그니처들과 구분될 수 있는 지문 시그니처를 추출하고 지문 시그니처 탐색을 위한 맵을 생성하는 단계;
상기 생성된 맵을 이용하여 입력 패킷에 대한 지문 시그니처 패턴 매칭을 수행하는 단계; 및
상기 지문 시그니처 패턴 매칭된 입력 패킷을 대상으로 시그니처 패턴 매칭을 수행하는 단계;
를 포함하는 것을 특징으로 하는 패킷 탐색 방법.
A packet search method of a packet search apparatus, the packet search apparatus comprising:
Extracting fingerprint signatures that can be distinguished from other signatures from each signature and generating a map for fingerprint signature search;
Performing fingerprint signature pattern matching on an input packet using the generated map; And
Performing signature pattern matching on the input packet matched with the fingerprint signature pattern;
And transmitting the packet.
제 16 항에 있어서,
상기 지문 시그니처 패턴 매칭을 수행하는 단계는 입력 패킷의 페이로드에서 지문 시그니처를 탐색하는 1차 패턴 매칭을 수행하고,
상기 시그니처 패턴 매칭을 수행하는 단계는 지문 시그니처 탐색 결과를 수신하고, 탐색된 지문 시그니처를 이용하여 입력 패킷의 페이로드에서 원 시그니처와 비교할 비교 대상 시그니처를 결정한 후, 비교 대상 시그니처로 입력 패킷의 페이로드에서 정밀 탐색하는 것을 특징으로 하는 패킷 탐색 방법.
17. The method of claim 16,
The step of performing the fingerprint signature pattern matching may include performing a primary pattern matching for searching a fingerprint signature in a payload of an input packet,
The signature pattern matching step may include receiving a fingerprint signature search result, determining a signature to be compared with the original signature in the payload of the input packet using the detected fingerprint signature, And searching for a packet in the packet.
제 16 항에 있어서, 상기 맵을 생성하는 단계는,
하드웨어 자원의 제약으로 인해 메모리의 사용 가능한 용량에 따라 가변 길이를 갖는 지문 시그니처를 추출하여 맵을 생성하는 것을 특징으로 하는 패킷 탐색 방법.
17. The method of claim 16, wherein generating the map further comprises:
And generating a map by extracting a fingerprint signature having a variable length according to a usable capacity of the memory due to restriction of hardware resources.
제 16 항에 있어서,
상기 생성된 맵을 지문 시그니처 탐색을 위해 배치할 방식을 결정하고 결정된 방식에 맞추어 맵을 저장하되, 맵을 구성하는 스테이트 테이블은 내부 메모리에 저장하고, 맵을 구성하는 넥스트 무브 테이블은 상기 내부 메모리의 크기를 줄이기 위해 외부 메모리에 저장하는 단계;
를 더 포함하는 것을 특징으로 하는 패킷 탐색 방법.
17. The method of claim 16,
The method comprising: determining a method of arranging the generated map for fingerprint signature search; storing a map according to a determined method; storing a state table constituting a map in an internal memory; Storing in an external memory to reduce the size;
Further comprising the steps of:
KR1020130126182A 2013-10-22 2013-10-22 Advanced packet searching apparatus and method for classifying packet based on signature searching KR101519619B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130126182A KR101519619B1 (en) 2013-10-22 2013-10-22 Advanced packet searching apparatus and method for classifying packet based on signature searching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130126182A KR101519619B1 (en) 2013-10-22 2013-10-22 Advanced packet searching apparatus and method for classifying packet based on signature searching

Publications (2)

Publication Number Publication Date
KR20150046671A KR20150046671A (en) 2015-04-30
KR101519619B1 true KR101519619B1 (en) 2015-05-12

Family

ID=53037978

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130126182A KR101519619B1 (en) 2013-10-22 2013-10-22 Advanced packet searching apparatus and method for classifying packet based on signature searching

Country Status (1)

Country Link
KR (1) KR101519619B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11025650B2 (en) 2018-01-03 2021-06-01 Wins Co., Ltd. Multi-pattern policy detection system and method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101268510B1 (en) 2011-12-29 2013-06-07 주식회사 시큐아이 Signature detecting device and method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101268510B1 (en) 2011-12-29 2013-06-07 주식회사 시큐아이 Signature detecting device and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11025650B2 (en) 2018-01-03 2021-06-01 Wins Co., Ltd. Multi-pattern policy detection system and method

Also Published As

Publication number Publication date
KR20150046671A (en) 2015-04-30

Similar Documents

Publication Publication Date Title
CN112468370B (en) High-speed network message monitoring and analyzing method and system supporting custom rules
US9990583B2 (en) Match engine for detection of multi-pattern rules
KR101868720B1 (en) Compiler for regular expressions
CN103415836A (en) Network processor and method for accelerating data packet parsing
US10225269B2 (en) Method and apparatus for detecting network attacks and generating attack signatures based on signature merging
US20100306263A1 (en) Apparatuses and methods for deterministic pattern matching
CN115065561B (en) Information interaction method and system based on database data storage
US7216364B2 (en) System security approaches using state tables
WO2014000305A1 (en) Method and apparatus for content matching
EP1744235A1 (en) Method and system for virus detection based on finite automata
KR101519619B1 (en) Advanced packet searching apparatus and method for classifying packet based on signature searching
CN114006763A (en) Rapid retrieval matching method and system based on rapid table
CN103780460A (en) System for realizing hardware filtering of TAP device through FPGA
WO2012083748A1 (en) Method and device for cross-packet inspection of protocol based on deep packet inspection
EP3264713B1 (en) Hardware acceleration architecture for signature matching applications for deep packet inspection
US8526436B2 (en) Address search method and packet processing device
CN106067876B (en) A kind of HTTP request packet identification method based on pattern match
EP3264716B1 (en) State transition compression mechanism to efficiently compress dfa based regular expression signatures
KR101470590B1 (en) Plug-in multi pattern matching apparatus and method thereof
JP2019029921A (en) Transmitter, receiver, and communication method
KR101308091B1 (en) Apparatus and method for generating sorting information of log data by using summary data
US11025650B2 (en) Multi-pattern policy detection system and method
CN110311835B (en) Electric power IEC protocol conformance verification method based on content template
CN114070819B (en) Malicious domain name detection method, device, electronic device and storage medium
Baoyi et al. Research on WSN secure communication method based on digital watermark for the monitoring of electric transmission lines

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20180508

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20190507

Year of fee payment: 5