KR102055494B1 - Code processor for signature and PCRE search, and method for searching signature and PCRE using the same - Google Patents

Code processor for signature and PCRE search, and method for searching signature and PCRE using the same Download PDF

Info

Publication number
KR102055494B1
KR102055494B1 KR1020180001814A KR20180001814A KR102055494B1 KR 102055494 B1 KR102055494 B1 KR 102055494B1 KR 1020180001814 A KR1020180001814 A KR 1020180001814A KR 20180001814 A KR20180001814 A KR 20180001814A KR 102055494 B1 KR102055494 B1 KR 102055494B1
Authority
KR
South Korea
Prior art keywords
pcre
signature
state
payload
character
Prior art date
Application number
KR1020180001814A
Other languages
Korean (ko)
Other versions
KR20190083861A (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 KR1020180001814A priority Critical patent/KR102055494B1/en
Publication of KR20190083861A publication Critical patent/KR20190083861A/en
Application granted granted Critical
Publication of KR102055494B1 publication Critical patent/KR102055494B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명은 시그니처 및 PCRE 탐색을 위한 코드 프로세서, 그리고 이를 이용한 시그니처 및 PCRE 탐색 방법에 관한 것이다. 본 발명은, 패킷(Packet) 또는 페이로드(Payload)가 입력되면 파싱(parsing)하여 n-튜플(n-tuple)(n은 2 이상의 자연수)로 구분하고, 페이로드(Payload)를 각 캐릭터별 적어도 하나 이상이 설정된 스테이트 프로세싱(State Processing)을 통해 패턴(Pattern) 또는 PCRE 서칭(PCRE Searching)을 수행 후 수행 결과를 미리 설정된 포맷으로 변경하여 전송하는 것을 특징으로 한다.
이에 의해, 시그니쳐 기반 보안장비의 시그니처 및 PCRE 탐지 성능을 높이기 위한 방법으로 기존의 유한 오토 머터(finite automata) 방식을 이용한 탐지방법은 유한 오토 머터를 이용하여 생성된 스테이트 트랜젝션 테이블(State transition table)을 하나의 고용량 메모리에 저장하고 이를 참조하여 다음 스테이트를 찾아가는 방식이기 때문에 메모리 성능에 의해서 전체적인 프로세스 성능이 결정되는 한계점을 극복하기 위해 스테이트 트랜젝션 테이블(State transition table)을 캐릭터별로 논리적으로 분산시킴으로써, 메모리 병목현상에 따른 성능저하 문제를 해결할 수 있는 효과를 제공한다.
The present invention relates to a code processor for searching for a signature and a PCRE, and a signature and PCRE searching method using the same. According to the present invention, when a packet or payload is input, the packet is parsed and divided into n-tuples (n is a natural number of two or more), and the payload is classified for each character. After performing a pattern or PCRE search through at least one state processing, the execution result is changed to a preset format and transmitted.
Accordingly, the detection method using the finite automata method as a method for improving signature and PCRE detection performance of signature-based security equipment uses a state transition table generated using a finite automater. In order to overcome the limitation that overall process performance is determined by memory performance because it is stored in one high memory and refers to it, the memory bottleneck is distributed logically by the state transition table. It provides an effect that can solve the performance degradation problem caused by the phenomenon.

Description

시그니처 및 PCRE 탐색을 위한 코드 프로세서, 그리고 이를 이용한 시그니처 및 PCRE 탐색 방법{Code processor for signature and PCRE search, and method for searching signature and PCRE using the same}Code processor for signature and PCRE search, and method for searching signature and PCRE using the same}

본 발명은 시그니처 및 PCRE 탐색을 위한 코드 프로세서, 그리고 이를 이용한 시그니처 및 PCRE 탐색 방법에 관한 것으로, 보다 구체적으로는, 시그니쳐 기반 보안장비의 시그니처 및 PCRE 탐지 성능을 높이기 위한 방법으로 기존의 유한 오토 머터(finite automata) 방식을 이용한 탐지방법은 유한 오토 머터를 이용하여 생성된 스테이트 트랜젝션 테이블(State transition table)을 하나의 고용량 메모리에 저장하고 이를 참조하여 다음 스테이트를 찾아가는 방식이기 때문에 메모리 성능에 의해서 전체적인 프로세스 성능이 결정되는 한계점을 극복하기 위해 스테이트 트랜젝션 테이블(State transition table)을 캐릭터별로 논리적으로 분산시킴으로써, 메모리 병목현상에 따른 성능저하 문제를 해결하도록 하기 위한 시그니처 및 PCRE 탐색을 위한 코드 프로세서, 그리고 이를 이용한 시그니처 및 PCRE 탐색 방법에 관한 것이다. The present invention relates to a code processor for detecting a signature and a PCRE, and a signature and a PCRE searching method using the same. More specifically, the present invention provides a method for improving signature and PCRE detection performance of a signature-based security device. The finite automata detection method uses a finite automater to store the state transition table in one high-capacity memory and finds the next state. In order to overcome this determined limitation, the code processor for searching the signature and PCRE to solve the performance bottleneck problem caused by the memory transition by logically distributing the state transition table by character, and Using relates to the signature and the PCRE search method.

최근 폭발적인 인터넷 사용의 증가와 맞물려 발생하는 보안 문제들에 대응하기 위한 시스템으로 각 침입 리스트로 정리된 시그니처-기반(Signature-Based) 방식의 보안장비가 각광받고 있으나, 각 패킷(Packet)의 페이로드(Payload)를 분리하여 등록된 모든 시그니처와 페이로드를 비교하는 것은 너무 많은 시간이 걸려 현실적으로 불가능한 한계점이 있다.As a system for responding to the security problems caused by the recent explosion of Internet usage, signature-based security devices organized into each intrusion list have been in the spotlight, but the payload of each packet Comparing all registered signatures and payloads by separating (payload) takes too much time and has a practically impossible limitation.

이에 따라 변형이 많고 고정 캐릭터열로 표현될 수 없는 공격들을 탐지하기 위해 보안장비에서는 Perl 호환 정규 표현식(PCRE, Perl Compatible Regular Expressions) 엔진을 지원하고 있으나 속도가 느려 표본 캐릭터 열(Sample String) 등의 편법을 사용하고 있는 현실이다. As a result, security devices support Perl Compatible Regular Expressions (PCRE) engines to detect attacks that have many variations and cannot be represented as fixed strings. It's a reality that uses shortcuts.

보다 구체적으로, 종래의 시그니처-기반(Signature-Based) 방식의 보안장비에서 시간이 너무 오래 걸리는 한계점을 "유한 오토 머터(Finite Automata)" 방식의 보안장비로 교체함으로써, 패킷에서 헤더를 제외한 페이로드에서 바이트 단위로 구분하고 아스키 코드들로 표현한 뒤, 이를 기반으로 도 1과 같이 NFA(Non-deterministic Finite Automata) 또는 DFA(Deterministic Finite Automata)을 사용하여 시그니처를 탐색할 수 있다.More specifically, by replacing the time-consuming threshold in the conventional signature-based security device with the security device of the "Finite Automata" method, the payload excluding the header from the packet After dividing by byte and expressing ASCII codes, the signature may be searched using Non-deterministic Finite Automata (NFA) or Deterministic Finite Automata (DFA) as shown in FIG.

먼저, 도 1a와 같이 NFA(Non-deterministic Finite Automata) 방식은 각 스테이트 넘버(State Number)를 이용해 Goto-graph 상의 시그니처 상의 스트링(String) 중 첫 캐릭터(a, b)를 중심으로 분열 가능한 다음 스테이트 넘버를 설정함으로써, 목적 스테이트 넘버로 도달하는 방식을 취할 수 있다. 즉, NFA 방식은 다음 스테이트 넘버가 여러 개가 될 수 있어, 다음 상태를 선택하기 위하여 여러 가지 가능성을 고려해야 하기 때문에 비결정적이다.First, as shown in FIG. 1A, the non-deterministic finite automata (NFA) method is capable of dividing the first state (a, b) of the string on the signature on the Goto-graph using each state number. By setting the number, a method of reaching the target state number can be taken. That is, the NFA method is non-deterministic because there may be several next state numbers, and various possibilities must be considered in order to select the next state.

하기의 표 1과 같이, 실시예1의 경우 ab+cd(+는 b의 반복을 의미)로 시그니처가 표현된 경우, 도 1a에서 스테이트 넘버 0->1->2->3->1/4로 최종적으로 목적 스테이트 넘버(1/4)에 해당하여 시그니처 탐색이 가능하다.As shown in Table 1, in Example 1, when the signature is expressed as ab + cd (+ means repetition of b), in FIG. 1A, state numbers 0-> 1-> 2-> 3-> 1 / Finally, the signature can be searched corresponding to the destination state number (1/4).

