KR102581422B1 - Vulnerability testing method and apparatus for serial communication apparaus - Google Patents

Vulnerability testing method and apparatus for serial communication apparaus Download PDF

Info

Publication number
KR102581422B1
KR102581422B1 KR1020210134174A KR20210134174A KR102581422B1 KR 102581422 B1 KR102581422 B1 KR 102581422B1 KR 1020210134174 A KR1020210134174 A KR 1020210134174A KR 20210134174 A KR20210134174 A KR 20210134174A KR 102581422 B1 KR102581422 B1 KR 102581422B1
Authority
KR
South Korea
Prior art keywords
attack
target device
packet
transmitting
packets
Prior art date
Application number
KR1020210134174A
Other languages
Korean (ko)
Other versions
KR20230050869A (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 KR1020210134174A priority Critical patent/KR102581422B1/en
Publication of KR20230050869A publication Critical patent/KR20230050869A/en
Application granted granted Critical
Publication of KR102581422B1 publication Critical patent/KR102581422B1/en

Links

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/1433Vulnerability analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/577Assessing vulnerabilities and evaluating computer system security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40228Modbus

Landscapes

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

Abstract

본 발명은 직렬 통신 장치에 대한 취약성 테스트 방법 및 장치에 관한 것이다. 본 발명의 일 실시예에 따른 테스트 방법은 대상 장치에 직렬 통신 방식으로 연결되어 상기 대상 장치의 직렬 통신에 따른 취약성을 테스트하는 테스트 장치에서 수행되는 방법으로서, 상기 대상 장치로 공격 패킷을 전송하는 단계; 상기 대상 장치로 허용된 정상 범위 내의 값을 포함하는 정상 패킷을 전송하는 단계; 및 상기 대상 장치의 비정상 상태가 발생하는 경우, 상기 대상 장치가 상기 공격 패킷에 대해 취약성이 있는 것으로 판단하는 단계;를 포함한다.The present invention relates to a vulnerability testing method and apparatus for serial communication devices. The testing method according to an embodiment of the present invention is a method performed in a test device that is connected to a target device through serial communication and tests vulnerabilities according to serial communication of the target device, including transmitting an attack packet to the target device. ; transmitting a normal packet containing a value within an allowed normal range to the target device; And when an abnormal state of the target device occurs, determining that the target device is vulnerable to the attack packet.

Description

직렬 통신 장치에 대한 취약성 테스트 방법 및 장치{VULNERABILITY TESTING METHOD AND APPARATUS FOR SERIAL COMMUNICATION APPARAUS}VULNERABILITY TESTING METHOD AND APPARATUS FOR SERIAL COMMUNICATION APPARAUS}

본 발명은 직렬 통신 장치에 대한 취약성 테스트 기술에 관한 것으로서, 더욱 상세하게는 모드버스 RTU(Modbus Remote Terminal Unit) 등과 같은 프로토콜(protocol)의 직렬 통신로 연결되는 대상 장치에 대해 해당 프로토콜의 직렬 통신에 따른 취약성을 테스트하기 위한 기술에 관한 것이다.The present invention relates to a vulnerability testing technology for serial communication devices, and more specifically, to a target device connected to serial communication of a protocol such as Modbus RTU (Modbus Remote Terminal Unit), to serial communication of the protocol. It is about technology for testing vulnerabilities.

종래의 취약성 테스트 방식은 TCP/IP 프로토콜 기반의 방식이다. 즉, 원격지에서 IP주소를 가지고 있는 대상 장치에 대해 특정의 TCP/IP 프로토콜 패킷을 송신한 후 그에 대한 응답 TCP/IP 프로토콜 패킷을 수신하며 수신된 패킷을 검사함으로써 해당 대상 장치의 TCP/IP 프로토콜 통신에 따른 취약성 테스트를 수행하였다.The conventional vulnerability testing method is based on the TCP/IP protocol. In other words, after sending a specific TCP/IP protocol packet to a target device with an IP address from a remote location, a response TCP/IP protocol packet is received, and the received packet is inspected for TCP/IP protocol communication of the target device. A vulnerability test was performed according to .

하지만, 모드버스 RTU 등의 직렬 통신 프로토콜을 사용하는 대상 장치의 경우, 상술한 종래의 취약성 테스트 방식의 적용이 불가능하다. 이는 모드버스 RTU를 사용하는 대상 장치의 경우, 비정상 데이터를 수신하면 TCP/IP 프로토콜 방식과 달리 그에 대한 오류 메시지를 대부분 응답하지 않기 때문이다.However, in the case of a target device using a serial communication protocol such as Modbus RTU, the conventional vulnerability testing method described above cannot be applied. This is because, unlike the TCP/IP protocol method, when a target device using Modbus RTU receives abnormal data, it does not respond with an error message in most cases.

즉, 실제 산업 현장에 적용되는 모드버스 RTU 방식이 적용된 대상 장치의 경우, 기본적으로 대부분 종류의 패킷에 대해 단방향 직렬 통신(즉, 데이터 수신)만이 제공된다. 그 결과, 대상 장치로 비정상 데이터를 전송하더라도, 대상 장치는 해당 비정상 데이터에 대해 거부 또는 삭제 등을 수행하지만, 해당 비정상 데이터의 수신에 따른 오류 메시지 등을 송신 측으로 응답하지 않으므로, 종래의 취약성 테스트 방식이 적용되기 어렵다.In other words, for target devices using the Modbus RTU method applied in actual industrial sites, only one-way serial communication (i.e., data reception) is provided for most types of packets. As a result, even if abnormal data is transmitted to the target device, the target device rejects or deletes the abnormal data, but does not respond to the sender with an error message, etc. upon receipt of the abnormal data, so the conventional vulnerability testing method This is difficult to apply.

따라서, 모드버스 RTU 등의 직렬 통신 프로토콜을 사용하는 대상 장치에 적용될 수 있는 새로운 방식의 취약성 테스트 기술이 필요한 실정이다.Therefore, there is a need for a new vulnerability testing technology that can be applied to target devices that use serial communication protocols such as Modbus RTU.

상기한 바와 같은 종래 기술의 문제점을 해결하기 위하여, 본 발명은 TCP/IP 프로토콜 방식이 아닌 모드버스 RTU 등과 같은 프로토콜 방식의 직렬 통신로 연결되는 대상 장치에 대해 해당 프로토콜의 직렬 통신에 따른 취약성을 테스트할 수 있는 기술을 제공하는데 그 목적이 있다.In order to solve the problems of the prior art as described above, the present invention tests vulnerabilities according to serial communication of the protocol for target devices connected through serial communication using a protocol such as Modbus RTU rather than the TCP/IP protocol. The purpose is to provide the technology to do it.

다만, 본 발명이 해결하고자 하는 과제는 이상에서 언급한 과제에 제한되지 않으며, 언급되지 않은 또 다른 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.However, the problem to be solved by the present invention is not limited to the problems mentioned above, and other problems not mentioned can be clearly understood by those skilled in the art from the description below. There will be.

상기와 같은 과제를 해결하기 위한 본 발명의 일 실시예에 따른 방법은 대상 장치에 직렬 통신 방식으로 연결되어 상기 대상 장치의 직렬 통신에 따른 취약성을 테스트하는 테스트 장치에서 수행되는 방법으로서, 상기 대상 장치로 공격 패킷을 전송하는 단계; 상기 대상 장치로 허용된 정상 범위 내의 값을 포함하는 정상 패킷을 전송하는 단계; 상기 대상 장치의 비정상 상태가 발생하는 경우, 상기 대상 장치가 상기 공격 패킷에 대해 취약성이 있는 것으로 판단하는 단계;를 포함한다.A method according to an embodiment of the present invention for solving the above problems is a method performed in a test device that is connected to a target device through serial communication and tests vulnerabilities according to serial communication of the target device, transmitting an attack packet to; transmitting a normal packet containing a value within an allowed normal range to the target device; When an abnormal state of the target device occurs, determining that the target device is vulnerable to the attack packet.

상기 비정상 상태는 상기 대상 장치의 가동 중지 현상 또는 랙(lag) 현상이 발생하거나, 상기 대상 장치가 허용된 범위 외의 값을 가지는 응답 패킷으로 응답하는 경우를 포함할 수 있다.The abnormal state may include a case where the target device stops working or lags, or the target device responds with a response packet with a value outside the allowed range.

상기 직렬 통신은 모드버스 RTU(Modbus Remote Terminal Unit) 프로토콜을 기반으로 하는 통신일 수 있다.The serial communication may be communication based on the Modbus RTU (Modbus Remote Terminal Unit) protocol.

상기 공격 패킷을 전송하는 단계는 복수의 공격 패킷을 연속으로 대상 장치로 전송하는 단계를 포함할 수 있으며, 상기 판단하는 단계는 상기 비정상 상태가 발생하는 경우에 상기 대상 장치가 상기 복수의 공격 패킷에 대해 취약성이 있는 것으로 판단하는 단계를 포함할 수 있다.The step of transmitting the attack packet may include continuously transmitting a plurality of attack packets to the target device, and the determining step may include the step of determining whether the target device responds to the plurality of attack packets when the abnormal state occurs. It may include a step of determining that there is a vulnerability.

본 발명의 일 실시예에 따른 방법은, 상기 대상 장치가 상기 복수의 공격 패킷에 대해 취약성이 있는 것으로 판단되는 경우, 상기 복수이 공격 패킷을 그룹으로 나누고 그룹에 속한 공격 패킷을 이용하여, 그룹 별로 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계를 반복 수행함으로써, 상기 복수의 공격 패킷 중에서 취약성이 있는 공격 패킷을 찾는 단계를 더 포함할 수 있다.The method according to an embodiment of the present invention is, when it is determined that the target device is vulnerable to the plurality of attack packets, dividing the plurality of attack packets into groups and using the attack packets belonging to the groups, The method may further include finding a vulnerable attack packet among the plurality of attack packets by repeating the steps of transmitting an attack packet, transmitting the normal packet, and determining the step.

상기 공격 패킷을 전송하는 단계는 공개된 기존 취약점 정보(Common Vulnerabilities and Exposures, CVE)에 관련된 값을 가지는 공격 패킷을 생성하여 전송하는 단계를 포함할 수 있다.The step of transmitting the attack packet may include generating and transmitting an attack packet having a value related to existing publicly disclosed vulnerability information (Common Vulnerabilities and Exposures, CVE).

상기 공격 패킷을 전송하는 단계는 상기 대상 장치의 설정 값 또는 작동에 관련된 정보를 저장하되 쓰기 가능한 상기 대상 장치의 모든 메모리 주소를 대상으로 각각 허용된 범위 외에서 변경되는 값을 가지는 복수의 공격 패킷을 생성하여 연속으로 전송하는 단계를 포함할 수 있다.The step of transmitting the attack packet stores information related to the setting value or operation of the target device, but generates a plurality of attack packets targeting all writable memory addresses of the target device, each with a value that changes outside the permitted range. This may include the step of continuously transmitting.

상기 공격 패킷은 데이터 길이(data length) 섹션이 허용된 길이 범위 외의 값을 가지는 비정상 데이터, 데이터 섹션이 데이터 길이 섹션과 다른 길이의 데이터를 가지는 비정상 데이터, 데이터 섹션이 허용된 값 외의 값을 가지는 비정상 데이터, 또는 데이터 섹션이 허용된 종류 외의 데이터 종류를 가지는 비정상 데이터를 포함할 수 있다.The attack packet is abnormal data in which the data length section has a value outside the allowed length range, abnormal data in which the data section has data of a length different from the data length section, and abnormal data in which the data section has a value outside the allowed value. The data, or data section, may contain abnormal data having a data type other than the permitted type.

