KR101972825B1 - Method and apparatus for automatically analyzing vulnerable point of embedded appliance by using hybrid analysis technology, and computer program for executing the method - Google Patents

Method and apparatus for automatically analyzing vulnerable point of embedded appliance by using hybrid analysis technology, and computer program for executing the method Download PDF

Info

Publication number
KR101972825B1
KR101972825B1 KR1020190006679A KR20190006679A KR101972825B1 KR 101972825 B1 KR101972825 B1 KR 101972825B1 KR 1020190006679 A KR1020190006679 A KR 1020190006679A KR 20190006679 A KR20190006679 A KR 20190006679A KR 101972825 B1 KR101972825 B1 KR 101972825B1
Authority
KR
South Korea
Prior art keywords
analysis
vulnerability
firmware
embedded device
static
Prior art date
Application number
KR1020190006679A
Other languages
Korean (ko)
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 KR1020190006679A priority Critical patent/KR101972825B1/en
Application granted granted Critical
Publication of KR101972825B1 publication Critical patent/KR101972825B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to a method and a device for automatically analyzing vulnerabilities of an embedded device using a hybrid analysis technology, and to a computer program for executing the method, and more particularly to a method for searching for vulnerabilities without an actual embedded device with respect to a firmware of the embedded device using static and dynamic analysis processes. According to the present invention, a system for detecting and preventing vulnerabilities of embedded devices in advance through automated vulnerability analysis is provided in order to solve a security problem of the embedded devices. Also, a new system capable of efficient analysis for a plurality of objects by analyzing the same only with a firmware of a corresponding embedded device without an actual embedded device in order to analyze embedded devices variously present in accordance with types, manufacturers, models, etc., is provided.

Description

하이브리드 분석 기술을 이용한 임베디드 기기 취약점 자동 분석 방법, 장치 및 그 방법을 실행하는 컴퓨터 프로그램{Method and apparatus for automatically analyzing vulnerable point of embedded appliance by using hybrid analysis technology, and computer program for executing the method}[0001] The present invention relates to a method and an apparatus for automatically analyzing an embedded device vulnerability using hybrid analysis technology, and a computer program for executing the method,

본 발명은 하이브리드 분석 기술을 이용한 임베디드 기기 취약점 자동 분석 방법, 장치 및 그 방법을 실행하는 컴퓨터 프로그램에 관한 것으로서, 더욱 상세하게는 정적 분석 프로세스와 동적 분석 프로세스를 이용하여 임베디드 기기의 펌웨어에 대하여, 실제 임베디드 기기 없이 취약점을 찾기 위한 방법, 장치 및 컴퓨터 프로그램에 관한 것이다.The present invention relates to a method and an apparatus for automatically analyzing vulnerabilities of an embedded device using a hybrid analysis technique and a computer program for executing the method. More particularly, the present invention relates to an embedded device A device, and a computer program for finding a vulnerability without an embedded device.

유무선 공유기, IP카메라, 네트워크 프린터, 그리고 다양한 IoT 기기 등 많은 임베디드 기기들이 실생활에 사용되고 있으며, 사용자의 개인 정보와 밀접한 관련이 생김에 따라 보안 이슈에도 관심이 증가하고 있다. 특히 Mirai Botnet과 같이 임베디드 기기의 취약점을 이용한 추가적인 보안 문제들도 발생하면서 임베디드 기기의 보안의 중요성이 높아지고 있으나, 이와 같은 다양한 임베디드 기기의 취약점에 대하여 펌웨어 만으로 자동으로 분석하는 시스템의 개발은 미미한 상황인 문제점이 있었다.Many embedded devices such as wired / wireless routers, IP cameras, network printers, and various IoT devices are used in real life, and security issues are increasingly attracted to users' personal information. In particular, security of embedded devices is becoming more important due to security problems such as Mirai Botnet using embedded device vulnerability. However, the development of a system that automatically analyzes firmware vulnerabilities of various embedded devices such as Mirai Botnet is a small situation There was a problem.

KRKR 10-2006-006288210-2006-0062882 AA

본 발명은 이와 같은 문제점을 해결하기 위해 창안된 것으로서, 임베디드 기기 보안 문제를 해결하기 위하여, 자동화된 취약점 분석을 통해 임베디드 기기들의 취약점을 사전에 탐지 사전에 예방하는 시스템을 제공하는데 그 목적이 있다.It is an object of the present invention to provide a system for preventing a vulnerability of an embedded device from being detected in advance through an automated vulnerability analysis in order to solve the security problem of an embedded device.

또한 종류와 제조사, 모델 등에 따라 다양하게 존재하는 임베디드 기기들을 분석하기 위해서, 실제 임베디드 기기 없이, 해당 임베디드 기기의 펌웨어만으로 분석할 수 있도록 하여 다수의 대상에 대해서 효율적인 분석이 가능한 새로운 시스템을 제공하는데 다른 목적이 있다.Also, in order to analyze embedded devices that exist in various types, manufacturers, models, etc., a new system capable of analyzing a plurality of objects by analyzing only the firmware of the embedded device without actual embedded devices is provided There is a purpose.

이와 같은 목적을 달성하기 위하여 본 발명에 따른 임베디드(embedded) 기기 취약점 자동 분석 방법은, (a) 분석 대상인 임베디드 기기의 펌웨어 코드(code)에 대하여, 정적 분석에 의하여 취약점 분석을 수행하는 단계; (b) 상기 정적 분석 결과로서, 취약점 테스트 코드를 생성하는 단계; (c) 상기 펌웨어를 에뮬레이션 실행시킨 후, 상기 펌웨어에 대한 동적 분석에 의하여 취약점 분석을 수행하는 단계; 및, (d) 상기 펌웨어에 대한 동적 분석의 로그(log) 데이터를 생성하는 단계를 포함하고, 상기 단계(a)의 정적 분석에 의한 취약점 분석 전에, 동적 분석 프로세스로부터 입력받은 로그 데이터를 기반으로 분석 대상 프로그램(펌웨어 코드)의 일부분을 해당 로그 데이터에 맞는 환경으로 설정하고, 이와 같이 설정된 펌웨어 코드에 대하여, 상기 단계(a)의 정적 분석에 의한 취약점 분석을 수행한다.In order to achieve the above object, there is provided a method for automatically analyzing an embedded device vulnerability according to the present invention, comprising the steps of: (a) performing a vulnerability analysis on a firmware code of an embedded device to be analyzed by static analysis; (b) generating, as a result of the static analysis, a vulnerability test code; (c) performing the vulnerability analysis by performing dynamic analysis on the firmware after emulating the firmware; And (d) generating log data of a dynamic analysis for the firmware, wherein prior to the analysis of the vulnerability by the static analysis of step (a), based on the log data input from the dynamic analysis process, A part of the analysis target program (firmware code) is set as an environment suitable for the log data, and the vulnerability analysis is performed by the static analysis of step (a) for the firmware code set as described above.

상기 단계(a)에서 상기 정적 분석에 의한 취약점 분석은, 기호 실행(symbolic execution) 방식으로 수행할 수 있다.In the step (a), the vulnerability analysis by the static analysis can be performed by a symbolic execution method.

상기 기호 실행 방식에 의한 취약점 분석을 수행하기 전, (a1) 상기 임베디드 기기 펌웨어로부터 바이너리(binary) 파일을 추출하는 단계; 및, (a2) 상기 추출된 바이너리 파일에 대하여 디스어셈블(disassemble)을 수행하여 어셈블리 코드(assembly code)로 변환하는 단계를 더 포함할 수 있고, 상기 기호 실행은, 상기 펌웨어의 어셈블리 코드에 대하여 수행할 수 있다.(A1) extracting a binary file from the embedded device firmware before performing the vulnerability analysis by the symbol execution method; And (a2) disassembling the extracted binary file to convert the extracted binary file into an assembly code. The symbol execution may be performed on the assembly code of the firmware can do.