구분division 내용Contents 실시예1Example 1 ab+cdab + cd 실시예2Example 2 ab+ceab + ce 실시예3Example 3 ab+c.*fab + c. * f 실시예4Example 4 b[d-f]ab [d-f] a 실시예5Example 5 bdcbdc

그러나 이러한 NFA(Non-deterministic Finite Automata) 방식은 스테이트 넘버 0->1->2->3->1/4가 아닌 0->5->6->7->8/2와 같이 끝단의 한 캐릭터만 틀린 goto-graph 상으로 진행시 7->8/2로 진행에서 스테이트 넘버가 틀린 경우 다시 초기부터 진행해야 해야하는 한계점이 다시 발생할 수 있다.However, this non-deterministic finite automata (NFA) approach is not the state number 0-> 1-> 2-> 3-> 1/4, but instead of the end number as 0-> 5-> 6-> 7-> 8/2. If only one character proceeds on the wrong goto-graph, if the state number is incorrect in proceeding from 7-> 8/2, the limitation that needs to proceed from the beginning may occur again.

이러한 한계점을 극복하기 위해, 도 1b와 같이 DFA(Deterministic Finite Automata)을 사용하여 시그니처를 탐색할 수 있다. 즉, DFA(Deterministic Finite Automata)에서 다음 스테이트 넘버가 없는 캐릭터에 해당하는 경우 초기부터 진행하는 것이 아닌 각 캐릭터별 분기된 스테이트 넘버를 통해 시그니처를 탐색할 수 있다. To overcome this limitation, the signature may be searched using a Deterministic Finite Automata (DFA) as shown in FIG. 1B. That is, in the case of a character without a next state number in the DFA (Deterministic Finite Automata), the signature may be searched through a branched state number for each character rather than proceeding from the beginning.

즉, DFA 방식은 전이함수로 정의된 다음 스테이트 넘버만을 설정하므로, NFA 방식에 비해 다음 상태를 선택하기 위한 가능성의 개수가 줄어들 수 있도록 하는 효율성을 제공할 수 있다.That is, since the DFA method sets only the next state number defined by the transition function, the number of possibilities for selecting the next state can be reduced compared to the NFA method.

이러한 DFA(Deterministic Finite Automata)에서는 도 2와 같이 출력 함수(Output Function)로 다양한 캐릭터열{he, she, his hers} 각각에 따른 목적 스테이트 넘버{2, 7, 7, 9}를 지정할 수 있다.In the DFA (Deterministic Finite Automata), as shown in FIG. 2, a target state number {2, 7, 7, 9} according to various strings {he, she, his hers} may be designated as an output function.

또한, 도 3과 같이, 각 캐릭터열에 따른 다음 스테이트를 찾지 못하는 경우에 실패 함수(Failure Function)를 갖으며, 도 4a와 같이 Goto Table, 그리고 도 4b와 같이 Goto Table을 각 현재의 스테이트 넘버에서 다음 스테이트 넘버를 정리한 스테이트 테이블, 그리고 Failure Function을 함수화한 Failure Table이 각 경우에 숫자에 따라 기하 급수적으로 커지는 한계점이 있으며, 그러한 점은 도 5의 바이트(byte)와 테이블 요소인 시그니처의 수의 관계를 나타낸 도표에서 확인할 수 있다. In addition, as shown in FIG. 3, when a next state according to each character string is not found, a failure function is included, and a Goto Table as shown in FIG. 4A and a Goto Table as shown in FIG. 4B are next from each current state number. The state table that summarizes the state numbers, and the failure table that functionalizes the failure function, grows exponentially with each number, which is the relationship between the byte of FIG. 5 and the number of signatures that are table elements. This can be seen in the chart.

이와 같이 종래의 시그니처와 PCRE 탐색 프로세서에서 Goto Table 및 Failure Table로 표현되는 스테이트 트랜젝션 테이블(State transition table)을 메모리에 저장하고 소프트웨어적인 프로세싱에 의한 메모리 액세스(access)를 통해 시그니처를 탐색시, 시그니처의 개수와 사이즈의 증가에 따라 스테이트 트랜젝션 테이블(State transition table)의 증가와 메모리 액세스(access)의 수의 증가에 따라 성능(performance)의 한계가 오며, 이를 극복하기 위해 처리 프로세스의 개수를 증가 시키거나 하드웨어적인 방식으로 처리 프로세스의 성능을 증가시키는 방식을 시도하고 있으나 하나의 메모리로 트래픽양이 증가 함에 따라 메모리 병목 현상에 의한 성능 저하 문제를 해결할 수는 없는 한계점이 발생한다.As such, when the signature and PCRE search processor store the state transition table represented by Goto Table and Failure Table in memory and search for the signature through memory access by software processing, As the number and size increase, there is a limit of performance as the state transition table increases and the number of memory accesses increases.To overcome this, increase the number of processing processes or The hardware approach is to increase the performance of the processing process, but as the traffic volume increases with a single memory, there is a limit that cannot solve the performance degradation problem caused by the memory bottleneck.

이에 따라 해당 기술분야에 있어서는 하나의 메모리 상에서 메모리 액세스에 있어서 캐릭터에 따른 코드 분산을 통한 프로세스의 액세스 방식으로 전환함으로써, 시그니처와 PCRE 탐색의 효율성을 획기적으로 향상시키기 위한 기술개발이 요구되고 있다.Accordingly, in the technical field, there is a demand for technology development to dramatically improve the efficiency of signature and PCRE search by switching to a process access method through code distribution according to characters in memory access on one memory.

대한민국 특허출원 특허출원번호 제10-1999-0056027호 "랜덤 액세스 채널의 프리앰블 시그니처 탐색 장치(APPARATUS FOR SEARCHING A PREAMBLE SIGNATURE OF ARANDOM ACCESS CHANNEL)"Korean Patent Application No. 10-1999-0056027 "APPARATUS FOR SEARCHING A PREAMBLE SIGNATURE OF ARANDOM ACCESS CHANNEL"

본 발명은 상기의 문제점을 해결하기 위한 것으로, 시그니쳐 기반 보안장비의 시그니처 및 PCRE 탐지 성능을 높이기 위한 방법으로 하나의 메모리 상에서 메모리 액세스에 있어서 캐릭터에 따른 코드 분산을 통한 프로세스의 액세스 방식으로 전환함으로써, 시그니처와 PCRE 탐색의 효율성을 획기적으로 향상시키기 위한 시그니처 및 PCRE 탐색을 위한 코드 프로세서, 그리고 이를 이용한 시그니처 및 PCRE 탐색 방법을 제공하기 위한 것이다.The present invention is to solve the above problems, in order to improve the signature and PCRE detection performance of the signature-based security device by switching to a process access method through the code distribution according to the character in the memory access on one memory, The present invention provides a signature processor and a code processor for retrieving a signature and a PCRE to significantly improve the efficiency of signature and PCRE retrieval, and a signature and PCRE retrieval method using the same.

또한, 본 발명은 DFA 기반의 시그니처 및 PCRE 탐색의 단점에 해당하는 테이블의 광범위한 문제점을 해결하여 하드웨어 및 메모리 성능에 상관없이 처리가 가능하도록 하기 위한 시그니처 및 PCRE 탐색을 위한 코드 프로세서, 그리고 이를 이용한 시그니처 및 PCRE 탐색 방법을 제공하기 위한 것이다.In addition, the present invention solves a wide range of tables corresponding to the shortcomings of DFA-based signatures and PCRE search, so that the process can be processed regardless of hardware and memory performance, and a code processor for PCRE search and a signature using the same And to provide a PCRE search method.

또한, 본 발명은 하나의 패킷 프로세스가 아닌 다중의 코드 프로세스를 이용해 패킷관점이 아닌 캐릭터 관점에서 패킷, 페이로드, 또는 유저 데이터(user data)를 처리함으로써, 메모리 부하를 줄이고 각 캐릭터별 코드 프로세서의 액세스 율에 따라 적어도 2개 이상으로 확장이 가능할 뿐만 아니라, 하나의 캐릭터에 할당된 코드 프로세스가 idle 상태인 경우 다른 캐릭터에 대한 분산 처리 프로세스를 수행할 수 있도록 하기 위한 시그니처 및 PCRE 탐색을 위한 코드 프로세서, 그리고 이를 이용한 시그니처 및 PCRE 탐색 방법을 제공하기 위한 것이다.In addition, the present invention uses multiple code processes instead of one packet process to process packets, payloads, or user data in terms of characters rather than packet perspectives, thereby reducing memory load and reducing the code processor of each character. Not only can be extended to 2 or more depending on the access rate, but also the code processor for signature and PCRE search to enable the distributed processing process for other characters when the code process assigned to one character is idle. And to provide a signature and PCRE search method using the same.