상기 공격 패킷을 전송하는 단계는 상기 대상 장치의 설정 값 또는 작동에 관련된 정보를 저장하되 쓰기 가능한 상기 대상 장치의 복수의 메모리 주소에 대한 공격 패킷들을 서로 다른 순서로 전송하는 단계를 포함할 수 있다.The step of transmitting the attack packet may include transmitting attack packets to a plurality of memory addresses of the target device that store settings or operation-related information of the target device and are writable in different orders.

공개된 기존 취약점 정보에 관련된 값을 가지는 공격 패킷을 생성하여 전송하는 기존 취약점 공격과, 상기 대상 장치의 작동에 관련된 정보를 저장한 상기 대상 장치의 모든 메모리 주소를 대상으로 각각 허용된 범위 외에서 변경되는 값을 가지는 복수의 공격 패킷을 생성하여 연속으로 전송하는 무작위 공격과, 상기 대상 장치의 작동에 관련된 정보를 저장한 상기 대상 장치의 복수의 메모리 주소에 대한 공격 패킷들을 서로 다른 순서로 전송하는 의미론적 공격을 각각 포함하는 공격 그룹 중에서 선택된 적어도 2개의 공격이 상기 공격 패킷을 전송하는 단계에서 각각 수행될 수 있다.Existing vulnerability attacks that generate and transmit attack packets with values related to existing disclosed vulnerability information, and changes outside the permitted range targeting all memory addresses of the target device that store information related to the operation of the target device. A random attack that generates a plurality of attack packets with a value and transmits them sequentially, and a semantic attack that transmits attack packets in different orders to a plurality of memory addresses of the target device that store information related to the operation of the target device. At least two attacks selected from attack groups each including an attack may be performed in the step of transmitting the attack packet.

상기 공격 그룹 중에서 어느 하나의 공격에 따른 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계를 수행하며, 이후 상기 공격 그룹 중에서 다른 하나의 공격에 따른 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계가 수행될 수 있다.Performing the steps of transmitting the attack packet according to one attack among the attack group, transmitting the normal packet, and the determining step, and then transmitting the attack packet according to another attack among the attack group. The steps of performing, transmitting the normal packet, and determining may be performed.

상기 공격 그룹 중에서 어느 하나의 공격에 따른 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계를 수행하고, 이후 상기 공격 그룹 중에서 다른 하나의 공격에 따른 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계를 수행하며, 이후 상기 공격 그룹 중에서 나머지 하나의 공격에 따른 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계가 수행될 수 있다. Performing the steps of transmitting the attack packet according to one attack among the attack group, transmitting the normal packet, and the determining step, and then transmitting the attack packet according to another attack among the attack group. performing the steps of transmitting the normal packet and the determining step, and then performing the step of transmitting the attack packet according to the remaining attack among the attack group, transmitting the normal packet, and the determining step. can be performed.

본 발명의 일 실시예에 따른 장치는 대상 장치와 직렬 통신을 수행하는 통신부; 및 상기 통신부의 동작을 제어하면서 상기 대상 장치의 직렬 통신에 따른 취약성 테스트를 제어하는 제어부;를 포함한다.A device according to an embodiment of the present invention includes a communication unit that performs serial communication with a target device; and a control unit that controls the operation of the communication unit and controls a vulnerability test according to serial communication of the target device.

상기 제어부는, 상기 대상 장치로 공격 패킷을 전송한 후에 상기 대상 장치로 허용된 정상 범위 내의 값을 포함하는 정상 패킷을 전송하도록 제어할 수 있으며, 이후 상기 대상 장치의 가동 중지 또는 랙(lag) 현상이 발생하거나 상기 상 장치가 허용된 범위 외의 값을 가지는 응답 패킷으로 응답하는 경우에 상기 대상 장치가 상기 공격 패킷에 대해 취약성이 있는 것으로 판단할 수 있다.After transmitting an attack packet to the target device, the control unit may control to transmit a normal packet containing a value within a normal range allowed to the target device, and thereafter, stop operation or lag of the target device. If this occurs or the target device responds with a response packet with a value outside the allowed range, it may be determined that the target device is vulnerable to the attack packet.

상기와 같이 구성되는 본 발명은 모드버스 RTU 등과 같은 프로토콜 방식의 직렬 통신로 연결되는 대상 장치에 대해 해당 프로토콜의 직렬 통신에 따른 취약성을 테스트할 수 있어, 종래의 TCP/IP 프로토콜 방식에 따른 취약성 테스트의 한계를 극복할 수 있는 이점이 있다.The present invention configured as described above can test the vulnerability of a target device connected through serial communication of a protocol such as Modbus RTU, according to the serial communication of the corresponding protocol, and test the vulnerability according to the conventional TCP/IP protocol method. There is an advantage in overcoming the limitations of

또한, 본 발명은 기존 취약점 공격, 무작위 공격 단계 및 의미론적 공격으로 이루어진 공격 그룹에서 적어도 2개를 선택하여 공격하는 복합 공격을 수행함으로써, 대상 장치의 다양한 설정 값 또는 동작에 대한 취약성을 보다 면밀하게 확인할 수 있는 이점이 있다.In addition, the present invention performs a complex attack that selects and attacks at least two from an attack group consisting of existing vulnerability attacks, random attack steps, and semantic attacks, to more closely identify vulnerabilities to various setting values or operations of the target device. There are benefits that can be confirmed.

본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The effects that can be obtained from the present invention are not limited to the effects mentioned above, and other effects not mentioned can be clearly understood by those skilled in the art from the description below. will be.

도 1은 본 발명의 일 실시예에 따른 테스트 장치(100)와 대상 장치(200)의 연결 개념도를 나타낸다.
도 2는 본 발명의 일 실시예에 따른 테스트 장치 및 대상 장치(100, 200)의 블록 구성도를 나타낸다.
도 3은 테스트 장치(100)의 제어부(130)의 블록 구성도를 나타낸다.
도 4는 본 발명의 일 실시예에 따른 테스트 방법의 순서도를 나타낸다.
도 5는 본 발명의 일 실시예에 따른 테스트 방법에서 수행되는 공격 종류를 나타낸다.
도 6은 메모리 주소에 대한 예시를 나타낸다.
도 7은 본 발명의 실험에서 발견된 4개의 취약점에 대한 내용을 나타낸다.
Figure 1 shows a conceptual diagram of the connection between a test device 100 and a target device 200 according to an embodiment of the present invention.
Figure 2 shows a block diagram of a test device and target devices 100 and 200 according to an embodiment of the present invention.
FIG. 3 shows a block diagram of the control unit 130 of the test device 100.
Figure 4 shows a flowchart of a test method according to an embodiment of the present invention.
Figure 5 shows the types of attacks performed in the test method according to an embodiment of the present invention.
Figure 6 shows an example of a memory address.
Figure 7 shows details of four vulnerabilities discovered in the experiment of the present invention.

본 발명의 상기 목적과 수단 및 그에 따른 효과는 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 보다 분명해질 것이며, 그에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 또한, 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다.The above purpose and means of the present invention and the resulting effects will become clearer through the following detailed description in conjunction with the accompanying drawings, and thus the technical idea of the present invention will be easily understood by those skilled in the art. It will be possible to implement it. Additionally, in describing the present invention, if it is determined that a detailed description of known technologies related to the present invention may unnecessarily obscure the gist of the present invention, the detailed description will be omitted.

본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며, 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 경우에 따라 복수형도 포함한다. 본 명세서에서, "포함하다", “구비하다”, “마련하다” 또는 “가지다” 등의 용어는 언급된 구성요소 외의 하나 이상의 다른 구성요소의 존재 또는 추가를 배제하지 않는다.The terminology used herein is for describing embodiments and is not intended to limit the invention. In this specification, singular forms also include plural forms, as appropriate, unless specifically stated otherwise in the context. In this specification, terms such as “comprise,” “provide,” “provide,” or “have” do not exclude the presence or addition of one or more other components other than the mentioned components.

본 명세서에서, “또는”, “적어도 하나” 등의 용어는 함께 나열된 단어들 중 하나를 나타내거나, 또는 둘 이상의 조합을 나타낼 수 있다. 예를 들어, “또는 B”“및 B 중 적어도 하나”는 A 또는 B 중 하나만을 포함할 수 있고, A와 B를 모두 포함할 수도 있다.In this specification, terms such as “or” and “at least one” may represent one of words listed together, or a combination of two or more. For example, “or B” “and at least one of B” may include only A or B, or both A and B.

본 명세서에서, “예를 들어” 등에 따르는 설명은 인용된 특성, 변수, 또는 값과 같이 제시한 정보들이 정확하게 일치하지 않을 수 있고, 허용 오차, 측정 오차, 측정 정확도의 한계와 통상적으로 알려진 기타 요인을 비롯한 변형과 같은 효과로 본 발명의 다양한 실시 예에 따른 발명의 실시 형태를 한정하지 않아야 할 것이다.In this specification, descriptions under “for example” and the like may not exactly match the information presented, such as cited characteristics, variables, or values, and may be subject to tolerances, measurement errors, limits of measurement accuracy and other commonly known factors. Effects such as modifications, including, should not limit the embodiments of the invention according to various embodiments of the present invention.

본 명세서에서, 어떤 구성요소가 다른 구성요소에 '연결되어’ 있다거나 '접속되어' 있다고 기재된 경우, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성 요소에 '직접 연결되어' 있다거나 '직접 접속되어' 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해될 수 있어야 할 것이다.In this specification, when a component is described as being 'connected' or 'connected' to another component, it may be directly connected or connected to the other component, but other components may exist in between. It must be understood that it may be possible. On the other hand, when a component is mentioned as being 'directly connected' or 'directly connected' to another component, it should be understood that there are no other components in between.

본 명세서에서, 어떤 구성요소가 다른 구성요소의 '상에' 있다거나 '접하여' 있다고 기재된 경우, 다른 구성요소에 상에 직접 맞닿아 있거나 또는 연결되어 있을 수 있지만, 중간에 또 다른 구성요소가 존재할 수 있다고 이해되어야 할 것이다. 반면, 어떤 구성요소가 다른 구성요소의 '바로 위에' 있다거나 '직접 접하여' 있다고 기재된 경우에는, 중간에 또 다른 구성요소가 존재하지 않은 것으로 이해될 수 있다. 구성요소 간의 관계를 설명하는 다른 표현들, 예를 들면, '~사이에'와 '직접 ~사이에' 등도 마찬가지로 해석될 수 있다.In this specification, when a component is described as being ‘on’ or ‘in contact with’ another component, it may be in direct contact with or connected to the other component, but there may be another component in between. It must be understood that it can be done. On the other hand, if a component is described as being 'right above' or 'in direct contact' with another component, it can be understood that there is no other component in the middle. Other expressions that describe the relationship between components, such as 'between' and 'directly between', can be interpreted similarly.

본 명세서에서, '제1', '제2' 등의 용어는 다양한 구성요소를 설명하는데 사용될 수 있지만, 해당 구성요소는 위 용어에 의해 한정되어서는 안 된다. 또한, 위 용어는 각 구성요소의 순서를 한정하기 위한 것으로 해석되어서는 안되며, 하나의 구성요소와 다른 구성요소를 구별하는 목적으로 사용될 수 있다. 예를 들어, '제1구성요소'는 '제2구성요소'로 명명될 수 있고, 유사하게 '제2구성요소'도 '제1구성요소'로 명명될 수 있다.In this specification, terms such as 'first' and 'second' may be used to describe various components, but the components should not be limited by the above terms. Additionally, the above term should not be interpreted as limiting the order of each component, but may be used for the purpose of distinguishing one component from another component. For example, a 'first component' may be named a 'second component', and similarly, a 'second component' may also be named a 'first component'.