상기 정적 분석에 의한 취약점 분석은, 버퍼 오버플로우(buffer overflow) 가능성에 대한 검증을 포함할 수 있다.The vulnerability analysis by the static analysis may include verification of the possibility of buffer overflow.

상기 정적 분석에 의한 취약점 분석은, 상기 펌웨어에 대하여 커맨드 인젝션(command injection) 공격이 가능한지 여부에 대한 검증을 포함할 수 있다.The vulnerability analysis by the static analysis may include a verification as to whether a command injection attack is possible with respect to the firmware.

상기 정적 분석에 의한 취약점 분석은, 상기 펌웨어에 대하여 SQL 인젝션(SQL injection) 공격이 가능한지 여부에 대한 검증을 포함할 수 있다.The vulnerability analysis by the static analysis may include verification of whether or not an SQL injection attack is possible for the firmware.

상기 정적 분석에 의한 취약점 분석은, 상기 펌웨어에 대하여 XSS(cross-site scripting) 공격이 가능한지 여부에 대한 검증을 포함할 수 있다.The vulnerability analysis by the static analysis may include a verification as to whether a cross-site scripting (XSS) attack is possible for the firmware.

상기 단계(b)의 취약점 테스트 코드는, 상기 분석 대상인 펌웨어 코드에, 상기 단계(a)에서 분석한 취약점을 유발할 수 있는 입력값을 기호 실행을 이용하여 생성할 수 있다.The vulnerability test code of the step (b) may generate an input value capable of causing the vulnerability analyzed in the step (a) to the firmware code to be analyzed, using the symbol execution.

상기 단계(c)의 동적 분석에 의한 취약점 분석은, 상기 단계(b)에서 생성된 취약점 테스트 코드를 실행 시킴에 의해 수행할 수 있다.The vulnerability analysis by the dynamic analysis of the step (c) can be performed by executing the vulnerability test code generated in the step (b).

상기 단계(c)의 동적 분석에 의한 취약점 분석은, 퍼저(fuzzer)를 이용하여 수행할 수 있다.The vulnerability analysis by the dynamic analysis of step (c) can be performed using a fuzzer.

상기 퍼저(fuzzer)를 이용한 취약점 분석은, 버퍼 오버플로우(buffer overflow), 커맨드 인젝션(command injection), SQL 인젝션(SQL injection), XSS(cross-site scripting) 중 하나 이상을 유발할 수 있는 다양한 값들을 입력하는 것을 반복하여, 출력되는 결과 값이나 수집된 로그를 통해 취약점으로 판단되는 부분이 생길 때까지 반복하는 것일 수 있다.The fuzzy analysis using the fuzzer may be performed using various values that may cause one or more of buffer overflow, command injection, SQL injection, and cross-site scripting It can be repeated until the vulnerability is determined through the output result or the collected log.

상기 단계(d)에서 생성한 동적 분석의 로그(log) 데이터는, 상기 단계(a)의 정적 분석에 의한 취약점 분석 프로세스에 전달하는 것일 수 있다.The log data of the dynamic analysis generated in the step (d) may be transmitted to the vulnerability analysis process by the static analysis in the step (a).

본 발명의 다른 측면에 따르면, 임베디드 기기 취약점을 자동으로 분석하기 위한 장치는, 적어도 하나의 프로세서; 및 컴퓨터로 실행가능한 명령을 저장하는 적어도 하나의 메모리를 포함하되, 상기 적어도 하나의 메모리에 저장된 상기 컴퓨터로 실행가능한 명령은, 상기 적어도 하나의 프로세서에 의하여, (a) 분석 대상인 임베디드 기기의 펌웨어 코드(code)에 대하여, 정적 분석에 의하여 취약점 분석을 수행하는 단계; (b) 상기 정적 분석 결과로서, 취약점 테스트 코드를 생성하는 단계; (c) 상기 펌웨어를 에뮬레이션 실행시킨 후, 상기 펌웨어에 대한 동적 분석에 의하여 취약점 분석을 수행하는 단계; 및, (d) 상기 펌웨어에 대한 동적 분석의 로그(log) 데이터를 생성하는 단계가 실행되도록 하고, 상기 단계(a)의 정적 분석에 의한 취약점 분석 전에, 동적 분석 프로세스로부터 입력받은 로그 데이터를 기반으로 분석 대상 프로그램(펌웨어 코드)의 일부분을 해당 로그 데이터에 맞는 환경으로 설정하고, 이와 같이 설정된 펌웨어 코드에 대하여, 상기 단계(a)의 정적 분석에 의한 취약점 분석을 수행하도록 한다.According to another aspect of the present invention, an apparatus for automatically analyzing an embedded device vulnerability includes at least one processor; And at least one memory for storing computer-executable instructions, wherein the computer-executable instructions stored in the at least one memory are executable by the at least one processor to: (a) generate a firmware code performing vulnerability analysis on the code by static analysis; (b) generating, as a result of the static analysis, a vulnerability test code; (c) performing the vulnerability analysis by performing dynamic analysis on the firmware after emulating the firmware; (D) generating log data of the dynamic analysis for the firmware is executed, and before the vulnerability analysis by the static analysis in the step (a), the log data inputted from the dynamic analysis process is used as a basis , A part of the analysis target program (firmware code) is set to an environment suitable for the log data, and the vulnerability analysis is performed by the static analysis of step (a) for the firmware code thus set.

본 발명의 또 다른 측면에 따르면, 임베디드 기기 취약점을 자동으로 분석하기 위한 컴퓨터 프로그램은, 비일시적 저장 매체에 저장되며, 프로세서에 의하여, (a) 분석 대상인 임베디드 기기의 펌웨어 코드(code)에 대하여, 정적 분석에 의하여 취약점 분석을 수행하는 단계; (b) 상기 정적 분석 결과로서, 취약점 테스트 코드를 생성하는 단계; (c) 상기 펌웨어를 에뮬레이션 실행시킨 후, 상기 펌웨어에 대한 동적 분석에 의하여 취약점 분석을 수행하는 단계; 및, (d) 상기 펌웨어에 대한 동적 분석의 로그(log) 데이터를 생성하는 단계가 실행되도록 하는 명령을 포함하고, 상기 단계(a)의 정적 분석에 의한 취약점 분석 전에, 동적 분석 프로세스로부터 입력받은 로그 데이터를 기반으로 분석 대상 프로그램(펌웨어 코드)의 일부분을 해당 로그 데이터에 맞는 환경으로 설정하고, 이와 같이 설정된 펌웨어 코드에 대하여, 상기 단계(a)의 정적 분석에 의한 취약점 분석을 수행하는 명령을 포함한다.According to another aspect of the present invention, a computer program for automatically analyzing an embedded device vulnerability is stored in a non-volatile storage medium, the program being executed by a processor to: (a) determine a firmware code of an embedded device, Performing vulnerability analysis by static analysis; (b) generating, as a result of the static analysis, a vulnerability test code; (c) performing the vulnerability analysis by performing dynamic analysis on the firmware after emulating the firmware; And (d) generating log data of a dynamic analysis for the firmware to be executed, wherein before the vulnerability analysis by the static analysis of step (a) A part of the analysis target program (firmware code) is set as an environment suitable for the log data based on the log data, and a command for performing the vulnerability analysis by the static analysis in the step (a) .

본 발명에 의하면, 임베디드 기기 보안 문제를 해결하기 위하여, 자동화된 취약점 분석을 통해 임베디드 기기들의 취약점을 사전에 탐지 사전에 예방하는 시스템을 제공하고, 또한 종류와 제조사, 모델 등에 따라 다양하게 존재하는 임베디드 기기들을 분석하기 위해서, 실제 임베디드 기기 없이, 해당 임베디드 기기의 펌웨어만으로 분석할 수 있도록 하여 다수의 대상에 대해서 효율적인 분석이 가능한 새로운 시스템을 제공하는 효과가 있다.According to the present invention, a system for preventing a vulnerability of embedded devices from being detected in advance through automated vulnerability analysis is provided in order to solve the security problem of embedded devices, and a system for preventing embedded systems, In order to analyze the devices, there is an effect of providing a new system capable of analyzing a plurality of objects efficiently by making it possible to analyze only the firmware of the embedded device without an actual embedded device.

