WO2023195697A1 - 고속 패킷 검색 방법 및 장치 - Google Patents

고속 패킷 검색 방법 및 장치 Download PDF

Info

Publication number
WO2023195697A1
WO2023195697A1 PCT/KR2023/004419 KR2023004419W WO2023195697A1 WO 2023195697 A1 WO2023195697 A1 WO 2023195697A1 KR 2023004419 W KR2023004419 W KR 2023004419W WO 2023195697 A1 WO2023195697 A1 WO 2023195697A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
index
search
field
node
Prior art date
Application number
PCT/KR2023/004419
Other languages
English (en)
French (fr)
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 (주)쿼드마이너
Publication of WO2023195697A1 publication Critical patent/WO2023195697A1/ko

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
    • 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/901Indexing; Data structures therefor; Storage structures
    • 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/901Indexing; Data structures therefor; Storage structures
    • G06F16/9014Indexing; Data structures therefor; Storage structures hash tables
    • 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/901Indexing; Data structures therefor; Storage structures
    • G06F16/9017Indexing; Data structures therefor; Storage structures using directory or table look-up
    • G06F16/902Indexing; Data structures therefor; Storage structures using directory or table look-up using more than one table in sequence, i.e. systems with three or more layers
    • 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
    • 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/90348Query processing by searching ordered data, e.g. alpha-numerically ordered data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/695Types of network addresses using masks or ranges of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Definitions

  • This disclosure relates to a high-speed packet search method and apparatus. More specifically, it relates to a method and device that can quickly search for packets matching search conditions in an environment where network detection and response technology based on full packet analysis is applied.
  • Network Detection and Response based on full packet collection and analysis, is a technology that can detect and respond to threats by collecting and analyzing all packets coming in and out of a company's network at high speed.
  • the problem that the present disclosure aims to solve is to provide a high-speed packet search method and device that can quickly search for packets meeting search conditions in a large amount of data called full packets.
  • a high-speed packet search method is a method of high-speed searching for packets corresponding to search conditions among packets collected in a network, and includes data specialized for the search conditions. creating and storing it in a database; and searching for packets corresponding to the entered search conditions based on the stored data.
  • a high-speed packet device includes one or more processors; and one or more memories configured to store instructions that cause the one or more processors to perform an operation, wherein the operation is performed to quickly search for packets matching search conditions among packets collected from the network. , generating data specialized for the search conditions and storing it in a database; and searching for packets corresponding to the entered search conditions based on the stored data.
  • packets matching search conditions can be searched at high speed from a large amount of data called full packets, thereby reducing the time required for a company's security manager to recognize and respond to a cyber attack.
  • FIG. 1 is a diagram illustrating the configuration of a high-speed packet search device according to an embodiment of the present disclosure.
  • Figure 2 is a diagram illustrating a meta table according to an embodiment of the present disclosure.
  • Figure 3 is a diagram illustrating a meta description table according to an embodiment of the present disclosure.
  • Figure 4 is a diagram illustrating an IP index table according to an embodiment of the present disclosure.
  • FIG. 5 is a diagram for explaining a search process using the IP index table of FIG. 4.
  • Figure 6 is a diagram illustrating an LPM table according to an embodiment of the present disclosure.
  • Figure 7 is a diagram illustrating a conversion table including URL and constant values of URL, according to an embodiment of the present disclosure.
  • Figure 8 is a diagram illustrating a hash table according to an embodiment of the present disclosure.
  • Figure 9 is a flow chart illustrating a high-speed packet search method according to an embodiment of the present disclosure.
  • FIG. 1 is a diagram illustrating the configuration of a high-speed packet search device 100 according to an embodiment of the present disclosure.
  • the high-speed packet search device 100 uses a database specialized for the packet search function instead of a relational database management system (RDBMS) with various functions.
  • a database specialized for search conditions such as IP and URL is used, among various search conditions such as IP (Internet Protocol), port, URL (Uniform Resource Locator), applications, and files.
  • IP Internet Protocol
  • URL Uniform Resource Locator
  • the high-speed packet search device 100 includes a meta table generator 110, a meta description table generator 120, an IP index table generator 130, an LPM table generator 140, and a conversion table. It includes a creation unit 150, a hash table creation unit 160, a database 170, and a control unit 180.
  • the meta table creation unit 110, meta description table creation unit 120, and IP index table creation unit 130 may operate as a first search engine.
  • the first search engine When IPs less than the standard number are input as search conditions, the first search engine generates data necessary to quickly search packets corresponding to the input IPs and stores them in the database 170.
  • the meta table creation unit 110 and the LPM table creation unit 140 may operate as a second search engine.
  • the second search engine generates the data necessary to determine at high speed whether the IP of the packet collected from the network is included in the input IP list when a large number of IP lists exceeding the standard number are input as search conditions and creates a database ( 170) and save it.
  • the conversion table generator 150 and the hash table generator 160 may operate as a third search engine.
  • the third search engine When a URL is entered as a search condition, the third search engine generates data necessary to quickly search packets corresponding to the entered URL and stores it in the database.
  • the control unit 180 determines the type and/or number of search conditions entered. For example, it is determined whether the entered search condition is IP or URL. If the entered search condition is IP, it is determined whether IPs less than the standard number have been entered or whether a large IP list has been entered. Based on this determination result, the control unit 180 can select data to be used for search from among the data stored in the database 170.
  • FIG. 1 the components shown in FIG. 1 will be described in more detail.
  • the meta table generator 110 sorts the collected packets based on IP and creates a meta table as illustrated in FIG. 2. Referring to Figure 2, it can be seen that the IPs are sorted in ascending order, and the sorted IPs are assigned a primary index, which is a number indicating the location in the meta table. Additionally, since the meta table sorts all collected packets based on IP, you can see that the same IP appears repeatedly. Hereinafter, for convenience of explanation, a group consisting of identical IPs is referred to as 'same IP section'.
  • the meta description table generator 120 extracts the IP located first and the primary index of the IP from each identical IP section of the meta table and generates a meta description table as illustrated in FIG. 3. .
  • the first IPs extracted from each identical IP section are sorted based on the primary index.
  • the sorted IPs are assigned a secondary index, which is a number indicating the location in the meta description table.
  • the IP index table generator 130 creates an IP index table as illustrated in FIG. 4 based on the meta description table.
  • the IP index table is used to quickly search the secondary index within the meta description table in relation to the IP to be searched.
  • IP is divided into IPv4 system and IPv6 system. According to the IPv4 system, one IP is expressed as a 3-digit number in 4 words. Each measure is called an octet, and is internally processed as 32 bits (8 bits for each measure). For example, 192.168.123.123 is displayed as 11000000.10101000.1111011.1111011.
  • IP is divided into classes A, B, C, D, and E depending on the band.
  • Class A is used in large-scale network environments, where 8 bits of the first node represent the network ID, and 24 bits of the second to fourth nodes represent the host ID.
  • Class B is used in a medium-scale network environment, where 16 bits of the first and second nodes represent the network ID, and 16 bits of the third and second nodes represent the host ID.
  • C class is used in small network environments, where 24 bits of the first to third nodes represent the network ID, and 8 bits of the fourth node represent the host ID.
  • D class is used for multicasting.
  • the E class is a class reserved for research/development or future use and is not used for general purposes.
  • the IPv4 class classification described above is shown in Table 1.
  • the basic unit of the IP index table consists of four fields. Specifically, the basic unit is configured to include a class field, value field, index field, and jump field, and these basic units are gathered to form an IP index table. Each basic unit may be assigned a tertiary index, which is a number indicating the position in the IP index table.
  • an index indicating the location of the octet of the IP is recorded. That is, an index indicating the location of each node is recorded.
  • the first to third nodes among the four nodes represent the network ID. Therefore, an index is needed to distinguish the first to third bars.
  • the index for the first measure may be set to '0'
  • the index for the second measure may be set to '1'
  • the index for the third measure may be set to '2'.
  • the value of the node corresponding to the index of the class field is recorded in the value field. For example, if 0 is recorded in the class field, the value of the first node of the IP is recorded in the value field. If 1 is recorded in the class field, the value of the second node of the IP is recorded in the value field.
  • the secondary index related to the value recorded in the value field among the secondary indexes of the meta description table is recorded. If there is no related secondary index, '0' may be recorded in the index field.
  • the tertiary index of the basic unit where the value to be compared next is recorded is recorded.
  • Figure 4 shows the case where each basic unit is aligned vertically, but the basic units may be aligned horizontally or in a matrix form.
  • the created IP index table may be stored in the database 170.
  • FIG. 5 is a diagram for explaining a process of searching for a specific IP using the IP index table illustrated in FIG. 4.
  • the basic unit whose tertiary index is '0' in the IP index table is referenced first.
  • the answer is 'Is the value of the first node 1?' Since the value of the first node in the IP entered as a search condition is '1', it matches the value '1' recorded in the value field.
  • '0' is recorded in the index field of the referenced basic unit. This means that there is no secondary index in the meta description table. Therefore, the basic unit to which the tertiary index of the following order is assigned is referred to. In other words, the basic unit whose tertiary index is '1' is referred to.
  • the answer is 'Is the value of the second node 1?' Since the value of the second node in the IP entered as the search condition is '2', it does not match the value '1' recorded in the value field. If the values do not match like this, check the jump field of the referenced basic unit. You can see that '4' is written in the jump field. This means that the basic units with a tertiary index of '2' and '3' should be skipped, and the basic unit with a tertiary index of '4' should be skipped. As a result, the basic unit with the tertiary index '4' is referenced.
  • the answer is 'Is the value of the second node 2?' Since the value of the second node in the IP entered as a search condition is '2', it matches the value '2' recorded in the value field. However, you can see that '0' is recorded in the index field of the referenced basic unit. This means that there is no secondary index in the meta description table. Therefore, the basic unit to which the tertiary index of the following order is assigned is referred to. In other words, the basic unit whose tertiary index is '5' is referenced.
  • the answer is 'Is the value of the third node 1?' Since the value of the third node in the IP entered as the search condition is '1', it matches the value '1' recorded in the value field. However, you can see that '30' is recorded in the index field of the referenced basic unit. In this way, if there is a value recorded in the index field, the corresponding value is obtained.
  • the secondary index equal to '30', which is the value obtained from the index field, is searched within the meta description table.
  • the primary index corresponding to the secondary index is obtained.
  • the primary index '200' corresponds to the secondary index '30'.
  • the LPM table generator 140 converts the IP list exceeding the standard number into an LPM (Longest Prefix Matching) table.
  • the LPM table has 256 cells arranged along the horizontal direction.
  • the 256 cells arranged along the horizontal direction are referred to as 'standard rows'.
  • the 256 cells included in the standard row are assigned indices of 0 to 255 (hereinafter referred to as 'horizontal indices').
  • Each cell can have one value between 0 and 1.
  • the value of a cell having the same horizontal index as the value of the first node of the IP included in the IP list is set to '1'.
  • the IP list includes the following IPs:
  • the values of the first measure are 192 and 193. Accordingly, among the cells in the reference row, the values of a cell with a horizontal index of '192' and a cell with a horizontal index of '193' may each be set to 1. The values of all remaining cells can be set to 0.
  • indices corresponding to the value range of the first node indexes corresponding to the value range of the second node, and indices corresponding to the value range of the third node ( Hereinafter referred to as 'vertical index'). If the IPs included in the IP list correspond to the C class, the value of the first node ranges from 192 to 223. And the range of the second and third node values is 0 to 255, respectively.
  • cells arranged along the vertical direction have vertical indices of 192 to 223 corresponding to the value range of the first node, vertical indices of 0 to 255 corresponding to the value range of the second node, and vertical indexes of 0 to 255 corresponding to the value range of the second node. Vertical indices from 0 to 255 corresponding to the value range are sequentially assigned.
  • an LPM table as shown in FIG. 6 is created. Since the value of the first node of IP is 192, the value of the cell with a horizontal index of 192 among the cells in the standard row is set to 1 (cells with a value of 1 are displayed in a different color from the remaining cells with a value of 0) ). And when the value of the first node is 192, the value of the second node is 168, so the row with a vertical index of 192 is selected among the vertical indices corresponding to the value range of the first node, and the cells belonging to the selected row are selected. Among them, the value of the cell with horizontal index 168 is set to 1.
  • the value of the cell with a horizontal index of 10 is set to 1.
  • the value of the third node is 10
  • the value of the fourth node is 232
  • the row with a vertical index of 10 is selected among the vertical indices corresponding to the value range of the third node, and the row belonging to the selected row is selected.
  • the value of the cell with a horizontal index of 232 is set to 1.
  • the value of the first node of the IP is searched. Since the value of the cell with horizontal index 192 in the standard row of the LPM table is 1, the value of the first node is determined to exist in the LPM table. Therefore, a query is made for the value of the second node.
  • the value of the cell with a vertical index of 192 and a horizontal index of 168 is 1, so the value of the second node is determined to exist in the LPM table. do. Therefore, a query is made for the value of the third node.
  • the value of the cell with a vertical index of 168 and a horizontal index of 10 is 1, so the value of the third node is determined to exist in the LPM table. do. Therefore, the value of the fourth node is searched.
  • the vertical indexes corresponding to the value range of the third node in the LPM table the vertical index is 10 and the value of the cell with the horizontal index 232 is 1, so the value of the fourth node is the value of the cell where the LPM table exists. It is judged that In this way, whether the IP is included in the IP list can be determined through a total of four comparison processes, so the number of comparisons can be significantly reduced compared to the conventional method.
  • n IPs obtained from the collected packets and the black IP list already held by the company is m
  • n x m comparisons must be performed.
  • the LPM table according to an embodiment of the present disclosure only a minimum of nx1 to a maximum of nx4 comparisons need to be performed, so the number of comparisons is greatly reduced. And search speed improves as the number of comparisons decreases.
  • the conversion table generator 150 converts the URL of the collected packets into a constant value.
  • URLs have a text format with an unspecified length, and converting these URLs into constant values means assigning an ID to the URL.
  • ID may mean Primary Key (PK).
  • PK Primary Key
  • the hash table generator 160 generates a hash table of a standard size based on the constant value.
  • the reference size may be, for example, 65536.
  • the reference size is not limited to the illustrated size, and may be smaller or larger than the illustrated size.
  • the standard size is 65536 will be used as an example.
  • Figure 8 is a diagram illustrating a hash table according to an embodiment of the present disclosure.
  • the hash table includes a hash index and cumulative value.
  • the hash index is determined by the remainder when the URL ID is divided by 65536. Therefore, the hash index ranges from 0 to 65535. IDs with the same hash index are sequentially recorded in the hash index.
  • Figure 9 is a flow chart illustrating a high-speed packet search method according to an embodiment of the present disclosure.
  • search conditions include IP and URL.
  • IPs IPs less than the standard number may be used as search conditions, or IP lists greater than the standard number may be used as search conditions. For example, a black IP list containing more than 1 million IP addresses already secured by a company may be used as a search condition.
  • data specialized for IP search below the standard number include meta tables, meta description tables, and IP index tables.
  • An example of data specialized for IP list search is the LPM table.
  • data specialized for URL search include conversion tables containing URLs and constant values of URLs, and hash tables.
  • the IP index table, meta description table, and meta table may be selected from the data stored in the database 170.
  • the value of each node of the IP entered as a search condition is compared with the value determined by the class field and value field of the standard unit of the IP index table. If the two values match as a result of the comparison, the secondary index and primary index are searched from the meta description table using the value of the index field of the standard unit. If the two values do not match as a result of the comparison, it jumps to the standard unit indicated by the value of the jump field of the standard unit. Using the value of the jump field like this reduces the number of comparisons, and the search speed improves as the number of comparisons decreases.
  • step S920 if the input search condition is a large IP list, the LPM table may be selected from data stored in the database. Then, the value of each node of the large IP list is compared with the value of each cell of the LPM table. During the comparison process, if it is determined that the value of each node of the IP list is not recorded in the LPM table, the comparison process is immediately stopped.
  • step S920 if the input search condition is URL, the conversion table and hash table stored in the database may be selected. Referring to the conversion table, the ID corresponding to the URL entered as the search condition is searched. Afterwards, when the remainder when the searched ID is divided by 65536 is calculated, a hash index with the same value as the calculated value and the corresponding cumulative value can be obtained from the hash table.
  • a module refers to software or hardware components such as a Field Programmable Gate Array (FPGA) or Application Specific Integrated Circuit (ASIC), and the module performs certain roles.
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • module is not limited to software or hardware.
  • a module may be configured to reside on an addressable storage medium and may be configured to execute on one or more processors.
  • a module may contain components such as software components, object-oriented software components, class components, and task components, as well as processes, functions, properties, procedures, and subroutines. , segments of program code, drivers, firmware, microcode, circuitry, data, databases, data structures, tables, arrays, and variables.
  • components and modules may be combined into smaller numbers of components and modules or may be further separated into additional components and modules.
  • the disclosed embodiments may be implemented in the form of a recording medium that stores instructions executable by a computer. Instructions may be stored in the form of program code, and when executed by a processor, may create program modules to perform operations of the disclosed embodiments.
  • the recording medium may be implemented as a computer-readable recording medium.
  • Computer-readable recording media include all types of recording media storing instructions that can be decoded by a computer. For example, there may be read only memory (ROM), random access memory (RAM), magnetic tape, magnetic disk, flash memory 200, optical data storage device, etc.
  • ROM read only memory
  • RAM random access memory
  • magnetic tape magnetic tape
  • magnetic disk magnetic disk
  • flash memory 200 optical data storage device
  • computer-readable recording media may be provided in the form of non-transitory storage media.
  • 'non-transitory storage medium' simply means that it is a tangible device and does not contain signals (e.g. electromagnetic waves). This term refers to cases where data is semi-permanently stored in a storage medium and temporary storage media. It does not distinguish between cases where it is stored as .
  • a 'non-transitory storage medium' may include a buffer where data is temporarily stored.
  • methods according to various embodiments disclosed in this document may be included and provided in a computer program product.
  • Computer program products are commodities and can be traded between sellers and buyers.
  • the computer program product may be distributed in the form of a machine-readable recording medium (e.g. compact disc read only memory (CD-ROM)) or via an application store (e.g. Play StoreTM) or on two user devices (e.g. It may be distributed directly between smartphones (e.g. smartphones) or distributed online (e.g. downloaded or uploaded).
  • a machine-readable recording medium e.g. compact disc read only memory (CD-ROM)
  • an application store e.g. Play StoreTM
  • two user devices e.g. It may be distributed directly between smartphones (e.g. smartphones) or distributed online (e.g. downloaded or uploaded).
  • a computer program product e.g., a downloadable app
  • a machine-readable recording medium such as the memory of a manufacturer's server, an application store's server, or a relay server. It can be stored or created temporarily.
  • the high-speed packet search method and device described above can be applied to the field of network detection and response technology based on full packet analysis.

Landscapes

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

Abstract

본 개시의 일 실시 예에 따른 고속 패킷 검색 방법은 네트워크에서 수집된 패킷들 중에서 검색 조건에 해당하는 패킷을 고속으로 검색하는 방법에 있어서, 상기 검색 조건에 특화된 데이터를 생성하여 데이터베이스에 저장하는 단계; 및 상기 검색 조건이 입력되면, 상기 저장된 데이터에 기초하여, 상기 입력된 검색 조건에 해당하는 패킷을 검색하는 단계를 포함한다.

Description

고속 패킷 검색 방법 및 장치
본 개시는 고속 패킷 검색 방법 및 장치에 관한 것이다. 더욱 상세하게는 풀 패킷 분석 기반의 네트워크 탐지 및 대응(Network Detection and Response) 기술이 적용된 환경에서 검색 조건에 해당하는 패킷을 고속으로 검색할 수 있는 방법 및 장치에 관한 것이다.
풀 패킷 수집 및 분석 기반의 네트워크 탐지 및 대응 기술(Network Detection and Response)은 기업의 네트워크를 통해 들어오고 나가는 모든 패킷을 고속으로 수집 및 분석해 위협을 발견하고 대응할 수 있는 기술이다.
풀 패킷 수집 및 분석 기반의 네트워크 탐지 및 대응 기술에 따르면, 기업의 내부 직원에 의한 비정상적인 행위 분석은 물론 기업에서 운영하고 있는 서비스에서 발생할 수 있는 보안위협 분석까지 가능하다.
이러한 장점에도 불구하고 풀 패킷(full packet)이라는 대량의 데이터에서 원하는 패킷을 검색하는데에는 여전히 상당한 시간이 소요되고 있는 실정이다.
본 개시가 해결하고자 하는 과제는 풀 패킷이라는 대량의 데이터에서 검색 조건에 해당하는 패킷을 고속으로 검색할 수 있는 패킷 고속 검색 방법 및 장치를 제공하는 것이다.
본 개시가 해결하고자 하는 과제들은 이상에서 언급한 과제들로 제한되지 않으며, 언급되지 않은 또 다른 과제들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.
상술한 과제를 해결하기 위하여, 본 개시의 일 실시 예에 따른 고속 패킷 검색 방법은, 네트워크에서 수집된 패킷들 중에서 검색 조건에 해당하는 패킷을 고속으로 검색하는 방법에 있어서, 상기 검색 조건에 특화된 데이터를 생성하여 데이터베이스에 저장하는 단계; 및 상기 저장된 데이터에 기초하여, 입력된 검색 조건에 해당하는 패킷을 검색하는 단계를 포함한다.
상술한 과제를 해결하기 위하여, 본 개시의 일 실시 예에 따른 고속 패킷 장치는, 하나 이상의 프로세서; 및 상기 하나 이상의 프로세서가 작업(operation)을 수행하도록 하는 인스트럭션들을 저장하도록 구성되는 하나 이상의 메모리를 포함하고, 상기 작업은, 네트워크에서 수집된 패킷들 중에서 검색 조건에 해당하는 패킷을 고속으로 검색하기 위하여, 상기 검색 조건에 특화된 데이터를 생성하여 데이터베이스에 저장하는 것; 및 상기 저장된 데이터에 기초하여, 입력된 검색 조건에 해당하는 패킷을 검색하는 것을 포함한다.
기타 실시예들의 구체적인 사항들은 상세한 설명 및 도면들에 포함되어 있다.
본 개시의 실시 예들에 따르면, 풀 패킷이라는 대량의 데이터에서 검색 조건에 해당하는 패킷을 고속으로 검색할 수 있으므로, 기업의 보안 관리자가 사이버 공격을 인지하고 대응하는데 소요되는 시간을 단축시킬 수 있다.
본 개시의 효과들은 이상에서 언급된 효과로 제한되지 않으며, 언급되지 않은 또 다른 효과들은 아래의 기재로부터 통상의 기술자에게 명확하게 이해될 수 있을 것이다.
도 1은 본 개시의 실시 예에 따른 고속 패킷 검색 장치의 구성을 도시한 도면이다.
도 2는 본 개시의 실시 예에 따른 메타 테이블을 예시한 도면이다.
도 3은 본 개시의 실시 예에 따른 메타 디스크립션 테이블을 예시한 도면이다.
도 4는 본 개시의 실시 예에 따른 IP 인덱스 테이블을 예시한 도면이다.
도 5는 도 4의 IP 인덱스 테이블을 이용한 검색 과정을 설명하기 위한 도면이다.
도 6은 본 개시의 실시 예에 따른 LPM 테이블을 예시한 도면이다.
도 7은 본 개시의 실시 예에 따른, URL 및 URL의 상수화된 값을 포함하는 변환 테이블을 예시한 도면이다.
도 8은 본 개시의 실시 예에 따른 해시 테이블을 예시한 도면이다.
도 9는 본 개시의 실시 예에 따른 고속 패킷 검색 방법을 도시한 순서도이다.
본 개시의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시 예들을 참조하면 명확해질 것이다. 그러나 본 개시는 이하에서 게시되는 실시 예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있다. 단지 본 실시 예들은 본 개시가 완전하도록 하고, 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 개시는 청구항의 범주에 의해 정의될 뿐이다.
다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있을 것이다. 또 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다.
본 명세서에서 사용된 용어는 실시 예들을 설명하기 위한 것이며 본 개시를 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 출입문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 및/또는 "포함하는(comprising)"은 언급된 구성요소 외에 하나 이상의 다른 구성요소의 존재 또는 추가를 배제하지 않는다.
이하, 첨부된 도면들을 참조하여 본 개시의 실시 예들을 설명한다. 도면에서 동일한 도면 부호는 동일한 구성요소를 나타낸다.
도 1은 본 개시의 실시 예에 따른 고속 패킷 검색 장치(100)의 구성을 도시한 도면이다.
본 개시의 실시 예에 따른 고속 패킷 검색 장치(100)는 다양한 기능을 갖는 관계형 데이터베이스(Relational Database Management System, RDBMS) 대신 패킷 검색 기능에 특화된 데이터베이스를 사용한다. 특히, IP(Internet Protocol), 포트, URL(Uniform Resource Locator), 어플리케이션 및 파일 등의 다양한 검색 조건들 중에서도 IP 및 URL이라는 검색 조건에 특화된 데이터베이스를 사용한다.
도 1을 참조하면, 고속 패킷 검색 장치(100)는 메타 테이블 생성부(110), 메타 디스크립션 테이블 생성부(120), IP 인덱스 테이블 생성부(130), LPM 테이블 생성부(140), 변환 테이블 생성부(150), 해시 테이블 생성부(160), 데이터베이스(170) 및 제어부(180)를 포함한다.
도 1에 도시된 구성요소들 중에서 메타 테이블 생성부(110), 메타 디스크립션 테이블 생성부(120), IP 인덱스 테이블 생성부(130)는 제1 검색 엔진으로써 동작할 수 있다. 제1 검색 엔진은 검색 조건으로써, 기준 개수 미만의 IP가 입력되는 경우, 입력된 IP에 해당하는 패킷을 고속으로 검색하는데 필요한 데이터를 생성하여 데이터베이스(170)에 저장한다.
도 1에 도시된 구성요소들 중에서 메타 테이블 생성부(110) 및 LPM 테이블 생성부(140)는 제2 검색 엔진으로서 동작할 수 있다. 제2 검색 엔진은 검색 조건으로써, 기준 개수 이상의 대량의 IP 리스트가 입력되는 경우, 네트워크에서 수집된 패킷의 IP가 입력된 IP 리스트에 포함되는지의 여부를 고속으로 판단하는데 필요한 데이터를 생성하여 데이터베이스(170)에 저장한다.
도 1에 도시된 구성요소들 중에서 변환 테이블 생성부(150) 및 해시 테이블 생성부(160)는 제3 검색 엔진으로서 동작할 수 있다. 제3 검색 엔진은 검색 조건으로써, URL이 입력되는 경우, 입력된 URL에 해당하는 패킷을 고속으로 검색하는데 필요한 데이터를 생성하여 데이터베이스에 저장한다.
제어부(180)는 입력된 검색 조건의 종류 및/또는 개수를 판단한다. 예를 들면, 입력된 검색 조건이 IP인지, URL인지를 판단한다. 만약 입력된 검색 조건이 IP라면, 기준 개수 미만의 IP가 입력된 것인지, 대량의 IP 리스트가 입력된 것인지를 판단한다. 제어부(180)는 이러한 판단 결과에 기초하여, 데이터베이스(170)에 저장되어 있는 데이터들 중에서 검색에 활용할 데이터를 선택할 수 있다.
이하, 도 1에 도시된 구성요소들에 대해서 좀 더 구체적으로 설명하기로 한다.
메타 테이블 생성부(110)는 수집된 패킷들을 IP를 기준으로 정렬하여 도 2에 예시된 바와 같은 메타 테이블(meta table)을 생성한다. 도 2를 참조하면, IP들이 오름 차순으로 정렬되어 있는 것을 알 수 있으며, 정렬된 IP들에는 메타 테이블 내에서의 위치를 가리키는 번호인 1차 인덱스가 할당되어 있는 것을 알 수 있다. 또한, 메타 테이블은 수집된 패킷들을 IP를 기준으로 모두 정렬한 것이므로, 동일한 IP가 중복되어 나타나는 것을 알 수 있다. 이하, 설명의 편의를 위하여 동일한 IP들로 이루어진 그룹을 '동일 IP 구간'이라 칭한다.
메타 디스크립션 테이블 생성부(120)는 메타 테이블의 각 동일 IP 구간에서 첫 번째에 위치한 IP 및 해당 IP의 1차 인덱스를 추출하여 도 3에 예시된 바와 같은 메타 디스크립션 테이블(meta description table)을 생성한다. 도 3을 참조하면, 각 동일 IP 구간에서 추출된 첫 번째 IP들은 1차 인덱스를 기준으로 정렬되어 있는 것을 알 수 있다. 또한, 정렬된 IP들에는 메타 디스크립션 테이블 내에서의 위치를 가리키는 번호인 2차 인덱스가 할당되어 있는 것을 알 수 있다.
IP 인덱스 테이블 생성부(130)는 메타 디스크립션 테이블에 기초하여 도 4에 예시된 바와 같은 IP 인덱스 테이블을 생성한다. IP 인덱스 테이블은 검색하고자 하는 IP와 관련하여, 메타 디스크립션 테이블 내에서의 2차 인덱스를 빠르게 검색하는데 사용된다.
도 4를 참조하여 IP 인덱스 테이블을 구체적으로 설명하기에 앞서, IP에 대해서 간단히 설명하기로 한다. IP는 IPv4 체계와 IPv6 체계로 나뉜다. IPv4 체계에 따르면, 하나의 IP는 3자리의 숫자가 4 마디로 표시된다. 각 마디는 옥텟(Octect)이라고 부르며, 내부적으로 32 비트(각 마디당 8 비트)로 처리된다. 예를 들어, 192.168.123.123은 11000000.10101000.1111011.1111011 으로 표시된다.
IP는 대역에 따라 A, B, C, D, E 클래스로 나뉜다. A 클래스는 대규모 네트워크 환경에 쓰이며, 첫 번째 마디의 8 비트가 네트워크 ID를 나타내고, 두 번째 내지 네 번째 마디의 24 비트가 호스트 ID를 나타낸다. B 클래스는 중규모 네트워크 환경에 쓰이며, 첫 번째 마디 및 두 번째 마디의 16 비트가 네트워크 ID를 나타내고, 세 번째 마디 및 두 번째 마디의 16 비트가 호스트 ID를 나타낸다. C 클래스는 소규모 네트워크 환경에 쓰이며, 첫 번째 내지 세 번째 마디의 24 비트가 네트워크 ID를 나타내고, 네 번째 마디의 8 비트가 호스트 ID를 나타낸다. D 클래스는 멀티캐스팅용으로 쓰인다. E 클래스는 연구/개발용 혹은 미래에 사용하기 위해 남겨놓은 클래스로 일반적인 용도로 사용되지 않는다. 상술한 바와 같은 IPv4 클래스 분류를 표로 도시하면 표 1과 같다.
Figure PCTKR2023004419-appb-img-000001
도 4를 참조하면, IP 인덱스 테이블의 기본 단위는 네 개의 필드로 구성된다. 구체적으로, 기본 단위는 클래스 필드, 밸류 필드, 인덱스 필드 및 점프 필드를 포함하도록 구성되며, 이러한 기본 단위들이 모여 IP 인덱스 테이블을 형성한다. 각각의 기본 단위에는 IP 인덱스 테이블 내에서의 위치를 나타내는 번호인 3차 인덱스가 할당될 수 있다.
클래스 필드에는 IP의 옥텟의 위치를 나타내는 인덱스가 기록된다. 즉, 각 마디의 위치를 나타내는 인덱스가 기록된다. 예를 들어, C 클래스의 경우, 4개의 마디 중에서 첫 번째 내지 세 번째 마디가 네트워크 아이디를 나타낸다. 따라서, 첫 번째 내지 세 번째 마디를 구분하기 위한 인덱스가 필요하다. 실시 예에 따르면, 첫 번째 마디에 대한 인덱스는 '0'으로 설정되고, 두 번째 마디에 대한 인덱스는 '1'로 설정되고, 세 번째 마디에 대한 인덱스는 '2'로 설정될 수 있다. 다시 말해 Octet 1=0, Octet 2=1, Octet 3=2 인 것으로 이해될 수 있다.
밸류 필드에는 클래스 필드의 인덱스에 대응하는 마디의 값이 기록된다. 예를 들어, 클래스 필드에 0이 기록되어 있다면, 밸류 필드에는 IP의 첫 번째 마디의 값이 기록된다. 만약 클래스 필드에 1이 기록되어 있다면, 밸류 필드에는 IP의 두 번째 마디의 값이 기록된다.
인덱스 필드에는 메타 디스크립션 테이블의 2차 인덱스들 중에서 밸류 필드에 기록되어 있는 값과 관련된 2차 인덱스가 기록된다. 관련된 2차 인덱스가 없는 경우, 인덱스 필드에는 '0'이 기록될 수 있다.
점프 필드에는 밸류 필드에 기록되어 있는 값과 검색하려는 IP의 값이 일치하지 않을 경우, 다음 번으로 비교할 값이 기록되어 있는 기본 단위의 3차 인덱스가 기록된다.
도 4는 각각의 기본 단위들이 수직 방향으로 정렬되어 있는 경우를 도시하고 있으나, 기본 단위들은 가로 방향으로 정렬될 수도 있고, 행렬 형태로 정렬될 수도 있다. 생성된 IP 인덱스 테이블은 데이터베이스(170)에 저장될 수 있다.
도 5는 도 4에 예시된 IP 인덱스 테이블을 이용하여 특정 IP를 검색하는 과정을 설명하기 위한 도면이다.
도 5를 참조하면, 도 4에 예시된 IP 인덱스 테이블의 기본 단위들이 가로 방향으로 나열되어 있는 것을 알 수 있으며, 일부 기본 단위들이 계단식으로 구분되어 있는 것을 알 수 있다.
검색 조건으로써, 1.2.1.1 라는 IP가 입력된 경우를 가정하자. 이 경우, IP 인덱스 테이블에서 3차 인덱스가 '0'인 기본 단위가 가장 먼저 참조된다. IP 인덱스 테이블에서 해당 기본 단위의 클래스 필드 및 밸류 필드에 기록되어 있는 값들을 해석하면 '첫 번째 마디의 값이 1인가'이다. 검색 조건으로 입력된 IP에서 첫 번째 마디의 값은 '1' 이므로, 밸류 필드에 기록되어 있는 값인 '1'과 일치한다. 그런데 참조된 기본 단위의 인덱스 필드에는 '0'이 기록되어 있는 것을 알 수 있다. 이는, 메타 디스크립션 테이블 내에서의 2차 인덱스가 없음을 의미한다. 따라서, 다음 순서의 3차 인덱스가 할당되어 있는 기본 단위가 참조된다. 즉, 3차 인덱스가 '1'인 기본 단위가 참조된다.
참조된 기본 단위의 클래스 필드 및 밸류 필드에 기록되어 있는 값들을 해석하면 '두 번째 마디의 값이 1인가'이다. 검색 조건으로 입력된 IP에서 두 번째 마디의 값은 '2' 이므로, 밸류 필드에 기록되어 있는 값인 '1'과 일치하지 않는다. 이처럼 값이 서로 일치하지 않는 경우에는 참조된 기본 단위의 점프 필드를 확인한다. 점프 필드에는 '4'가 기록되어 있는 것을 알 수 있다. 이는, 3차 인덱스가 '2'인 기본 단위와 '3'인 기본 단위는 건너뛰고, 3차 인덱스가 '4'인 기본 단위로 점프해야함을 의미한다. 그 결과, 3차 인덱스가 '4'인 기본 단위가 참조된다.
참조된 기본 단위의 클래스 필드 및 밸류 필드에 기록되어 있는 값들을 해석하면 '두 번째 마디의 값이 2인가'이다. 검색 조건으로 입력된 IP에서 두 번째 마디의 값은 '2' 이므로, 밸류 필드에 기록되어 있는 값인 '2'와 일치한다. 그런데 참조된 기본 단위의 인덱스 필드에는 '0'이 기록되어 있는 것을 알 수 있다. 이는, 메타 디스크립션 테이블 내에서의 2차 인덱스가 없음을 의미한다. 따라서, 다음 순서의 3차 인덱스가 할당되어 있는 기본 단위가 참조된다. 즉, 3차 인덱스가 '5'인 기본 단위가 참조된다.
참조된 기본 단위의 클래스 필드 및 밸류 필드에 기록되어 있는 값들을 해석하면 '세 번째 마디의 값이 1인가'이다. 검색 조건으로 입력된 IP에서 세 번째 마디의 값은 '1' 이므로, 밸류 필드에 기록되어 있는 값인 '1'과 일치한다. 그런데 참조된 기본 단위의 인덱스 필드에는 '30'이 기록되어 있는 것을 알 수 있다. 이처럼, 인덱스 필드에 기록되어 있는 값이 있는 경우, 해당 값을 획득한다.
이후, 인덱스 필드로부터 획득한 값인 '30'과 동일한 2차 인덱스를 메타 디스크립션 테이블 내에서 검색한다. 그 결과, 2차 인덱스에 대응하는 1차 인덱스를 획득한다. 도 3을 참조하면, 2차 인덱스 '30'에는 1차 인덱스 '200'이 대응되어 있는 것을 알 수 있다. 1차 인덱스가 획득되면, 획득된 1차 인덱스에 해당하는 IP 주소들을 기 저장되어 있는 메타 테이블에서 검색할 수 있다.
상술한 방법에 따르면, 최대 765(=255+255+255)번 안에 원하는 데이터가 존재하는 구간에 접근할 수 있다. 구체적으로, 4번 내지 765번 안에 원하는 데이터가 존재하는 구간에 접근할 수 있다.
다시 도 1을 참조하면, LPM 테이블 생성부(140)는 기준 개수 이상의 IP 리스트를 LPM(Longest Prefix Matching) 테이블로 변환한다. LPM 테이블은 가로 방향을 따라 256개의 셀이 배치된다. 이하, 가로 방향을 따라 배치된 256개의 셀을 '기준 행'이라 칭한다. 기준 행에 포함된 256개의 셀에는 0~255의 인덱스가 할당된다(이하, '가로 방향 인덱스'라 칭한다). 각 셀은 0 및 1 중에서 하나의 값을 가질 수 있다. 구체적으로, 기준 행의 셀들 중에서 IP 리스트에 포함되어 있는 IP의 첫 번째 마디의 값과 동일한 가로 방향 인덱스를 가지는 셀은 값이 '1'로 설정된다. 예를 들어, IP 리스트에 다음과 같은 IP들이 포함된다고 하자.
192.168.10.232
193.168.10.232
이 경우, 첫 번째 마디의 값은 192 및 193 이다. 따라서, 기준 행의 셀들 중에서 가로 방향 인덱스가 '192'인 셀과 가로 방향 인덱스가 '193'인 셀의 값이 각각 1로 설정될 수 있다. 나머지 셀들의 값은 모두 0으로 설정될 수 있다.
기준 행의 하단에는 기준 행과 동일한 개수의 셀들을 포함하는 행들이 연달아 배치된다. 세로 방향을 따라 배치된 셀들에는 첫 번째 마디의 값의 범위에 대응하는 인덱스들, 두 번째 마디의 값의 범위에 대응하는 인덱스들, 세 번째 마디의 값의 범위에 대응하는 인덱스들이 차례로 할당된다(이하, '세로 방향 인덱스'라 칭한다). IP 리스트에 포함된 IP들이 C 클래스에 해당하는 경우, 첫 번째 마디의 값의 범위는 192~223 이다. 그리고 두 번째 마디의 값의 범위 및 세 번째 마디의 값은 범위는 각각 0~255 이다. 따라서 세로 방향을 따라 배치된 셀들에는 첫 번째 마디의 값의 범위에 해당하는 192~223의 세로 방향 인덱스들, 두 번째 마디의 값의 범위에 해당하는 0~255의 세로 방향 인덱스들, 세 번째 마디의 값의 범위에 해당하는 0~255의 세로 방향 인덱스들이 차례로 할당된다.
예를 들어, IP 리스트에 "192.168.10.232"라는 IP만 포함되어 있다면, 도 6에 도시된 바와 같은 LPM 테이블이 생성된다. IP의 첫 번째 마디의 값이 192 이므로, 기준 행의 셀들 중에서 가로 방향 인덱스가 192인 셀의 값이 1로 설정된다(값이 1인 셀은 값이 0인 나머지 셀들과 다른 색상으로 표시되어 있다). 그리고 첫 번째 마디의 값이 192일 때 두 번째 마디의 값은 168 이므로, 첫 번째 마디의 값의 범위에 대응하는 세로 방향 인덱스들 중에서 세로 방향 인덱스가 192인 행이 선택되고, 선택된 행에 속하는 셀들 중에서 가로 방향 인덱스가 168인 셀의 값이 1로 설정된다. 또한, 두 번째 마디의 값이 168일 때 세 번째 마디의 값은 10 이므로, 두 번째 마디의 값의 범위에 대응하는 세로 방향 인덱스들 중에서 세로 방향 인덱스가 168인 행이 선택되고, 선택된 행에 속하는 셀들 중에서 가로 방향의 인덱스가 10인 셀의 값이 1로 설정된다. 또한, 세 번째 마디의 값이 10일 때 네 번째 마디의 값은 232 이므로, 세 번째 마디의 값의 범위에 대응하는 세로 방향 인덱스들 중에서 세로 방향 인덱스가 10인 행이 선택되고, 선택된 행에 속하는 셀들 중에서 가로 방향 인덱스가 232인 셀의 값이 1로 설정된다.
이러한 방식으로 LPM 테이블이 생성된 후, 실제 수집된 패킷의 IP가 "192.168.10.232"인 경우, 수집된 패킷의 IP를 IP 리스트에서 조회하는 과정을 설명하면 다음과 같다.
우선, IP의 첫 번째 마디의 값에 대한 조회가 이루어진다. LPM 테이블의 기준 행에서 가로 방향 인덱스가 192인 셀의 값이 1이므로, 첫 번째 마디의 값은 LPM 테이블에 존재하는 것으로 판단된다. 따라서, 두 번째 마디의 값에 대한 조회가 이루어진다. LPM 테이블에서 첫 번째 마디의 값의 범위에 대응하는 세로 방향 인덱스들 중에서 세로 방향 인덱스가 192이고 가로 방향 인덱스가 168인 셀의 값이 1이므로, 두 번째 마디의 값은 LPM 테이블에 존재하는 것으로 판단된다. 따라서, 세 번째 마디의 값에 대한 조회가 이루어진다. LPM 테이블에서 두 번째 마디의 값의 범위에 대응하는 세로 방향 인덱스들 중에서 세로 방향 인덱스가 168이고 가로 방향 인덱스가 10인 셀의 값이 1이므로, 세 번째 마디의 값은 LPM 테이블에 존재하는 것으로 판단된다. 따라서 네 번째 마디의 값에 대한 조회가 이루어진다. LPM 테이블에서 세 번째 마디의 값의 범위에 대응하는 세로 방향의 인덱스들 중에서 세로 방향 인덱스가 10이고, 가로 방향 인덱스가 232인 셀의 값이 1이므로, 네 번째 마디의 값은 LPM 테이블이 존재하는 것으로 판단된다. 이처럼 해당 IP가 IP 리스트에 포함되는지의 여부를 총 4번의 비교 과정을 통해 판단할 수 있으므로, 종래에 비하여 비교 횟수를 대폭 감소시킬 수 있다. 구체적으로, 수집된 패킷에서 획득된 IP가 n개이고, 기업에서 기 보유하고 있는 블랙 IP 리스트가 m개인 경우, 종래에는 nxm 번의 비교를 수행해야 한다. 그러나 본 개시의 실시 예에 따른 LPM 테이블을 이용하면, 최소 nx1 번 내지 최대 nx4 번의 비교만을 수행하면 되므로, 비교 횟수가 대폭 감소된다. 그리고 비교 횟수가 감소된 만큼 검색 속도가 향상된다.
다시 도 1을 참조하면, 변환 테이블 생성부(150)는 수집된 패킷의 URL을 상수화된 값으로 변환한다. URL은 길이가 지정되지 않은 텍스트 형식을 갖는데, 이러한 URL을 상수화된 값으로 변환한다는 것은 URL에 대하여 ID를 할당한다는 것을 의미한다. 여기서 ID는 기본 키(Primary Key, PK)를 의미할 수 있다. URL 및 URL의 상수화된 값을 포함하는 변환 테이블을 예시하면 도 7과 같다.
해시 테이블 생성부(160)는 상수화된 값에 기초하여 기준 크기의 해시 테이블을 생성한다. 기준 크기는 예를 들어, 65536일 수 있다. 그러나 기준 크기가 예시된 것으로 한정되는 것은 아니며, 예시된 크기보다 더 작거나 더 클 수도 있다. 이하, 설명의 편의를 위하여 기준 크기가 65536인 경우를 예로 들어 설명하기로 한다.
도 8은 본 개시의 실시 예에 따른 해시 테이블을 예시한 도면이다.
도 8을 참조하면, 해시 테이블은 해시 인덱스와 누적 값을 포함한다. 해시 인덱스는 URL의 ID를 65536으로 나누었을 때의 나머지로 결정된다. 따라서, 해시 인덱스는 0~65535의 범위를 갖는다. 동일한 해시 인덱스를 가지는 ID들은 해당 해시 인덱스에 차례로 기록된다.
누적 값은 해시 인덱스에 기록된 ID의 개수들을 차례로 누적한 값이 기록된다. 예를 들어, 해시 인덱스 0에는 총 3개의 ID가 기록되어 있고, 해시 인덱스 1에는 총 4개의 ID가 기록되어 있으며, 해시 인덱스 2에는 총 2개의 ID가 기록되어 있는 것을 알 수 있다. 이 경우, 해시 인덱스 1에 대한 누적 값은 3+4=7 이다. 그리고 해시 인덱스 2에 대한 누적 값은 7+2=9 이다.
이러한 누적 값은 검색 범위를 좁히는데 사용될 수 있다. 예를 들어, 검색 조건으로써, 'naver.com'이라는 URL이 입력되었다고 하자. 도 7을 참조하면, 'naver.com'이라는 URL에 대한 ID는 2이므로, 해시 인덱스 역시 '2'이다. 도 8에서 해시 인덱스 2에 대한 누적 값은 9이고, 바로 이전의 누적 값은 7인 것을 알 수 있다. 이는 바로 이전의 누적 값(7) 이후부터 해당 누적 값(9)까지 2건의 엑세스(access)로 검색 결과를 얻을 수 있음을 의미하며, 7회 내지 9회의 메타데이터만 검색해 보면 결과를 얻을 수 있음을 의미한다.
도 9는 본 개시의 실시 예에 따른 고속 패킷 검색 방법을 도시한 순서도이다.
우선, 검색 조건에 특화된 데이터를 생성하여 데이터베이스(170)에 저장한다(S910). 여기서, 검색 조건으로는 IP 및 URL을 예로 들 수 있다. IP의 경우, 기준 개수 미만의 IP가 검색 조건으로 사용될 수도 있고, 기준 개수 이상의 IP 리스트가 검색 조건으로 사용될 수도 있다. 예를 들면, 기업이 기 확보하고 있는 백만 건 이상의 IP 주소가 포함된 블랙 IP 리스트가 검색 조건으로 사용될 수도 있다. 기준 개수 미만의 IP 검색에 특화된 데이터로는 메타 테이블, 메타 디스크립션 테이블, 그리고 IP 인덱스 테이블을 예로 들 수 있다. IP 리스트 검색에 특화된 데이터로는 LPM 테이블을 예로 들 수 있다. URL 검색에 특화된 데이터로는 URL 및 URL의 상수화된 값을 포함하는 변환 테이블, 그리고 해시 테이블을 예로 들 수 있다.
이후, 데이터베이스에 저장된 데이터에 기초하여, 입력된 검색 조건에 해당하는 패킷을 검색한다(S920).
상기 S920 단계에서, 입력된 검색 조건이 기준 개수 미만의 IP라면, 데이터베이스(170)에 저장되어 있는 데이터들 중에서 IP 인덱스 테이블, 메타 디스크립션 테이블 및 메타 테이블이 선택될 수 있다. 검색 조건으로 입력된 IP의 각 마디의 값은 IP 인덱스 테이블의 기준 단위의 클래스 필드 및 밸류 필드에 의해 결정되는 값과 비교된다. 비교 결과 두 값이 일치하는 경우에는 기준 단위의 인덱스 필드의 값을 이용하여 메타 디스크립션 테이블에서 2차 인덱스 및 1차 인덱스가 검색된다. 비교 결과 두 값이 일치하지 않는 경우에는 기준 단위의 점프 필드의 값이 가리키는 기준 단위로 점프하게 된다. 이처럼 점프 필드의 값을 이용하면, 비교 횟수가 감소되고, 비교 횟수가 감소된 만큼 검색 속도가 향상된다.
상기 S920 단계에서, 입력된 검색 조건이 대량의 IP 리스트라면, 데이터베이스에 저장되어 있는 데이터들 중에서 LPM 테이블이 선택될 수 있다. 그리고 대량의 IP 리스트의 각 마디의 값과 LPM 테이블의 각 셀의 값의 비교가 이루어진다. 비교 과정에서, IP 리스트의 각 마디의 값이 LPM 테이블에 기록되어 있지 않은 것으로 판단되면, 비교 과정이 즉시 중단된다.
상기 S920 단계에서, 입력된 검색 조건이 URL이라면, 데이터베이스에 저장되어 있는 변환 테이블 및 해시 테이블이 선택될 수 있다. 변환 테이블을 참조하면, 검색 조건으로 입력된 URL에 대응하는 ID가 검색된다. 이후 검색된 ID를 65536로 나누었을 때의 나머지가 연산되면, 연산된 값과 동일한 값을 가지는 해시 인덱스 및 그에 대응하는 누적 값을 해시 테이블로부터 얻을 수 있다.
이상으로, 본 개시의 실시 예들을 설명하였다. 전술한 설명에서 도 1에 도시된 고속 패킷 검색 장치를 구성하는 구성요소들은 모듈로 구현될 수 있다. 모듈은 소프트웨어 또는 Field Programmable Gate Array(FPGA)나 주문형 반도체(Application Specific Integrated Circuit, ASIC)와 같은 하드웨어 구성요소를 의미하며, 모듈은 어떤 역할들을 수행한다. 그렇지만 모듈은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니다. 모듈은 어드레싱할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 실행시키도록 구성될 수도 있다.
따라서, 일 예로서 모듈은 소프트웨어 구성요소들, 객체지향 소프트웨어 구성요소들, 클래스 구성요소들 및 태스크 구성요소들과 같은 구성요소들과, 프로세스들, 함수들, 속성들, 프로시저들, 서브루틴들, 프로그램 코드의 세그먼트들, 드라버들, 펌웨어, 마이크로코드, 회로, 데이터, 데이터베이스, 데이터 구조들, 테이블들, 어레이들, 및 변수들을 포함한다. 구성요소들과 모듈들에서 제공되는 기능은 더 작은 수의 구성요소들 및 모듈들로 결합되거나 추가적인 구성요소들과 모듈들로 더 분리될 수 있다.
한편, 개시된 실시예들은 컴퓨터에 의해 실행 가능한 명령어를 저장하는 기록매체의 형태로 구현될 수 있다. 명령어는 프로그램 코드의 형태로 저장될 수 있으며, 프로세서에 의해 실행되었을 때, 프로그램 모듈을 생성하여 개시된 실시예들의 동작을 수행할 수 있다. 기록매체는 컴퓨터로 읽을 수 있는 기록매체로 구현될 수 있다.
컴퓨터가 읽을 수 있는 기록매체로는 컴퓨터에 의하여 해독될 수 있는 명령어가 저장된 모든 종류의 기록매체를 포함한다. 예를 들어, ROM(read only memory), RAM(random access memory), 자기 테이프, 자기 디스크, 플래쉬 메모리(200), 광 데이터 저장장치 등이 있을 수 있다.
또한, 컴퓨터가 읽을 수 있는 기록매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, '비일시적 저장매체'는 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다. 예로, '비일시적 저장매체'는 데이터가 임시적으로 저장되는 버퍼를 포함할 수 있다.
일 실시 예에 따르면, 본 문서에 개시된 다양한 실시 예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 기록 매체(예: compact disc read only memory (CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예: 스마트폰들) 간에 직접 배포되거나, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우, 컴퓨터 프로그램 제품(예: 다운로더블 앱(downloadable app))의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 기록 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
이상과 첨부된 도면을 참조하여 본 개시에 따른 실시 예들을 설명하였다. 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자는 본 개시가 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시 예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다.
상술한 바와 같은 고속 패킷 검색 방법 및 장치는 풀 패킷 분석 기반의 네트워크 탐지 및 대응 기술 분야에 적용될 수 있다.

Claims (11)

  1. 네트워크에서 수집된 패킷들 중에서 검색 조건에 해당하는 패킷을 고속으로 검색하는 방법에 있어서,
    상기 검색 조건에 특화된 데이터를 생성하여 데이터베이스에 저장하는 단계; 및
    상기 저장된 데이터에 기초하여, 입력된 검색 조건에 해당하는 패킷을 검색하는 단계를 포함하는,
    고속 패킷 검색 방법.
  2. 제1항에 있어서,
    상기 저장하는 단계는,
    상기 네트워크에서 수집된 패킷들을 IP를 기준으로 정렬하고 정렬된 패킷들에 1차 인덱스를 할당하여 메타 테이블을 생성하는 단계;
    상기 메타 테이블의 동일 IP 구간마다 첫 번째에 위치한 IP 및 상기 첫 번째에 위치한 IP의 1차 인덱스를 추출하고, 추출된 IP들에 2차 인덱스를 할당하여 메타 디스크립션 테이블을 생성하는 단계; 및
    상기 메타 디스크립션 테이블의 2차 인덱스들 중에서 상기 검색 조건으로 입력된 IP와 관련된 2차 인덱스에 고속으로 접근하기 위한 IP 인덱스 테이블을 생성하는 단계를 포함하는,
    고속 패킷 검색 방법.
  3. 제2항에 있어서,
    상기 IP 인덱스 테이블은 복수의 기본 단위를 포함하고,
    상기 기본 단위는 클래스 필드, 밸류 필드, 인덱스 필드 및 점프 필드를 포함하며,
    상기 복수의 기본 단위에는 3차 인덱스가 할당되는,
    고속 패킷 검색 방법.
  4. 제3항에 있어서,
    상기 클래스 필드에는 상기 메타 디스크립션 테이블에 포함되어 있는 IP의 각 마디의 위치를 나타내는 인덱스가 기록되고,
    상기 밸류 필드에는 상기 클래스 필드의 인덱스에 대응하는 마디의 값이 기록되며,
    상기 인덱스 필드에는 상기 메타 디스크립션 테이블의 2차 인덱스들 중에서 상기 밸류 필드에 기록되어 있는 값과 관련된 2차 인덱스가 기록되고,
    상기 점프 필드에는 상기 밸류 필드에 기록되어 있는 값과 상기 검색 조건으로 입력된 IP의 값이 일치하지 않을 경우, 다음 번으로 비교할 값이 기록되어 있는 기본 단위의 3차 인덱스가 기록되는,
    고속 패킷 검색 방법.
  5. 제4항에 있어서,
    상기 검색하는 단계는
    상기 검색 조건으로 입력된 IP의 각 마디의 값을 상기 IP 인덱스 테이블의 기준 단위의 클래스 필드 및 밸류 필드에 의해 결정되는 값과 비교하는 단계;
    상기 비교 결과, 두 값이 일치하는 경우, 상기 기준 단위의 인덱스 필드의 값을 이용하여 상기 메타 디스크립션 테이블에서 2차 인덱스를 검색하는 단계;
    상기 비교 결과, 두 값이 일치하지 않는 경우, 상기 기준 단위의 점프 필드의 값이 가리키는 기준 단위로 점프하는 단계를 포함하는,
    고속 패킷 검색 방법.
  6. 제1항에 있어서,
    상기 저장하는 단계는,
    상기 네트워크에서 수집된 패킷들을 IP를 기준으로 정렬하여 메타 테이블을 생성하는 단계; 및
    기 확보된 IP 리스트에 대한 LPM(Longest Prefix Matching) 테이블을 생성하는 단계를 포함하는,
    고속 패킷 검색 방법.
  7. 제6항에 있어서,
    상기 LPM 테이블은
    가로 방향을 따라 배치된 256개의 셀을 포함하는 기준 행; 및
    상기 기준 행과 동일한 개수의 셀을 포함하며, 상기 기준 행의 하단에 세로 방향을 따라 배치되는 복수의 행을 포함하며,
    상기 기준 행의 셀들에는 가로 방향 인덱스가 할당되고,
    상기 세로 방향을 따라 배치된 셀들에는 상기 IP 리스트에 포함된 IP의 첫 번째 마디의 값의 범위에 대응하는 인덱스들, 두 번째 마디의 값의 범위에 대응하는 인덱스들, 세 번째 마디의 값의 범위에 대응하는 인덱스들이 차례로 할당되는,
    고속 패킷 검색 방법.
  8. 제7항에 있어서,
    상기 검색하는 단계는,
    상기 검색 조건으로 입력된 IP 리스트의 각 마디의 값과 상기 LPM 테이블의 각 셀의 값을 비교하는 단계; 및
    상기 입력된 IP 리스트의 각 마디의 값이 상기 LPM 테이블에 기록되어 있지 않은 경우, 비교를 중단하는 단계를 포함하는,
    고속 패킷 검색 방법.
  9. 제1항에 있어서,
    상기 저장하는 단계는,
    상기 네트워크에서 수집된 패킷들을 URL을 기준으로 정렬하고 정렬된 URL들에 상기 URL들을 상수화한 값인 ID를 할당하는 단계;
    상기 ID를 기준 크기로 나누었을 때의 나머지를 해시 인덱스로 하는 해시 테이블을 생성하는 단계;
    동일한 해시 인덱스를 가지는 ID들을 상기 해시 테이블의 해당 해시 인덱스에 차례로 기록하는 단계; 및
    해시 인덱스에 기록된 ID의 개수에 대한 누적 값을 기록하는 단계를 포함하는,
    고속 패킷 검색 방법.
  10. 프로세서로 하여금
    네트워크에서 수집된 패킷들 중에서 검색 조건에 해당하는 패킷을 고속으로 검색하기 위하여, 상기 검색 조건에 특화된 데이터를 생성하여 데이터베이스에 저장하는 것; 및
    상기 저장된 데이터에 기초하여, 입력된 검색 조건에 해당하는 패킷을 검색하는 것을 실행하도록 구성된 인스트럭션들을 포함하는,
    컴퓨터 판독 가능 기록 매체.
  11. 하나 이상의 프로세서; 및
    상기 하나 이상의 프로세서가 작업(operation)을 수행하도록 하는 인스트럭션들을 저장하도록 구성되는, 하나 이상의 메모리를 포함하고,
    상기 작업은,
    네트워크에서 수집된 패킷들 중에서 검색 조건에 해당하는 패킷을 고속으로 검색하기 위하여, 상기 검색 조건에 특화된 데이터를 생성하여 데이터베이스에 저장하는 것; 및
    상기 저장된 데이터에 기초하여, 입력된 검색 조건에 해당하는 패킷을 검색하는 것;을 포함하는,
    고속 패킷 검색 장치.
PCT/KR2023/004419 2022-04-04 2023-04-03 고속 패킷 검색 방법 및 장치 WO2023195697A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2022-0041642 2022-04-04
KR1020220041642A KR102655234B1 (ko) 2022-04-04 2022-04-04 고속 패킷 검색 방법 및 장치

Publications (1)

Publication Number Publication Date
WO2023195697A1 true WO2023195697A1 (ko) 2023-10-12

Family

ID=88243197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/004419 WO2023195697A1 (ko) 2022-04-04 2023-04-03 고속 패킷 검색 방법 및 장치

Country Status (2)

Country Link
KR (2) KR102655234B1 (ko)
WO (1) WO2023195697A1 (ko)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100808023B1 (ko) * 2003-10-20 2008-02-28 인텔 코포레이션 2-스테이지 패킷 분류 방법 및 장치, 컴퓨터 판독가능한 기록 매체 및 머신 액세스가능 매체
US20150131451A1 (en) * 2013-11-12 2015-05-14 Fujitsu Limited Packet storage method and packet storage apparatus
KR101837935B1 (ko) * 2017-03-31 2018-03-13 주식회사 젠틸리언 전수 패킷 저장 기반의 데이터 검색 성능 향상을 위한 수신 패킷 저장 장치 및 그 방법
KR102080478B1 (ko) * 2019-06-20 2020-02-24 주식회사 쿼드마이너 패턴 기반 색인 처리 시스템 및 이를 이용한 패턴 기반 색인 처리 방법
KR20220001606A (ko) * 2020-06-30 2022-01-06 주식회사맥데이타 대용량 네트워크 모니터링을 위한 실시간 패킷 데이터 저장 방법 및 장치
KR102363757B1 (ko) * 2020-12-01 2022-02-16 (주)모니터랩 Ip 주소 비교 방법 및 장치

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100808023B1 (ko) * 2003-10-20 2008-02-28 인텔 코포레이션 2-스테이지 패킷 분류 방법 및 장치, 컴퓨터 판독가능한 기록 매체 및 머신 액세스가능 매체
US20150131451A1 (en) * 2013-11-12 2015-05-14 Fujitsu Limited Packet storage method and packet storage apparatus
KR101837935B1 (ko) * 2017-03-31 2018-03-13 주식회사 젠틸리언 전수 패킷 저장 기반의 데이터 검색 성능 향상을 위한 수신 패킷 저장 장치 및 그 방법
KR102080478B1 (ko) * 2019-06-20 2020-02-24 주식회사 쿼드마이너 패턴 기반 색인 처리 시스템 및 이를 이용한 패턴 기반 색인 처리 방법
KR20220001606A (ko) * 2020-06-30 2022-01-06 주식회사맥데이타 대용량 네트워크 모니터링을 위한 실시간 패킷 데이터 저장 방법 및 장치
KR102363757B1 (ko) * 2020-12-01 2022-02-16 (주)모니터랩 Ip 주소 비교 방법 및 장치

Also Published As

Publication number Publication date
KR20230142957A (ko) 2023-10-11
KR102655234B1 (ko) 2024-04-05
KR20240046700A (ko) 2024-04-09

Similar Documents

Publication Publication Date Title
CN112866023B (zh) 网络检测、模型训练方法、装置、设备及存储介质
WO2010011026A2 (ko) 이미지를 이용한 검색 시스템
WO2012108623A1 (ko) 이미지 데이터베이스에 신규 이미지 및 이에 대한 정보를 추가하기 위한 방법, 시스템 및 컴퓨터 판독 가능한 기록 매체
WO2013151221A1 (ko) 대용량 데이터의 클러스터 결과 분석 시스템 및 방법
WO2013073805A1 (ko) 이미지 검색 방법, 장치, 및 이 방법을 실행하기 위한 컴퓨터 판독 가능한 기록 매체
WO2018182060A1 (ko) 관계형 데이터베이스 기반의 텍스트 로그데이터 저장 및 검색 방법
WO2017155292A1 (ko) 비정상행위 탐색방법 및 탐색프로그램
WO2013065944A1 (ko) Ngs를 위한 서열 재조합 방법 및 장치
WO2019039673A1 (ko) 인공지능 기반의 웹 페이지 분석에 기초한 제품 키워드 정보 자동추출 장치 및 방법
WO2016117739A1 (ko) 인-메모리 데이터베이스 기반의 데이터 관리 시스템 및 그 방법
WO2015030363A1 (ko) 침입탐지규칙 간의 유사도 측정 장치 및 그 방법
WO2022107964A1 (ko) 인접 행렬 기반의 악성 코드 탐지 및 분류 장치와 악성 코드 탐지 및 분류 방법
WO2023195697A1 (ko) 고속 패킷 검색 방법 및 장치
CN116975865B (zh) 恶意Office文档检测方法、装置、设备及存储介质
CN110008701A (zh) 基于elf文件特征的静态检测规则提取方法及检测方法
WO2022107994A1 (ko) 빅데이터 증강분석 프로파일링 시스템
WO2014098372A1 (ko) 유해 사이트 수집 장치 및 방법
WO2014148664A1 (ko) 단어의 의미를 기반으로 하는 다국어 검색 시스템, 다국어 검색 방법 및 이를 이용한 이미지 검색 시스템
WO2012030049A2 (ko) 동적 임계값이 적용된 유사문서 분류화 장치 및 방법
WO2016088954A1 (ko) 스팸 분류 방법, 이를 수행하기 위한 기록 매체 및 스팸 분류 장치
WO2022097891A1 (ko) 동일 구조의 데이터를 추출하는 방법 및 그를 이용한 장치
WO2015133774A1 (ko) 특허 분석 시스템 및 방법과 이를 실행하기 위한 프로그램이 기록된 기록매체
WO2014098337A1 (ko) 유해 사이트 수집 장치 및 방법
CN111049801B (zh) 一种防火墙策略检测方法
CN114024701A (zh) 域名检测方法、装置及通信系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23784922

Country of ref document: EP

Kind code of ref document: A1