다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있을 것이다. 또한, 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다. Unless otherwise defined, all terms used in this specification may be used with meanings that can be commonly understood by those skilled in the art to which the present invention pertains. Additionally, terms defined in commonly used dictionaries are not interpreted ideally or excessively unless clearly specifically defined.

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일 실시예를 상세히 설명하도록 한다.Hereinafter, a preferred embodiment according to the present invention will be described in detail with reference to the attached drawings.

도 1은 본 발명의 일 실시예에 따른 테스트 장치(100)와 대상 장치(200)의 연결 개념도를 나타내며, 도 2는 본 발명의 일 실시예에 따른 테스트 장치 및 대상 장치(100, 200)의 블록 구성도를 나타낸다.Figure 1 shows a conceptual diagram of the connection between a test device 100 and a target device 200 according to an embodiment of the present invention, and Figure 2 shows a connection diagram of a test device and a target device 100 and 200 according to an embodiment of the present invention. Shows the block configuration diagram.

도 1을 참조하면, 본 발명의 일 실시예에 따른 테스트 장치(100)는 대상 장치(200)에 직렬 통신 방식으로 연결되어 대상 장치(200)에 적용된 직렬 통신의 프로토콜(protocol)에 따른 취약성을 테스트하는 장치이다. Referring to FIG. 1, the test device 100 according to an embodiment of the present invention is connected to the target device 200 through serial communication to detect vulnerabilities according to the serial communication protocol applied to the target device 200. It is a testing device.

한편, 종래 기술이 TCP/IP 프로토콜 기반의 취약성 테스트 방식을 수행하는 것과 달리, 본 테스트 장치(100)는 대상 장치(200)가 모드버스 RTU(Modbus Remote Terminal Unit) 등의 직렬 통신 프로토콜을 사용하는 경우에 해당 직렬 통신 프로토콜에 적용되기 위한 취약성 테스트 방식을 수행한다.Meanwhile, unlike the prior art that performs a TCP/IP protocol-based vulnerability testing method, this test device 100 uses a serial communication protocol such as a Modbus RTU (Modbus Remote Terminal Unit) in the target device 200. In this case, a vulnerability testing method is performed to apply to the corresponding serial communication protocol.

특히, 모드버스 RTU의 직렬 통신 프로토콜이 적용된 경우, 대상 장치(200)로 비정상 데이터를 전송하더라도, 대상 장치(200)는 해당 비정상 데이터에 대해 거부 또는 삭제 등을 수행하지만, 해당 비정상 데이터의 수신에 따른 오류 메시지 등을 송신 측으로 대부분 응답하지 않으므로, 종래 기술에 따른 취약성 테스트 방식이 적용되기 어렵다. In particular, when the serial communication protocol of Modbus RTU is applied, even if abnormal data is transmitted to the target device 200, the target device 200 rejects or deletes the abnormal data, but does not receive the abnormal data. Since most error messages, etc., are not responded to by the sender, it is difficult to apply the vulnerability testing method according to the prior art.

이를 해결하기 위해, 본 테스트 장치(100)는 대상 장치(200)에 적용된 모드버스 RTU의 직렬 통신 프로토콜 등에 대한 취약성을 테스트하기 위한 장치로서, 컴퓨팅(computing)이 가능한 전자 장치 또는 컴퓨팅 네트워크일 수 있다.To solve this, the test device 100 is a device for testing vulnerabilities to the serial communication protocol of the Modbus RTU applied to the target device 200, and may be an electronic device capable of computing or a computing network. .

예를 들어, 전자 장치는 데스크탑 PC(desktop personal computer), 랩탑 PC(laptop personal computer), 태블릿 PC(tablet personal computer), 넷북 컴퓨터(netbook computer), 워크스테이션(workstation), PDA(personal digital assistant), 스마트폰(smartphone), 스마트패드(smartpad), 또는 휴대폰(mobile phone), 등이거나, 취약성 테스트를 위해 별도로 제작된 전자 장치일 수 있으나, 이에 한정되는 것은 아니다.For example, electronic devices include desktop personal computers, laptop personal computers, tablet personal computers, netbook computers, workstations, and personal digital assistants (PDAs). , a smartphone, smartpad, or mobile phone, or an electronic device separately manufactured for vulnerability testing, but is not limited thereto.

또한, 대상 장치(200)는 취약성 테스트의 대상이 되는 장치로서, 모드버스 RTU의 직렬 통신 프로토콜 등을 기반으로 직렬 통신 가능한 장치이다. 예를 들어, 대상 장치(200)는 PLC(programmable logic controller) 장치와 같이 다양한 산업 제어용으로 사용되는 장치, 또는 스마트 분배 전기 장치를 포함하는 보호 계전기 장치 등일 수 있으나, 이에 한정되는 것은 아니다.Additionally, the target device 200 is a device that is subject to a vulnerability test and is capable of serial communication based on the serial communication protocol of Modbus RTU. For example, the target device 200 may be a device used for various industrial control purposes, such as a programmable logic controller (PLC) device, or a protection relay device including a smart distribution electric device, but is not limited thereto.

이러한 테스트 장치 및 대상 장치(100, 200)는, 도 2에 도시된 바와 같이, 통신부(110), 메모리(120) 및 제어부(130)를 포함할 수 있다.These test devices and target devices 100 and 200 may include a communication unit 110, a memory 120, and a control unit 130, as shown in FIG. 2 .

통신부(110, 210)는 타 장치와 통신을 수행하는 구성이다. 즉, 테스트 장치(100)의 통신부(110)와 대상 장치(200)의 통신부(210)는 서로 연결되어 모드버스 RTU 등의 직렬 통신 프로토콜을 기반으로 직렬 통신을 수행할 수 있다. 이를 위해, 통신부(110, 210)는 직렬 통신을 위한 구성을 포함한다. 예를 들어, 직렬 통신 구성은 RS485, RS423, RS422, RS232 또는 USB 방식으로 연결될 수 있으나, 이에 한정되는 것은 아니다. The communication units 110 and 210 are configured to communicate with other devices. That is, the communication unit 110 of the test device 100 and the communication unit 210 of the target device 200 are connected to each other and can perform serial communication based on a serial communication protocol such as Modbus RTU. To this end, the communication units 110 and 210 include components for serial communication. For example, the serial communication configuration may be connected by RS485, RS423, RS422, RS232, or USB, but is not limited thereto.

즉, 테스트 장치(100)의 통신부(110)는 후술할 본 발명에 따른 테스트 방법의 수행 시에 직렬 통신 방식으로 공격 패킷, 정상 패킷 등을 대상 장치(200)의 통신부(210)로 전송할 수 있으며, 이후에 대상 장치(200)의 통신부(210)로부터 직렬 통신 방식으로 응답 패킷 등을 수신할 수도 있다.That is, the communication unit 110 of the test device 100 can transmit attack packets, normal packets, etc. to the communication unit 210 of the target device 200 through serial communication when performing the test method according to the present invention, which will be described later. , Later, a response packet, etc. may be received from the communication unit 210 of the target device 200 through serial communication.

메모리(120, 220)는 테스트 장치(100) 및 대상 장치(200)의 동작에 필요한 각종 정보를 저장한다. 가령, 테스트 장치(100)의 메모리(120)의 저장 정보로는 기존 취약점 정보(Common Vulnerabilities and Exposures, CVE), 공격 패킷에 대한 정보, 정상 패킷에 대한 정보, 후술할 본 발명에 따른 테스트 방법에 관련된 프로그램 정보 등이 포함될 수 있으나, 이에 한정되는 것은 아니다. 또한, 대상 장치(200)의 메모리(220)의 저장 정보로는 대상 장치(200)에 대한 각종 설정 값 및 작동에 관련된 정보를 포함할 수 있으나, 이에 한정되는 것은 아니다.The memories 120 and 220 store various information necessary for the operation of the test device 100 and the target device 200. For example, information stored in the memory 120 of the test device 100 includes existing vulnerability information (Common Vulnerabilities and Exposures, CVE), information about attack packets, information about normal packets, and the test method according to the present invention, which will be described later. Related program information may be included, but is not limited to this. Additionally, information stored in the memory 220 of the target device 200 may include, but is not limited to, information related to various setting values and operations for the target device 200.

예를 들어, 메모리(120, 220)는 그 유형에 따라 하드디스크 타입(hard disk type), 마그네틱 매체 타입(Magnetic media type), CD-ROM(compact disc read only memory), 광기록 매체 타입(Optical Media type), 자기-광 매체 타입(Magneto-optical media type), 멀티미디어 카드 마이크로 타입(Multimedia card micro type), 플래시 저장부 타입(flash memory type), 롬 타입(read only memory type), 또는 램 타입(random access memory type) 등을 포함할 수 있으나, 이에 한정되는 것은 아니다. 또한, 메모리(120, 220)는 그 용도/위치에 따라 캐시(cache), 버퍼, 주기억장치, 또는 보조기억장치이거나 별도로 마련된 저장 시스템일 수 있으나, 이에 한정되는 것은 아니다.For example, the memories 120 and 220 are classified into hard disk type, magnetic media type, CD-ROM (compact disc read only memory), and optical recording media type depending on their type. Media type, Magneto-optical media type, Multimedia card micro type, flash memory type, read only memory type, or RAM type. (random access memory type), etc., but is not limited thereto. Additionally, the memories 120 and 220 may be a cache, a buffer, a main memory, an auxiliary memory, or a separately provided storage system depending on their purpose/location, but are not limited thereto.