도 1은 본 발명에 따른 하이브리드 분석 기술을 이용한 임베디드 기기 취약점 자동 분석 방법의 전체 프로세스를 나타내는 도면.
도 2는 본 발명에 따른 하이브리드 분석 기술을 이용한 임베디드 기기 취약점 자동 분석 방법에서 정적 분석 프로세스를 나타내는 도면.
도 3은 본 발명에 따른 하이브리드 분석 기술을 이용한 임베디드 기기 취약점 자동 분석 방법에서 동적 분석 프로세스를 나타내는 도면.
도 4는 본 발명에 따른 하이브리드 분석 기술을 이용한 임베디드 기기 취약점 자동 분석 장치의 구성을 나타내는 도면.
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a diagram showing an overall process of an automatic analysis method of an embedded device vulnerability using a hybrid analysis technique according to the present invention. FIG.
2 is a diagram illustrating a static analysis process in an automatic method for analyzing an embedded device vulnerability using a hybrid analysis technique according to the present invention.
3 is a diagram illustrating a dynamic analysis process in an automatic method for analyzing vulnerabilities of an embedded device using a hybrid analysis technique according to the present invention.
4 is a diagram illustrating a configuration of an apparatus for automatically analyzing vulnerabilities of an embedded device using a hybrid analysis technique according to the present invention.

이하 첨부된 도면을 참조로 본 발명의 바람직한 실시예를 상세히 설명하기로 한다. 이에 앞서, 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다. 따라서, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시예에 불과할 뿐이고 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형예들이 있을 수 있음을 이해하여야 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Prior to this, terms and words used in the present specification and claims should not be construed as limited to ordinary or dictionary terms, and the inventor should appropriately interpret the concepts of the terms appropriately It should be interpreted in accordance with the meaning and concept consistent with the technical idea of the present invention based on the principle that it can be defined. Therefore, the embodiments described in this specification and the configurations shown in the drawings are merely the most preferred embodiments of the present invention and do not represent all the technical ideas of the present invention. Therefore, It is to be understood that equivalents and modifications are possible.

도 1은 본 발명에 따른 하이브리드 분석 기술을 이용한 임베디드 기기 취약점 자동 분석 방법의 전체 프로세스를 나타내는 도면이다.1 is a diagram illustrating an overall process of an automatic method for analyzing an embedded device vulnerability using a hybrid analysis technique according to the present invention.

우선 이 시스템은 다양한 임베디드 기기들의 펌웨어들을 입력 받는다(S100). 기본적으로 리눅스 OS 기반의 임베디드 기기들을 대상으로 하며, 아키텍쳐는 ARM, MIPS 등 다양한 아키텍쳐에 대한 분석이 가능하다. 펌웨어들은 분석을 위해서 파일 시스템이 반드시 포함되어 있어야 하며, 암호화되어 있지 않아야 한다. 임베디드 기기 제조사들은 자사의 펌웨어를 적합한 형태로 가공하여 사용할 수 있으며, 그 외의 분석을 위해서는 임베디드 기기 제조사에서 제공하는 펌웨어 업데이트 파일들을 웹 사이트나 FTP 서버 등에서 수집하여 분석이 가능하다.First, the system receives firmware of various embedded devices (S100). Basically, it is targeted at embedded devices based on Linux OS, and architecture can analyze various architectures such as ARM and MIPS. Firmware must contain the file system for analysis and not be encrypted. Embedded device makers can process their firmware in a suitable form. For other analysis, firmware update files provided by embedded device manufacturers can be collected and analyzed on a website or an FTP server.

펌웨어의 구조를 분석하는 과정은 다양한 방법이 적용될 수 있다. 일반적인 압축 방식의 펌웨어뿐만 아니라 각 제조사 혹은 기기별 특별한 형식을 가지는 경우 이에 대해 원하는 부분만 추출하는 기능을 하도록 별도의 모듈 형태로도 구현이 가능하다.Various methods can be applied to analyze the structure of the firmware. In addition to the general compression type firmware, it can be implemented as a separate module type so as to have a function of extracting only a desired portion of the firmware in case that each manufacturer or device has a specific format.

분석 과정은 크게 두 가지의 분석 프로세스를 포함한다. 즉, 정적 분석 프로세스 및 동적 분석 프로세스가 그것이다.The analysis process includes two types of analysis processes. That is, the static analysis process and the dynamic analysis process.

정적 분석 프로세스는 정적 분석, 즉, 펌웨어의 프로그램 코드 자체에 대한 분석을 실행한다(S200). 기호 실행(Symbolic execution) 기술을 이용하여 프로그램의 자세한 실행 흐름을 분석해 버퍼 오버플로우(buffer Overflow), 커맨드 인젝션(command injection), SQL 인젝션(SQL Injection), XSS 등 다양한 취약점들을 탐지한다. 그리고 취약점으로 판단된 부분이 있다면 해당 부분을 동적으로 테스트하기 위한 테스트 코드를 생성하여(S210), 동적 분석 프로세스에 이를 제공한다(S220).The static analysis process executes a static analysis, that is, an analysis on the program code itself of the firmware (S200). Symbolic execution techniques are used to analyze the program's detailed execution flow to detect various types of vulnerabilities such as buffer overflow, command injection, SQL injection, and XSS. If there is a part judged to be a vulnerability, a test code for dynamically testing the part is generated (S210), and the dynamic code is provided to the dynamic analysis process (S220).

동적 분석 프로세스는 동적 분석, 즉, 펌웨어를 실제로 동작시키는 가운데 분석을 실행한다(S300). 펌웨어에서 추출한 파일시스템을 에뮬레이션을 통해 실제 장비에서 실행되는 것처럼 내부의 프로그램들을 실행하고, 퍼징(fuzzing)을 이용해 취약점을 찾거나, 정적 분석에서 생성한 테스트 코드를 실행해 취약점을 검증한다. 동적 분석에서는 모니터링을 기반으로 취약점에 대한 검증이 이루어지는데, 최종적으로 분석 로그(log)를 생성하고(S310), 분석 로그 상에서 정확한 취약점이 발견되지는 않았지만 취약점 가능성이 큰 부분에 대해서는 정적 분석 프로세스에 해당 정보를 제공하여(S320), 정적 분석 프로세스로 하여금 정확한 테스트 코드를 생성하도록 하여 검증을 진행한다.The dynamic analysis process performs dynamic analysis, i.e., analysis while actually operating the firmware (S300). Through emulation of the file system extracted from the firmware, internal programs are executed as if they are executed in real equipment, fuzzing is used to find the vulnerability, or the test code generated from the static analysis is executed to verify the vulnerability. In the dynamic analysis, the vulnerability is verified based on the monitoring. Finally, the analysis log is generated (S310). Although the exact vulnerability is not found in the analysis log, The corresponding information is provided (S320), and the static analysis process is performed so as to generate an accurate test code.

최종적인 취약점 분석 결과로는 동적 분석 프로세스에서 산출된 취약점 로그 중 명확한 결과를 보여 추가적인 정적 분석이 필요 없는 항목들을 취약점으로 보고한다(S330).As a result of the final vulnerability analysis, vulnerabilities are reported as vulnerabilities in the items of the dynamic analysis process, which do not need additional static analysis, because of the clear result of the vulnerability log.

이하에서는 도 2를 참조하여 정적 분석 프로세스를 상세히 설명하고, 도 3을 참조하여 동적 분석 프로세스를 상세히 설명한다.Hereinafter, the static analysis process will be described in detail with reference to FIG. 2, and the dynamic analysis process will be described in detail with reference to FIG.

도 2는 본 발명에 따른 하이브리드 분석 기술을 이용한 임베디드 기기 취약점 자동 분석 방법에서 정적 분석 프로세스를 나타내는 도면이다.2 is a diagram illustrating a static analysis process in an automatic method for analyzing an embedded device vulnerability using a hybrid analysis technique according to the present invention.