그러나 본 발명의 목적들은 상기에 언급된 목적으로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.However, the objects of the present invention are not limited to the above-mentioned objects, and other objects not mentioned will be clearly understood by those skilled in the art from the following description.

상기의 목적을 달성하기 위해 본 발명의 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서는, 패킷(Packet), 페이로드(Payload) 또는 유저 데이터(user data)가 입력되면 파싱(parsing)하여 n-튜플(n-tuple)(n은 2 이상의 자연수)로 구분하고, 페이로드(Payload) 또는 유저 데이터(user data)를 각 캐릭터별 적어도 하나 이상이 설정된 스테이트 프로세싱(State Processing)을 통해 패턴(Pattern) 또는 PCRE 서칭(PCRE Searching)을 수행 후 수행 결과를 미리 설정된 포맷으로 변경하여 전송하는 것을 특징으로 한다.In order to achieve the above object, a code processor for searching for a signature and a PCRE according to an embodiment of the present invention may be parsed when a packet, a payload, or user data is input. Patterns are divided into n-tuples (n is a natural number of two or more) and through state processing in which at least one payload or user data is set for each character. Or after performing PCRE Searching, the execution result is changed to a preset format and then transmitted.

이때, 본 발명의 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서는, 각 캐릭터를 담당하는 스테이트 프로세싱을 처리하기 위한 스테이트 엔진(State Engine)(124a)이 바이트(byte) 단위의 캐릭터에 해당하는 미리 설정된 개수의 캐릭터로 할당되며, 각 캐릭터를 담당하는 스테이트 엔진(State Engine)(124a)에 있어서 미리 설정된 임계 액세스율 (access rate) 이상인 경우 적어도 2개 이상으로 할당되고, 하나의 캐릭터에 할당된 스테이트 엔진(State Engine)(124a)이 idle 상태인 경우 다른 캐릭터에 대한 분산 처리 프로세스를 수행할 수 있는 것을 특징으로 한다.In this case, in the code processor for signature and PCRE search according to another embodiment of the present invention, a state engine 124a for processing state processing for each character corresponds to a character in bytes. Is assigned to a predetermined number of characters, and in a state engine (124a) that is in charge of each character, it is assigned to at least two or more when it is equal to or more than a predetermined threshold access rate, and assigned to one character. When the state engine 124a is in an idle state, it is possible to perform a distributed processing process for another character.

또한, 본 발명의 또 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서는, UIB(User Interface Block)(110)와 SPB(Service Processing Block)(120)를 포함하며, UIB(User Interface Block)(110)는, 외부 I/F(Interface)를 통해서 정보를 입력받아 PDB(Payload Distribute block)(112)에 전달하는 역할을 담당하는 PIB(Packet/Payload Interface Block)(111); 입력된 정보의 파싱(Parsing)을 수행하며, 페이로드(Payloa)를 페이로드 프로세서(Payload Processor, 'PP')(121a)에 할당하는 기능을 담당하는 PDB(Payload Distribute block)(112); 및 스테이트 엔진(State Engine)(124a : 124a-0 내지 124a-255)의 결과(Result)를 페이로드(Payload)별 소팅(sorting)하여 패키지(Package)화 하는 기능을 담당하는 RPB(Result Processor Block)(113); 구성되는 것을 특징으로 한다.Also, a code processor for searching for a signature and a PCRE according to another embodiment of the present invention includes a user interface block (UIB) 110 and a service processing block (SPB) 120, and includes a user interface block (UIB). 110, a Packet / Payload Interface Block (PIB) 111, which plays a role of receiving information through an external I / F (Interface) and delivering the information to a payload distribution block (PDB) 112; A Payload Distribute block (PDB) 112 which performs parsing of input information and is responsible for allocating a payload (Payloa) to a payload processor (PP) 121a; And a RPB (Result Processor Block) in charge of the function of sorting the result of a state engine (124a: 124a-0 to 124a-255) by sorting by payload. 113; It is characterized in that the configuration.