제어부(130, 230)는 테스트 장치(100) 및 대상 장치(200)의 다양한 제어 동작을 수행할 수 있다. 가령, 테스트 장치(100의 제어부(130)는 테스트 장치(100)의 나머지 구성인 통신부(110) 및 메모리(120) 등의 동작을 제어하면서, 대상 장치(200)의 직렬 통신에 따른 취약성 테스트를 제어할 수 있다. 즉, 제어부(130)는 메모리(120)에 저장된 정보를 이용하여 후술할 본 발명에 따른 테스트 방법의 수행을 제어할 수 있다. 또한, 대상 장치(200)의 제어부(230)는 대상 장치(200)의 나머지 구성인 통신부(210) 및 메모리(220) 등의 동작을 제어하면서 대상 장치(200)가 가지는 산업용 제어 등의 고유 기능을 제어할 수 있다.The control units 130 and 230 may perform various control operations of the test device 100 and the target device 200. For example, the control unit 130 of the test device 100 controls the operation of the communication unit 110 and memory 120, which are the remaining components of the test device 100, and performs a vulnerability test according to serial communication of the target device 200. In other words, the control unit 130 can control the performance of the test method according to the present invention, which will be described later, using the information stored in the memory 120. In addition, the control unit 230 of the target device 200 Can control unique functions of the target device 200, such as industrial control, while controlling the operations of the remaining components of the target device 200, such as the communication unit 210 and the memory 220.

예를 들어, 제어부(130, 230)는 하드웨어인 프로세서(processor) 또는 해당 프로세서에서 수행되는 소프트웨어인 프로세스(process) 등을 포함할 수 있으나, 이에 한정되는 것은 아니다.For example, the control units 130 and 230 may include a hardware processor or a software process executed on the processor, but are not limited thereto.

한편, 테스트 장치(100) 및 대상 장치(200)는 입력부(미도시) 또는 표시부(미도시) 등을 추가적으로 포함할 수 있다.Meanwhile, the test device 100 and the target device 200 may additionally include an input unit (not shown) or a display unit (not shown).

이때, 입력부는 사용자의 입력에 대응하여, 입력데이터를 발생시키며, 다양한 입력수단을 포함할 수 있다. 예를 들어, 입력부는 키보드(key board), 키패드(key pad), 돔 스위치(dome switch), 터치 패널(touch panel), 터치 키(touch key), 터치 패드(touch pad), 마우스(mouse), 메뉴 버튼(menu button) 등을 포함할 수 있으나, 이에 한정되는 것은 아니다.At this time, the input unit generates input data in response to the user's input and may include various input means. For example, the input unit includes a keyboard, key pad, dome switch, touch panel, touch key, touch pad, and mouse. , menu button, etc., but is not limited thereto.

또한, 표시부는 다양한 영상 데이터를 화면으로 표시하는 것으로서, 비발광형 구성이나 발광형 구성을 포함할 수 있다. 예를 들어, 표시부는 발광 다이오드(LED; light emitting diode), 액정 디스플레이(LCD; liquid crystal display) 패널, 발광 다이오드(LED; light emitting diode) 디스플레이 패널, 유기 발광 다이오드(OLED; organic LED) 디스플레이 패널, 마이크로 전자기계 시스템(MEMS; micro electro mechanical systems) 디스플레이 패널, 또는 전자 종이(electronic paper) 디스플레이 패널 등을 포함할 수 있으나, 이에 한정되는 것은 아니다. 또한, 표시부는 입력부와 결합되어 터치 스크린(touch screen) 등으로 구현될 수도 있다.Additionally, the display unit displays various image data on the screen and may include a non-emissive configuration or an emissive configuration. For example, the display unit may include a light emitting diode (LED), a liquid crystal display (LCD) panel, a light emitting diode (LED) display panel, or an organic light emitting diode (OLED) display panel. , a micro electro mechanical systems (MEMS) display panel, or an electronic paper display panel, but is not limited thereto. Additionally, the display unit may be combined with the input unit and implemented as a touch screen or the like.

도 3은 테스트 장치(100)의 제어부(130)의 블록 구성도를 나타낸다.FIG. 3 shows a block diagram of the control unit 130 of the test device 100.

도 3을 참조하면, 테스트 장치(100)의 제어부(130)는 후술할 본 발명에 따른 테스트 방법의 수행을 제어하기 위해, 공격 패킷 생성부(131), 정상 패킷 생성부(132) 및 취약성 판단부(133)를 포함할 수 있다. 예를 들어, 공격 패킷 생성부(131), 정상 패킷 생성부(132) 및 취약성 판단부(133)는 제어부(130)의 하드웨어 구성이거나, 제어부(130)에서 수행되는 소프트웨어인 프로세스일 수 있으나, 이에 한정되는 것은 아니다.Referring to FIG. 3, the control unit 130 of the test device 100 uses an attack packet generation unit 131, a normal packet generation unit 132, and a vulnerability determination unit to control the performance of the test method according to the present invention, which will be described later. It may include part 133. For example, the attack packet generation unit 131, the normal packet generation unit 132, and the vulnerability determination unit 133 may be hardware components of the control unit 130 or may be software processes performed in the control unit 130. It is not limited to this.

이하, 본 발명의 일 실시예에 따른 테스트 방법에 대해 보다 상세하게 설명하도록 한다.Hereinafter, the test method according to an embodiment of the present invention will be described in more detail.

도 4는 본 발명의 일 실시예에 따른 테스트 방법의 순서도를 나타낸다.Figure 4 shows a flowchart of a test method according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 테스트 방법은 대상 장치(200)에 직렬 통신 방식으로 연결된 테스트 장치(100)에서 대상 장치(200)의 직렬 통신에 따른 취약성을 테스트하기 위한 방법으로서, 도 4에 도시된 바와 같이, S100 내지 S300을 포함할 수 있다.The test method according to an embodiment of the present invention is a method for testing the vulnerability of the target device 200 due to serial communication in the test device 100 connected to the target device 200 through serial communication, as shown in FIG. 4 As described above, it may include S100 to S300.

S100은 제어부(130)의 공격 패킷 생성부(131)가 공격 패킷을 생성하여 통신부(110)를 통해 대상 장치(200)의 통신부(210)로 전송하는 단계이다. 즉, 공격 패킷은 대상 장치(200)의 설정 값을 변경하거나 또는 대상 장치(200)가 특정 동작을 수행하도록 하는 패킷으로서, 정상 데이터 또는 비정상 데이터를 포함할 수 있다. S100 is a step in which the attack packet generation unit 131 of the control unit 130 generates an attack packet and transmits it to the communication unit 210 of the target device 200 through the communication unit 110. That is, the attack packet is a packet that changes the settings of the target device 200 or causes the target device 200 to perform a specific operation, and may include normal or abnormal data.

이때, 정상 데이터는 패킷의 각 섹션이 해당 패킷의 종류에 따라 허용된 정상 범위 내의 값을 가지는 경우의 데이터를 지칭한다. 또한, 비정상 데이터는 패킷의 각 섹션이 해당 패킷의 종류에 따라 허용된 정상 범위 외의 값을 가지는 경우의 데이터를 지칭한다. 즉, 후술할 공격 종류에 따라 공격 패킷은 정상 데이터를 포함하거나 비정상 데이터를 포함할 수 있다.At this time, normal data refers to data where each section of the packet has a value within the normal range allowed depending on the type of the packet. Additionally, abnormal data refers to data where each section of a packet has a value outside the normal range allowed depending on the type of the packet. That is, depending on the type of attack, which will be described later, the attack packet may contain normal data or abnormal data.

예를 들어, 비정상 데이터는 데이터 길이(data length) 섹션이 허용된 길이 범위 외의 값을 가지나, 데이터 섹션이 데이터 길이 섹션과 다른 길이의 데이터를 가지거나, 데이터 섹션이 허용된 값 외의 값을 가지거나, 데이터 섹션이 허용된 종류 외의 데이터 종류를 가질 수 있으나, 이에 한정되는 것은 아니다.For example, abnormal data may occur if the data length section has a value outside the allowed length range, the data section has data of a different length than the data length section, or the data section has a value outside the allowed , a data section may have a data type other than the permitted type, but is not limited to this.

즉, 후술할 기존 취약점 공격을 수행할 경우, 공격 패킷 생성부(131)는 비정상 데이터를 포함하는 공격 패킷을 생성할 수 있다. 또한, 후술할 무작위 공격 또는 후술할 의미론적 공격을 수행할 경우, 공격 패킷 생성부(131)는 정상 데이터를 포함하는 공격 패킷 또는 비정상 데이터를 포함하는 공격 패킷을 생성할 수 있다.That is, when performing an attack on an existing vulnerability, which will be described later, the attack packet generator 131 may generate an attack packet containing abnormal data. Additionally, when performing a random attack to be described later or a semantic attack to be described later, the attack packet generator 131 may generate an attack packet including normal data or an attack packet including abnormal data.

다만, S100에서, 공격 패킷 생성부(131)는 후술할 공격의 종류에 따라 하나의 공격 패킷을 생성하여 전송하거나, 복수의 공격 패킷을 생성하여 전송할 수 있다. 이에 대해서는 후술할 무작위 공격에서 보다 상세하게 설명하도록 한다.However, in S100, the attack packet generator 131 may generate and transmit one attack packet or generate and transmit a plurality of attack packets depending on the type of attack, which will be described later. This will be explained in more detail in the random attacks described later.

이후, S200은 제어부(130)의 정상 패킷 생성부(132)가 정상 패킷을 생성하여 통신부(110)를 통해 대상 장치(200)의 통신부(210)로 전송하는 단계이다. 즉, 정상 패킷은 대상 장치(200)의 설정 값을 변경하거나 또는 대상 장치(200)가 특정 동작을 수행하도록 하되 정상 데이터를 포함하는 패킷이다. 가령, S200에서 전송되는 정상 패킷은 그 이전의 S100에서 전송된 공격 패킷이 공격한 대상 장치(200)의 메모리(220)의 해당 메모리 주소에 관련된 설정 값 변경 또는 특정 동작 수행을 위한 패킷일 수 있으나, 이에 한정되는 것은 아니다. 예를 들어, 대상 장치(200)의 메모리(220)에서 A의 메모리 주소에 관련된 공격 패킷이 S100에서 전송된 경우, S200에서는 대상 장치(200)의 메모리(220)에서 동일한 A의 메모리 주소에 관련된 정상 데이터를 포함하는 정상 패킷을 전송할 수 있다.Thereafter, S200 is a step in which the normal packet generation unit 132 of the control unit 130 generates a normal packet and transmits it to the communication unit 210 of the target device 200 through the communication unit 110. In other words, a normal packet is a packet that changes the setting value of the target device 200 or causes the target device 200 to perform a specific operation but includes normal data. For example, a normal packet transmitted from S200 may be a packet for changing a setting value or performing a specific operation related to the memory address of the memory 220 of the target device 200 that was attacked by an attack packet transmitted from the previous S100. , but is not limited to this. For example, if an attack packet related to the memory address of A in the memory 220 of the target device 200 is transmitted in S100, in S200, the attack packet related to the memory address of A in the memory 220 of the target device 200 is transmitted. Normal packets containing normal data can be transmitted.

다만, 대상 장치(200)는 제어부(230)의 사양에 따라 테스트 장치(100)로부터 수신된 특정 종류의 패킷에 대해 응답이 가능할 수도 있다. 이 경우, 정상 패킷 생성부(132)는 대상 장치(200)로부터 응답되는 종류의 패킷을 정상 패킷으로 생성하여 전송할 수 있다.However, the target device 200 may be able to respond to a specific type of packet received from the test device 100 according to the specifications of the control unit 230. In this case, the normal packet generator 132 may generate the type of packet responded to from the target device 200 as a normal packet and transmit it.

이후, S300은 제어부(130)의 취약성 판단부(133)가 S200의 정상 패킷의 수신에 따른 테스트 장치(100)의 상태를 기반으로 대상 장치(200)에 대한 S100의 공격 패킷의 취약성 여부를 판단하는 단계이다. 즉, 대상 장치(200)가 비정상 상태인 경우, 취약성 판단부(133)는 대상 장치(200)가 S100의 공격 패킷에 대해 취약성이 있는 것으로 판단할 수 있다. 반면, 대상 장치(200)가 정상 상태인 경우, 취약성 판단부(133)는 대상 장치(200)가 S100의 공격 패킷에 대해 취약성이 없는 것으로 판단할 수 있다. Afterwards, S300 determines whether the vulnerability determination unit 133 of the control unit 130 is vulnerable to an attack packet of S100 on the target device 200 based on the state of the test device 100 according to the reception of a normal packet of S200. This is the step. That is, if the target device 200 is in an abnormal state, the vulnerability determination unit 133 may determine that the target device 200 is vulnerable to the attack packet of S100. On the other hand, when the target device 200 is in a normal state, the vulnerability determination unit 133 may determine that the target device 200 is not vulnerable to the attack packet of S100.

이때, 대상 장치(200)의 비정상 상태는 대상 장치(200)의 가동 중지 현상 또는 랙(lag) 현상이 발생하거나, 대상 장치(200)가 비정상 데이터(즉, 허용된 범위 외의 값)을 가지는 응답 패킷으로 응답하는 경우를 포함할 수 있다. 특히, 이러한 취약성 판단은 S200의 정상 패킷에 대한 응답 가능 여부에 따라 다양하게 수행될 수 있다.At this time, the abnormal state of the target device 200 is when the target device 200 stops operating or lags, or the target device 200 responds with abnormal data (i.e., a value outside the allowed range). This may include cases where a response is made with a packet. In particular, this vulnerability determination can be performed in various ways depending on whether the S200 can respond to normal packets.

가령, 낮은 사양의 제어부(230) 구비 등으로 인해, 테스트 장치(200)가 S200의 정상 패킷에 대해 응답이 불가능한 경우가 있다. 이 경우, 대상 장치(200)에서 가동 중지 현상 또는 랙 현상의 비정상 상태가 발생하면, 취약성 판단부(133)는 대상 장치(200)가 S100의 공격 패킷에 대해 취약성이 있는 것으로 판단할 수 있다. 반면, 대상 장치(200)에서 가동 중지 현상 또는 랙 현상의 비정상 상태가 발생하지 않고 대상 장치(200)가 정상 가동한다면, 취약성 판단부(133)는 대상 장치(200)가 S100의 공격 패킷에 대해 취약성이 없는 것으로 판단할 수 있다.For example, there are cases where the test device 200 is unable to respond to normal packets from S200 due to the provision of the control unit 230 with low specifications. In this case, if an abnormal state such as an outage or lag phenomenon occurs in the target device 200, the vulnerability determination unit 133 may determine that the target device 200 is vulnerable to the attack packet of S100. On the other hand, if an abnormal state such as outage or lag does not occur in the target device 200 and the target device 200 operates normally, the vulnerability determination unit 133 determines whether the target device 200 responds to the attack packet of S100. It can be judged that there is no vulnerability.

또한, 높은 사양의 제어부(230) 구비 등으로 인해, 테스트 장치(200)가 S200의 정상 패킷에 대해 응답이 가능한 경우가 있다. 이 경우, 대상 장치(200)가 비정상 데이터를 가지는 응답 패킷으로 응답하는 비정상 상태가 발생한다면, 취약성 판단부(133)는 대상 장치(200)가 S100의 공격 패킷에 대해 취약성이 있는 것으로 판단할 수 있다. 반면, 대상 장치(200)가 정상 데이터를 가지는 응답 패킷으로 응답하는 정상 상태가 발생한다면, 취약성 판단부(133)는 대상 장치(200)가 S100의 공격 패킷에 대해 취약성이 없는 것으로 판단할 수 있다.Additionally, due to the provision of a high-specification control unit 230, etc., there are cases where the test device 200 is able to respond to normal packets of S200. In this case, if an abnormal state occurs in which the target device 200 responds with a response packet with abnormal data, the vulnerability determination unit 133 may determine that the target device 200 is vulnerable to the attack packet of S100. there is. On the other hand, if a normal state occurs in which the target device 200 responds with a response packet with normal data, the vulnerability determination unit 133 may determine that the target device 200 is not vulnerable to the attack packet of S100. .

도 5는 본 발명의 일 실시예에 따른 테스트 방법에서 수행되는 공격 종류를 나타낸다.Figure 5 shows the types of attacks performed in the test method according to an embodiment of the present invention.

한편, S100에서, 공격 패킷 생성부(131)는 공격 종류에 따라 다양한 공격 패킷을 생성하여 대상 장치(200)로 전송할 수 있다. 이때, 공격 종류에 따라 공격 패킷의 종류도 나뉠 수 있다. 즉, 도 5를 참조하면, 공격 종류는 기존 취약점 공격, 무작위 공격, 또는 의미론적 공격을 포함할 수 있다. 이에 따라, 공격 패킷 생성부(131)는 기존 취약점 공격, 무작위 공격 및 의미론적 공격로 이루어진 공격 그룹에서 적어도 하나의 공격 종류를 선택하여 해당 공격 종류에 따른 공격 패킷을 생성할 수 있다.Meanwhile, in S100, the attack packet generator 131 may generate various attack packets depending on the type of attack and transmit them to the target device 200. At this time, the type of attack packet may be divided depending on the type of attack. That is, referring to FIG. 5, the type of attack may include an existing vulnerability attack, a brute force attack, or a semantic attack. Accordingly, the attack packet generator 131 may select at least one attack type from an attack group consisting of existing vulnerability attacks, random attacks, and semantic attacks and generate an attack packet according to the attack type.

<기존 취약점 공격><Exploiting existing vulnerabilities>

기존 취약점 공격은 공격 패킷 생성부(131)가 공개된 기존 취약점 정보(Common Vulnerabilities and Exposures, CVE)에 관련된 값을 가지는 공격 패킷을 생성하여 전송하는 공격이다. 즉, CVE는 대상 장치(200) 또는 모드버스 RTU의 직렬 통신 프로토콜에 대해 공개적으로 알려진 보안 결함 목록으로서, 이를 제공하는 서버로부터 다운로드 가능하며 메모리(120)에 기 저장되어 있다.An existing vulnerability attack is an attack in which the attack packet generator 131 creates and transmits an attack packet with values related to existing vulnerability information (Common Vulnerabilities and Exposures, CVE) that has been disclosed. That is, the CVE is a list of publicly known security flaws in the serial communication protocol of the target device 200 or Modbus RTU, can be downloaded from a server that provides it, and is already stored in the memory 120.

이러한 CVE를 참조하여 생성된 공격 패킷은 대상 장치(200)의 메모리(220)에서 대상 장치(200)의 설정 값 변경 또는 작동에 관련된 정보를 저장한 메모리 주소이면서 특히 쓰기 가능한 메모리 주소(이하, “대상 메모리 주소”라 지칭함)에 관련된 패킷일 수 있다.The attack packet generated with reference to this CVE is a memory address in the memory 220 of the target device 200 that stores information related to changing or operating the setting value of the target device 200, and is a particularly writable memory address (hereinafter, “ It may be a packet related to the “target memory address”).

이러한 기존 취약점 공격에 따른 S100이 수행된 후, S200 및 S300이 차례로 수행될 수 있다. 이때, 기존 취약점 공격이 수행되는 경우, 대상 장치(200)에서 비정상 상태가 발생될 가능성이 비교적 높으므로, 제어부(130)는 기존 취약점 공격에 따른 취약성을 하나씩 확인하도록 제어 동작하는 것이 바람직할 수 있다. After S100 according to this existing vulnerability attack is performed, S200 and S300 may be performed sequentially. At this time, when an existing vulnerability attack is performed, there is a relatively high possibility that an abnormal state will occur in the target device 200, so it may be desirable for the control unit 130 to perform a control operation to check vulnerabilities according to the existing vulnerability attack one by one. .

즉, 기존 취약점 공격에 대한 하나의 공격 패킷을 전송하는 S100이 수행된 후 S200 및 S300이 수행되고, 이후 기존 취약점 공격에 대한 다른 하나의 공격 패킷을 전송하는 S100이 수행된 후 S200 및 S300이 수행될 수 있다. 이러한 과정은 모든 기존 취약점 공격에 대해 수행될 수 있다.That is, S200 and S300 are performed after S100, which transmits one attack packet for an existing vulnerability attack, is performed, and then S100, which transmits another attack packet for an existing vulnerability attack, is performed, and then S200 and S300 are performed. It can be. This process can be performed for all existing exploits.

<무작위 공격><Random attack>

무작위 공격은 공격 패킷 생성부(131)가 대상 장치(200)의 메모리(220)의 대상 메모리 주소들을 타겟으로 삼아 집중적으로 복수의 공격 패킷을 생성하여 전송하는 공격이다. 이때, 모든 대상 메모리 주소에 대해 각각 무작위 공격이 수행될 수 있다.A random attack is an attack in which the attack packet generator 131 generates and transmits a plurality of attack packets by targeting target memory addresses of the memory 220 of the target device 200. At this time, random attacks may be performed on all target memory addresses.

즉, 어느 하나의 대상 메모리 주소에 대해 복수의 공격 패킷을 생성하여 연속으로 전송하며, 이러한 전송 과정이 각 대상 메모리 주소에 대해 차례로 수행된다. 이때, 하나의 대상 메모리 주소에 대해 전송되는 복수의 공격 패킷은 비정상 데이터를 포함할 수 있다. 이러한 무작위 공격에 따른 S100이 수행된 후, S200 및 S300이 차례로 수행될 수 있다. That is, multiple attack packets are generated for one target memory address and transmitted sequentially, and this transmission process is performed for each target memory address in turn. At this time, multiple attack packets transmitted to one target memory address may include abnormal data. After S100 according to this random attack is performed, S200 and S300 may be performed sequentially.

다만, 대상 메모리 주소가 많을 뿐 아니라 각 대상 메모리 주소에 대한 공격 패킷도 많다. 이에 따라, S100 수행 시에 무작위 공격의 공격 패킷을 하나씩 전송하여 각각에 대해 S200 및 S300을 별도로 수행하는 경우에 상당한 시간이 소요될 수 있다. 이를 개선하기 위해, S100 수행 시에 무작위 공격의 공격 패킷들을 연속으로 대상 장치로 전송하는 것이 바람직할 수 있다.However, not only are there many target memory addresses, but there are also many attack packets for each target memory address. Accordingly, when performing S100, if attack packets of random attacks are transmitted one by one and S200 and S300 are performed separately for each, it may take a considerable amount of time. To improve this, it may be desirable to continuously transmit random attack attack packets to the target device when performing S100.

가령, 대상 메모리 주소에 대한 취약성을 하나씩 확인하기 위해, 하나의 대상 메모리 주소를 대상으로 하는 무작위 공격의 공격 패킷들을 연속으로 전송하는 S100이 수행된 후 S200 및 S300이 수행되고, 이후 다른 하나의 대상 메모리 주소를 대상으로 하는 무작위 공격의 공격 패킷들을 연속으로 전송하는 S100이 수행된 후 S200 및 S300이 수행될 수 있다. 이러한 과정은 모든 대상 메모리 주소에 대해 수행될 수 있다.For example, in order to check vulnerabilities for target memory addresses one by one, S100, which sequentially transmits random attack attack packets targeting one target memory address, is performed, and then S200 and S300 are performed, and then S200 and S300 are performed. S200 and S300 may be performed after S100, which continuously transmits random attack packets targeting a memory address, is performed. This process can be performed for any target memory address.

또는, 어느 복수의 대상 메모리 주소를 대상으로 하는 무작위 공격의 공격 패킷들을 전송하는 S100이 수행된 후 S200 및 S300이 수행되고, 이후 다른 복수의 대상 메모리 주소를 대상으로 하는 무작위 공격의 공격 패킷들을 전송하는 S100이 수행된 후 S200 및 S300이 수행될 수도 있다. 이러한 과정은 모든 대상 메모리 주소에 대해 수행될 수 있다.Alternatively, S200 and S300 are performed after S100, which transmits attack packets of a random attack targeting a plurality of target memory addresses, and then transmits attack packets of a random attack targeting a plurality of other target memory addresses. S200 and S300 may be performed after S100 is performed. This process can be performed for any target memory address.

또는, 모든 대상 메모리 주소를 대상으로 하는 무작위 공격의 공격 패킷들을 전송하는 S100이 수행된 후 S200 및 S300이 수행될 수도 있다. Alternatively, S200 and S300 may be performed after S100, which transmits random attack packets targeting all target memory addresses, is performed.

한편, S300에서 비정상 상태가 발생하는 경우, 취약성 판단부(133)는 대상 장치(200)가 S100의 무작위 공격에 따른 공격 패킷들에 대해 취약성이 있는 것으로 판단한다. 다만, 이 경우, S100의 무작위 공격에 따른 공격 패킷들 중에 어느 공격 패킷에 의해 취약성이 있는지를 구체적으로 확인할 필요가 있다.Meanwhile, when an abnormal state occurs in S300, the vulnerability determination unit 133 determines that the target device 200 is vulnerable to attack packets resulting from a random attack of S100. However, in this case, it is necessary to specifically check which attack packet among the attack packets resulting from the random attack of S100 has the vulnerability.

이를 위해, 공격 패킷 생성부(131)는 이전에 수행된 S100에서 전송된 공격 패킷들(즉, 취약성이 있는 무작위 공격에 따른 공격 패킷들)을 그룹으로 나눈다. 이후, 각 그룹에 속한 공격 패킷을 이용하여, 그룹 별로 공격 패킷을 전송하면서 다시 S100 내지 S300이 반복 수행된다. 그 결과, 제어부(130)는 취약성이 있는 무작위 공격에 따른 공격 패킷들 중에서 어느 공격 패킷에 취약성이 있는지를 구체적으로 찾아 확인할 수 있다.To this end, the attack packet generator 131 divides attack packets (that is, attack packets resulting from random attacks with vulnerabilities) transmitted in the previously performed S100 into groups. Thereafter, S100 to S300 are repeatedly performed while transmitting attack packets for each group using attack packets belonging to each group. As a result, the control unit 130 can specifically find and confirm which attack packet has the vulnerability among the attack packets resulting from the random attack with vulnerability.

예를 들어, S100에서 전송되는 공격 패킷들은, 데이터 길이(data length) 섹션이 허용된 길이 범위 외에서 서로 다른 값을 가지거나, 데이터 섹션이 데이터 길이 섹션과 다른 길이의 데이터를 가지되 서로 다른 길이의 데이터를 가지거나, 데이터 섹션이 허용된 값 외에서 서로 다른 값을 가지거나, 데이터 섹션이 허용된 종류 외의 데이터 종류를 가지되 서로 다른 데이터 종류를 가질 수 있으나, 이에 한정되는 것은 아니다.For example, in attack packets transmitted from S100, the data length section has different values outside the allowed length range, or the data section has data of a different length than the data length section, but the data length section has different lengths. It may have data, the data section may have a different value than the allowed value, or the data section may have a data type other than the permitted type, but the data section may have a different data type, but is not limited to this.

<의미론적 공격><Semantic attack>

의미론적 공격은 복수의 대상 메모리 주소를 타겟으로 삼아 이들 대상 메모리 주소에 대한 공격 패킷들을 생성하여 다양한 순서로 전송함으로써 그 전송 순서에 따른 취약성을 확인하는 공격이다. 즉, 무작위 공격에서 취약성이 발생하지 않더라도, 대상 메모리 주소들에 대한 공격 순서를 변경하면 취약성이 발생하는 경우가 발생할 수 있으며, 의미론적 공격은 이러한 경우를 확인하기 위한 공격이다.A semantic attack is an attack that targets multiple target memory addresses, creates attack packets for these target memory addresses, and transmits them in various orders to check vulnerabilities according to the transmission order. In other words, even if a vulnerability does not occur in a brute force attack, a vulnerability may occur if the order of the attack on target memory addresses is changed, and a semantic attack is an attack to check such cases.

이를 위해, 제어부(130)는 의미론적 공격의 타겟에 해당하는 복수의 대상 메모리 주소를 선택(설정)할 수 있다. 물론, 이러한 선택은 입력부(미도시)를 통한 사용자의 입력에 의해 수행될 수도 있다. To this end, the control unit 130 may select (set) a plurality of target memory addresses corresponding to the target of the semantic attack. Of course, this selection may be performed by a user's input through an input unit (not shown).

즉, 의미론적 공격이 수행되는 경우, 의미론적 공격의 타겟이 선택된 후, 선택된 타겟의 대상 메모리 주소들에 대해 제1 순서로 공격 패킷이 전송(가령, 제1 대상 메모리 주소에 대한 공격 패킷 전송 후에 제2 대상 메모리 주소에 대한 공격 패킷 전송)됨으로써 S100이 수행되며, 이후 S200 및 S300이 차례로 수행된다. 다음으로, 선택된 타겟의 대상 메모리 주소들에 대해 제1 순서와 다른 제2 순서로 공격 패킷이 전송(가령, 제2 대상 메모리 주소에 대한 공격 패킷 전송 후에 제1 대상 메모리 주소에 대한 공격 패킷 전송)됨으로써 S100이 수행되며, 이후 S200 및 S300이 차례로 수행된다. 이와 같이, 선택된 타겟의 대상 메모리 주소들에 대해 다양한 순서로 공격 패킷이 전송되어, 타겟의 대상 메모리 주소들의 공격 순서에 따른 취약성을 확인할 수 있다.That is, when a semantic attack is performed, after the target of the semantic attack is selected, attack packets are transmitted in the first order to the target memory addresses of the selected target (e.g., after transmitting the attack packet to the first target memory address) S100 is performed by transmitting an attack packet to the second target memory address, and then S200 and S300 are performed sequentially. Next, attack packets are transmitted to the target memory addresses of the selected target in a second order different from the first order (e.g., after transmitting the attack packet to the second target memory address, attack packets are transmitted to the first target memory address). As a result, S100 is performed, and then S200 and S300 are performed sequentially. In this way, attack packets are transmitted in various orders to the target memory addresses of the selected target, so that vulnerabilities according to the attack order of the target memory addresses can be confirmed.

다만, 이러한 의미론적 공격에서, S100에서 타겟의 각 대상 메모리 주소들에 대해 전송되는 각 공격 패킷은 비정상 데이터를 포함하거나 정상 데이터를 포함할 수 있다. However, in this semantic attack, each attack packet transmitted for each target memory address in S100 may include abnormal data or normal data.

가령, 하나의 순서(제1 순서 또는 제2 순서)의 S100에서, 처음에 정상 데이터의 공격 패킷을 전송하고, 다음에 비정상 데이터의 공격 패킷을 전송할 수 있다. 또는, 하나의 순서(제1 순서 또는 제2 순서)의 S100에서, 처음에 비정상 데이터의 공격 패킷을 전송하고, 다음에 정상 데이터의 공격 패킷을 전송할 수 있다. 또는, 제1 순서의 S100에서 정상 데이터의 공격 패킷을 전송하고, 제2 순서의 S100에서 비정상 데이터의 공격 패킷을 전송할 수 있다. 또는, 제1 순서의 S100에서 비정상 데이터의 공격 패킷을 전송하고, 제2 순서의 S100에서 정상 데이터의 공격 패킷을 전송할 수 있다. 또는, 제1 순서 및 제2 순서의 모든 S100에서, 정상 데이터의 공격 패킷을 전송할 수 있다. 또는, 제1 순서 및 제2 순서의 모든 S100에서, 비정상 데이터의 공격 패킷을 전송할 수 있다.For example, in one sequence (first sequence or second sequence) of S100, an attack packet of normal data may be transmitted first, and then an attack packet of abnormal data may be transmitted. Alternatively, in one sequence (first sequence or second sequence) of S100, an attack packet of abnormal data may be transmitted first, and then an attack packet of normal data may be transmitted. Alternatively, an attack packet of normal data may be transmitted in the first sequence S100, and an attack packet of abnormal data may be transmitted in the second sequence S100. Alternatively, an attack packet of abnormal data may be transmitted in the first sequence S100, and an attack packet of normal data may be transmitted in the second sequence S100. Alternatively, attack packets of normal data may be transmitted in all S100s of the first and second sequences. Alternatively, attack packets of abnormal data may be transmitted in all S100s of the first and second sequences.

물론, 모든 공격 패킷이 정상 데이터를 포함하는 경우, 대상 장치(200)가 정상 데이터의 공격 패킷들에 따라 복수의 정상 동작을 다양한 순서로 수행할 경우에 발생하는 취약성에 대해서도 확인 가능하다. Of course, if all attack packets include normal data, vulnerabilities that occur when the target device 200 performs a plurality of normal operations in various orders according to attack packets of normal data can also be checked.

도 6은 메모리 주소에 대한 예시를 나타낸다.Figure 6 shows an example of a memory address.

즉, 도 6을 참조하면, A 및 X의 대상 메모리 주소가 의미론적 공격의 타겟으로 선택될 수 있다. 이때, A에 대한 공격 패킷을 전송한 후에 X에 대한 공격 패킷을 전송하는 제1 순서의 S100을 수행한 후 S200 및 S300을 수행한 결과, 취약성이 발생하지 않는다. 하지만, 그 순서를 달리하여, X에 대한 공격 패킷을 전송한 후에 A에 대한 공격 패킷을 전송하는 제2 순서의 S100을 수행한 후 S200 및 S300을 수행한 결과, 취약성이 발생할 수 있다.That is, referring to FIG. 6, the target memory addresses of A and X may be selected as the target of a semantic attack. At this time, as a result of performing S200 and S300 after performing S100 in the first order of transmitting the attack packet to A and then transmitting the attack packet to X, no vulnerability occurs. However, if the order is different, after transmitting the attack packet to

예를 들어, 메뉴 버튼의 입력 후 Enter가 입력되는 경우(제1 순서)에 대상 장치(200)는 정상 상태로 동작하지만, Enter 입력 후에 메뉴 버튼가 입력되는 경우(제2 순서)에 대상 장치(200)는 비정상 상태로 동작할 수도 있다. For example, when Enter is input after the menu button is input (first order), the target device 200 operates in a normal state, but when the menu button is input after Enter is input (second order), the target device 200 ) may operate in an abnormal state.