정적 분석 프로세스에서는 입력받은 임베디드 기기 펌웨어의 프로그램 코드 자체에 대한 분석을 실행하며, 해당 펌웨어에서 웹 서버, CGI 서비스 프로그램, 기타 네트워크 서비스에 해당하는 바이너리 파일들을 추출하여 분석을 진행한다. CGI란, Common Gateway Interface(CGI)는 HTTP(Hyper-Text Transfer Protocol)를 해석하는 웹 서버에서 별도로 구현된 서비스 프로그램을 동작시킬 수 있도록 해주는 인터페이스이다.The static analysis process analyzes the program code itself of the input embedded device firmware and extracts the binary files corresponding to the web server, the CGI service program, and other network services from the firmware, and performs the analysis. Common Gateway Interface (CGI) is an interface that enables a service program implemented separately from a web server that interprets HTTP (Hyper-Text Transfer Protocol) to operate.

먼저 분석하려는 임베디드 기기의 펌웨어를 입력받는다(S220). 입력받은 펌웨어에 대하여, 분석을 위해서 기본적으로 바이너리 파일들을 추출하여(S201) 분석 가능한 어셈블리 코드로 바꾸고(S202), 또한 함수 단위의 구분을 하는 작업이 필요한데, IDA Pro와 같은 상용 분석 도구를 이용하거나 관련된 오픈소스 라이브러리들을 이용하여 이 과정을 진행한다.First, the firmware of the embedded device to be analyzed is inputted (S220). In order to analyze the input firmware, binary files are basically extracted (S201) and converted into analytical assembly codes (S202). In addition, it is necessary to divide the functions into units of functions. A commercial analysis tool such as IDA Pro This process is performed using related open source libraries.

각 바이너리 파일들에 대하여, 기호 실행(symbolic execution) 방법을 이용하여 취약점 분석을 진행한다(S203). 이는 다양한 기호 실행 기반 프레임워크를 이용해 구현 가능하다. 기호 실행이란, 프로그램 실행시 구체적인 값이 아닌 미지수가 사용된다면, 해당 값을 기호 값으로 가정하여 프로그램을 분석하는 방식이다.Vulnerability analysis is performed for each binary file using a symbolic execution method (S203). It can be implemented using a variety of symbol execution-based frameworks. Symbol execution is a method of analyzing a program, assuming that the value is a symbolic value, if an unknown value is used instead of a concrete value when the program is executed.

기호 실행을 이용한 취약점 분석은 관련 기존 연구들과 유사하게 진행하며, 프로그램의 시작부분부터 종료까지 기호 실행 엔진에서 실행하면서 취약점이 발생할 수 있는 패턴과 일치하는 상태에 있는지 여부를 확인하여 분석한다. 또는 취약점의 발생 가능성이 큰 함수들에 대해서만 부분적인 분석을 하거나, 동적 분석 프로세스로부터 입력받은(S220) 로그(log) 데이터를 기반으로 프로그램의 일부분을 해당 로그 데이터에 맞는 환경으로 설정(S221)한 뒤 분석을 할 수도 있다(S203).Vulnerability analysis using sign execution proceeds similar to the related previous researches. From the beginning to the end of the program, it runs in the signature execution engine to check whether the Vulnerability is in a state consistent with the pattern that could cause the vulnerability. A partial analysis is performed only on functions that are likely to cause a vulnerability or a portion of the program is set to an environment suitable for the log data based on log data input from the dynamic analysis process (S220) (S221) Back analysis may be performed (S203).

취약점 검사(S204)를 위한 패턴은 다양하게 구현될 수 있다.The pattern for the vulnerability check (S204) can be variously implemented.

예를 들어, 버퍼 오버플로우(buffer overflow) 취약점은 데이터 복사에 사용되는 몇 가지 라이브러리 함수들에서 길이 검증에 대한 분석을 하거나, 실행 과정에서 스택에 존재하는 리턴 주소가 변조되는 경우가 발생하는지를 분석하여 탐지할 수 있다.For example, the buffer overflow vulnerability can be analyzed by analyzing the length of some library functions used for copying data, or analyzing whether the return address in the stack is altered during execution It can detect.

커맨드 인젝션(command injection)은 명령어를 삽입한다는 뜻으로, 웹 요청에시스템 명령어를 보내 이를 실행하도록 하는 방법이다. 웹 내부에서 시스템 명령어를 실행하는 경우 사용자가 입력한 값이 올바른지 검사하지 않고 시스템 명령어의 일부분으로 전달한다면, 해커는 이 값을 조작하여 다른 시스템 명령어를 실행할 수 있다. 커맨드 인젝션의 경우, 실행 과정에서 system() 함수나 execve() 계열 함수들에 도달한 상태에서 해당 함수들의 파라미터로 커맨드 인젝션 공격에 사용될 수 있는 문자열들이 외부로부터 온 데이터를 통해서 입력될 수 있는지 확인이 가능하다.Command injection means to insert a command, which is a way to send a system command to a web request to execute it. If you run a system command from within the web, the hacker can manipulate this value to execute other system commands if you pass it as part of a system command without checking that the value you enter is correct. In the case of command injection, it is checked whether the strings that can be used in the command injection attack can be inputted through the data from the outside by reaching the system () function or the execve () It is possible.

SQL 인젝션(SQL injection, SQL 삽입, SQL 주입으로도 불린다)은 코드 인젝션의 한 기법으로 클라이언트의 입력값을 조작하여 서버의 데이터베이스를 공격할 수 있는 공격 방식을 말한다. SQL 인젝션도 커맨드 인젝션과 유사하게 SQL 쿼리(query) 관련된 함수에서 인젝션이 발생할 수 있는지 확인이 가능하다.SQL injection (also called SQL injection, SQL injection, or SQL injection) is a technique of code injection that can attack a server's database by manipulating client input values. SQL Injection is similar to command injection, and it is possible to check whether injection can occur in a SQL query related function.

XSS(cross-site scripting)은 SQL 인젝션과 함께 웹 상에서 가장 기초적인 취약점 공격 방법의 일종으로, 악의적인 사용자가 공격하려는 사이트에 스크립트를 넣는 기법을 말한다. 공격에 성공하면 사이트에 접속한 사용자는 삽입된 코드를 실행하게 되며, 보통 의도치 않은 행동을 수행시키거나 쿠키나 세션 토큰 등의 민감한 정보를 탈취한다. XSS의 경우 입력받은 데이터가 그대로 출력되는 부분에 대해서 XSS에 사용가능한 특수한 문자들에 대한 처리가 이루어지는지에 대해 검사하여 확인이 가능하다.Cross-site scripting (XSS) is one of the most basic vulnerability attack methods on the Web, along with SQL injection, which is a technique for malicious users to inject scripts into sites they wish to attack. If the attack is successful, users who access the site will execute the embedded code, usually perform unintended actions, or steal sensitive information such as cookies or session tokens. In the case of XSS, it is possible to check whether or not the special characters usable in XSS are processed with respect to the portion where the input data is directly outputted.

발견한 취약점들은 정적 분석 프로세스의 기호 실행(symbolic execution) 과정에서 발생한 오류로 인한 False Positive일수도 있고, 실제 실행 과정에서는 사용되지 않는 부분에서 발생한 취약점일 가능성도 있기 때문에 이에 대한 검증이 필요하다. 따라서 바로 취약점으로 보고하는 것이 아니라, 이를 검증할 수 있도록 취약점 테스트 코드를 생성한다(S210). 취약점 테스트 코드는 분석한 취약점을 유발할 수 있는 입력값을 기호 실행을 이용해 생성한 것으로, 웹서버 등 대상 서비스와 통신을 위한 기본적인 템플릿 코드에 해당 입력값 부분을 추가한 형태의 단순한 코드로 생성한다.The detected vulnerabilities may be false positives due to errors occurred in the symbolic execution process of the static analysis process or may be vulnerabilities that are not used in the actual execution process. Therefore, the vulnerability test code is generated so that the vulnerability can be verified rather than reporting the vulnerability directly (S210). The vulnerability test code is generated by using symbol execution that can cause the vulnerability to be analyzed. The vulnerability test code is generated by simple code with the input value part added to the basic template code for communication with the target service such as the web server.