또한, 본 발명의 또 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서에 있어서, SPB(Service Processing Block)(120)는, PDB(112)로부터 페이로드(Payload) 또는 유저 데이터(user data)를 전달받아 시그니처/PCRE 매칭(Signature/Perl Compatible Regular Expressions Matching)을 진행하는 PPG(Payload Processor Group)(121) 블록; PPG(121)과 SEG(State Engine Group)(124) 간의 스위칭(Switching) 기능을 담당하는 FSEG(First stage Switch Engine Group)(122) 및 SSEG(Second stage Switch Engine Group)(123) 블록; 및 유한 오토 머터(Finite Automata)에 의해 캐릭터별로 생성된 스테이트 트리(state tree) 정보를 통해서 PP(Payload Processor)(121a)에서 입력된 데이터(data)의 방향을 분석 후 전달하되, 방향 분석 결과(다음 스테이트)에 따른 캐릭터로 할당된 캐릭터별 스테이트 엔진(State Engine)(124a) 상호 간의 이동을 통해 최종적인 시그니처 또는 PCRE를 탐색하는 SEG(124) 블록; 을 포함하는 것을 특징으로 한다.In addition, in the code processor for the signature and PCRE search according to another embodiment of the present invention, the SPB (Service Processing Block) 120, payload (Payload) or user data (user data) from the PDB (112) A Payload Processor Group (PPG) block 121 which receives the received message and performs Signature / Perl Compatible Regular Expressions Matching; A first stage switch engine group (FSEG) 122 and a second stage switch engine group (SSEG) 123 that are responsible for a switching function between the PPG 121 and the state engine group (SEG) 124; And after analyzing the direction of the data (data) input from the PP (Payload Processor) (121a) through the state tree (state tree) generated for each character by the finite automata (Finite Automata), the direction analysis result ( A SEG 124 block for searching for a final signature or PCRE through movement between character state engines 124a assigned to characters according to the next state; Characterized in that it comprises a.

또한, 본 발명의 또 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서는, 코드 프로세서(Code Processor)(100)의 제어 및 상태 관리 담당하는 블록으로서 UIB(110)의 컨트롤 패스(control path)를 통하여 제어 통신을 수행하는 CCB(Code processor Control Block)(130); 를 더 포함하는 것을 특징으로 한다. In addition, a code processor for searching for a signature and a PCRE according to another embodiment of the present invention is a block that is in charge of control and state management of the code processor 100 and a control path of the UIB 110. Code processor control block (CCB) 130 for performing control communication through; It characterized in that it further comprises.

상기의 목적을 달성하기 위해 본 발명의 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서를 이용한 시그니처 및 PCRE 탐색 방법은, 패킷(Packet), 페이로드(Payload) 또는 유저 데이터(user data)가 입력되면 파싱(parsing)하여 n-튜플(n-tuple)(n은 2 이상의 자연수)로 구분하는 제 1 단계; 및 페이로드(Payload) 또는 유저 데이터(user data)를 각 캐릭터별 적어도 하나 이상이 설정된 스테이트 프로세싱(State Processing)을 통해 패턴(Pattern) 또는 PCRE 서칭(PCRE Searching)을 수행 후 수행 결과를 미리 설정된 포맷으로 변경하여 전송하는 제 2 단계; 를 포함하는 것을 특징으로 한다.In order to achieve the above object, a signature and a PCRE discovery method using a signature and a code processor for PCRE discovery according to an embodiment of the present invention may include a packet, a payload, or user data. A first step of parsing the data into n-tuples (n being a natural number of two or more); And performing a pattern or PCRE search through state processing in which at least one payload or user data is set for each character, and then performing a preset format. A second step of transmitting to change; Characterized in that it comprises a.

이때, 본 발명의 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서를 이용한 시그니처 및 PCRE 탐색 방법에 있어서, 상기 제 2 단계는, 청구항 6에 있어서, 상기 제 2 단계는,In this case, in the signature and the PCRE search method using a signature and a code processor for PCRE search according to another embodiment of the present invention, the second step is the method according to claim 6,

각 캐릭터별 스테이트 프로세싱을 처리하기 위한 스테이트 엔진(State Engine)(124a)이 미리 설정된 개수의 캐릭터로 할당되며, 각 캐릭터를 담당하는 스테이트 엔진(State Engine)(124a)에 있어서 미리 설정된 임계 액세스율 (access rate) 이상인 경우 적어도 2개 이상으로 할당되고, 하나의 캐릭터에 할당된 스테이트 엔진(State Engine)(124a)이 idle 상태인 경우 다른 캐릭터에 대한 분산 처리 프로세스를 수행할 수 있는 것을 특징으로 한다.A state engine 124a for processing the state processing for each character is assigned to a predetermined number of characters, and a threshold access rate set in advance in the state engine 124a in charge of each character At least two (or more than an access rate) is allocated, and when the state engine (124a) assigned to one character is in an idle state, a distributed processing process for another character may be performed.

또한, 본 발명의 또 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서를 이용한 시그니처 및 PCRE 탐색 방법에 있어서, 상기 제 1 단계는, 외부 I/F(Interface)를 통해서 정보 입력이 수행되는 제 1-1 단계; 및 입력된 정보의 파싱(Parsing)을 수행하며, 페이로드(Payloa)를 페이로드 프로세서(Payload Processor, 'PP')(121a)에 할당되는 제 1-2 단계; 를 포함하는 것을 특징으로 한다.In addition, in the signature and PCRE search method using a signature and a code processor for PCRE search according to another embodiment of the present invention, the first step is a first step of inputting information through an external I / F (Interface) Step 1-1; A first and second steps of parsing the input information and allocating a payload (Payloa) to a payload processor (PP) 121a; Characterized in that it comprises a.

또한, 본 발명의 또 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서를 이용한 시그니처 및 PCRE 탐색 방법에 있어서, 상기 제 2 단계는, 페이로드(Payload) 또는 유저 데이터(user data)를 전달받아 시그니처/PCRE 매칭(Signature/Perl Compatible Regular Expressions Matching)을 진행하는 제 2-1 단계; 및 유한 오토 머터(Finite Automata)에 의해 캐릭터별로 생성된 스테이트 트리(state tree) 정보를 통해서 PP(Payload Processor)(121a)에서 입력된 데이터(data)의 방향을 분석 후 전달하되, 방향 분석 결과(다음 스테이트)에 따른 캐릭터로 할당된 캐릭터별 스테이트 엔진(State Engine)(124a) 상호 간의 이동을 통해 최종적인 시그니처 또는 PCRE를 탐색하는 는 제 2-2 단계; 를 포함하는 것을 특징으로 한다.Also, in the signature and PCRE discovery method using a signature and a code processor for PCRE discovery according to another embodiment of the present invention, the second step is to receive a payload or user data Step 2-1 to proceed with Signature / Perl Compatible Regular Expressions Matching; And after analyzing the direction of the data (data) input from the PP (Payload Processor) (121a) through the state tree (state tree) generated for each character by the finite automata (Finite Automata), the direction analysis result ( Searching for the final signature or PCRE by moving between the state engines (124a) for each character assigned to the character according to the next state; Characterized in that it comprises a.

또한, 본 발명의 또 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서를 이용한 시그니처 및 PCRE 탐색 방법에 있어서, 각 캐릭터를 담당하는 스테이트 엔진(State Engine)(124a)은, Goto Table 상의 각 캐릭터열(c.r.)을 추출하여 재정렬하되 각 셀을 다음 진행할 스테이트 넘버(State Number) 또는 SID(State number ID)의 존재 여부를 알리기 위한 1 비트(1, 0)의 정보로 변환 생성된 "PSID_V 테이블(PSID_Valid table)(124b)", 그리고 PSID_V Table(124b) 상에서 PSID(Pre-State ID)를 활용해서 SID를 추출하기 위한 "VC_Table(124c)" 및 "SID Table(124d)"를 구비한 SE(State Engine)(124a)를 활용하는 것을 특징으로 한다.In addition, in the signature and PCRE search method using the signature and the code processor for PCRE search according to another embodiment of the present invention, the state engine (124a) in charge of each character, each character on the Goto Table Extract and reorder the columns (cr), and convert each cell to 1 bit (1, 0) information to indicate the presence of the next state number or state number ID (SID). SE (State) having "VC_Table (124c)" and "SID Table (124d)" for extracting SID using PSID (Pre-State ID) on PSID_Valid table (124b) "and PSID_V Table (124b). Engine) 124a.

또한, 본 발명의 또 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서를 이용한 시그니처 및 PCRE 탐색 방법에 있어서, PSID_V 테이블(PSID_Valid table)(124b)은, Goto Table 상의 수직 직선 형태로 배열된 각 캐릭터열(c.r.)을 PSID_Valid table(124b)과 같이 셀 격자(m×l)로 재구성한 형태를 갖는 것을 특징으로 한다. Further, in the signature and PCRE discovery method using the signature and the code processor for PCRE discovery according to another embodiment of the present invention, the PSID_V table (PSID_Valid table) 124b is each arranged in a vertical straight form on the Goto Table. The character string cr may be reconfigured into a cell grid m × l like the PSID_Valid table 124b.

본 발명의 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서, 그리고 이를 이용한 시그니처 및 PCRE 탐색 방법은, 시그니쳐 기반 보안장비의 시그니처 및 PCRE 탐지 성능을 높이기 위한 방법으로 기존의 하나의 고용량 메모리 상에서 스테이터 넘버를 처리하기 때문에 메모리 성능에 의해서 전체적인 프로세스 성능이 결정되는 한계점을 극복하기 위해 메모리를 캐릭터별로 논리적으로 분산시킴으로써, 메모리 병목 문제를 해결할 수 있는 효과를 제공한다.A code processor for searching for a signature and a PCRE, and a signature and PCRE searching method using the same, according to an embodiment of the present invention, are methods for improving signature and PCRE detection performance of a signature-based security device. In order to overcome the limitation that the overall process performance is determined by the memory performance, the memory is logically distributed by character, thereby solving the memory bottleneck problem.

또한, 본 발명의 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서, 그리고 이를 이용한 시그니처 및 PCRE 탐색 방법은, DFA 기반의 시그니처 및 PCRE 탐색의 단점에 해당하는 테이블의 광범위한 문제점을 해결하여 하드웨어 및 메모리 성능에 상관없이 처리가 가능한 효과를 제공할 수 있다. Also, a code processor for searching for a signature and a PCRE, and a signature and PCRE searching method using the same according to another embodiment of the present invention solve a wide range of problems corresponding to the shortcomings of a DFA-based signature and a PCRE searching to solve hardware and hardware problems. It can provide a processable effect regardless of memory performance.

뿐만 아니라, 본 발명의 다른 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서, 그리고 이를 이용한 시그니처 및 PCRE 탐색 방법은, 하나의 패킷 프로세스가 아닌 다중의 코드 프로세스를 이용해 패킷관점이 아닌 캐릭터 관점에서 패킷, 페이로드, 또는 유저 데이터(user data)를 처리함으로써, 메모리 부하를 줄이고 각 캐릭터별 코드 프로세서의 액세스 율에 따라 적어도 2개 이상으로 확장이 가능할 뿐만 아니라, 하나의 캐릭터에 할당된 코드 프로세스가 idle 상태인 경우 다른 캐릭터에 대한 분산 처리 프로세스를 수행할 수 있도록 할 수 있는 효과가 있다.In addition, a code processor for searching for a signature and a PCRE according to another embodiment of the present invention, and a method for searching for a signature and a PCRE using the same, use a multiple code process instead of a single packet process. , Payload, or user data to reduce memory overhead and scale up to at least two, depending on the access rate of each character's code processor. In the case of a state, there is an effect that it is possible to perform a distributed processing process for other characters.

도 1 내지 도 5는 종래의 기술에 따른 시그니처 및 PCRE 탐색을 위한 패킷 프로세서 기반의 동작 원리 및 문제점을 설명하기 위한 도면이다.
도 6은 본 발명의 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서(100)의 주요 구성요소를 나타내는 도면이다.
도 7은 본 발명의 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서(100)의 구성요소를 구체적으로 나타내는 도면이다.
도 8은 본 발명의 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서(100)에서 캐릭터별로 생성된 스테이트 트리(state tree) 정보를 통해서 입력된 캐릭터의 방향을 분석 후 전달하는 과정의 원리를 나타내는 도면이다.
1 to 5 are diagrams for explaining the principle and problems of the packet processor-based operation for the signature and PCRE search according to the prior art.
6 is a diagram illustrating the main components of the code processor 100 for signature and PCRE discovery according to an embodiment of the present invention.
FIG. 7 illustrates in detail the components of the code processor 100 for signature and PCRE discovery according to an embodiment of the present invention.
8 is a view illustrating a principle of a process of analyzing and transmitting a direction of an input character through state tree information generated for each character in the code processor 100 for signature and PCRE search according to an embodiment of the present invention. Drawing.

이하, 본 발명의 바람직한 실시예의 상세한 설명은 첨부된 도면들을 참조하여 설명할 것이다. 하기에서 본 발명을 설명함에 있어서, 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다.Hereinafter, the detailed description of the preferred embodiment of the present invention will be described with reference to the accompanying drawings. In the following description of the present invention, detailed descriptions of well-known functions or configurations will be omitted when it is deemed that they may unnecessarily obscure the subject matter of the present invention.

도 6은 본 발명의 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서(100)의 주요 구성요소를 나타내는 도면이다. 도 7은 본 발명의 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서(100)의 구성요소를 구체적으로 나타내는 도면이다. 한편, 본 발명에서는 설명의 편의를 위해 시그니처 탐색 방법을 중심으로 적용되나 PCRE 탐색 등 침입 탐지를 위한 코드 프로세서로도 변형되어 적용 가능하다. 6 is a diagram illustrating the main components of the code processor 100 for signature and PCRE discovery according to an embodiment of the present invention. FIG. 7 illustrates in detail the components of the code processor 100 for signature and PCRE discovery according to an embodiment of the present invention. Meanwhile, in the present invention, a signature search method is mainly applied for convenience of description, but may be modified and applied to a code processor for intrusion detection such as PCRE search.

도 6 및 도 7을 참조하면, 코드 프로세서(Code Processor)(100)는 Goto Table 상의 각 캐릭터열(c.r.)을 추출하여 재정렬하되 각 셀을 다음 진행할 스테이트 넘버(State Number) 또는 SID(State number ID)의 존재 여부를 알리기 위한 1 비트(1, 0)의 정보로 변환 생성된 "PSID_V 테이블(PSID_Valid table)(124b)", 그리고 PSID_V Table(124b) 상에서 PSID(Pre-State ID)를 활용해서 SID를 추출하기 위한 "VC_Table(124c)" 및 "SID Table(124d)"를 구비한 SE(State Engine)(124a)를 활용한다.Referring to FIGS. 6 and 7, the code processor 100 extracts and rearranges each character string cr on the Goto Table, but states each cell next to a state number or state number ID. SID by using the PSID_V table (124b) and the PSID (Pre-State ID) on the PSID_V Table 124b. A state engine (SE) 124a having a "VC_Table 124c" and a "SID Table 124d" for extracting the data is utilized.

여기서 PSID_Valid table(124b)은 도 4a 상의 수직의 직선 형태로 배열된 각 캐릭터열(c.r.)을 도 8의 PSID_Valid table(124b)과 같이 셀 격자(m×l)(m, l은 서로 같거나 다른 2 이상의 자연수)로 재구성한 형태를 갖는다. Here, the PSID_Valid table 124b is a cell grid (m × l) where m and l are the same as or different from each other, as shown in the PSID_Valid table 124b of FIG. 8. Two or more natural numbers).

한편, 코드 프로세서(Code Processor)(100)는 10G, 100G, PCIe(PCI Express) 또는 로컬 버스(Local Bus) 등과 같은 외부 I/F(Interface)를 통해서 패킷(Packet), 페이로드(Payload) 또는 유저 데이터(user data)가 입력되면 파싱(parsing)하여 n-튜플(n-tuple)(n은 2 이상의 자연수)로 구분하고, 페이로드(Payload) 또는 유저 데이터(user data)를 각 캐릭터별 적어도 하나 이상이 설정된 스테이트 프로세싱(State Processing)을 통해 패턴(Pattern) 또는 PCRE 서칭(PCRE Searching)을 수행 후 수행 결과를 미리 설정된 포맷으로 변경하여 전송하며, 이를 위해 UIB(User Interface Block)(110)와 SPB(Service Processing Block)(120)와, 제어 및 상태 관리를 담당하는 CCB(Code processor Control Block)(130)로 구성될 수 있다. On the other hand, the code processor 100 may include a packet, a payload, or a packet through an external I / F (Interface) such as 10G, 100G, PCI Express (PCIe), or a local bus. When user data is input, it is parsed and divided into n-tuples (n is a natural number of two or more), and at least payload or user data for each character is obtained. After performing pattern or PCRE Searching through one or more state processing, the result is changed to a preset format and transmitted. For this purpose, the UIB 110 and the UIB 110 are transmitted. Service Processing Block (SPB) 120, and Code Processor Control Block (CCB) 130 that is responsible for control and state management.

본 발명의 일 실시예로, 각 캐릭터별 스테이트 프로세싱을 처리하기 위한 스테이트 엔진(State Engine)(124a)은 미리 설정된 개수의 캐릭터로 할당될 수 있다(예, 바이트(byte) 단위의 캐릭터에 해당하는 0부터 255까지의 256 캐릭터별로 할당). In one embodiment of the present invention, the state engine 124a for processing the state processing for each character may be allocated to a predetermined number of characters (eg, corresponding to a character in a byte unit). Per 256 characters from 0 to 255).