이러한 비정상 상태를 확인하기 위해, 메뉴 버튼 입력 동작과 Enter 입력 동작을 타겟으로 설정하여 의미론적 공격이 수행될 수 있다. 즉, 제1 순서의 각 동작에 대한 정상 데이터의 공격 패킷들을 전송하는 S100을 수행한 후 S200 및 S300을 수행한 결과, 대상 장치(200)는 정상 상태로 동작하며 이에 따라 제1 순서에 따른 취약성은 없는 것으로 확인된다. 반면, 제2 순서의 각 동작에 대한 정상 데이터의 공격 패킷들을 전송하는 S100을 수행한 후 S200 및 S300을 수행한 결과, 대상 장치(200)는 비정상 상태로 동작하며 이에 따라 제2 순서에 따른 취약성이 있는 것으로 확인된다.To check this abnormal state, a semantic attack can be performed by setting the menu button input operation and the Enter input operation as targets. That is, as a result of performing S200 and S300 after performing S100, which transmits attack packets of normal data for each operation in the first order, the target device 200 operates in a normal state and is therefore vulnerable according to the first order. It is confirmed that there is no . On the other hand, as a result of performing S200 and S300 after performing S100, which transmits attack packets of normal data for each operation in the second order, the target device 200 operates in an abnormal state and is therefore vulnerable according to the second order. It is confirmed that there is.