도 3은 본 발명에 따른 하이브리드 분석 기술을 이용한 임베디드 기기 취약점 자동 분석 방법에서 동적 분석 프로세스를 나타내는 도면이다.3 is a diagram illustrating a dynamic analysis process in an automatic method for analyzing vulnerabilities of an embedded device using a hybrid analysis technique according to the present invention.

동적 분석 프로세스에서는 입력받은(S100) 임베디드 기기 펌웨어에서 파일 시스템 부분을 추출한 뒤(S301), QEMU를 기반으로 한 펌웨어 에뮬레이션 시스템에 해당 파일 시스템과 미리 만들어 둔 별도의 커널을 올려 대상 임베디드 기기가 에뮬레이션 된 환경을 구축한다(S302). 해당 환경에서는 해당 임베디드 기기의 하드웨어적인 부분은 없지만, 주된 공격 대상이 되는 외부로 공개된 웹 서버, 네트워크 서비스 등은 에뮬레이션 된 환경에서 실행되어 실제 장비와 같이 동작하게 된다.In the dynamic analysis process, the file system part is extracted from the input device firmware (S100) (S301), and a separate kernel is created in the firmware emulation system based on the QEMU and the file system is created in advance, Environment is established (S302). In this environment, there is no hardware part of the embedded device. However, web server, network service, etc., which are exposed as the main attack target, are executed in the emulated environment and operate as actual equipment.

임베디드 기기 펌웨어가 에뮬레이션 된 후(S302), 동적 분석을 진행하며, 동적 분석 과정에서 발생하는 비정상적 동작이나 프로그램 실행 흐름, 커널에서 수집한 각종 정보들에 대한 로그를 남겨, 이를 기반으로 취약점 여부를 검사하고, 취약점으로 보이거나 관련성이 있는 로그들을 결과로 출력한다.After the embedded device firmware is emulated (S302), dynamic analysis is performed. A log of various abnormal information, flow of program execution, and information collected in the dynamic analysis process is logged, And prints the results as logs that appear to be vulnerable or relevant.