각 캐릭터를 담당하는 스테이트 엔진(State Engine)(124a)은 미리 설정된 임계 액세스율 (access rate) 이상인 경우 적어도 2개 이상으로 할당될 수 있으며, 하나의 캐릭터에 할당된 스테이트 엔진(State Engine)(124a)이 idle 상태인 경우 다른 캐릭터에 대한 분산 처리 프로세스를 수행할 수 있다. Each state engine 124a in charge of each character may be allocated to at least two or more state engines 124a which are assigned to one character when it is equal to or more than a predetermined threshold access rate. ) Is idle, you can perform a distributed processing process on other characters.

먼저, UIB(110)는 100G, 10G, PCIe, Local Bus 인터페이스를 담당하기 위해 외부 I/F(Interface)를 통해서 정보 입력이 수행되는 PIB(Packet/Payload Interface Block)(111)와, 입력된 정보의 파싱(Parsing)을 수행하며 페이로드(Payloa)를 페이로드 프로세서(Payload Processor, 이하 'PP')(121a)에 할당하는 기능을 담당하는 PDB(Payload Distribute block)(112)와, 스테이트 엔진(State Engine)(124a : 124a-0 내지 124a-255)의 결과(Result)를 페이로드(Payload)별 소팅(sorting)하여 패킷(Package)화 하는 기능을 담당하는 RPB(Result Processor Block)(113)로 구성된다.First, the UIB 110 is a PIB (Packet / Payload Interface Block) 111 in which information is input through an external I / F (Interface) to perform 100G, 10G, PCIe, and Local Bus interfaces, and input information. Payload Distribute block (PDB) 112, which performs parsing of the payload and allocates payloads to the payload processor (PP) 121a, and a state engine RPB (Result Processor Block) 113, which is responsible for sorting the result of a state engine (124a: 124a-0 to 124a-255) by sorting the payloads by payload, and packetizing them. It consists of.

SPB(120)는 PDB(112)로부터 페이로드(Payload) 또는 유저 데이터(user data)를 전달받아 시그니처/PCRE 매칭(Signature/Perl Compatible Regular Expressions Matching)을 진행하는 PPG(Payload Processor Group)(121) 블록과, PPG(121)과 SEG(State Engine Group)(124) 간의 스위칭(Switching) 기능을 담당하는 FSEG(First stage Switch Engine Group)(122) 및 SSEG(Second stage Switch Engine Group)(123) 블록, 그리고 유한 오토 머터(Finite Automata)에 의해 캐릭터별로 생성된 스테이트 트리(state tree) 정보를 통해서 PP(Payload Processor)(121a)에서 입력된 데이터(data)의 방향을 분석 후 전달하되, 방향 분석 결과(다음 스테이트)에 따른 캐릭터로 할당된 캐릭터별 스테이트 엔진(State Engine)(124a) 상호 간의 이동을 통해 최종적인 시그니처 또는 PCRE를 탐색하는 SEG(124) 블록으로 구성된다. The SPB 120 receives a payload or user data from the PDB 112 and performs a Payload Processor Group (PPG) 121 performing a signature / Perl Compatible Regular Expressions Matching. Block, First stage Switch Engine Group (FSEG) 122 and Second stage Switch Engine Group (SSEG) 123, which are responsible for the switching function between PPG 121 and State Engine Group (SEG) 124. And, after analyzing the direction of the data (data) input from the payload processor (121a) through the state tree (state tree) generated for each character by the finite automata (Finite Automata), the direction analysis result A SEG 124 block for searching for a final signature or PCRE through movement between character state engines 124a assigned to characters according to (Next State).

CCB(130)는 코드 프로세서(Code Processor)(100)의 제어 및 상태 관리 담당하는 블록으로서 UIB(110)의 컨트롤 패스(control path)를 통하여 제어 통신을 수행한다. The CCB 130 is a block in charge of control and state management of the code processor 100 and performs control communication through a control path of the UIB 110.

도 8은 본 발명의 실시예에 따른 시그니처 및 PCRE 탐색을 위한 코드 프로세서(100)에서 캐릭터별로 생성된 스테이트 트리(state tree) 정보를 통해서 입력된 캐릭터의 방향을 분석 후 전달하는 과정의 원리를 나타내는 도면이다. 8 is a view illustrating a principle of a process of analyzing and transmitting a direction of an input character through state tree information generated for each character in the code processor 100 for signature and PCRE search according to an embodiment of the present invention. Drawing.

도 8을 참조하면, SE(124a)는 SSEG(123)로부터 수신된 PSID(Pre-State ID) 비트(bits)로 PSID_V 테이블(PSID_Valid table)(124b)을 액세스(access)하여 PSID 위치의 available(‘1’) 여부를 확인함으로써, 수신된 PSID(Pre-State ID)에 대한 캐릭터가 자신에게 할당된 캐릭터에 해당하는지를 검색한다. Referring to FIG. 8, the SE 124a accesses the PSID_V table 124b using the PSID bits received from the SSEG 123 to enable available PSID locations. '1') to check whether the character for the received PSID (Pre-State ID) corresponds to the character assigned to the user.

이에 따라, SE(124a)는 PSID_V 테이블(PSID_V table)(124b)의 PSID 위치의 비트가 '1'인 경우(bit of PSID_V table = '1'), PSID_V 테이블(PSID_V table)(124b) 중 PSID 값에 해당하는 row에 해당 비트(bit)까지의 ‘1’의 개수를 합산한 뒤, 합산된 숫자와 매칭되는 row에 해당하는 VC 테이블(VC table)(124c)의 값과 합산하여 Match되는 SID(State ID) 테이블(SID table)(124d) 상의 SID 값을 추출할 수 있다.Accordingly, when the bit of the PSID position of the PSID_V table 124b is '1' (bit of PSID_V table = '1'), the SE 124a determines the PSID of the PSID_V table (PSID_V table) 124b. SID matched by adding the number of '1's up to the corresponding bit to the row corresponding to the value, and then adding the value of the VC table 124c corresponding to the row matching the summed number. The SID value on the (State ID) table (SID table) 124d can be extracted.

여기서, SID 테이블(SID table)(124d)은 VC 테이블(VC table)(124c)의 값을 Match 값으로 하고, Match 값과 매칭되는 SID 값의 조합으로 형성됨으로써, 합산된 1의 개수를 이용해 다음 진행해야할 스테이트 넘버에 해당하는 SID 값을 추출할 수 있다. Here, the SID table 124d is formed by a combination of SID values matching the Match value with the value of the VC table 124c as a Match value. The SID value corresponding to the state number to be processed can be extracted.

즉, SE(124a)는 SID 테이블(SID table)(124d)을 액세스(access)하여 Match('1' : match) 정보와 SID 정보를 분석 후 PPID(Payload Processor ID)에 해당하는 PP(121a)로 전송한다. 분석된 정보가 입력되면 PP(121a)는 PPID(PP(121a) ID)와 입력된 SID(State ID)를 PSID(Pre-State ID)로 하여 페이로드의 다음 캐릭터에 해당 스테이트 엔진(State Engine)(124a)으로 전송을 통해 최종적인 시그니처 또는 PCRE를 탐색하도록 하거나, SE(124a) 자체가 방향 분석 결과(다음 스테이트)를 다른 캐릭터로 할당된 SE(124a)로 직접 전달할 수도 있다. That is, the SE 124a accesses the SID table 124d and analyzes the match ('1': match) information and the SID information, and then the PP 121a corresponding to the payload processor ID (PPID). To send. When the analyzed information is input, the PP 121a corresponds to the next character of the payload using the PPID (PP 121a) ID and the input SID (State ID) as the PSID (Pre-State ID). The transmission to 124a may be used to search for the final signature or PCRE, or the SE 124a itself may pass the direction analysis result (next state) directly to the SE 124a assigned to another character.

반대로, SE(124a)는 PSID_V 테이블(PSID_V table)(124b)의 PSID 비트가 '0'인 경우(bit of PSID_V table = '0'), 무브 테이블(Move Table)(124e) 중 PSID_V Table(124b)의 위치 비트 값과 매칭되는 위치 정보를 이용해 SID 정보를 PPID에 해당하는 PP(121a)로 전송한다.On the contrary, when the PSID bit of the PSID_V table 124b is '0' (bit of PSID_V table = '0'), the SE 124a of the PSID_V Table 124b is moved from the Move Table 124e. SID information is transmitted to the PP 121a corresponding to the PPID by using the location information matching the location bit value of.

여기서 무브 테이블(Move Table)(124e)은 PSID_V Table(124b)의 셀 격자(m×l)와 동일한 구조를 갖도록 형성됨으로써, SSEG(123)로부터 수신된 PSID(Pre-State ID)의 순번에 해당하는 PSID_V Table(124b) 상에서 PSID 비트가 '0'인 경우(bit of PSID_V table = '0')의 도 1a에서 상술한 NFA(Non-deterministic Finite Automata) 상에서 다음 스테이트 넘버가 없는 경우 초기 상태 SID인 스테이트 넘버(0)로의 복귀와, 입력된 PSID의 반복을 표현하기 위해 각 셀을 1비트(0 또는 1)로 생성할 수 있다. Here, the move table 124e is formed to have the same structure as the cell lattice m × l of the PSID_V table 124b, so that the move table 124e corresponds to the order of the PSID (pre-state ID) received from the SSEG 123. On the PSID_V Table 124b, if the PSID bit is '0' (bit of PSID_V table = '0') on the NFA (Non-deterministic Finite Automata) described above with reference to FIG. Each cell can be generated with one bit (0 or 1) to represent return to state number 0 and repetition of the input PSID.

SE(124a)는 무브 테이블(Move Table)(124e)에서 추출된 값이 '0'인 경우(bit of Move Table = '0') 정해진 초기 상태 SID를 PPID(Payload Processor ID)에 해당하는 PP(121a)로 전송하며, 무브 테이블(Move Table)(124e)에서 추출된 값이 '1'인 경우(bit of Move Table = '1') 입력된 PSID를 PPID(Payload Processor ID)에 해당하는 PP(121a)로 전송함으로써(Keep now state), 캐릭터별 메모리 분산을 통한 병목 현상 문제를 해결하면서도 기존의 NFA 및 DFA 방식과 동일한 기능을 수행할 수 있다. When the value extracted from the Move Table 124e is '0' (bit of Move Table = '0'), the SE 124a uses the PP corresponding to the Payload Processor ID (PPID). 121a), and when the value extracted from the Move Table 124e is '1' (bit of Move Table = '1'), the input PSID is PP corresponding to the Payload Processor ID (PPID). By transmitting to (Keep now state), it is possible to solve the bottleneck problem through memory distribution for each character while performing the same function as the existing NFA and DFA method.

이상과 같이, 본 명세서와 도면에는 본 발명의 바람직한 실시예에 대하여 개시하였으며, 비록 특정 용어들이 사용되었으나, 이는 단지 본 발명의 기술 내용을 쉽게 설명하고 발명의 이해를 돕기 위한 일반적인 의미에서 사용된 것이지, 본 발명의 범위를 한정하고자 하는 것은 아니다. 여기에 개시된 실시예 외에도 본 발명의 기술적 사상에 바탕을 둔 다른 변형 예들이 실시 가능하다는 것은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 자명한 것이다.As described above, the present specification and drawings have been described with respect to preferred embodiments of the present invention, although specific terms are used, it is only used in a general sense to easily explain the technical contents of the present invention and to help the understanding of the present invention. It is not intended to limit the scope of the present invention. It will be apparent to those skilled in the art that other modifications based on the technical idea of the present invention can be carried out in addition to the embodiments disclosed herein.

100 : 코드 프로세서(Code Processor)
110 : UIB(User Interface Block)
120 : SPB(Service Processing Block)
121 : PPG(Payload Processor Group)
121a : 페이로드 프로세서(Payload Processor)
122 : SE 테이블(Stats Engine Table)
130 : CCB(Code processor Control Block)
100: Code Processor
110: UIB (User Interface Block)
120: Service Processing Block (SPB)
121: Payload Processor Group (PPG)
121a: Payload Processor
122: Stats Engine Table
130: code processor control block (CCB)

Claims (12)

패킷(Packet), 페이로드(Payload) 또는 유저 데이터(user data)가 입력되면 파싱(parsing)하여 n-튜플(n-tuple)(n은 2 이상의 자연수)로 구분하고, 페이로드(Payload) 또는 유저 데이터(user data)를 각 캐릭터별 적어도 하나 이상이 설정된 스테이트 프로세싱(State Processing)을 통해 패턴(Pattern) 또는 PCRE 서칭(PCRE Searching)을 수행 후 수행 결과를 미리 설정된 포맷으로 변경하여 전송하는 시그니처 및 PCRE 탐색을 위한 코드 프로세서에 있어서,
Goto Table 상의 각 캐릭터열(c.r.)을 추출하여 재정렬하되 각 셀을 다음 진행할 스테이트 넘버(State Number) 또는 SID(State number ID)의 존재 여부를 알리기 위한 1 비트(1, 0)의 정보로 변환 생성된 "PSID_V 테이블(PSID_Valid table)(124b)", 그리고 PSID_V Table(124b) 상에서 PSID(Pre-State ID)를 활용해서 SID를 추출하기 위한 "VC_Table(124c)" 및 "SID Table(124d)"를 구비한 SE(State Engine)(124a)를 활용하는 것을 특징으로 하는 시그니처 및 PCRE 탐색을 위한 코드 프로세서.
When a packet, payload or user data is input, it is parsed and divided into n-tuples (n is a natural number of two or more), and a payload or A signature for performing a pattern or a PCRE search through state processing in which at least one user data is set for each character, and then changing the execution result to a predetermined format and transmitting the same. In the code processor for PCRE search,
Extracts and rearranges each character string (cr) on the Goto Table, and converts each cell to 1 bit (1, 0) of information to indicate whether or not there is a next state number or state number ID (SID). "PSID_Valid table 124b" and "VC_Table 124c" and "SID Table 124d" for extracting SIDs using PSID (Pre-State ID) on PSID_V Table 124b. Code processor for signature and PCRE search, characterized in that utilizing the provided state engine (SE) (124a).
청구항 1에 있어서,
각 캐릭터에 따른 스테이트 프로세싱을 처리하기 위한 스테이트 엔진(State Engine)(124a)이 미리 설정된 개수의 캐릭터로 할당되며, 각 캐릭터를 담당하는 스테이트 엔진(State Engine)(124a)에 있어서 미리 설정된 임계 액세스율 (access rate) 이상인 경우 적어도 2개 이상으로 할당되고, 하나의 캐릭터에 할당된 스테이트 엔진(State Engine)(124a)이 idle 상태인 경우 다른 캐릭터에 대한 분산 처리 프로세스를 수행할 수 있는 것을 특징으로 하는 시그니처 및 PCRE 탐색을 위한 코드 프로세서.
The method according to claim 1,
A state engine 124a for processing state processing according to each character is allocated to a predetermined number of characters, and a threshold access rate preset in the state engine 124a in charge of each character (access rate) or more are assigned to at least two, and when the state engine (124a) assigned to one character is idle state, it is possible to perform a distributed processing process for other characters Code processor for signature and PCRE traversal.
청구항 1에 있어서, 코드 프로세서(Code Processor)(100)는,
UIB(User Interface Block)(110)와 SPB(Service Processing Block)(120)를 포함하며, UIB(User Interface Block)(110)는,
외부 I/F(Interface)를 통해서 정보를 입력받아 PDB(Payload Distribute block)(112)에 전달하는 역할을 담당하는 PIB(Packet/Payload Interface Block)(111);
입력된 정보의 파싱(Parsing)을 수행하며, 페이로드(Payloa)를 페이로드 프로세서(Payload Processor, 'PP')(121a)에 할당하는 기능을 담당하는 PDB(Payload Distribute block)(112); 및
스테이트 엔진(State Engine)(124a : 124a-0 내지 124a-255)의 결과(Result)를 페이로드(Payload)별 소팅(sorting)하여 패킷(Package)화 하는 기능을 담당하는 RPB(Result Processor Block)(113); 구성되는 것을 특징으로 하는 시그니처 및 PCRE 탐색을 위한 코드 프로세서.
The method according to claim 1, Code Processor (Code Processor) 100,
The user interface block (UIB) 110 and the service processing block (SPB) 120, the user interface block (UIB) 110,
A PIB (Packet / Payload Interface Block) 111, which is responsible for receiving information through an external I / F (Interface) and delivering it to a Payload Distribute block (PDB) 112;
A Payload Distribute block (PDB) 112 which performs parsing of input information and is responsible for allocating a payload (Payloa) to a payload processor (PP) 121a; And
Result Processor Block (RPB) that is responsible for sorting the result of the state engine (124a: 124a-0 to 124a-255) by sorting the payloads by payload (113); Code processor for signature and PCRE search, characterized in that configured.
청구항 3에 있어서, SPB(Service Processing Block)(120)는,
PDB(112)로부터 페이로드(Payload) 또는 유저 데이터(user data)를 전달받아 시그니처/PCRE 매칭(Signature/Perl Compatible Regular Expressions Matching)을 진행하는 PPG(Payload Processor Group)(121) 블록;
PPG(121)과 SEG(State Engine Group)(124) 간의 스위칭(Switching) 기능을 담당하는 FSEG(First stage Switch Engine Group)(122) 및 SSEG(Second stage Switch Engine Group)(123) 블록; 및
유한 오토 머터(Finite Automata)에 의해 캐릭터별로 생성된 스테이트 트리(state tree) 정보를 통해서 PP(Payload Processor)(121a)에서 입력된 데이터(data)의 방향을 분석 후 전달하되, 방향 분석 결과(다음 스테이트)에 따른 캐릭터로 할당된 캐릭터별 스테이트 엔진(State Engine)(124a) 상호 간의 이동을 통해 최종적인 시그니처 또는 PCRE를 탐색하는 SEG(124) 블록; 을 포함하는 것을 특징으로 하는 시그니처 및 PCRE 탐색을 위한 코드 프로세서.
The method according to claim 3, Service Processing Block (SPB) 120,
A Payload Processor Group (PPG) block 121 that receives a payload or user data from the PDB 112 and performs Signature / Perl Compatible Regular Expressions Matching;
A first stage switch engine group (FSEG) 122 and a second stage switch engine group (SSEG) 123 that are responsible for a switching function between the PPG 121 and the state engine group (SEG) 124; And
After analyzing the direction of data input from the PP (Payload Processor) 121a through state tree information generated for each character by Finite Automata, the direction analysis result (next) A SEG 124 block for searching for a final signature or PCRE through movement between character state engines 124a assigned to characters according to states; Code processor for signature and PCRE search, characterized in that it comprises a.
청구항 4에 있어서,
코드 프로세서(Code Processor)(100)의 제어 및 상태 관리 담당하는 블록으로서 UIB(110)의 컨트롤 패스(control path)를 통하여 제어 통신을 수행하는 CCB(Code processor Control Block)(130); 를 더 포함하는 것을 특징으로 하는 시그니처 및 PCRE 탐색을 위한 코드 프로세서.
The method according to claim 4,
A code processor control block (CCB) 130 for performing control communication through a control path of the UIB 110 as a block in charge of control and state management of the code processor 100; Code processor for signature and PCRE search further comprising a.
시그니처 및 PCRE 탐색을 위한 코드 프로세서가 패킷(Packet), 페이로드(Payload) 또는 유저 데이터(user data)가 입력되면 파싱(parsing)하여 n-튜플(n-tuple)(n은 2 이상의 자연수)로 구분하는 제 1 단계; 및
시그니처 및 PCRE 탐색을 위한 코드 프로세서가 페이로드(Payload) 또는 유저 데이터(use data)를 각 캐릭터별 적어도 하나 이상이 설정된 스테이트 프로세싱(State Processing)을 통해 패턴(Pattern) 또는 PCRE 서칭(PCRE Searching)을 수행 후 수행 결과를 미리 설정된 포맷으로 변경하여 전송하는 제 2 단계; 를 포함하며,
상기 제 2 단계는, 시그니처 및 PCRE 탐색을 위한 코드 프로세서가,
Goto Table 상의 각 캐릭터열(c.r.)을 추출하여 재정렬하되 각 셀을 다음 진행할 스테이트 넘버(State Number) 또는 SID(State number ID)의 존재 여부를 알리기 위한 1 비트(1, 0)의 정보로 변환 생성된 "PSID_V 테이블(PSID_Valid table)(124b)", 그리고 PSID_V Table(124b) 상에서 PSID(Pre-State ID)를 활용해서 SID를 추출하기 위한 "VC_Table(124c)" 및 "SID Table(124d)"를 구비한 SE(State Engine)(124a)를 활용하는 것을 특징으로 하는 시그니처 및 PCRE 탐색 방법.
The code processor for signature and PCRE search is parsed when a packet, payload or user data is input, and n-tuple (n is a natural number of two or more). A first step of dividing; And
The code processor for signature and PCRE search performs pattern or PCRE search through state processing in which at least one payload or user data is set for each character. A second step of changing a performance result to a preset format after the performance and transmitting the result; Including;
In the second step, the code processor for signature and PCRE search,
Extracts and rearranges each character string (cr) on the Goto Table, and converts each cell to 1 bit (1, 0) of information to indicate whether or not there is a next state number or state number ID (SID). "PSID_Valid table 124b" and "VC_Table 124c" and "SID Table 124d" for extracting SIDs using PSID (Pre-State ID) on PSID_V Table 124b. Signature and PCRE search method characterized in that using the provided state engine (SE) (124a).
청구항 6에 있어서, 상기 제 2 단계는,
각 캐릭터별 스테이트 프로세싱을 처리하기 위한 스테이트 엔진(State Engine)(124a)이 미리 설정된 개수의 캐릭터로 할당되며, 각 캐릭터를 담당하는 스테이트 엔진(State Engine)(124a)에 있어서 미리 설정된 임계 액세스율 (access rate) 이상인 경우 적어도 2개 이상으로 할당되고, 하나의 캐릭터에 할당된 스테이트 엔진(State Engine)(124a)이 idle 상태인 경우 다른 캐릭터에 대한 분산 처리 프로세스를 수행할 수 있는 것을 특징으로 하는 시그니처 및 PCRE 탐색 방법.
The method of claim 6, wherein the second step,
A state engine 124a for processing the state processing for each character is assigned to a predetermined number of characters, and a threshold access rate set in advance in the state engine 124a in charge of each character access rate) or more, and at least two signatures are assigned, and when the state engine (124a) assigned to one character is idle, the signature may be performed by a distributed processing process for another character. And how to navigate the PCRE.
청구항 7에 있어서, 상기 제 1 단계는,
외부 I/F(Interface)를 통해서 정보 입력이 수행되는 제 1-1 단계; 및
입력된 정보의 파싱(Parsing)을 수행하며, 페이로드(Payloa)를 페이로드 프로세서(Payload Processor, 'PP')(121a)에 할당되는 제 1-2 단계; 를 포함하는 것을 특징으로 하는 시그니처 및 PCRE 탐색 방법.
The method of claim 7, wherein the first step,
A first step in which information is input through an external I / F (Interface); And
Performing a parsing of the input information and assigning a payload to a payload processor (PP) 121a; Signature and PCRE search method comprising a.
청구항 8에 있어서, 상기 제 2 단계는,
페이로드(Payload) 또는 유저 데이터(user data)를 전달받아 시그니처/PCRE 매칭(Signature/Perl Compatible Regular Expressions Matching)을 진행하는 제 2-1 단계; 및
유한 오토 머터(Finite Automata)에 의해 캐릭터별로 생성된 스테이트 트리(state tree) 정보를 통해서 PP(Payload Processor)(121a)에서 입력된 데이터(data)의 방향을 분석 후 전달하되, 방향 분석 결과(다음 스테이트)에 따른 캐릭터로 할당된 캐릭터별 스테이트 엔진(State Engine)(124a) 상호 간의 이동을 통해 최종적인 시그니처 또는 PCRE를 탐색하는 는 제 2-2 단계; 를 포함하는 것을 특징으로 하는 시그니처 및 PCRE 탐색 방법.
The method of claim 8, wherein the second step,
A second step of receiving a payload or user data and performing signature / perl compatible regular expressions matching; And
After analyzing the direction of data input from the PP (Payload Processor) 121a through state tree information generated for each character by Finite Automata, the direction analysis result (next) Searching for a final signature or PCRE by moving between state engines (124a) for each character assigned to the character according to the state; Signature and PCRE search method comprising a.
삭제delete 청구항 1에 있어서, PSID_V 테이블(PSID_Valid table)(124b)은,
Goto Table 상의 수직 직선 형태로 배열된 각 캐릭터열(c.r.)을 PSID_Valid table(124b)과 같이 셀 격자(m×l)로 재구성한 형태를 갖는 것을 특징으로 하는 시그니처 및 PCRE 탐색을 위한 코드 프로세서.
The method according to claim 1, PSID_V table (PSID_Valid table) 124b,
A code processor for retrieving signatures and PCRE, characterized in that each character string (cr) arranged in a vertical straight line on a Goto Table has a form reconstructed into a cell grid (m × l) such as a PSID_Valid table (124b).
청구항 1에 있어서,
PSID_V Table(124b)의 셀 격자(m×l)와 동일한 구조를 갖도록 형성되어, SSEG(123)로부터 수신된 PSID(Pre-State ID)의 순번에 해당하는 PSID_V Table(124b) 상에서 PSID 비트가 '0'인 경우(bit of PSID_V table = '0')의 다음 스테이트 넘버가 없는 경우 초기 상태 SID인 스테이트 넘버(0)로의 복귀와, 입력된 PSID의 반복을 표현하기 위해 각 셀을 1비트(0 또는 1)로 생성할 수 있도록 하는 무브 테이블(Move Table)(124e)이 더 구비되는 것을 특징으로 하는 시그니처 및 PCRE 탐색을 위한 코드 프로세서.
The method according to claim 1,
It is formed to have the same structure as the cell grid (m × l) of the PSID_V Table 124b, and the PSID bit on the PSID_V Table 124b corresponding to the sequence number of the PSID (Pre-State ID) received from the SSEG 123 is' If there is no next state number of 0 '(bit of PSID_V table =' 0 '), each cell has 1 bit (0) to express return to state number 0, which is the initial state SID, and the repetition of the input PSID. Or 1) a move table (Move Table) 124e which can be generated as 1).
KR1020180001814A 2018-01-05 2018-01-05 Code processor for signature and PCRE search, and method for searching signature and PCRE using the same KR102055494B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180001814A KR102055494B1 (en) 2018-01-05 2018-01-05 Code processor for signature and PCRE search, and method for searching signature and PCRE using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180001814A KR102055494B1 (en) 2018-01-05 2018-01-05 Code processor for signature and PCRE search, and method for searching signature and PCRE using the same

Publications (2)

Publication Number Publication Date
KR20190083861A KR20190083861A (en) 2019-07-15
KR102055494B1 true KR102055494B1 (en) 2019-12-12

Family

ID=67257834

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180001814A KR102055494B1 (en) 2018-01-05 2018-01-05 Code processor for signature and PCRE search, and method for searching signature and PCRE using the same

Country Status (1)

Country Link
KR (1) KR102055494B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101378115B1 (en) * 2012-11-01 2014-03-27 한국전자통신연구원 Intrusion detection apparatus and method using pattern matching technology based on perl compatible regular expressions

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8347384B1 (en) * 2007-07-31 2013-01-01 Hewlett-Packard Development Company, L.P. Methods and systems for using incremental operation for processing regular expressions in intrusion-prevention systems
KR101537996B1 (en) * 2012-10-17 2015-07-23 한국전자통신연구원 Apparatus and method for intrusion detection with traffic condition load balancer between cpu and gpu

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101378115B1 (en) * 2012-11-01 2014-03-27 한국전자통신연구원 Intrusion detection apparatus and method using pattern matching technology based on perl compatible regular expressions

Also Published As

Publication number Publication date
KR20190083861A (en) 2019-07-15

Similar Documents

Publication Publication Date Title
CN112468370B (en) High-speed network message monitoring and analyzing method and system supporting custom rules
US9514246B2 (en) Anchored patterns
US9858051B2 (en) Regex compiler
US8220048B2 (en) Network intrusion detector with combined protocol analyses, normalization and matching
AU2003277248B2 (en) Intrusion detection accelerator
US8774194B2 (en) Method and apparatus for a high-speed frame tagger
US7602780B2 (en) Scalably detecting and blocking signatures at high speeds
US7098815B1 (en) Method and apparatus for efficient compression
CN104426909A (en) Generating a non-deterministic finite automata (NFA) graph for regular expression patterns with advanced features
CN105337991A (en) Integrated message flow searching and updating method
WO2013123452A1 (en) System for finding code in a data flow
CA2936605C (en) Method and apparatus for generating a plurality of indexed data fields
CN112507336A (en) Server-side malicious program detection method based on code characteristics and flow behaviors
US20140041030A1 (en) System for finding code in a data flow
KR102055494B1 (en) Code processor for signature and PCRE search, and method for searching signature and PCRE using the same
KR101123846B1 (en) Traffic logging and search method, and a firewall system using the same
US7661138B1 (en) Finite state automaton compression
CN112583827A (en) Data leakage detection method and device
KR101079815B1 (en) Signature clustering method based grouping attack signature by the hashing
CN110543548B (en) Multi-keyword rapid matching method and matching system for communication content of Internet of things equipment
KR102562765B1 (en) IP Band Information Extraction System And Method Thereof
KR102055326B1 (en) Network intrusion detection system based on accessing memory with character distributed type, and method thereof
US11929837B2 (en) Rule compilation schemes for fast packet classification
JP2006505043A (en) Hardware parser accelerator
Park et al. A lightweight software model for signature-based application-level traffic classification system

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