<복합 공격><Combined attack>

한편, 본 발명의 일 실시예에 따른 테스트 방법은 기존 취약점 공격, 무작위 공격 단계 및 의미론적 공격으로 이루어진 공격 그룹에서 적어도 2개를 선택하여 공격하는 복합 공격을 수행할 수 있다. 이러한 복합 공격의 경우, 대상 장치(200)의 다양한 설정 값 또는 동작에 대한 취약성을 보다 면밀하게 확인할 수 있는 이점이 있다.Meanwhile, the test method according to an embodiment of the present invention can perform a complex attack in which at least two attacks are selected from an attack group consisting of an existing vulnerability attack, a random attack stage, and a semantic attack. In the case of such complex attacks, there is an advantage of being able to more closely check vulnerabilities to various setting values or operations of the target device 200.

즉, 제어부(130)는 공격 그룹 중에서 제1 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행하며, 이후에 공격 그룹 중에서 다른 제2 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행할 수 있다.That is, the control unit 130 performs S100 according to the first attack in the attack group, then sequentially performs S200 and S300, and then performs S100 according to the second attack in the attack group, and then performs S200 and S300. Can be performed sequentially.

예를 들어, 제어부(130)는 기존 취약점 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행하며, 이후에 무작위 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행할 수 있다. 또는, 제어부(130)는 무작위 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행하며, 이후에 의미론적 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행할 수 있다.For example, the control unit 130 may perform S100 according to an existing vulnerability attack, then sequentially perform S200 and S300, and then perform S100 according to a random attack, and then sequentially perform S200 and S300. Alternatively, the control unit 130 may perform S100 according to a random attack, then sequentially perform S200 and S300, and then perform S100 according to a semantic attack, and then sequentially perform S200 and S300.