동적 분석 프로세스는 정적 분석 프로세스에서 생성한 취약점 테스트 코드를 전달받아(S220) 실행하여 검증을 하거나(S303), 또는 퍼저(fuzzer)를 이용하여 진행된다(S304). 퍼저(fuzzer)란, 랜덤값 또는 시퀀셜한 값을 어플리케이션의 다양한 필드에 삽입하여 밝혀지지 않은 어플리케이션 취약점(예를 들어, 버퍼 오버플로우, 파라미터 포맷체크, 에러 핸들링, 사용자 입력값 체크 등)에서부터 확실히 유해하다고 보기는 어려운 정보(예를 들어, OS버전, 어플리케이션 서버 버전, 데이터베이스 정보, 심지어는 사설 IP 등과 같은)를 알아내기 위해 사용되는 도구를 말한다.The dynamic analysis process receives the vulnerability test code generated in the static analysis process (S220), executes the verification (S303), or proceeds using the fuzzer (S304). A fuzzer is a technique that inserts a random or sequential value into various fields of an application to ensure that it is safe from unknown application vulnerabilities (eg, buffer overflows, parameter format checks, error handling, user input value checks, Refers to a tool used to determine difficult information (such as OS version, application server version, database information, even private IP, etc.).

퍼저를 통한 분석(S304)에서는 웹 인터페이스의 데이터를 입력할 수 있는 부분에 버퍼 오버플로우(buffer overflow), 커맨드 인젝션(command injection), SQL 인젝션(SQL injection), XSS(cross-site scripting) 등을 유발할 수 있는 다양한 값들을 입력하는 것을 반복하며, 출력되는 결과 값이나 수집된 로그를 통해 취약점으로 판단되는 부분이 생길 때까지 반복하게 된다.In S304, the buffer overflow, command injection, SQL injection, and cross-site scripting (XSS) are applied to the part where data of the web interface can be input. It repeatedly tries to input various values that can be triggered, and it repeats until it is judged as a vulnerability through output result or collected log.

취약점 판단 방법(S305)의 경우, 취약점에 따라 여러 가지 방법으로 구현될 수 있는데, 예를 들어 버퍼 오버플로우 등이 발생할 경우에는 대부분 프로그램에 비정상적으로 종료되는 크래시가 발생하므로 쉽게 판단이 가능하며, 커맨드 인젝션의 경우 커널에서 프로그램 실행 관련된 시스템 콜에 대한 로그를 남기면 커맨드 인젝션을 시도한 명령어가 정상적으로 전달되어 실행되었는지 판단할 수 있다. XSS의 경우에는 서버에서 출력되는 결과에 입력한 XSS 스크립트가 포함되었는지 여부에 대한 확인이 가능하다. 이와 같이 하여 취약점에 대한 로그(log) 데이터를 생성한다(S310).In the case of the vulnerability determination method (S305), it can be implemented in various ways according to the vulnerability. For example, when a buffer overflow occurs, a crash that abnormally terminates in a program is mostly generated, In the case of injection, if a log of the system call related to program execution is left in the kernel, it is possible to judge whether or not the command which has attempted command injection has been normally transmitted and executed. In the case of XSS, it is possible to check whether the XSS script entered in the output from the server is included. In this manner, log data for the vulnerability is generated (S310).

또한 로그 상에서 취약점으로 바로 판단되지는 않았지만 취약점 가능성이 있는 부분은 정적 분석이 가능하므로 해당 바이너리 정보, 입력값 등의 정보를 정적 분석 프로세스에 제공한다(S320). 예를 들어, 로그 상에서 입력값이 프로그램 실행 관련 시스템 콜까지 전달은 되었지만 약간 변조되거나 일부만 전달되는 경우, 필터링 등이 있을 수 있으며 이는 정적 분석을 통해 우회 가능성을 판단할 수 있다.In addition, although the vulnerability is not directly judged in the log, since the static analysis can be performed on the vulnerable portion, the information such as the binary information and the input value is provided to the static analysis process (S320). For example, there may be a case where the input value is passed to the system call related to the program execution, but it is slightly modulated or only a part of the input is passed through the log, and the filtering may be performed.

도 4는 본 발명에 따른 하이브리드 분석 기술을 이용한 임베디드 기기 취약점 자동 분석 장치(200)의 구성을 나타내는 도면이다.FIG. 4 is a diagram illustrating a configuration of an apparatus for automatically analyzing vulnerabilities of an embedded device 200 using a hybrid analysis technique according to the present invention.

임베디드 기기 취약점 자동 분석 장치(200)는 예를 들어, 노트북 또는 데스크탑 컴퓨터와 같은 거치식 컴퓨터 장치일 수 있다. 그러나 반드시 이에 한정되지는 않으며, 경우에 따라서는 태블릿 장치와 같은 모바일 장치일 수도 있다.The embedded device vulnerability automatic analyzing apparatus 200 may be, for example, a portable computer apparatus such as a notebook or a desktop computer. However, it is not necessarily limited thereto, and in some cases, it may be a mobile device such as a tablet device.

임베디드 기기 취약점 자동 분석 장치(200)는 프로세서(210), 프로그램과 데이터를 저장하는 비휘발성 저장부(220), 실행 중인 프로그램들을 저장하는 휘발성 메모리(230), 다른 기기와 통신을 수행하기 위한 통신부(240), 이들 장치 사이의 내부 통신 통로인 버스 등으로 이루어져 있다.The embedded device automatic vulnerability analysis apparatus 200 includes a processor 210, a nonvolatile storage unit 220 for storing programs and data, a volatile memory 230 for storing executing programs, a communication unit (240), a bus serving as an internal communication path between these devices, and the like.

실행 중인 프로그램으로는, 장치 드라이버, 운영체계(Operating System) 및 다양한 어플리케이션(미도시)이 있을 수 있다. 또한 분석 대상인 임베디드 기기 펌웨어가 실행 중일 수도 있다. 이와 같은 임베디드 기기 펌웨어(400)는 도시된 바와 같이 임베디드 기기(10)와 직접 연결되어 임베디드 기기 취약점 자동 분석 장치(200)로 다운로드될 수도 있지만, 그 펌웨어를 저장하고 있는 다른 장치(10)로부터 임베디드 기기 취약점 자동 분석 장치(200)로 다운로드될 수도 있다. 또한 분석 대상인 펌웨어를 임베디드 기기 취약점 자동 분석 장치(200)에 다운로드하여 분석할 수도 있지만, 별도의 펌웨어 에뮬레이션 시스템(미도시)에 다운로드 하여 실행시킨 후, 임베디드 기기 취약점 자동 분석 장치(200)와 통신하도록 연결하여 분석을 수행할 수도 있다.The running program may be a device driver, an operating system, and various applications (not shown). Also, the embedded device firmware to be analyzed may be running. As shown in the figure, the embedded device firmware 400 may be directly connected to the embedded device 10 and downloaded to the embedded device vulnerability automatic analyzer 200. However, the embedded device firmware 400 may be downloaded from another device 10 storing the firmware, And may be downloaded to the apparatus automatic vulnerability analysis apparatus 200. In addition, the firmware to be analyzed may be downloaded to the embedded device vulnerability automatic analyzer 200 for analysis, but may be downloaded and executed in a separate firmware emulation system (not shown), and then communicated to the embedded device vulnerability automatic analyzer 200 The analysis can also be performed by connecting.

임베디드 기기 펌웨어(400)는, 코드 자체 분석을 위한 정적 분석 프로세스(S200) 또는 실행 상태에서의 분석을 위한 동적 분석 프로세스(S300)에서 그 분석대상이 된다. 동적 분석 프로세스에서는 임베디드 기기 취약점 자동 분석 장치(200) 내에서, 임베디드 기기 취약점 자동 분석 어플리케이션(프로그램)(300)과 함께 구동되고 있을 수 있다.The embedded device firmware 400 is subject to analysis in a static analysis process S200 for code self analysis or a dynamic analysis process S300 for analysis in execution state. In the dynamic analysis process, the embedded device vulnerability automatic analysis device 200 may be operated together with the embedded device vulnerability automatic analysis application (program) 300.

도시되지는 않았지만, 임베디드 기기 취약점 자동 분석 장치(200)는 전력제공부를 포함한다.Although not shown, the embedded device vulnerability automatic analyzing apparatus 200 includes a power providing unit.

임베디드 기기 취약점 자동 분석 어플리케이션(프로그램)(300)은 임베디드 기기 취약점 자동 분석 장치(200)에 설치되어 실행됨으로써 임베디드 기기의 펌웨어에 대한 취약점 분석 프로세스를 수행하는데, 그러한 취약점 분석 프로세스에 대하여는 이미 도 1 내지 도 3을 참조하여 상세히 설명한 바 있으므로, 이하에서는 그 전체적인 흐름에 대하여만 간략히 정리하여 설명하기로 한다.The embedded device vulnerability automatic analysis application (program) 300 is installed in the embedded device automatic vulnerability analyzer 200 and executes the vulnerability analysis process for the firmware of the embedded device. 3, it will be briefly described below.

즉, 임베디드 기기 취약점 자동 분석 장치(200)는 다양한 임베디드 기기들의 펌웨어들을 입력 받고, 정적 분석 프로세스 및 동적 분석 프로세스를 통하여 해당 펌웨어의 취약점 분석을 수행한다.That is, the embedded device vulnerability automatic analyzer 200 receives the firmware of various embedded devices and analyzes the vulnerability of the corresponding firmware through the static analysis process and the dynamic analysis process.

정적 분석 프로세스는 정적 분석, 즉, 펌웨어의 프로그램 코드 자체에 대한 분석을 실행하며, 동적 분석 프로세스는 동적 분석, 즉, 펌웨어를 임베디드 기기 취약점 자동 분석 장치(200)에서 실제로 동작시키는 가운데 분석을 실행한다.The static analysis process executes the static analysis, that is, the analysis of the program code itself of the firmware, and the dynamic analysis process executes the dynamic analysis, that is, the analysis while the firmware is actually operated in the embedded device vulnerability automatic analyzing apparatus 200 .

정적 분석 프로세스에서는 기호 실행(Symbolic execution) 기술을 이용하여 프로그램의 자세한 실행 흐름을 분석해 버퍼 오버플로우(buffer Overflow), 커맨드 인젝션(command injection), SQL 인젝션(SQL Injection), XSS 등 다양한 취약점들을 탐지한다. 그리고 취약점으로 판단된 부분이 있다면 해당 부분을 동적으로 테스트하기 위한 테스트 코드를 생성하여(S210), 동적 분석 프로세스에 이를 제공한다.The static analysis process analyzes the detailed execution flow of the program using symbolic execution technology to detect various kinds of vulnerabilities such as buffer overflow, command injection, SQL injection, and XSS . If there is a part judged to be a vulnerability, a test code for dynamically testing the part is generated (S210), and the test code is provided to the dynamic analysis process.

동적 분석 프로세스는 펌웨어에서 추출한 파일시스템을 에뮬레이션을 통해 실제 장비에서 실행되는 것처럼 내부의 프로그램들을 실행하고, 퍼징(fuzzing)을 이용해 취약점을 찾거나, 정적 분석에서 생성한 테스트 코드를 실행해 취약점을 검증한다. 동적 분석에서는 그와 같이 에뮬레이션을 통하여 동작하는 펌웨어에 대한 모니터링을 기반으로 취약점에 대한 검증이 이루어지는데, 최종적으로 분석 로그(log)를 생성하고, 분석 로그 상에서 정확한 취약점이 발견되지는 않았지만 취약점 가능성이 큰 부분에 대해서는 정적 분석 프로세스에 해당 정보를 제공하여, 정적 분석 프로세스로 하여금 정확한 테스트 코드를 생성하도록 하여 검증을 진행한다. 최종적인 취약점 분석 결과로는 동적 분석 프로세스에서 산출된 취약점 로그 중 명확한 결과를 보여 추가적인 정적 분석이 필요 없는 항목들을 취약점으로 보고한다.The dynamic analysis process emulates the file system extracted from the firmware and executes the internal programs as if it is executed on the actual equipment. It uses fuzzing to find the vulnerability, or executes the test code generated from the static analysis to verify the vulnerability do. In the dynamic analysis, the vulnerability is verified based on the monitoring of the firmware operating through the emulation. Finally, an analysis log is generated, and although an exact vulnerability is not found in the analysis log, For the larger part, the information is provided to the static analysis process so that the static analysis process can generate the correct test code and proceed with the verification. The final vulnerability analysis result shows that the vulnerability logs show the clear results of the vulnerability logs generated by the dynamic analysis process and do not require additional static analysis.

100: 임베디드 기기/펌웨어 저장 장치
200: 임베디드 기기 취약점 자동 분석 장치
300: 임베디드 기기 취약점 자동 분석 어플리케이션(프로그램)
400: 임베디드 기기 펌웨어
100: Embedded device / firmware storage device
200: Embedded device vulnerability automatic analyzer
300: Embedded device vulnerability automatic analysis application (program)
400: Embedded device firmware

Claims (15)

임베디드(embedded) 기기 취약점 자동 분석 방법으로서,
(a) 분석 대상인 임베디드 기기의 펌웨어 코드(code)에 대하여, 정적 분석에 의하여 취약점 분석을 수행하는 단계;
(b) 상기 정적 분석 결과로서, 취약점 테스트 코드를 생성하는 단계;
(c) 상기 펌웨어를 에뮬레이션 실행시킨 후, 상기 펌웨어에 대한 동적 분석에 의하여 취약점 분석을 수행하는 단계; 및,
(d) 상기 펌웨어에 대한 동적 분석의 로그(log) 데이터를 생성하는 단계
를 포함하고,
상기 단계(a)의 정적 분석에 의한 취약점 분석 전에, 동적 분석 프로세스로부터 입력받은 로그 데이터를 기반으로 분석 대상 프로그램(펌웨어 코드)의 일부분을 해당 로그 데이터에 맞는 환경으로 설정하고, 이와 같이 설정된 펌웨어 코드에 대하여, 상기 단계(a)의 정적 분석에 의한 취약점 분석을 수행하는,
임베디드 기기 취약점 자동 분석 방법.
As an automatic analysis method of embedded device vulnerability,
(a) performing a vulnerability analysis on a firmware code of an embedded device to be analyzed by static analysis;
(b) generating, as a result of the static analysis, a vulnerability test code;
(c) performing the vulnerability analysis by performing dynamic analysis on the firmware after emulating the firmware; And
(d) generating log data of dynamic analysis for the firmware
Lt; / RTI >
A part of the analysis target program (firmware code) is set as an environment suitable for the log data based on the log data input from the dynamic analysis process before the vulnerability analysis by the static analysis in the step (a) And performing a vulnerability analysis by the static analysis of the step (a)
Automated method for analyzing embedded device vulnerability.
청구항 1에 있어서,
상기 단계(a)에서 상기 정적 분석에 의한 취약점 분석은,
기호 실행(symbolic execution) 방식으로 수행하는 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method according to claim 1,
The vulnerability analysis according to the static analysis in the step (a)
Symbolic execution.
The method comprising the steps of:
청구항 2에 있어서,
상기 기호 실행 방식에 의한 취약점 분석을 수행하기 전,
(a1) 상기 임베디드 기기 펌웨어로부터 바이너리(binary) 파일을 추출하는 단계; 및,
(a2) 상기 추출된 바이너리 파일에 대하여 디스어셈블(disassemble)을 수행하여 어셈블리 코드(assembly code)로 변환하는 단계
를 더 포함하고,
상기 기호 실행은, 상기 펌웨어의 어셈블리 코드에 대하여 수행하는 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method of claim 2,
Before performing the vulnerability analysis by the symbol execution method,
(a1) extracting a binary file from the embedded device firmware; And
(a2) disassembling the extracted binary file to convert the extracted binary file into an assembly code
Further comprising:
The symbol execution may be performed on the assembly code of the firmware
The method comprising the steps of:
청구항 1에 있어서,
상기 정적 분석에 의한 취약점 분석은,
버퍼 오버플로우(buffer overflow) 가능성에 대한 검증을 포함하는 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method according to claim 1,
The vulnerability analysis by the static analysis,
Including verification of the possibility of buffer overflow
The method comprising the steps of:
청구항 1에 있어서,
상기 정적 분석에 의한 취약점 분석은,
상기 펌웨어에 대하여 커맨드 인젝션(command injection) 공격이 가능한지 여부에 대한 검증을 포함하는 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method according to claim 1,
The vulnerability analysis by the static analysis,
Including verification of whether a command injection attack is possible with respect to the firmware
The method comprising the steps of:
청구항 1에 있어서,
상기 정적 분석에 의한 취약점 분석은,
상기 펌웨어에 대하여 SQL 인젝션(SQL injection) 공격이 가능한지 여부에 대한 검증을 포함하는 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method according to claim 1,
The vulnerability analysis by the static analysis,
Including verification of whether or not an SQL injection attack is possible for the firmware
The method comprising the steps of:
청구항 1에 있어서,
상기 정적 분석에 의한 취약점 분석은,
상기 펌웨어에 대하여 XSS(cross-site scripting) 공격이 가능한지 여부에 대한 검증을 포함하는 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method according to claim 1,
The vulnerability analysis by the static analysis,
Including verification of whether a cross-site scripting (XSS) attack is possible against the firmware
The method comprising the steps of:
청구항 1에 있어서,
상기 단계(b)의 취약점 테스트 코드는,
상기 분석 대상인 펌웨어 코드에, 상기 단계(a)에서 분석한 취약점을 유발할 수 있는 입력값을 기호 실행을 이용하여 생성한 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method according to claim 1,
The vulnerability test code of step (b)
(I) an input value capable of causing the vulnerability analyzed in the step (a) to be generated in the firmware code to be analyzed by using symbol execution
The method comprising the steps of:
삭제delete 청구항 1에 있어서,
상기 단계(c)의 동적 분석에 의한 취약점 분석은,
상기 단계(b)에서 생성된 취약점 테스트 코드를 실행 시킴에 의해 수행하는 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method according to claim 1,
The vulnerability analysis by the dynamic analysis of the step (c)
Executing by executing the vulnerability test code generated in the step (b)
The method comprising the steps of:
청구항 1에 있어서,
상기 단계(c)의 동적 분석에 의한 취약점 분석은,
퍼저(fuzzer)를 이용하여 수행하는 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method according to claim 1,
The vulnerability analysis by the dynamic analysis of the step (c)
Performing with a fuzzer
The method comprising the steps of:
청구항 11에 있어서,
상기 퍼저(fuzzer)를 이용한 취약점 분석은,
버퍼 오버플로우(buffer overflow), 커맨드 인젝션(command injection), SQL 인젝션(SQL injection), XSS(cross-site scripting) 중 하나 이상을 유발할 수 있는 다양한 값들을 입력하는 것을 반복하여, 출력되는 결과 값이나 수집된 로그를 통해 취약점으로 판단되는 부분이 생길 때까지 반복하는 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method of claim 11,
In the vulnerability analysis using the fuzzer,
It is repeated to input various values that may cause at least one of buffer overflow, command injection, SQL injection, and cross-site scripting (XSS) Repeat until the vulnerability is determined through the collected logs
The method comprising the steps of:
청구항 11에 있어서,
상기 단계(d)에서 생성한 동적 분석의 로그(log) 데이터는,
상기 단계(a)의 정적 분석에 의한 취약점 분석 프로세스에 전달하는 것
을 특징으로 하는 임베디드 기기 취약점 자동 분석 방법.
The method of claim 11,
The log data of the dynamic analysis generated in the step (d)
To the vulnerability analysis process by the static analysis of step (a)
The method comprising the steps of:
임베디드 기기 취약점을 자동으로 분석하기 위한 장치로서,
적어도 하나의 프로세서; 및
컴퓨터로 실행가능한 명령을 저장하는 적어도 하나의 메모리를 포함하되,
상기 적어도 하나의 메모리에 저장된 상기 컴퓨터로 실행가능한 명령은, 상기 적어도 하나의 프로세서에 의하여,
(a) 분석 대상인 임베디드 기기의 펌웨어 코드(code)에 대하여, 정적 분석에 의하여 취약점 분석을 수행하는 단계;
(b) 상기 정적 분석 결과로서, 취약점 테스트 코드를 생성하는 단계;
(c) 상기 펌웨어를 에뮬레이션 실행시킨 후, 상기 펌웨어에 대한 동적 분석에 의하여 취약점 분석을 수행하는 단계; 및,
(d) 상기 펌웨어에 대한 동적 분석의 로그(log) 데이터를 생성하는 단계
가 실행되도록 하고,
상기 단계(a)의 정적 분석에 의한 취약점 분석 전에, 동적 분석 프로세스로부터 입력받은 로그 데이터를 기반으로 분석 대상 프로그램(펌웨어 코드)의 일부분을 해당 로그 데이터에 맞는 환경으로 설정하고, 이와 같이 설정된 펌웨어 코드에 대하여, 상기 단계(a)의 정적 분석에 의한 취약점 분석을 수행하도록 하는,
임베디드 기기 취약점을 자동으로 분석하기 위한 장치.
An apparatus for automatically analyzing an embedded device vulnerability,
At least one processor; And
At least one memory for storing computer executable instructions,
The computer-executable instructions stored in the at least one memory may be, by the at least one processor,
(a) performing a vulnerability analysis on a firmware code of an embedded device to be analyzed by static analysis;
(b) generating, as a result of the static analysis, a vulnerability test code;
(c) performing the vulnerability analysis by performing dynamic analysis on the firmware after emulating the firmware; And
(d) generating log data of dynamic analysis for the firmware
Lt; / RTI >
A part of the analysis target program (firmware code) is set as an environment suitable for the log data based on the log data input from the dynamic analysis process before the vulnerability analysis by the static analysis in the step (a) And performing a vulnerability analysis by the static analysis of step (a)
A device for automatically analyzing embedded device vulnerabilities.
임베디드 기기 취약점을 자동으로 분석하기 위한 컴퓨터 프로그램으로서,
비일시적 저장 매체에 저장되며, 프로세서에 의하여,
(a) 분석 대상인 임베디드 기기의 펌웨어 코드(code)에 대하여, 정적 분석에 의하여 취약점 분석을 수행하는 단계;
(b) 상기 정적 분석 결과로서, 취약점 테스트 코드를 생성하는 단계;
(c) 상기 펌웨어를 에뮬레이션 실행시킨 후, 상기 펌웨어에 대한 동적 분석에 의하여 취약점 분석을 수행하는 단계; 및,
(d) 상기 펌웨어에 대한 동적 분석의 로그(log) 데이터를 생성하는 단계
가 실행되도록 하는 명령을 포함하고,
상기 단계(a)의 정적 분석에 의한 취약점 분석 전에, 동적 분석 프로세스로부터 입력받은 로그 데이터를 기반으로 분석 대상 프로그램(펌웨어 코드)의 일부분을 해당 로그 데이터에 맞는 환경으로 설정하고, 이와 같이 설정된 펌웨어 코드에 대하여, 상기 단계(a)의 정적 분석에 의한 취약점 분석을 수행하는 명령을 포함하는,
임베디드 기기 취약점을 자동으로 분석하기 위한 컴퓨터 프로그램.
A computer program for automatically analyzing an embedded device vulnerability,
Stored in a non-volatile storage medium,
(a) performing a vulnerability analysis on a firmware code of an embedded device to be analyzed by static analysis;
(b) generating, as a result of the static analysis, a vulnerability test code;
(c) performing the vulnerability analysis by performing dynamic analysis on the firmware after emulating the firmware; And
(d) generating log data of dynamic analysis for the firmware
To be executed,
A part of the analysis target program (firmware code) is set as an environment suitable for the log data based on the log data input from the dynamic analysis process before the vulnerability analysis by the static analysis in the step (a) And performing an analysis of the vulnerability according to the static analysis of step (a)
A computer program for automatically analyzing embedded device vulnerabilities.
KR1020190006679A 2019-01-18 2019-01-18 Method and apparatus for automatically analyzing vulnerable point of embedded appliance by using hybrid analysis technology, and computer program for executing the method KR101972825B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190006679A KR101972825B1 (en) 2019-01-18 2019-01-18 Method and apparatus for automatically analyzing vulnerable point of embedded appliance by using hybrid analysis technology, and computer program for executing the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190006679A KR101972825B1 (en) 2019-01-18 2019-01-18 Method and apparatus for automatically analyzing vulnerable point of embedded appliance by using hybrid analysis technology, and computer program for executing the method

Publications (1)

Publication Number Publication Date
KR101972825B1 true KR101972825B1 (en) 2019-04-30

Family

ID=66285663

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190006679A KR101972825B1 (en) 2019-01-18 2019-01-18 Method and apparatus for automatically analyzing vulnerable point of embedded appliance by using hybrid analysis technology, and computer program for executing the method

Country Status (1)

Country Link
KR (1) KR101972825B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752829A (en) * 2020-06-22 2020-10-09 中国人民解放军海军工程大学 Dynamic debugging method for firmware program of embedded system
KR20210046363A (en) * 2019-10-18 2021-04-28 한전케이디엔주식회사 Apparatus and method for verifying suitability of code algorithm implementation in real time operating system
KR102305386B1 (en) 2021-06-17 2021-09-24 세종대학교산학협력단 Apparatus and method for fuzzing firmware
US11175992B1 (en) 2020-11-04 2021-11-16 Electronics And Telecommunications Research Institute Method for automated fuzzing for IoT device based on automated reset and apparatus using the same
CN114925372A (en) * 2022-05-12 2022-08-19 北京控制与电子技术研究所 Firmware safety detection method for enterprise safety production requirements

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060062882A (en) 2004-12-06 2006-06-12 한국전자통신연구원 Method for supporting web application program vulnerability analysis
KR20180060497A (en) * 2016-11-29 2018-06-07 한국전력공사 Apparatus and method for analyzing embeded software vulnerability based on binary code

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060062882A (en) 2004-12-06 2006-06-12 한국전자통신연구원 Method for supporting web application program vulnerability analysis
KR20180060497A (en) * 2016-11-29 2018-06-07 한국전력공사 Apparatus and method for analyzing embeded software vulnerability based on binary code

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210046363A (en) * 2019-10-18 2021-04-28 한전케이디엔주식회사 Apparatus and method for verifying suitability of code algorithm implementation in real time operating system
KR102269335B1 (en) * 2019-10-18 2021-06-24 한전케이디엔주식회사 Apparatus and method for verifying suitability of code algorithm implementation in real time operating system
CN111752829A (en) * 2020-06-22 2020-10-09 中国人民解放军海军工程大学 Dynamic debugging method for firmware program of embedded system
US11175992B1 (en) 2020-11-04 2021-11-16 Electronics And Telecommunications Research Institute Method for automated fuzzing for IoT device based on automated reset and apparatus using the same
KR102305386B1 (en) 2021-06-17 2021-09-24 세종대학교산학협력단 Apparatus and method for fuzzing firmware
CN114925372A (en) * 2022-05-12 2022-08-19 北京控制与电子技术研究所 Firmware safety detection method for enterprise safety production requirements
CN114925372B (en) * 2022-05-12 2024-04-12 北京控制与电子技术研究所 Firmware security detection method for enterprise security production requirements

Similar Documents

Publication Publication Date Title
KR101972825B1 (en) Method and apparatus for automatically analyzing vulnerable point of embedded appliance by using hybrid analysis technology, and computer program for executing the method
US10581879B1 (en) Enhanced malware detection for generated objects
Saxena et al. FLAX: Systematic Discovery of Client-side Validation Vulnerabilities in Rich Web Applications.
RU2653985C2 (en) Method and system for detecting malicious software by control of software implementation running under script
US11748487B2 (en) Detecting a potential security leak by a microservice
US20180075233A1 (en) Systems and methods for agent-based detection of hacking attempts
US9507933B2 (en) Program execution apparatus and program analysis apparatus
CN103996007A (en) Testing method and system for Android application permission leakage vulnerabilities
CN109101815B (en) Malicious software detection method and related equipment
CN103390130A (en) Rogue program searching and killing method and device based on cloud security as well as server
US11528298B2 (en) Methods and systems for preventing malicious activity in a computer system
CN109948338B (en) Android application sensitive path triggering method based on static analysis
CN110929264A (en) Vulnerability detection method and device, electronic equipment and readable storage medium
KR102396237B1 (en) Apparatus for processing cyber threat information, method for processing cyber threat information, and medium for storing a program processing cyber threat information
CN109818972B (en) Information security management method and device for industrial control system and electronic equipment
KR20160090566A (en) Apparatus and method for detecting APK malware filter using valid market data
CN113935041A (en) Vulnerability detection system and method for real-time operating system equipment
Tang et al. Ssldetecter: detecting SSL security vulnerabilities of android applications based on a novel automatic traversal method
Qin et al. UCRF: Static analyzing firmware to generate under-constrained seed for fuzzing SOHO router
CN111767548A (en) Vulnerability capturing method, device, equipment and storage medium
Park et al. Identifying behavior dispatchers for malware analysis
KR102415494B1 (en) Emulation based security analysis method for embedded devices
CN112685745B (en) Firmware detection method, device, equipment and storage medium
KR20200092508A (en) Large-scale honeypot system IoT botnet analysis
CN115361203A (en) Vulnerability analysis method based on distributed scanning engine

Legal Events

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