만일, 공격 그룹에서 모든 공격이 수행되는 경우, 제어부(130)는 공격 그룹 중에서 제1 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행하고, 이후에 공격 그룹 중에서 다른 제2 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행하며, 이후에 공격 그룹 중에서 나머지 제3 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행할 수 있다.If all attacks are performed in the attack group, the control unit 130 performs S100 according to the first attack among the attack group, then sequentially performs S200 and S300, and then performs S100 according to the second attack among the attack group. After performing S100, S200 and S300 can be performed in sequence, and after performing S100 according to the remaining third attack in the attack group, S200 and S300 can be performed in sequence.

예를 들어, 제어부(130)는 기존 취약점 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행하고, 이후에 무작위 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행하며, 이후에 의미론적 공격에 따른 S100을 수행한 후, S200 및 S300을 차례로 수행할 수 있다.For example, the control unit 130 performs S100 according to an existing vulnerability attack, then sequentially performs S200 and S300, then performs S100 according to a random attack, and then sequentially performs S200 and S300, and then After performing S100 according to the semantic attack, S200 and S300 can be performed sequentially.

<실험><Experiment>

본 발명에 따른 실험을 수행하였다. 이를 위해, FreeRTOS를 사용하여 RTOS(Real Time Operating System)로 구현된 임베디스 시스템인 테스트 장치(100)를 준비하였다. RTOS의 스레드에서 애플리케이션은 테스트 시작을 실행할 때 자신의 작업을 할당 받는다. 다만, 메모리 크기가 작고 CPU 성능이 낮기 때문에 연결된 외부에 패킷 생성 모듈을 구현하였다. 생성된 패킷은 JIG(middle section)로 전송되고 대상 장치(200)의 JIG로 다시 전송된다.An experiment according to the present invention was performed. For this purpose, a test device 100, an embedded system implemented as RTOS (Real Time Operating System) using FreeRTOS, was prepared. In a thread in an RTOS, an application is assigned its own work when executing a test startup. However, because the memory size is small and CPU performance is low, a packet generation module was implemented externally. The generated packet is transmitted to the JIG (middle section) and again to the JIG of the target device 200.

스마트 분배 전기 장치를 포함하는 보호 계전기 장치를 대상 장치(200)로 선택하였다. 다만, IED 카테고리 중 단순 전기기기(예: 기본 배전기기, 기본 릴레이 등)보다 메쉬 구조가 더 많은 전기기기를 대상 장치(200)로 선택하였다. 메쉬 구조는 하드웨어 기반의 구현뿐만 아니라 HMI를 통해 사용되는 명령어를 이용하는 RTOS 기반의 소프트웨어로 구현된 것을 의미한다.A protection relay device including a smart distribution electrical device was selected as the target device 200. However, among the IED categories, electrical devices with more mesh structures than simple electrical devices (e.g. basic power distribution devices, basic relays, etc.) were selected as the target device 200. The mesh structure means not only a hardware-based implementation, but also an RTOS-based software implementation that uses commands used through HMI.

Modbus RTU 프로토콜을 사용하는 대상 장치(200)를 테스트하기 위해, 대상 장치(200)를 USB 또는 직렬 포트를 사용하여 테스트 장치(100)에 연결한다. 연결 시 테스트 장치(100) 내부의 이더넷 스위치는 raw 패킷을 허용 가능한 패킷으로 전환한다.To test the target device 200 using the Modbus RTU protocol, the target device 200 is connected to the test device 100 using a USB or serial port. When connected, the Ethernet switch inside the test device 100 converts raw packets into acceptable packets.

대상 장치(200)의 쓰기 가능한 모든 메모리 주소에 대해 공격을 수행하면서 그 취약성을 확인하였다. 먼저, 기존 취약점 공격을 위해, exploit-DB 웹사이트에서 개시된 CVE 목록을 참조하여 공격 패킷의 구조를 구현하였다. 이러한 CVE 목록을 참조한 기존 취약점 공격을 수행한 다음에 취약점이 발견되지 않으면, 테스트 장치(100)는 무작위 공격을 수행한다. 무작위 공격 동안, 테스트 장치(100)는 각 섹션 값을 뒤집는 Modbus RTU 패킷을 생성한다. 무작위 공격이 실패하면, 테스트 장치(100)는 의미론적 공격을 수행한다.The vulnerability was confirmed by performing an attack on all writable memory addresses of the target device 200. First, to attack existing vulnerabilities, the attack packet structure was implemented by referring to the list of CVEs published on the exploit-DB website. If no vulnerability is found after performing an existing vulnerability attack referring to this list of CVEs, the test device 100 performs a random attack. During a brute force attack, test device 100 generates Modbus RTU packets that flip the values of each section. If the random attack fails, the test device 100 performs a semantic attack.

이러한 의미론적 공격은 단위 테스트와 유사하게 수행된다. 먼저, 테스트 장치(100)는 쓰기 가능한 메모리 주소 중에서 타겟을 선택하고, 대상 장치(200)의 처음 타겟에 대해 정상 데이터의 공격 패킷을 전송한 후, 다음 주소의 타겟에 대해 비정상의 공격 패킷을 전송한다. 테스트 장치(100)는 공격 가능한 메모리 주소가 남아 있지 않을 때까지 타겟에 대한 모든 경우의 순서에 대한 의미론적 공격을 수행하였다.These semantic attacks are performed similarly to unit tests. First, the test device 100 selects a target from among writable memory addresses, transmits an attack packet of normal data to the first target of the target device 200, and then transmits an abnormal attack packet to the target of the next address. do. The test device 100 performed a semantic attack on all sequences of cases for the target until there were no attackable memory addresses remaining.

도 7은 본 발명의 실험에서 발견된 4개의 취약점에 대한 내용을 나타낸다.Figure 7 shows details of four vulnerabilities discovered in the experiment of the present invention.

그 결과, 도 7에 도시된 바와 같이, 총 4개의 취약점, 즉 1개의 치명적인 취약점과, 3개의 약한 취약점이 발견되었다. 1개의 치명적인 취약점은 PLC에서 발생한다. 이 취약점으로 인해 읽기 권한만 있는 주소가 덤핑(dumping) 되었다. 기본적으로, RS485 통신은 통신할 때 데이터 길이 섹션을 확인해야 한다. 이러한 이유로 RS485 기반 통신은 버퍼 오버플로 공격을 수행하기 어렵다. 나머지 약한 취약점은 빠른 패킷 전송(fast packet sending)에 관한 것이며, 자체 처리 용량을 초과하여 처리할 수 없다. 이러한 공격이 발생한 대상 장치(200)는 공격 패킷 이외의 명령을 수락할 수 없다.As a result, as shown in Figure 7, a total of 4 vulnerabilities, that is, 1 critical vulnerability and 3 weak vulnerabilities, were discovered. One critical vulnerability occurs in PLC. This vulnerability resulted in dumping of addresses with read-only permissions. Basically, RS485 communication needs to check the data length section when communicating. For this reason, RS485-based communication is difficult to perform buffer overflow attacks. The remaining weak vulnerabilities are related to fast packet sending, and cannot handle more than its own processing capacity. The target device 200 where such an attack occurs cannot accept commands other than the attack packet.

상술한 바와 같이 구성되는 본 발명은 모드버스 RTU 등과 같은 프로토콜 방식의 직렬 통신로 연결되는 대상 장치에 대해 해당 프로토콜의 직렬 통신에 따른 취약성을 테스트할 수 있어, 종래의 TCP/IP 프로토콜 방식에 따른 취약성 테스트의 한계를 극복할 수 있는 이점이 있다. 또한, 본 발명은 기존 취약점 공격, 무작위 공격 단계 및 의미론적 공격으로 이루어진 공격 그룹에서 적어도 2개를 선택하여 공격하는 복합 공격을 수행함으로써, 대상 장치의 다양한 설정 값 또는 동작에 대한 취약성을 보다 면밀하게 확인할 수 있는 이점이 있다.The present invention, configured as described above, can test the vulnerability according to the serial communication of the protocol for a target device connected through serial communication of a protocol such as Modbus RTU, and thus the vulnerability according to the conventional TCP/IP protocol method. There is an advantage in overcoming the limitations of testing. In addition, the present invention performs a complex attack that selects and attacks at least two from an attack group consisting of existing vulnerability attacks, random attack steps, and semantic attacks, to more closely identify vulnerabilities to various setting values or operations of the target device. There are benefits that can be confirmed.

본 발명의 상세한 설명에서는 구체적인 실시 예에 관하여 설명하였으나 본 발명의 범위에서 벗어나지 않는 한도 내에서 여러 가지 변형이 가능함은 물론이다. 그러므로 본 발명의 범위는 설명된 실시 예에 국한되지 않으며, 후술되는 청구범위 및 이 청구범위와 균등한 것들에 의해 정해져야 한다.In the detailed description of the present invention, specific embodiments have been described, but of course, various modifications are possible without departing from the scope of the present invention. Therefore, the scope of the present invention is not limited to the described embodiments, but should be defined by the claims described below and equivalents to these claims.

100: 테스트 장치 200: 대상 장치
110, 210: 통신부 120, 220: 메모리
130, 230: 제어부
100: test device 200: target device
110, 210: Communication unit 120, 220: Memory
130, 230: Control unit

Claims (12)

대상 장치에 직렬 통신 방식으로 연결되어 상기 대상 장치의 직렬 통신에 따른 취약성을 테스트하는 테스트 장치에서 수행되는 방법으로서,
상기 대상 장치로 공격 패킷을 전송하는 단계;
상기 대상 장치로 허용된 정상 범위 내의 값을 포함하는 정상 패킷을 전송하는 단계; 및
상기 대상 장치의 비정상 상태가 발생하는 경우, 상기 대상 장치가 상기 공격 패킷에 대해 취약성이 있는 것으로 판단하는 단계;를 포함하며,
공개된 기존 취약점 정보(Common Vulnerabilities and Exposures, CVE)에 관련된 값을 가지는 공격 패킷을 생성하여 전송하는 기존 취약점 공격과, 상기 대상 장치의 설정 값 또는 작동에 관련된 정보를 저장한 상기 대상 장치의 복수 메모리 주소를 대상으로 각각 허용된 범위 외에서 변경되는 값을 가지는 복수의 공격 패킷을 생성하여 연속으로 전송하는 무작위 공격과, 상기 대상 장치의 작동에 관련된 정보를 저장한 상기 대상 장치의 복수의 메모리 주소에 대한 공격 패킷들을 서로 다른 순서로 전송하는 의미론적 공격을 각각 포함하는 공격 그룹 중에서 선택된 적어도 2개의 공격이 상기 공격 패킷을 전송하는 단계에서 각각 수행되는 방법.
A method performed in a test device that is connected to a target device through serial communication and tests vulnerabilities due to serial communication of the target device,
transmitting an attack packet to the target device;
transmitting a normal packet containing a value within an allowed normal range to the target device; and
When an abnormal state of the target device occurs, determining that the target device is vulnerable to the attack packet,
Existing vulnerability attacks that generate and transmit attack packets with values related to existing public vulnerability information (Common Vulnerabilities and Exposures, CVE), and multiple memories of the target device that store information related to the setting values or operation of the target device. A random attack that targets an address and continuously transmits a plurality of attack packets with values that change outside the permitted range, and a plurality of memory addresses of the target device that store information related to the operation of the target device. A method in which at least two attacks selected from an attack group each including semantic attacks that transmit attack packets in different orders are each performed in the step of transmitting the attack packets.
제1항에 있어서,
상기 직렬 통신은 모드버스 RTU(Modbus Remote Terminal Unit) 프로토콜을 기반으로 하는 통신인 방법.
According to paragraph 1,
The serial communication method is communication based on the Modbus RTU (Modbus Remote Terminal Unit) protocol.
제1항에 있어서,
상기 공격 패킷을 전송하는 단계는 복수의 공격 패킷을 연속으로 대상 장치로 전송하는 단계를 포함하며,
상기 판단하는 단계는 상기 비정상 상태가 발생하는 경우에 상기 대상 장치가 상기 복수의 공격 패킷에 대해 취약성이 있는 것으로 판단하는 단계를 포함하는 방법.
According to paragraph 1,
The step of transmitting the attack packet includes sequentially transmitting a plurality of attack packets to the target device,
The determining step includes determining that the target device is vulnerable to the plurality of attack packets when the abnormal state occurs.
제3항에 있어서,
상기 대상 장치가 상기 복수의 공격 패킷에 대해 취약성이 있는 것으로 판단되는 경우, 상기 복수이 공격 패킷을 그룹으로 나누고 그룹에 속한 공격 패킷을 이용하여, 그룹 별로 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계를 반복 수행함으로써, 상기 복수의 공격 패킷 중에서 취약성이 있는 공격 패킷을 찾는 단계를 더 포함하는 방법.
According to paragraph 3,
If it is determined that the target device is vulnerable to the plurality of attack packets, dividing the plurality of attack packets into groups and using attack packets belonging to the groups to transmit the attack packets for each group, and transmitting the normal packets to each group. The method further includes the step of finding a vulnerable attack packet among the plurality of attack packets by repeating the transmitting step and the determining step.
제1항에 있어서,
상기 비정상 상태는 상기 대상 장치의 가동 중지 현상 또는 랙(lag) 현상이 발생하거나 상기 대상 장치가 허용된 범위 외의 값을 가지는 응답 패킷으로 응답하는 경우를 포함하는 방법.
According to paragraph 1,
The abnormal state includes a case where the target device stops working or lags, or the target device responds with a response packet with a value outside the allowed range.
삭제delete 제1항에 있어서,
상기 공격 패킷은 데이터 길이(data length) 섹션이 허용된 길이 범위 외의 값을 가지는 비정상 데이터, 데이터 섹션이 데이터 길이 섹션과 다른 길이의 데이터를 가지는 비정상 데이터, 데이터 섹션이 허용된 값 외의 값을 가지는 비정상 데이터, 또는 데이터 섹션이 허용된 종류 외의 데이터 종류를 가지는 비정상 데이터를 포함하는 방법.
According to paragraph 1,
The attack packet is abnormal data in which the data length section has a value outside the allowed length range, abnormal data in which the data section has data of a length different from the data length section, and abnormal data in which the data section has a value outside the allowed value. A method in which data, or a section of data, contains abnormal data that has a data type other than the permitted type.
제1항에 있어서,
상기 공격 패킷을 전송하는 단계는 상기 무작위 공격에 대한 공격 패킷들을 서로 다른 순서로 전송하는 단계를 포함하는 방법.
According to paragraph 1,
The method of transmitting the attack packet includes transmitting attack packets for the random attack in different orders.
삭제delete 제1항에 있어서,
상기 공격 그룹 중에서 어느 하나의 공격에 따른 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계가 수행된 후,
상기 공격 그룹 중에서 다른 하나의 공격에 따른 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계가 수행되는 방법.
According to paragraph 1,
After the step of transmitting the attack packet according to one attack among the attack group, the step of transmitting the normal packet, and the step of determining are performed,
A method in which the step of transmitting the attack packet according to another attack among the attack group, the step of transmitting the normal packet, and the step of determining are performed.
제1항에 있어서,
상기 공격 그룹 중에서 어느 하나의 공격에 따른 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계가 수행되고,
이후 상기 공격 그룹 중에서 다른 하나의 공격에 따른 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계가 수행되며,
이후 상기 공격 그룹 중에서 나머지 하나의 공격에 따른 상기 공격 패킷을 전송하는 단계, 상기 정상 패킷을 전송하는 단계 및 상기 판단하는 단계가 수행되는 방법.
According to paragraph 1,
Transmitting the attack packet according to one attack among the attack group, transmitting the normal packet, and the determining step are performed,
Thereafter, the step of transmitting the attack packet according to another attack among the attack group, the step of transmitting the normal packet, and the step of determining are performed,
Thereafter, the steps of transmitting the attack packet according to the remaining attack among the attack group, transmitting the normal packet, and the determining step are performed.
대상 장치와 직렬 통신을 수행하는 통신부; 및
상기 통신부의 동작을 제어하면서 상기 대상 장치의 직렬 통신에 따른 취약성 테스트를 제어하는 제어부;를 포함하며,
상기 제어부는,
상기 대상 장치로 공격 패킷을 전송한 후에 상기 대상 장치로 허용된 정상 범위 내의 값을 포함하는 정상 패킷을 전송하도록 제어하고,
이후 상기 대상 장치의 비정상 상태가 발생하는 경우에 상기 대상 장치가 상기 공격 패킷에 대해 취약성이 있는 것으로 판단하며,
상기 공격 패킷의 전송 시에, 공개된 기존 취약점 정보(Common Vulnerabilities and Exposures, CVE)에 관련된 값을 가지는 공격 패킷을 생성하여 전송하는 기존 취약점 공격과, 상기 대상 장치의 설정 값 또는 작동에 관련된 정보를 저장한 상기 대상 장치의 복수 메모리 주소를 대상으로 각각 허용된 범위 외에서 변경되는 값을 가지는 복수의 공격 패킷을 생성하여 연속으로 전송하는 무작위 공격과, 상기 대상 장치의 작동에 관련된 정보를 저장한 상기 대상 장치의 복수의 메모리 주소에 대한 공격 패킷들을 서로 다른 순서로 전송하는 의미론적 공격을 각각 포함하는 공격 그룹 중에서 선택된 적어도 2개의 공격이 각각 수행되도록 제어하는 장치.
A communication unit that performs serial communication with a target device; and
It includes a control unit that controls the operation of the communication unit and controls a vulnerability test according to serial communication of the target device,
The control unit,
After transmitting an attack packet to the target device, control to transmit a normal packet containing a value within a normal range allowed to the target device,
Afterwards, if an abnormal state of the target device occurs, it is determined that the target device is vulnerable to the attack packet,
When transmitting the attack packet, an existing vulnerability attack that generates and transmits an attack packet with values related to existing publicly disclosed vulnerability information (Common Vulnerabilities and Exposures, CVE), and information related to the setting value or operation of the target device. A random attack that generates and continuously transmits multiple attack packets with values that change outside of the permitted range targeting multiple stored memory addresses of the target device, and the target that stores information related to the operation of the target device. A device that controls the execution of at least two attacks selected from a group of attacks, each of which includes a semantic attack that transmits attack packets to a plurality of memory addresses of the device in different orders.
KR1020210134174A 2021-10-08 2021-10-08 Vulnerability testing method and apparatus for serial communication apparaus KR102581422B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210134174A KR102581422B1 (en) 2021-10-08 2021-10-08 Vulnerability testing method and apparatus for serial communication apparaus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210134174A KR102581422B1 (en) 2021-10-08 2021-10-08 Vulnerability testing method and apparatus for serial communication apparaus

Publications (2)

Publication Number Publication Date
KR20230050869A KR20230050869A (en) 2023-04-17
KR102581422B1 true KR102581422B1 (en) 2023-09-20

Family

ID=86128346

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210134174A KR102581422B1 (en) 2021-10-08 2021-10-08 Vulnerability testing method and apparatus for serial communication apparaus

Country Status (1)

Country Link
KR (1) KR102581422B1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100876637B1 (en) * 2006-11-23 2009-01-09 한국전자통신연구원 Apparatus and method for detecting software attacks on linux
KR102112587B1 (en) * 2015-03-20 2020-05-19 한국전자통신연구원 Packet monitoring device and packet monitoring method for communication packet
KR20170091989A (en) * 2016-02-02 2017-08-10 동신대학교산학협력단 System and method for managing and evaluating security in industry control network
KR102199054B1 (en) * 2017-08-10 2021-01-07 한국전자통신연구원 Apparatus for serial port based cyber security vulnerability assessment and method for the same
KR102512622B1 (en) * 2020-01-08 2023-03-23 건국대학교 산학협력단 METHOD FOR DETECTING DRDoS ATTACK, AND APPARATUSES PERFORMING THE SAME

Also Published As

Publication number Publication date
KR20230050869A (en) 2023-04-17

Similar Documents

Publication Publication Date Title
US20190095619A1 (en) Identifying whether an application is malicious
JP5611598B2 (en) Encryption key container on USB token
US7877091B2 (en) Method and system for executing a container managed application on a processing device
KR102546578B1 (en) Method, device, equipment and storage medium for obtaining mini program data
KR102490490B1 (en) Method and device for magnetic disk encryption protection
US9241007B1 (en) System, method, and computer program for providing a vulnerability assessment of a network of industrial automation devices
CN103532938B (en) Method and system for protecting application data
US11765195B2 (en) Distributed network-level probabilistic attack graph generation
CN105376719A (en) Information pushing method and device
US20150095639A1 (en) Using a pkcs module for opening multiple databases
KR102581422B1 (en) Vulnerability testing method and apparatus for serial communication apparaus
CN113821841B (en) Resource management method, computing device and readable storage medium
US11662927B2 (en) Redirecting access requests between access engines of respective disk management devices
US11297086B2 (en) Correlation-based network security
CN112306372B (en) Method, apparatus and program product for processing data
CN111835857A (en) Method and apparatus for accessing data
CN116029380B (en) Quantum algorithm processing method, device, equipment, storage medium and program product
CN109062642A (en) A kind of control message informing method and device
US11693942B2 (en) Access control apparatus and method for controlling configuration of automation apparatus
CN112882838B (en) Method and apparatus for vacating resource instances
KR20070079518A (en) Message routing transaction system and the transaction method thereof
CN116455950A (en) Request response method, device, computer equipment and storage medium
CN117240643A (en) Communication method of mobile terminal and intelligent equipment, intelligent home system and electronic equipment
CN117857158A (en) Data isolation method and system based on container technology
CN115185542A (en) Containerization deployment method, device, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant