WO2021187744A1 - Electronic device and control method therefor - Google Patents

Electronic device and control method therefor Download PDF

Info

Publication number
WO2021187744A1
WO2021187744A1 PCT/KR2021/000912 KR2021000912W WO2021187744A1 WO 2021187744 A1 WO2021187744 A1 WO 2021187744A1 KR 2021000912 W KR2021000912 W KR 2021000912W WO 2021187744 A1 WO2021187744 A1 WO 2021187744A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
crash
electronic device
input value
basic block
Prior art date
Application number
PCT/KR2021/000912
Other languages
French (fr)
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 삼성전자주식회사
Publication of WO2021187744A1 publication Critical patent/WO2021187744A1/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/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • 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/3696Methods or tools to render software testable
    • 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
    • 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

Definitions

  • the present disclosure relates to an electronic device and a control method thereof, and more particularly, to an electronic device performing fuzzing on a target program and a control method thereof.
  • a method called fuzzing is known as one of several methods for finding vulnerabilities, and fuzzing is performed by inputting several input values into software and checking whether the device handles the values well without vulnerabilities.
  • In-memory fuzzing is a method to prevent the overhead caused by the existing fuzzing method of executing software from the beginning every time each fuzzing is performed. It refers to a method of performing fuzzing by restoring a memory snapshot when executing a new test case and inputting an input value to the basic block corresponding to the function.
  • One technical problem to be solved by the present invention is to provide an electronic device and a method for controlling the same for acquiring a new function by abstracting a function constituting a target program, and performing fuzzing based on the acquired new function.
  • a method of controlling an electronic device comprising: acquiring trace data for a target program; obtaining at least one first function based on the trace data; identifying a second function corresponding to a first basic block in which fuzzing starts among the at least one first function; abstracting the second function to obtain a third function; and performing fuzzing based on the trace data and the third function.
  • an electronic device includes: a memory for storing at least one instruction; and a processor, wherein the processor obtains trace data for a target program, obtains at least one first function based on the trace data, and performs fuzzing among the at least one first function.
  • An electron that identifies a second function corresponding to the starting first basic block, obtains a third function by abstracting the second function, and performs fuzzing based on the trace data and the third function A device may be provided.
  • the trace data includes at least one snapshot data for the target program, and the processor identifies, from among the at least one snapshot data, snapshot data corresponding to an execution time of the second function. and loading the identified snapshot data, obtaining a first input value for the first basic block based on the third function, and inputting the first input value into the first basic block to crash ( crash) can be detected.
  • the processor verifies the crash detection based on the first input value and the location information about the crash, and obtains location information about the second basic block in which the crash is detected, obtain a second input value for the target program based on the first input value and the third function, and verify the crash detection based on the location information on the second basic block and the second input value have.
  • the processor may determine that the crash detection is true detection.
  • the processor may determine that the crash detection is erroneous.
  • the processor may obtain a solution of the second function and generate a third function based on the obtained solution of the second function.
  • the processor may identify at least one constraint included in the trace data, and obtain the first function based on the identified constraint.
  • the second function may correspond to an upper branch connected to the first basic block.
  • FIG. 1 is a flowchart illustrating an operation of an electronic device according to an embodiment of the present disclosure.
  • FIG. 2 is a block diagram of a target program according to an embodiment of the present disclosure.
  • FIG. 3 is a diagram for explaining a function abstraction operation of an electronic device according to an embodiment of the present disclosure.
  • FIG. 4 is a view for explaining a purge operation according to an embodiment of the present disclosure.
  • FIG. 5 is a block diagram illustrating a configuration of an electronic device according to an embodiment of the present disclosure.
  • FIG. 6 is a flowchart illustrating a control method of an electronic device according to an embodiment of the present disclosure.
  • Embodiments of the present disclosure may apply various transformations and may have various embodiments, and specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the scope of the specific embodiments, and it should be understood to include all transformations, equivalents and substitutions included in the spirit and scope of the disclosed technology. In describing the embodiments, if it is determined that a detailed description of a related known technology may obscure the subject matter, the detailed description thereof will be omitted.
  • FIG. 1 is a flowchart illustrating an operation of an electronic device according to an embodiment of the present disclosure.
  • the electronic device 100 includes a target program 10 , a trace data acquisition module 110 , a broker module 120 , a function acquisition module 130 , a function selection module 140 , and a function conversion module ( 150) and a purging module 160 may be included.
  • the electronic device 100 may be a personal computer (PC), but is not limited thereto.
  • each module may be implemented as software, but may be implemented as a combination of software and hardware or may be implemented as hardware.
  • the electronic device 100 may acquire trace data for the target program 10 by using the trace data acquisition module 110 .
  • the trace data acquisition module 110 may execute the target program 10 to extract trace data.
  • the trace data means state information of the electronic device 100 related to the execution of the target program 10 , and the state of the memory or register of the electronic device 100 during the execution of the target program 10 . may contain information.
  • the trace data may include information on a constraint executed among a plurality of constraints included in the target program 10 and a basic block, and a plurality of snapshot data.
  • a basic block is a linear code sequence with no incoming branch except for entry and no outgoing branch except for exit, and includes at least one instruction or code.
  • a constraint is a condition that limits an input value input to the basic block, and only an input value that satisfies the constraint may be input to the basic block.
  • the broker module 120 may acquire trace data and transmit it to the function acquisition module 130 . Also, the broker module 120 may obtain a program input value for the target program obtained through the fuzzing module 160 and transmit it to the target program 10 .
  • the electronic device 100 may acquire at least one first function by inputting the trace data transmitted through the broker module 120 into the function acquiring module 130 .
  • the function acquisition module 130 may acquire at least one first function based on the trace data.
  • the first function means a function that limits the condition input to the basic block
  • the function obtaining module 130 may generate the first function based on the constraint condition included in the trace data.
  • the function acquisition module 130 may perform symbolic execution to acquire the first function based on the constraint condition.
  • the electronic device 100 may obtain the second function by inputting at least one first function obtained through the function obtaining module 130 into the function selection module 140 .
  • the function selection module 140 may select one function from among the at least one first function. Specifically, the function selection module 140 may identify a second function corresponding to a first basic block in which fuzzing starts among at least one first function. In this case, the function selection module 140 may randomly identify the second function. Alternatively, the function selection module 140 may identify the second function based on a user command.
  • the electronic device 100 may obtain the third function by inputting the second function obtained through the function selection module 140 into the function conversion module 150 .
  • the function conversion module 150 may obtain a third function by abstracting the second function.
  • abstraction means simplifying a specific function.
  • the function transformation module 150 may obtain a solution of the second function, and generate a third function based on the obtained solution of the second function.
  • the function transformation module 150 may obtain a solution of the second function using a Satisfiability Modulo Theories solver (SMT).
  • SMT solver refers to software that obtains a solution that makes a logical expression true.
  • the fuzzing module 160 may perform fuzzing based on the third function. Specifically, the fuzzing module 160 may obtain a first input value that satisfies the third function. The fuzzing module 160 may detect a crash by inputting a first input value to a first basic block where purging starts. When a crash is detected, the fuzzing module 160 may store information on the second basic block in which the crash occurs (eg, location information of the second basic block) in the memory.
  • a crash means an abnormal termination of the target program 10 . Meanwhile, a more detailed description of the purge operation will be described later with reference to FIG. 4 .
  • the fuzzing module 160 may verify the crash detection based on the first input value causing the crash and the information on the second basic block in which the crash occurred. Specifically, the fuzzing module 160 may obtain a program input value for the target program 10 based on the first input value and the third function. The fuzzing module 160 may input a program input value into the target program 10 to identify whether the crash occurs again in the second basic block. At this time, if a crash occurs in the second basic block, the fuzzing module 160 may determine that the detection of the generated crash by inputting the first input value into the first basic block is true detection. On the other hand, if the crash does not occur or occurs in a basic block other than the second basic block, the fuzzing module 160 determines that the detection of the generated crash by inputting the first input value into the first basic block is erroneous. can judge
  • the program 10 and the trace data acquisition module 110 are included in the electronic device 100 , but this is only an embodiment, and the program 10 and the trace data acquisition module 110 are external. may be included in the device.
  • the program 10 and the trace data acquisition module 110 may be included in a mobile device or an IOT device capable of communicating with the electronic device 100 .
  • the electronic device 100 may acquire trace data through the broker module 120 .
  • FIG. 2 is a block diagram of a target program according to an embodiment of the present disclosure. Specifically, FIG. 2 is a diagram for explaining a method of acquiring the first function using the function acquiring module 130 . Meanwhile, basic blocks and branches included in the trace data are illustrated by solid lines, and basic blocks and branches not included in the trace data are illustrated by dotted lines.
  • the target program 10 includes a plurality of basic blocks B and a plurality of branches BL connecting the plurality of basic blocks.
  • the target program 10 includes a first constraint condition C1 corresponding to the first branch BL1, a second constraint condition C2 corresponding to the second branch BL2, and a first constraint condition C2 corresponding to the third branch BL3.
  • the third constraint C3 and the fourth constraint C4 corresponding to the fourth branch BL4 may be included.
  • the electronic device 100 may acquire the first function for each branch based on the constraint condition corresponding to each branch. Specifically, the electronic device 100 may acquire the first function by accumulating constraint conditions respectively corresponding to the branch corresponding to the first function and the upper branch thereof. The electronic device 100 may generate a first function including all constraint conditions corresponding to each branch as well as an upper branch. For example, when the electronic device 100 obtains the 1-2 th function F1 - 2 corresponding to the second branch BL2 , the first branch BL1 that is an upper branch of the second branch BL2 . A 1-2 function F1-2 may be obtained by accumulating the first constraint condition C1 corresponding to , and the second constraint condition C2 corresponding to the second branch BL2.
  • the 1-2 function F1-2 may include both the first constraint condition C1 and the second constraint condition C2.
  • the electronic device 100 may acquire the 1-3 function F1-3 by accumulating the first to third constraint conditions C1, C2, and C3, and the first to fourth constraint conditions C1 , C2, C3, C4) may be accumulated to obtain a 1-4 th function (F1-4).
  • the electronic device 100 converts the 1-4 th function F1-4 corresponding to the first basic block B1 in which the fuzzing (ie, in-memory purge) starts among the obtained first functions to the second function. It can be obtained with (F2).
  • the electronic device 100 may include an SMT solver and a formula abstractor.
  • the electronic device 100 may obtain a solution 30 of the second function F2 by inputting the second function F2 to the SMT solver. Then, the electronic device 100 may obtain the third function F3 by inputting the obtained solution 30 to the function generating unit.
  • the function generating unit may abstract the second function F2 to generate a third function F3 that is simpler than the second function F2.
  • the electronic device 100 may perform in-memory fuzzing by inputting an input value that satisfies the abstracted third function F3 to the first basic block B1 . As described above, the time consumed for purging may be reduced by performing the purging based on the third function F3 instead of the second function F2.
  • FIG. 4 is a view for explaining a purge operation according to an embodiment of the present disclosure.
  • the electronic device 100 may obtain a first input value x1 that satisfies the third function F3.
  • the electronic device 100 may perform purging by inputting the obtained first input value x1 into the first basic block B1. That is, the electronic device 100 may perform in-memory purging. Specifically, the electronic device 100 may perform in-memory purge by using snapshot data included in the trace data.
  • the electronic device 100 executes the first function F1 corresponding to the first branch BL1 connected to the first basic block B1 where in-memory purge starts among a plurality of snapshot data included in the trace data. You can get information about the time point.
  • the electronic device 100 may identify snapshot data corresponding to the execution time of the first function F1 based on information on the execution time of the first function F1.
  • the electronic device 100 loads the identified snapshot data into the memory, and repeatedly inputs at least one first input value x1 that satisfies the third function F3 into the first basic block B1 to cause a crash. occurrence can be identified.
  • the electronic device 100 may prevent overhead by purging with the first basic block B1 as the starting point, rather than performing the purging by executing the target program 10 from the beginning.
  • the electronic device 100 may perform a verification operation for detecting a crash as described later by storing information on the second basic block B2 in which the crash occurs in a memory.
  • the first input value x1 is not an actual input value for the target program 10, so It is necessary to verify the crash detection to determine whether the detected crash is a true detection based on the actual input value of the .
  • conventional techniques using in-memory fuzzing even if the first input value x1 is found, an actual input value for the target program 10 corresponding to the first input value x1 cannot be found. Accordingly, the conventional techniques have a problem in that the crash false positive rate is high.
  • the electronic device 100 may reduce a crash false positive rate by performing a verification operation for crash detection. Specifically, the electronic device 100 may obtain the second input value IN1 that is the input value for the target program 10 by inputting the first input value x1 causing the crash to the fuzzing module 160 . . In addition, the electronic device 100 may identify whether a crash occurs in the second basic block B2 by inputting the obtained second input value IN1 into the target program 10 . When a crash occurs in the second basic block B2 , the electronic device 100 may determine that crash detection through in-memory purge is true detection. On the other hand, if a crash does not occur in the second basic block B2 , the electronic device 100 may determine that the crash detection through the in-memory purge is an erroneous detection.
  • the electronic device 500 may include a communication interface 510 , a memory 520 , and a processor 530 .
  • the electronic device 500 corresponds to the electronic device 100 described with reference to FIGS. 1 to 4 , and each configuration of the electronic device 500 will be described below.
  • the communication interface 510 includes at least one circuit and may communicate with various types of external devices.
  • the electronic device 500 may communicate with an external device through a wired or wireless method through the communication interface 510 .
  • the external device may be a server, which is a device separate from the electronic device 500 .
  • the electronic device 500 may receive the trace data from the external device through the communication interface 510 .
  • the memory 520 may store an operating system (OS) for controlling overall operations of the components of the electronic device 500 and commands or data related to the components of the electronic device 500 .
  • OS operating system
  • the memory 520 may be implemented as a non-volatile memory (eg, a hard disk, a solid state drive (SSD), a flash memory), a volatile memory, or the like.
  • the memory 520 may store trace data and information on a basic block in which a crash occurs.
  • the processor 530 may control the overall operation of the electronic device 500 .
  • the processor 530 may acquire trace data.
  • the processor 530 may obtain at least one first function based on the trace data.
  • the processor 530 may identify at least one constraint included in the trace data, and obtain the first function based on the identified constraint.
  • the processor 530 may identify a second function corresponding to the first basic block in which the fuzzing starts from among the at least one first function.
  • the second function may correspond to an upper branch connected to the first basic block.
  • the processor 530 may obtain the third function by abstracting the second function.
  • the processor 530 may obtain a solution of the second function, and generate a third function based on the obtained solution of the second function.
  • the processor 530 may perform fuzzing based on the trace data and the third function.
  • the processor 530 may identify the snapshot data corresponding to the execution time of the second function from among at least one snapshot data included in the trace data and load it into the memory 520 .
  • the processor 530 may detect the crash by inputting an input value that satisfies the third function into the first basic block by changing the memory value.
  • the processor 530 may verify the crash detection based on the first input value and location information about the crash.
  • the processor 530 may obtain location information on the second basic block in which the crash is detected.
  • the processor 530 may obtain a second input value for the target program based on the first input value and the third function.
  • the processor 530 may determine the crash detection as true detection.
  • the processor 530 may determine that the crash detection is a false detection.
  • FIG. 6 is a flowchart illustrating a control method of an electronic device according to an embodiment of the present disclosure.
  • the electronic device 100 may acquire trace data for a target program ( S610 ). Then, the electronic device 100 may acquire at least one first function based on the trace data (S620). Specifically, the electronic device 100 may generate the first function based on constraint conditions for the target program included in the trace data. Then, the electronic device 100 may identify a second function corresponding to the first basic block in which the fuzzing starts among the at least one first function ( S630 ). In this case, the electronic device 100 may randomly select a first basic block and identify a second function corresponding to an upper branch of the first basic block. Also, the electronic device 100 may obtain a third function by abstracting the identified second function ( S640 ).
  • the electronic device 100 may obtain a solution of the second function by using the SMT solver, and may generate a third function based on the obtained solution. Then, the electronic device 100 may perform fuzzing based on the trace data and the third function (S650). In this case, the electronic device 100 may obtain and load a memory snapshot corresponding to the second function included in the trace data. In addition, the electronic device 100 may perform in-memory purging by obtaining an input value that satisfies the third function and changing the memory based on the obtained input value.
  • the various embodiments described above may be implemented in a recording medium readable by a computer or a similar device using software, hardware, or a combination thereof.
  • the embodiments described herein may be implemented by the processor itself.
  • embodiments such as the procedures and functions described in this specification may be implemented as separate software modules. Each of the software modules may perform one or more functions and operations described herein.
  • computer instructions for performing the processing operation according to various embodiments of the present disclosure described above may be stored in a non-transitory computer-readable medium.
  • a specific device may perform the processing operation according to the above-described various embodiments.
  • the non-transitory computer-readable medium refers to a medium that stores data semi-permanently, rather than a medium that stores data for a short moment, such as a register, cache, memory, etc., and can be read by a device.
  • Specific examples of the non-transitory computer-readable medium may include a CD, DVD, hard disk, Blu-ray disk, USB, memory card, ROM, and the like.
  • the device-readable storage medium may be provided in the form of a non-transitory storage medium.
  • 'non-transitory storage medium' is a tangible device and only means that it does not contain a signal (eg, electromagnetic wave). It does not distinguish the case where it is stored as
  • the 'non-transitory storage medium' may include a buffer in which data is temporarily stored.
  • the method according to various embodiments disclosed in this document may be provided as included in a computer program product.
  • Computer program products may be traded between sellers and buyers as commodities.
  • the computer program product is distributed in the form of a machine-readable storage medium (eg compact disc read only memory (CD-ROM)), or through an application store (eg Play Store TM ) or on two user devices ( It can be distributed (eg downloaded or uploaded) directly, online between smartphones (eg: smartphones).
  • a portion of the computer program product eg, a downloadable app
  • a machine-readable storage medium such as a memory of a manufacturer's server, a server of an application store, or a relay server. It may be temporarily stored or temporarily created.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A method for controlling an electronic device is disclosed. A control method according to the present disclosure comprises the steps of: acquiring trace data for a target program; acquiring one or more first functions on the basis of the trace data; identifying a second function corresponding to a first basic block in which fuzzing starts among the one or more first functions; acquiring a third function by abstracting the second function; and performing the fuzzing on the basis of the trace data and the third function.

Description

전자 장치 및 그 제어 방법Electronic device and its control method
본 개시는 전자 장치 및 그 제어 방법으로, 보다 상세하게는, 타겟 프로그램에 대해 퍼징(fuzzing)을 수행하는 전자 장치 및 그 제어 방법에 관한 것이다.The present disclosure relates to an electronic device and a control method thereof, and more particularly, to an electronic device performing fuzzing on a target program and a control method thereof.
근래에는 스마트 디바이스와 IoT기기 등 인터넷과 연결되는 기기들의 확산으로 인해 소프트웨어의 공격 요소들이 증가하고 있으며, 이에 따라 소프트웨어(또는 기기)의 취약점(vulnerability)을 찾는 기술에 대한 연구가 활발히 진행되고 있는 실정이다. 취약점을 찾는 여러 가지 방법 중 하나로 퍼징(Fuzzing)이라는 방법이 알려져 있으며, 퍼징은 여러 입력 값을 소프트웨어에 입력하여 기기가 해당 값을 취약점 없이 잘 처리하는지 확인하는 방식으로 이루어진다.In recent years, attack elements of software are increasing due to the proliferation of devices connected to the Internet, such as smart devices and IoT devices, and accordingly, research on technologies for finding vulnerabilities in software (or devices) is being actively conducted. am. A method called fuzzing is known as one of several methods for finding vulnerabilities, and fuzzing is performed by inputting several input values into software and checking whether the device handles the values well without vulnerabilities.
한편, 최근에는 퍼징을 보다 효과적으로 수행하기 위한 방법으로 인-메모리 퍼징(in-memory fuzzing)이 이용되고 있다. 인-메모리 퍼징이란 퍼징을 할 때마다 매번 소프트웨어를 처음부터 실행하는 기존 퍼징 방법에 따른 오버 헤드(overhead)를 방지하기 위한 방법으로, 특정 함수가 실행되는 시점의 메모리 상태를 스냅샷으로 저장하고, 새로운 테스트 케이스를 실행할 때 메모리 스냅샷을 복원하여 해당 함수에 대응되는 기본 블록에 입력 값을 입력하여 퍼징을 수행하는 방법을 의미한다.Meanwhile, in-memory fuzzing has recently been used as a method for more effectively performing fuzzing. In-memory fuzzing is a method to prevent the overhead caused by the existing fuzzing method of executing software from the beginning every time each fuzzing is performed. It refers to a method of performing fuzzing by restoring a memory snapshot when executing a new test case and inputting an input value to the basic block corresponding to the function.
다만, 이러한 인-메모리 퍼징 방법을 통해 사용자가 퍼징 동작 중 발견된 크래시(crash)를 발생시킨 입력 값을 알아내더라도, 해당 입력 값을 프로그램에 입력하였을 때 크래시가 재연되지 않는 등의 취약점에 대한 오탐 발생률이 높다는 문제점이 있다.However, through this in-memory fuzzing method, even if the user finds out the input value that caused the crash that was discovered during the fuzzing operation, when the input value is entered into the program, the crash is not repeated. There is a problem that the incidence rate is high.
이에 따라, 인-메모리 퍼징 방법의 취약점에 대한 오탐 발생률을 줄이는 기술에 대한 필요성이 대두된다.Accordingly, there is a need for a technique for reducing the incidence of false positives for vulnerabilities in the in-memory fuzzing method.
본 발명이 해결하고자 하는 일 기술적 과제는, 타겟 프로그램을 구성하는 함수를 추상화하여 새로운 함수를 획득하고, 획득된 새로운 함수를 바탕으로 퍼징을 수행하는 전자 장치 및 그 제어 방법을 제공하는 것이다.SUMMARY OF THE INVENTION One technical problem to be solved by the present invention is to provide an electronic device and a method for controlling the same for acquiring a new function by abstracting a function constituting a target program, and performing fuzzing based on the acquired new function.
본 발명의 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명의 기술분야에서의 통상의 기술자에게 명확하게 이해 될 수 있을 것이다.The technical problems of the present invention are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art from the following description.
상술한 기술적 과제를 해결하기 위한 본 개시의 예시적인 일 실시 예에 따르면, 전자 장치의 제어 방법에 있어서, 타겟 프로그램에 대한 트레이스 데이터(trace data)를 획득하는 단계; 상기 트레이스 데이터를 바탕으로 적어도 하나의 제1 함수를 획득하는 단계; 상기 적어도 하나의 제1 함수 중 퍼징이 시작되는 제1 기본 블록에 대응되는 제2 함수를 식별하는 단계; 상기 제2 함수를 추상화하여 제3 함수를 획득하는 단계; 및 상기 트레이스 데이터 및 상기 제3 함수를 바탕으로 퍼징(fuzzing)을 수행하는 단계;를 포함하는 제어 방법이 제공될 수 있다.According to an exemplary embodiment of the present disclosure for solving the above technical problem, there is provided a method of controlling an electronic device, the method comprising: acquiring trace data for a target program; obtaining at least one first function based on the trace data; identifying a second function corresponding to a first basic block in which fuzzing starts among the at least one first function; abstracting the second function to obtain a third function; and performing fuzzing based on the trace data and the third function.
상술한 기술적 과제를 해결하기 위한 본 개시의 예시적인 다른 일 실시 예에 따르면, 전자 장치에 있어서, 적어도 하나의 인스트럭션을 저장하는 메모리; 및 프로세서;를 포함하고, 상기 프로세서는, 타겟 프로그램에 대한 트레이스 데이터(trace data)를 획득하고, 상기 트레이스 데이터를 바탕으로 적어도 하나의 제1 함수를 획득하고, 상기 적어도 하나의 제1 함수 중 퍼징이 시작되는 제1 기본 블록에 대응되는 제2 함수를 식별하고, 상기 제2 함수를 추상화하여 제3 함수를 획득하고, 상기 트레이스 데이터 및 상기 제3 함수를 바탕으로 퍼징(fuzzing)을 수행하는 전자 장치가 제공될 수 있다.According to another exemplary embodiment of the present disclosure for solving the above-described technical problem, an electronic device includes: a memory for storing at least one instruction; and a processor, wherein the processor obtains trace data for a target program, obtains at least one first function based on the trace data, and performs fuzzing among the at least one first function. An electron that identifies a second function corresponding to the starting first basic block, obtains a third function by abstracting the second function, and performs fuzzing based on the trace data and the third function A device may be provided.
상기 트레이스 데이터는 상기 타겟 프로그램에 대한 적어도 하나의 스냅샷 데이터(snapshot data)를 포함하고, 상기 프로세서는, 상기 적어도 하나의 스냅샷 데이터 중 상기 제2 함수의 실행 시점에 대응되는 스냅샷 데이터를 식별하고, 상기 식별된 스냅샷 데이터를 로딩하고, 상기 제3 함수를 바탕으로 상기 제1 기본 블록에 대한 제1 입력 값을 획득하고, 상기 제1 입력 값을 상기 제1 기본 블록에 입력하여 크래시(crash)를 검출할 수 있다.The trace data includes at least one snapshot data for the target program, and the processor identifies, from among the at least one snapshot data, snapshot data corresponding to an execution time of the second function. and loading the identified snapshot data, obtaining a first input value for the first basic block based on the third function, and inputting the first input value into the first basic block to crash ( crash) can be detected.
상기 프로세서는, 상기 크래시가 검출되면, 상기 제1 입력 값 및 상기 크래시에 대한 위치 정보를 바탕으로 상기 크래시 검출을 검증하되, 상기 크래시가 검출된 제2 기본 블록에 대한 위치 정보를 획득하고, 상기 제1 입력 값 및 상기 제3 함수를 바탕으로 상기 타겟 프로그램에 대한 제2 입력 값을 획득하고, 상기 제2 기본 블록에 대한 위치 정보 및 상기 제2 입력 값을 바탕으로 상기 크래시 검출을 검증할 수 있다.When the crash is detected, the processor verifies the crash detection based on the first input value and the location information about the crash, and obtains location information about the second basic block in which the crash is detected, obtain a second input value for the target program based on the first input value and the third function, and verify the crash detection based on the location information on the second basic block and the second input value have.
상기 프로세서는, 상기 제2 입력 값을 상기 타겟 프로그램에 입력하여 상기 제2 기본 블록에서 크래시가 검출되면, 상기 크래시 검출을 진검출로 판단할 수 있다.When a crash is detected in the second basic block by inputting the second input value into the target program, the processor may determine that the crash detection is true detection.
상기 프로세서는, 상기 제2 입력 값을 상기 타겟 프로그램에 입력하여 상기 제2 기본 블록에서 크래시가 미검출되면, 상기 크래시 검출을 오검출로 판단할 수 있다.When a crash is not detected in the second basic block by inputting the second input value to the target program, the processor may determine that the crash detection is erroneous.
상기 프로세서는, 상기 제2 함수의 해를 획득하고 상기 획득된 제2 함수의 해를 바탕으로 제3 함수를 생성할 수 있다.The processor may obtain a solution of the second function and generate a third function based on the obtained solution of the second function.
상기 프로세서는, 상기 트레이스 데이터에 포함된 적어도 하나의 제약 조건을 식별하고, 상기 식별된 제약 조건을 바탕으로 상기 제1 함수를 획득할 수 있다.The processor may identify at least one constraint included in the trace data, and obtain the first function based on the identified constraint.
상기 제2 함수는, 상기 제1 기본 블록과 연결되는 상위 브랜치에 대응될 수 있다.The second function may correspond to an upper branch connected to the first basic block.
본 개시의 과제의 해결 수단이 상술한 해결 수단들로 제한되는 것은 아니며, 언급되지 아니한 해결 수단들은 본 명세서 및 첨부된 도면으로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The solutions of the problems of the present disclosure are not limited to the above-described solutions, and solutions that are not mentioned will be clearly understood by those of ordinary skill in the art to which the present disclosure belongs from the present specification and the accompanying drawings. will be able
이상과 같은 본 개시의 다양한 실시 예에 따르면, 타겟 프로그램의 취약점을 효과적으로 찾을 수 있으며, 취약점에 대한 오탐 발생률을 줄일 수 있다. 이에 따라, 사용자 편의성 및 만족도가 향상될 수 있다.According to various embodiments of the present disclosure as described above, it is possible to effectively find a vulnerability of a target program, and it is possible to reduce the incidence of false positives for the vulnerability. Accordingly, user convenience and satisfaction may be improved.
그 외에 본 개시의 실시 예로 인하여 얻을 수 있거나 예측되는 효과에 대해서는 본 개시의 실시 예에 대한 상세한 설명에서 직접적 또는 암시적으로 개시하도록 한다. 예컨대, 본 개시의 실시 예에 따라 예측되는 다양한 효과에 대해서는 후술될 상세한 설명 내에서 개시될 것이다.In addition, the effects obtainable or predicted by the embodiments of the present disclosure are to be disclosed directly or implicitly in the detailed description of the embodiments of the present disclosure. For example, various effects predicted according to embodiments of the present disclosure will be disclosed in the detailed description to be described later.
도 1은 본 개시의 일 실시 예에 따른 전자 장치의 동작을 설명하기 위한 흐름도이다.1 is a flowchart illustrating an operation of an electronic device according to an embodiment of the present disclosure.
도 2는 본 개시의 일 실시 예에 따른 타겟 프로그램의 구성도이다.2 is a block diagram of a target program according to an embodiment of the present disclosure.
도 3은 본 개시의 일 실시 예에 따른 전자 장치의 함수 추상화 동작을 설명하기 위한 도면이다.3 is a diagram for explaining a function abstraction operation of an electronic device according to an embodiment of the present disclosure.
도 4는 본 개시의 일 실시 예에 따른 퍼징 동작을 설명하기 위한 도면이다.4 is a view for explaining a purge operation according to an embodiment of the present disclosure.
도 5는 본 개시의 일 실시 예에 따른 전자 장치의 구성을 도시한 블록도이다.5 is a block diagram illustrating a configuration of an electronic device according to an embodiment of the present disclosure.
도 6은 본 개시의 일 실시 예에 따른 전자 장치의 제어 방법을 도시한 순서도이다.6 is a flowchart illustrating a control method of an electronic device according to an embodiment of the present disclosure.
본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 본 개시에 대해 구체적으로 설명하기로 한다. Terms used in this specification will be briefly described, and the present disclosure will be described in detail.
본 개시의 실시 예에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 개시의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다.Terms used in the embodiments of the present disclosure are selected as currently widely used general terms as possible while considering the functions in the present disclosure, which may vary depending on the intention or precedent of a person skilled in the art, the emergence of new technology, etc. . In addition, in a specific case, there is a term arbitrarily selected by the applicant, and in this case, the meaning will be described in detail in the description of the corresponding disclosure. Therefore, the terms used in the present disclosure should be defined based on the meaning of the term and the contents of the present disclosure, rather than the simple name of the term.
본 개시의 실시 예들은 다양한 변환을 가할 수 있고 여러 가지 실시 예를 가질 수 있는바, 특정 실시 예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나 이는 특정한 실시 형태에 대해 범위를 한정하려는 것이 아니며, 개시된 사상 및 기술 범위에 포함되는 모든 변환, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 실시 예들을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.Embodiments of the present disclosure may apply various transformations and may have various embodiments, and specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the scope of the specific embodiments, and it should be understood to include all transformations, equivalents and substitutions included in the spirit and scope of the disclosed technology. In describing the embodiments, if it is determined that a detailed description of a related known technology may obscure the subject matter, the detailed description thereof will be omitted.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 구성요소들은 용어들에 의해 한정되어서는 안 된다. 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Terms such as first, second, etc. may be used to describe various elements, but the elements should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "구성되다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as "comprises" or "consisting of" are intended to designate that the features, numbers, steps, operations, components, parts, or combinations thereof described in the specification exist, and are intended to indicate that one or more other It is to be understood that this does not preclude the possibility of addition or presence of features or numbers, steps, operations, components, parts, or combinations thereof.
아래에서는 첨부한 도면을 참고하여 본 개시의 실시 예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 개시는 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다. 그리고 도면에서 본 개시를 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, with reference to the accompanying drawings, embodiments of the present disclosure will be described in detail so that those of ordinary skill in the art to which the present disclosure pertains can easily implement them. However, the present disclosure may be implemented in several different forms and is not limited to the embodiments described herein. And in order to clearly explain the present disclosure in the drawings, parts irrelevant to the description are omitted, and similar reference numerals are attached to similar parts throughout the specification.
도 1은 본 개시의 일 실시 예에 따른 전자 장치의 동작을 설명하기 위한 흐름도이다.1 is a flowchart illustrating an operation of an electronic device according to an embodiment of the present disclosure.
도 1을 참조하면, 전자 장치(100)는 타겟 프로그램(10), 트레이스 데이터 획득 모듈(110), 브로커 모듈(120), 함수 획득 모듈(130), 함수 선택 모듈(140), 함수 변환 모듈(150) 및 퍼징 모듈(160)을 포함할 수 있다. 예로, 전자 장치(100)는 개인용 컴퓨터(PC)일 수 있으나, 이에 한정되는 것은 아니다. 또한, 각 모듈은 소프트웨어로 구현될 수도 있으나, 소프트웨어 및 하드웨어의 결합으로 구현되거나 하드웨어로 구현될 수도 있다.Referring to FIG. 1 , the electronic device 100 includes a target program 10 , a trace data acquisition module 110 , a broker module 120 , a function acquisition module 130 , a function selection module 140 , and a function conversion module ( 150) and a purging module 160 may be included. For example, the electronic device 100 may be a personal computer (PC), but is not limited thereto. In addition, each module may be implemented as software, but may be implemented as a combination of software and hardware or may be implemented as hardware.
전자 장치(100)는 트레이스 데이터 획득 모듈(110)을 이용하여 타겟 프로그램(10)에 대한 트레이스 데이터(trace data)를 획득할 수 있다. 트레이스 데이터 획득 모듈(110)은 타겟 프로그램(10)을 실행시켜 트레이스 데이터를 추출할 수 있다. 여기서, 트레이스 데이터(trace data)란, 타겟 프로그램(10)의 실행과 관련된 전자 장치(100)의 상태 정보를 의미하며, 타겟 프로그램(10) 실행 과정에서 전자 장치(100)의 메모리 또는 레지스터의 상태 정보를 포함할 수 있다. 또한, 트레이스 데이터는 타겟 프로그램(10)에 포함된 다수의 제약 조건(constraint) 중 실행된 제약 조건 및 기본 블록(basic block)에 대한 정보, 다수의 스냅샷 데이터(snapshot data)를 포함할 수 있다. 기본 블록(basic block)은 엔트리 외에는 들어오는 분기가 없고 출구 외에는 나가는 분기가 없는 직선 코드열로서, 적어도 하나의 명령어 또는 코드를 포함한다. 또한, 제약 조건(constraint)은 기본 블록으로 입력되는 입력 값을 제한하는 조건으로, 제약 조건을 만족하는 입력 값만이 기본 블록으로 입력될 수 있다.The electronic device 100 may acquire trace data for the target program 10 by using the trace data acquisition module 110 . The trace data acquisition module 110 may execute the target program 10 to extract trace data. Here, the trace data means state information of the electronic device 100 related to the execution of the target program 10 , and the state of the memory or register of the electronic device 100 during the execution of the target program 10 . may contain information. In addition, the trace data may include information on a constraint executed among a plurality of constraints included in the target program 10 and a basic block, and a plurality of snapshot data. . A basic block is a linear code sequence with no incoming branch except for entry and no outgoing branch except for exit, and includes at least one instruction or code. In addition, a constraint is a condition that limits an input value input to the basic block, and only an input value that satisfies the constraint may be input to the basic block.
브로커 모듈(120)은 트레이스 데이터를 획득하여 함수 획득 모듈(130)로 전달할 수 있다. 또한, 브로커 모듈(120)은 퍼징 모듈(160)을 통해 획득되는 타겟 프로그램에 대한 프로그램 입력 값을 획득하여 타겟 프로그램(10)으로 전달할 수 있다.The broker module 120 may acquire trace data and transmit it to the function acquisition module 130 . Also, the broker module 120 may obtain a program input value for the target program obtained through the fuzzing module 160 and transmit it to the target program 10 .
전자 장치(100)는 브로커 모듈(120)을 통해 전달되는 트레이스 데이터를 함수 획득 모듈(130)에 입력하여 적어도 하나의 제1 함수를 획득할 수 있다. 함수 획득 모듈(130)은 트레이스 데이터를 바탕으로 적어도 하나의 제1 함수를 획득할 수 있다. 여기서, 제1 함수(formula)란, 기본 블록으로 입력되는 조건을 제한하는 함수를 의미하며, 함수 획득 모듈(130)은 트레이스 데이터에 포함된 제약 조건을 바탕으로 제1 함수를 생성할 수 있다. 구체적으로, 함수 획득 모듈(130)은 심볼릭 실행(Symbolic Execution)을 수행하여 제약 조건을 바탕으로 제1 함수를 획득할 수 있다.The electronic device 100 may acquire at least one first function by inputting the trace data transmitted through the broker module 120 into the function acquiring module 130 . The function acquisition module 130 may acquire at least one first function based on the trace data. Here, the first function (formula) means a function that limits the condition input to the basic block, and the function obtaining module 130 may generate the first function based on the constraint condition included in the trace data. Specifically, the function acquisition module 130 may perform symbolic execution to acquire the first function based on the constraint condition.
전자 장치(100)는 함수 획득 모듈(130)을 통해 획득되는 적어도 하나의 제1 함수를 함수 선택 모듈(140)에 입력하여 제2 함수를 획득할 수 있다. 함수 선택 모듈(140)은 적어도 하나의 제1 함수 중 하나의 함수를 선택할 수 있다. 구체적으로, 함수 선택 모듈(140)은 적어도 하나의 제1 함수 중 퍼징이 시작되는 제1 기본 블록에 대응되는 제2 함수를 식별할 수 있다. 이 때, 함수 선택 모듈(140)은 랜덤(random)하게 제2 함수를 식별할 수 있다. 또는, 함수 선택 모듈(140)은 사용자 명령에 기초하여 제2 함수를 식별할 수 있다.The electronic device 100 may obtain the second function by inputting at least one first function obtained through the function obtaining module 130 into the function selection module 140 . The function selection module 140 may select one function from among the at least one first function. Specifically, the function selection module 140 may identify a second function corresponding to a first basic block in which fuzzing starts among at least one first function. In this case, the function selection module 140 may randomly identify the second function. Alternatively, the function selection module 140 may identify the second function based on a user command.
전자 장치(100)는 함수 선택 모듈(140)을 통해 획득되는 제2 함수를 함수 변환 모듈(150)에 입력하여 제3 함수를 획득할 수 있다. 함수 변환 모듈(150)은 제2 함수를 추상화(abstraction)하여 제3 함수를 획득할 수 있다. 여기서, 추상화는 특정 함수를 간략화시키는 것을 의미한다. 구체적으로, 함수 변환 모듈(150)은 제2 함수의 해를 획득하고, 획득된 제2 함수의 해를 바탕으로 제3 함수를 생성할 수 있다. 이 때, 함수 변환 모듈(150)은 SMT 솔버(Satisfiability Modulo Theories solver)를 이용하여 제2 함수의 해를 획득할 수 있다. 여기서, SMT 솔버는 논리식을 참으로 만드는 해를 획득하는 소프트웨어를 의미한다.The electronic device 100 may obtain the third function by inputting the second function obtained through the function selection module 140 into the function conversion module 150 . The function conversion module 150 may obtain a third function by abstracting the second function. Here, abstraction means simplifying a specific function. Specifically, the function transformation module 150 may obtain a solution of the second function, and generate a third function based on the obtained solution of the second function. In this case, the function transformation module 150 may obtain a solution of the second function using a Satisfiability Modulo Theories solver (SMT). Here, the SMT solver refers to software that obtains a solution that makes a logical expression true.
퍼징 모듈(160)은 제3 함수를 바탕으로 퍼징을 수행할 수 있다. 구체적으로, 퍼징 모듈(160)은 제3 함수를 만족하는 제1 입력 값을 획득할 수 있다. 퍼징 모듈(160)은 제1 입력 값을 퍼징이 시작되는 제1 기본 블록에 입력하여 크래시를 검출할 수 있다. 크래시가 검출되면, 퍼징 모듈(160)은 크래시가 발생한 제2 기본 블록에 대한 정보(예로, 제2 기본 블록의 위치 정보)를 메모리에 저장할 수 있다. 여기서, 크래시(crash)란 타겟 프로그램(10)의 비정상적인 종료를 의미한다. 한편, 퍼징 동작에 대한 보다 상세한 설명은 도 4를 참조하여 후술하도록 한다.The fuzzing module 160 may perform fuzzing based on the third function. Specifically, the fuzzing module 160 may obtain a first input value that satisfies the third function. The fuzzing module 160 may detect a crash by inputting a first input value to a first basic block where purging starts. When a crash is detected, the fuzzing module 160 may store information on the second basic block in which the crash occurs (eg, location information of the second basic block) in the memory. Here, a crash means an abnormal termination of the target program 10 . Meanwhile, a more detailed description of the purge operation will be described later with reference to FIG. 4 .
퍼징 모듈(160)은 크래시를 유발한 제1 입력 값과 크래시가 발생한 제2 기본 블록에 대한 정보를 바탕으로 크래시 검출을 검증할 수 있다. 구체적으로, 퍼징 모듈(160)은 제1 입력 값과 제3 함수를 바탕으로 타겟 프로그램(10)에 대한 프로그램 입력 값을 획득할 수 있다. 퍼징 모듈(160)은 프로그램 입력 값을 타겟 프로그램(10)에 입력하여 제2 기본 블록에서 크래시가 재차 발생하는지 여부를 식별할 수 있다. 이 때, 제2 기본 블록에서 크래시가 발생하면, 퍼징 모듈(160)은 제1 입력 값을 제1 기본 블록에 입력하여 발생된 크래시에 대한 검출이 진검출인 것으로 판단할 수 있다. 반면에, 크래시가 발생하지 않거나, 제2 기본 블록이 아닌 다른 기본 블록에서 발생되면 퍼징 모듈(160)은 제1 입력 값을 제1 기본 블록에 입력하여 발생된 크래시에 대한 검출이 오검출인 것으로 판단할 수 있다.The fuzzing module 160 may verify the crash detection based on the first input value causing the crash and the information on the second basic block in which the crash occurred. Specifically, the fuzzing module 160 may obtain a program input value for the target program 10 based on the first input value and the third function. The fuzzing module 160 may input a program input value into the target program 10 to identify whether the crash occurs again in the second basic block. At this time, if a crash occurs in the second basic block, the fuzzing module 160 may determine that the detection of the generated crash by inputting the first input value into the first basic block is true detection. On the other hand, if the crash does not occur or occurs in a basic block other than the second basic block, the fuzzing module 160 determines that the detection of the generated crash by inputting the first input value into the first basic block is erroneous. can judge
한편, 이상에서는 프로그램(10) 및 트레이스 데이터 획득 모듈(110)이 전자 장치(100)에 포함되는 것으로 설명하였으나 이는 일 실시 예에 불과하며, 프로그램(10) 및 트레이스 데이터 획득 모듈(110)은 외부 기기에 포함될 수 있다. 예로, 프로그램(10) 및 트레이스 데이터 획득 모듈(110)은 전자 장치(100)와 통신 가능한 모바일 장치 또는 IOT 장치에 포함될 수 있다. 이 때, 전자 장치(100)는 브로커 모듈(120)을 통해 트레이스 데이터를 획득할 수 있다.Meanwhile, in the above, it has been described that the program 10 and the trace data acquisition module 110 are included in the electronic device 100 , but this is only an embodiment, and the program 10 and the trace data acquisition module 110 are external. may be included in the device. For example, the program 10 and the trace data acquisition module 110 may be included in a mobile device or an IOT device capable of communicating with the electronic device 100 . In this case, the electronic device 100 may acquire trace data through the broker module 120 .
이상에서는 전자 장치(100)에 포함되는 각 모듈의 동작에 대하여 설명하였다. 이하에서는 도 2를 참조하여 전자 장치(100)의 보다 구체적인 동작에 대하여 설명하도록 한다.In the above, the operation of each module included in the electronic device 100 has been described. Hereinafter, a more specific operation of the electronic device 100 will be described with reference to FIG. 2 .
도 2는 본 개시의 일 실시 예에 따른 타겟 프로그램의 구성도이다. 구체적으로, 도 2는 함수 획득 모듈(130)을 이용하여 제1 함수를 획득하는 방법을 설명하기 위한 도면이다. 한편, 트레이스 데이터에 포함되는 기본 블록 및 브랜치는 실선으로 도시되었으며, 트레이스 데이터에 포함되지 않는 기본 블록 및 브랜치는 점선으로 도시되었다.2 is a block diagram of a target program according to an embodiment of the present disclosure. Specifically, FIG. 2 is a diagram for explaining a method of acquiring the first function using the function acquiring module 130 . Meanwhile, basic blocks and branches included in the trace data are illustrated by solid lines, and basic blocks and branches not included in the trace data are illustrated by dotted lines.
도 2를 참조하면, 타겟 프로그램(10)은 다수의 기본 블록(B) 및 다수의 기본 블록들을 연결하는 다수의 브랜치(branch)(BL)를 포함한다. 타겟 프로그램(10)은 제1 브랜치(BL1)에 대응되는 제1 제약 조건(C1), 제2 브랜치(BL2)에 대응되는 제2 제약 조건(C2), 제3 브랜치(BL3)에 대응되는 제3 제약 조건(C3) 및 제4 브랜치(BL4)에 대응되는 제4 제약 조건(C4)을 포함할 수 있다. Referring to FIG. 2 , the target program 10 includes a plurality of basic blocks B and a plurality of branches BL connecting the plurality of basic blocks. The target program 10 includes a first constraint condition C1 corresponding to the first branch BL1, a second constraint condition C2 corresponding to the second branch BL2, and a first constraint condition C2 corresponding to the third branch BL3. The third constraint C3 and the fourth constraint C4 corresponding to the fourth branch BL4 may be included.
이 때, 전자 장치(100)는 각 브랜치에 대응되는 제약 조건을 바탕으로 각 브랜치 별 제1 함수를 획득할 수 있다. 구체적으로, 전자 장치(100)는 제1 함수에 대응되는 브랜치 및 그 상위 브랜치에 각각 대응되는 제약 조건들을 누적하여 제1 함수를 획득할 수 있다. 전자 장치(100)는 각 브랜치 뿐만 아니라 상위 브랜치에 대응되는 제약 조건들을 모두 포함하는 제1 함수를 생성할 수 있다. 예를 들어, 전자 장치(100)는 제2 브랜치(BL2)에 대응되는 제1-2 함수(F1-2)를 획득할 때, 제2 브랜치(BL2)의 상위 브랜치인 제1 브랜치(BL1)에 대응되는 제1 제약 조건(C1) 및 제2 브랜치(BL2)에 대응되는 제2 제약 조건(C2)을 누적하여 제1-2 함수(F1-2)를 획득할 수 있다. 이 때, 제1-2 함수(F1-2)는 제1 제약 조건(C1) 및 제2 제약 조건(C2)을 모두 포함할 수 있다. 마찬가지로, 전자 장치(100)는 제1 내지 제3 제약 조건(C1, C2, C3)을 누적하여 제1-3 함수(F1-3)를 획득할 수 있으며, 제1 내지 제4 제약 조건(C1, C2, C3, C4)을 누적하여 제1-4 함수(F1-4)를 획득할 수 있다.In this case, the electronic device 100 may acquire the first function for each branch based on the constraint condition corresponding to each branch. Specifically, the electronic device 100 may acquire the first function by accumulating constraint conditions respectively corresponding to the branch corresponding to the first function and the upper branch thereof. The electronic device 100 may generate a first function including all constraint conditions corresponding to each branch as well as an upper branch. For example, when the electronic device 100 obtains the 1-2 th function F1 - 2 corresponding to the second branch BL2 , the first branch BL1 that is an upper branch of the second branch BL2 . A 1-2 function F1-2 may be obtained by accumulating the first constraint condition C1 corresponding to , and the second constraint condition C2 corresponding to the second branch BL2. In this case, the 1-2 function F1-2 may include both the first constraint condition C1 and the second constraint condition C2. Similarly, the electronic device 100 may acquire the 1-3 function F1-3 by accumulating the first to third constraint conditions C1, C2, and C3, and the first to fourth constraint conditions C1 , C2, C3, C4) may be accumulated to obtain a 1-4 th function (F1-4).
전자 장치(100)는 이와 같이 획득된 여러 제1 함수 중 퍼징(즉, 인 메모리 퍼징)이 시작되는 제1 기본 블록(B1)에 대응되는 제1-4 함수(F1-4)를 제2 함수(F2)로 획득할 수 있다.The electronic device 100 converts the 1-4 th function F1-4 corresponding to the first basic block B1 in which the fuzzing (ie, in-memory purge) starts among the obtained first functions to the second function. It can be obtained with (F2).
도 3은 본 개시의 일 실시 예에 따른 전자 장치의 함수 추상화 동작을 설명하기 위한 도면이다. 도 3을 참조하면, 전자 장치(100)는 SMT 솔버 및 함수 생성 유닛(formula abstractor)을 포함할 수 있다. 3 is a diagram for explaining a function abstraction operation of an electronic device according to an embodiment of the present disclosure. Referring to FIG. 3 , the electronic device 100 may include an SMT solver and a formula abstractor.
전자 장치(100)는 제2 함수(F2)를 SMT 솔버에 입력하여 제2 함수(F2)의 해(30)를 획득할 수 있다. 그리고, 전자 장치(100)는 획득된 해(30)를 함수 생성 유닛에 입력하여 제3 함수(F3)를 획득할 수 있다. 함수 생성 유닛은 제2 함수(F2)를 추상화하여 제2 함수(F2)보다 간략화된 제3 함수(F3)를 생성할 수 있다. 전자 장치(100)는 추상화된 제3 함수(F3)를 만족하는 입력 값을 제1 기본 블록(B1)에 입력하여 인-메모리 퍼징을 수행할 수 있다. 이와 같이, 제2 함수(F2)가 아닌 제3 함수(F3)를 바탕으로 퍼징을 수행함으로써 퍼징에 소모되는 시간을 줄어들 수 있다.The electronic device 100 may obtain a solution 30 of the second function F2 by inputting the second function F2 to the SMT solver. Then, the electronic device 100 may obtain the third function F3 by inputting the obtained solution 30 to the function generating unit. The function generating unit may abstract the second function F2 to generate a third function F3 that is simpler than the second function F2. The electronic device 100 may perform in-memory fuzzing by inputting an input value that satisfies the abstracted third function F3 to the first basic block B1 . As described above, the time consumed for purging may be reduced by performing the purging based on the third function F3 instead of the second function F2.
도 4는 본 개시의 일 실시 예에 따른 퍼징 동작을 설명하기 위한 도면이다. 4 is a view for explaining a purge operation according to an embodiment of the present disclosure.
전자 장치(100)는 제3 함수(F3)를 만족하는 제1 입력 값(x1)을 획득할 수 있다. 전자 장치(100)는 획득된 제1 입력 값(x1)을 제1 기본 블록(B1)에 입력하여 퍼징을 수행할 수 있다. 즉, 전자 장치(100)는 인 메모리 퍼징을 수행할 수 있다. 구체적으로, 전자 장치(100)는 트레이스 데이터에 포함된 스냅샷 데이터를 이용하여 인 메모리 퍼징을 수행할 수 있다. 전자 장치(100)는 트레이스 데이터에 포함된 다수의 스냅샷 데이터 중 인 메모리 퍼징이 시작되는 제1 기본 블록(B1)에 연결되는 제1 브랜치(BL1)에 대응되는 제1 함수(F1)의 실행 시점에 대한 정보를 획득할 수 있다. 전자 장치(100)는 제1 함수(F1)의 실행 시점에 대한 정보를 바탕으로 제1 함수(F1)의 실행 시점에 대응되는 스냅샷 데이터를 식별할 수 있다. 전자 장치(100)는 식별된 스냅샷 데이터를 메모리에 로딩하고, 제3 함수(F3)를 만족하는 적어도 하나의 제1 입력 값(x1)을 반복적으로 제1 기본 블록(B1)에 입력하여 크래시 발생 여부를 식별할 수 있다. 이와 같이, 전자 장치(100)는 타겟 프로그램(10)을 처음부터 실행시켜 퍼징을 수행하는 것이 아니라, 제1 기본 블록(B1)을 시작점으로 퍼징을 수행함으로써 오버 헤드를 방지할 수 있다. 또한, 전자 장치(100)는 크래시가 발생한 제2 기본 블록(B2)에 대한 정보를 메모리에 저장함으로써 후술하는 바와 같이 크래시 검출에 대한 검증 동작을 수행할 수 있다.The electronic device 100 may obtain a first input value x1 that satisfies the third function F3. The electronic device 100 may perform purging by inputting the obtained first input value x1 into the first basic block B1. That is, the electronic device 100 may perform in-memory purging. Specifically, the electronic device 100 may perform in-memory purge by using snapshot data included in the trace data. The electronic device 100 executes the first function F1 corresponding to the first branch BL1 connected to the first basic block B1 where in-memory purge starts among a plurality of snapshot data included in the trace data. You can get information about the time point. The electronic device 100 may identify snapshot data corresponding to the execution time of the first function F1 based on information on the execution time of the first function F1. The electronic device 100 loads the identified snapshot data into the memory, and repeatedly inputs at least one first input value x1 that satisfies the third function F3 into the first basic block B1 to cause a crash. occurrence can be identified. As described above, the electronic device 100 may prevent overhead by purging with the first basic block B1 as the starting point, rather than performing the purging by executing the target program 10 from the beginning. Also, the electronic device 100 may perform a verification operation for detecting a crash as described later by storing information on the second basic block B2 in which the crash occurs in a memory.
한편, 제1 입력 값(x1)으로 인해 타겟 프로그램(10)에서 크래시가 발생하더라도, 제1 입력 값(x1)은 실제 타겟 프로그램(10)에 대한 입력 값은 아니므로, 타겟 프로그램(10)에 대한 실제 입력 값을 바탕으로 검출된 크래시가 진검출인지 판단하는 크래시 검출에 대한 검증이 필요하다. 인 메모리 퍼징을 이용한 종래의 기술들은 제1 입력 값(x1)을 찾더라도, 제1 입력 값(x1)에 대응되는 타겟 프로그램(10)에 대한 실제 입력 값을 찾을 수 없었다. 이에 따라, 종래의 기술들은 크래시 오탐률이 높다는 문제점이 있었다.On the other hand, even if a crash occurs in the target program 10 due to the first input value x1, the first input value x1 is not an actual input value for the target program 10, so It is necessary to verify the crash detection to determine whether the detected crash is a true detection based on the actual input value of the . In conventional techniques using in-memory fuzzing, even if the first input value x1 is found, an actual input value for the target program 10 corresponding to the first input value x1 cannot be found. Accordingly, the conventional techniques have a problem in that the crash false positive rate is high.
한편, 전자 장치(100)는 크래시 검출에 대한 검증 동작을 수행함으로써 크래시 오탐률을 낮출 수 있다. 구체적으로, 전자 장치(100)는 크래시를 유발한 제1 입력 값(x1)을 퍼징 모듈(160)에 입력하여 타겟 프로그램(10)에 대한 입력 값인 제2 입력 값(IN1)을 획득할 수 있다. 그리고, 전자 장치(100)는 획득된 제2 입력 값(IN1)을 타겟 프로그램(10)에 입력하여 제2 기본 블록(B2)에서 크래시가 발생하는지 식별할 수 있다. 제2 기본 블록(B2)에서 크래시가 발생되면, 전자 장치(100)는 인 메모리 퍼징을 통한 크래시 검출이 진검출이라 판단할 수 있다. 반면에, 제2 기본 블록(B2)에서 크래시가 발생되지 않으면, 전자 장치(100)는 인 메모리 퍼징을 통한 크래시 검출이 오검출이라 판단할 수 있다.Meanwhile, the electronic device 100 may reduce a crash false positive rate by performing a verification operation for crash detection. Specifically, the electronic device 100 may obtain the second input value IN1 that is the input value for the target program 10 by inputting the first input value x1 causing the crash to the fuzzing module 160 . . In addition, the electronic device 100 may identify whether a crash occurs in the second basic block B2 by inputting the obtained second input value IN1 into the target program 10 . When a crash occurs in the second basic block B2 , the electronic device 100 may determine that crash detection through in-memory purge is true detection. On the other hand, if a crash does not occur in the second basic block B2 , the electronic device 100 may determine that the crash detection through the in-memory purge is an erroneous detection.
이상에서는 전자 장치의 퍼징 동작에 대하여 설명하였다. 이하에서는, 전자 장치의 구성에 대하여 설명하도록 한다.In the above, the purging operation of the electronic device has been described. Hereinafter, the configuration of the electronic device will be described.
도 5는 본 개시의 일 실시 예에 따른 전자 장치의 구성을 도시한 블록도이다. 도 5를 참조하면, 전자 장치(500)는 통신 인터페이스(510), 메모리(520) 및 프로세서(530)를 포함할 수 있다. 전자 장치(500)는 도 1 내지 도 4에서 설명한 전자 장치(100)에 대응되며, 이하에서는 전자 장치(500)의 각 구성에 대하여 설명한다.5 is a block diagram illustrating a configuration of an electronic device according to an embodiment of the present disclosure. Referring to FIG. 5 , the electronic device 500 may include a communication interface 510 , a memory 520 , and a processor 530 . The electronic device 500 corresponds to the electronic device 100 described with reference to FIGS. 1 to 4 , and each configuration of the electronic device 500 will be described below.
통신 인터페이스(510)는 적어도 하나의 회로를 포함하며 다양한 유형의 외부 기기와 통신을 수행할 수 있다. 전자 장치(500)는 통신 인터페이스(510)를 통해 외부 장치와 유선 또는 무선 방식을 통해 통신을 수행할 수 있다. 이 때, 외부 장치는 전자 장치(500)와는 별개의 장치인 서버가 될 수 있다. 특히, 타겟 프로그램(10)에 대한 트레이스 데이터가 외부 장치에서 생성된 경우, 전자 장치(500)는 통신 인터페이스(510)를 통해 외부 장치로부터 트레이스 데이터를 수신할 수 있다.The communication interface 510 includes at least one circuit and may communicate with various types of external devices. The electronic device 500 may communicate with an external device through a wired or wireless method through the communication interface 510 . In this case, the external device may be a server, which is a device separate from the electronic device 500 . In particular, when the trace data for the target program 10 is generated by the external device, the electronic device 500 may receive the trace data from the external device through the communication interface 510 .
메모리(520)는 전자 장치(500)의 구성요소들의 전반적인 동작을 제어하기 위한 운영체제(OS: Operating System) 및 전자 장치(500)의 구성요소와 관련된 명령 또는 데이터를 저장할 수 있다. 이를 위해 메모리(520)는 비휘발성 메모리(ex: 하드 디스크, SSD(Solid state drive), 플래시 메모리), 휘발성 메모리 등으로 구현될 수 있다. 본 개시에 따른 일 실시 예에 있어서, 메모리(520)는 트레이스 데이터 및 크래시가 발생된 기본 블록에 대한 정보를 저장할 수 있다.The memory 520 may store an operating system (OS) for controlling overall operations of the components of the electronic device 500 and commands or data related to the components of the electronic device 500 . To this end, the memory 520 may be implemented as a non-volatile memory (eg, a hard disk, a solid state drive (SSD), a flash memory), a volatile memory, or the like. In an embodiment according to the present disclosure, the memory 520 may store trace data and information on a basic block in which a crash occurs.
프로세서(530)는 전자 장치(500)의 전반적인 동작을 제어할 수 있다.The processor 530 may control the overall operation of the electronic device 500 .
프로세서(530)는 트레이스 데이터를 획득할 수 있다. 프로세서(530)는 트레이스 데이터를 바탕으로 적어도 하나의 제1 함수를 획득할 수 있다. 이 때, 프로세서(530)는 트레이스 데이터에 포함된 적어도 하나의 제약 조건을 식별하고, 식별된 제약 조건을 바탕으로 제1 함수를 획득할 수 있다.The processor 530 may acquire trace data. The processor 530 may obtain at least one first function based on the trace data. In this case, the processor 530 may identify at least one constraint included in the trace data, and obtain the first function based on the identified constraint.
프로세서(530)는 적어도 하나의 제1 함수 중 퍼징이 시작되는 제1 기본 블록에 대응되는 제2 함수를 식별할 수 있다. 제2 함수는 제1 기본 블록과 연결되는 상위 브랜치에 대응될 수 있다.The processor 530 may identify a second function corresponding to the first basic block in which the fuzzing starts from among the at least one first function. The second function may correspond to an upper branch connected to the first basic block.
프로세서(530)는 제2 함수를 추상화하여 제3 함수를 획득할 수 있다. 이 때, 프로세서(530)는 제2 함수의 해를 획득하고, 획득된 제2 함수의 해를 바탕으로 제3 함수를 생성할 수 있다.The processor 530 may obtain the third function by abstracting the second function. In this case, the processor 530 may obtain a solution of the second function, and generate a third function based on the obtained solution of the second function.
프로세서(530)는 트레이스 데이터 및 제3 함수를 바탕으로 퍼징을 수행할 수 있다. 프로세서(530)는 트레이스 데이터에 포함된 적어도 하나의 스냅샷 데이터 중 제2 함수의 실행 시점에 대응되는 스냅샷 데이터를 식별하여 메모리(520)로 로딩할 수 있다. 그리고, 프로세서(530)는 메모리 값을 변경함으로써 제1 기본 블록에 제3 함수를 만족하는 입력 값을 입력하여 크래시를 검출할 수 있다.The processor 530 may perform fuzzing based on the trace data and the third function. The processor 530 may identify the snapshot data corresponding to the execution time of the second function from among at least one snapshot data included in the trace data and load it into the memory 520 . In addition, the processor 530 may detect the crash by inputting an input value that satisfies the third function into the first basic block by changing the memory value.
프로세서(530)는 크래시가 검출되면, 제1 입력 값 및 크래시에 대한 위치 정보를 바탕으로 크래시 검출을 검증할 수 있다. 프로세서(530)는 크래시가 검출된 제2 기본 블록에 대한 위치 정보를 획득할 수 있다. 프로세서(530)는 제1 입력 값 및 제3 함수를 바탕으로 타겟 프로그램에 대한 제2 입력 값을 획득할 수 있다. 프로세서(530)는 제2 입력 값을 타겟 프로그램에 입력하여 제2 기본 블록에서 크래시가 검출되면, 크래시 검출을 진검출로 판단할 수 있다. 반면에, 제2 기본 블록에서 크래시가 검출되지 않으면, 프로세서(530)는 크래시 검출을 오검출로 판단할 수 있다.When a crash is detected, the processor 530 may verify the crash detection based on the first input value and location information about the crash. The processor 530 may obtain location information on the second basic block in which the crash is detected. The processor 530 may obtain a second input value for the target program based on the first input value and the third function. When a crash is detected in the second basic block by inputting the second input value into the target program, the processor 530 may determine the crash detection as true detection. On the other hand, if a crash is not detected in the second basic block, the processor 530 may determine that the crash detection is a false detection.
도 6은 본 개시의 일 실시 예에 따른 전자 장치의 제어 방법을 도시한 순서도이다.6 is a flowchart illustrating a control method of an electronic device according to an embodiment of the present disclosure.
도 6을 참조하면, 전자 장치(100)는 타겟 프로그램에 대한 트레이스 데이터를 획득할 수 있다(S610). 그리고, 전자 장치(100)는 트레이스 데이터를 바탕으로 적어도 하나의 제1 함수를 획득할 수 있다(S620). 구체적으로, 전자 장치(100)는 트레이스 데이터에 포함된 타겟 프로그램에 대한 제약 조건들을 바탕으로 제1 함수를 생성할 수 있다. 그리고, 전자 장치(100)는 적어도 하나의 제1 함수 중 퍼징이 시작되는 제1 기본 블록에 대응되는 제2 함수를 식별할 수 있다(S630). 이 때, 전자 장치(100)는 무작위로 제1 기본 블록을 선택하고, 제1 기본 블록의 상위 브랜치에 대응되는 제2 함수를 식별할 수 있다. 또한, 전자 장치(100)는 식별된 제2 함수를 추상화하여 제3 함수를 획득할 수 있다(S640). 구체적으로, 전자 장치(100)는 SMT 솔버를 이용하여 제2 함수의 해를 획득하고, 획득된 해를 바탕으로 제3 함수를 생성할 수 있다. 그리고, 전자 장치(100)는 트레이스 데이터 및 제3 함수를 바탕으로 퍼징을 수행할 수 있다(S650). 이 때, 전자 장치(100)는 트레이스 데이터에 포함된 제2 함수에 대응되는 메모리 스냅샷을 획득하여 로딩할 수 있다. 그리고, 전자 장치(100)는 제3 함수를 만족하는 입력 값을 획득하고, 획득된 입력 값을 바탕으로 메모리를 변경함으로써 인 메모리 퍼징을 수행할 수 있다.Referring to FIG. 6 , the electronic device 100 may acquire trace data for a target program ( S610 ). Then, the electronic device 100 may acquire at least one first function based on the trace data (S620). Specifically, the electronic device 100 may generate the first function based on constraint conditions for the target program included in the trace data. Then, the electronic device 100 may identify a second function corresponding to the first basic block in which the fuzzing starts among the at least one first function ( S630 ). In this case, the electronic device 100 may randomly select a first basic block and identify a second function corresponding to an upper branch of the first basic block. Also, the electronic device 100 may obtain a third function by abstracting the identified second function ( S640 ). Specifically, the electronic device 100 may obtain a solution of the second function by using the SMT solver, and may generate a third function based on the obtained solution. Then, the electronic device 100 may perform fuzzing based on the trace data and the third function (S650). In this case, the electronic device 100 may obtain and load a memory snapshot corresponding to the second function included in the trace data. In addition, the electronic device 100 may perform in-memory purging by obtaining an input value that satisfies the third function and changing the memory based on the obtained input value.
한편, 이상에서 설명된 다양한 실시 예들은 소프트웨어(software), 하드웨어(hardware) 또는 이들의 조합을 이용하여 컴퓨터(computer) 또는 이와 유사한 장치로 읽을 수 있는 기록 매체 내에서 구현될 수 있다. 일부 경우에 있어 본 명세서에서 설명되는 실시 예들이 프로세서 자체로 구현될 수 있다. 소프트웨어적인 구현에 의하면, 본 명세서에서 설명되는 절차 및 기능과 같은 실시 예들은 별도의 소프트웨어 모듈들로 구현될 수 있다. 소프트웨어 모듈들 각각은 본 명세서에서 설명되는 하나 이상의 기능 및 작동을 수행할 수 있다.Meanwhile, the various embodiments described above may be implemented in a recording medium readable by a computer or a similar device using software, hardware, or a combination thereof. In some cases, the embodiments described herein may be implemented by the processor itself. According to the software implementation, embodiments such as the procedures and functions described in this specification may be implemented as separate software modules. Each of the software modules may perform one or more functions and operations described herein.
한편, 상술한 본 개시의 다양한 실시 예들에 따른 처리 동작을 수행하기 위한 컴퓨터 명령어(computer instructions)는 비일시적 컴퓨터 판독 가능 매체(non-transitory computer-readable medium) 에 저장될 수 있다. 이러한 비일시적 컴퓨터 판독 가능 매체에 저장된 컴퓨터 명령어는 프로세서에 의해 실행되었을 때 상술한 다양한 실시 예에 따른 처리 동작을 특정 기기가 수행하도록 할 수 있다.Meanwhile, computer instructions for performing the processing operation according to various embodiments of the present disclosure described above may be stored in a non-transitory computer-readable medium. When the computer instructions stored in such a non-transitory computer-readable medium are executed by a processor, a specific device may perform the processing operation according to the above-described various embodiments.
비일시적 컴퓨터 판독 가능 매체란 레지스터, 캐쉬, 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라 반영구적으로 데이터를 저장하며, 기기에 의해 판독(reading)이 가능한 매체를 의미한다. 비일시적 컴퓨터 판독 가능 매체의 구체적인 예로는, CD, DVD, 하드 디스크, 블루레이 디스크, USB, 메모리카드, ROM 등이 있을 수 있다.The non-transitory computer-readable medium refers to a medium that stores data semi-permanently, rather than a medium that stores data for a short moment, such as a register, cache, memory, etc., and can be read by a device. Specific examples of the non-transitory computer-readable medium may include a CD, DVD, hard disk, Blu-ray disk, USB, memory card, ROM, and the like.
한편, 기기로 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, ‘비일시적 저장매체'는 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다. 예로, '비일시적 저장매체'는 데이터가 임시적으로 저장되는 버퍼를 포함할 수 있다.Meanwhile, the device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory storage medium' is a tangible device and only means that it does not contain a signal (eg, electromagnetic wave). It does not distinguish the case where it is stored as For example, the 'non-transitory storage medium' may include a buffer in which data is temporarily stored.
일 실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어 TM)를 통해 또는 두개의 사용자 장치들(예: 스마트폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품(예: 다운로더블 앱(downloadable app))의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to an embodiment, the method according to various embodiments disclosed in this document may be provided as included in a computer program product. Computer program products may be traded between sellers and buyers as commodities. The computer program product is distributed in the form of a machine-readable storage medium (eg compact disc read only memory (CD-ROM)), or through an application store (eg Play Store TM ) or on two user devices ( It can be distributed (eg downloaded or uploaded) directly, online between smartphones (eg: smartphones). In the case of online distribution, at least a portion of the computer program product (eg, a downloadable app) is stored at least in a machine-readable storage medium, such as a memory of a manufacturer's server, a server of an application store, or a relay server. It may be temporarily stored or temporarily created.
이상에서는 본 개시의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 개시는 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에서 청구하는 본 개시의 요지를 벗어남이 없이 당해 개시에 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 개시의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.In the above, preferred embodiments of the present disclosure have been illustrated and described, but the present disclosure is not limited to the specific embodiments described above, and it is common in the technical field pertaining to the present disclosure without departing from the gist of the present disclosure as claimed in the claims. Various modifications may be made by those having the knowledge of

Claims (15)

  1. 전자 장치의 제어 방법에 있어서,A method for controlling an electronic device, comprising:
    타겟 프로그램에 대한 트레이스 데이터(trace data)를 획득하는 단계;acquiring trace data for a target program;
    상기 트레이스 데이터를 바탕으로 적어도 하나의 제1 함수를 획득하는 단계; obtaining at least one first function based on the trace data;
    상기 적어도 하나의 제1 함수 중 퍼징이 시작되는 제1 기본 블록에 대응되는 제2 함수를 식별하는 단계;identifying a second function corresponding to a first basic block in which fuzzing starts among the at least one first function;
    상기 제2 함수를 추상화하여 제3 함수를 획득하는 단계; 및 abstracting the second function to obtain a third function; and
    상기 트레이스 데이터 및 상기 제3 함수를 바탕으로 퍼징(fuzzing)을 수행하는 단계;를 포함하는performing fuzzing based on the trace data and the third function; including
    제어 방법.control method.
  2. 제1 항에 있어서,According to claim 1,
    상기 트레이스 데이터는 상기 타겟 프로그램에 대한 적어도 하나의 스냅샷 데이터(snapshot data)를 포함하고,The trace data includes at least one snapshot data for the target program,
    상기 퍼징을 수행하는 단계는,Performing the purging step,
    상기 적어도 하나의 스냅샷 데이터 중 상기 제2 함수의 실행 시점에 대응되는 스냅샷 데이터를 식별하고, 상기 식별된 스냅샷 데이터를 로딩하는 단계;identifying snapshot data corresponding to an execution time of the second function from among the at least one snapshot data, and loading the identified snapshot data;
    상기 제3 함수를 바탕으로 상기 제1 기본 블록에 대한 제1 입력 값을 획득하고, 상기 제1 입력 값을 상기 제1 기본 블록에 입력하여 크래시(crash)를 검출하는 단계를 포함하는obtaining a first input value for the first basic block based on the third function, and detecting a crash by inputting the first input value into the first basic block
    제어 방법.control method.
  3. 제2 항에 있어서,3. The method of claim 2,
    상기 크래시가 검출되면, 상기 제1 입력 값 및 상기 크래시에 대한 위치 정보를 바탕으로 상기 크래시 검출을 검증하는 단계;를 더 포함하고,When the crash is detected, verifying the crash detection based on the first input value and the location information about the crash;
    상기 검증하는 단계는,The verification step is
    상기 크래시가 검출된 제2 기본 블록에 대한 위치 정보를 획득하는 단계,obtaining location information on the second basic block in which the crash is detected;
    상기 제1 입력 값 및 상기 제3 함수를 바탕으로 상기 타겟 프로그램에 대한 제2 입력 값을 획득하는 단계, 및obtaining a second input value for the target program based on the first input value and the third function; and
    상기 제2 기본 블록에 대한 위치 정보 및 상기 제2 입력 값을 바탕으로 상기 크래시 검출을 검증하는 단계를 포함하는verifying the crash detection based on the location information on the second basic block and the second input value
    제어 방법.control method.
  4. 제3 항에 있어서,4. The method of claim 3,
    상기 크래시 검출을 검증하는 단계는,The step of verifying the crash detection includes:
    상기 제2 입력 값을 상기 타겟 프로그램에 입력하여 상기 제2 기본 블록에서 크래시가 검출되면, 상기 크래시 검출을 진검출로 판단하는When a crash is detected in the second basic block by inputting the second input value into the target program, determining that the crash detection is a true detection
    제어 방법.control method.
  5. 제3 항에 있어서,4. The method of claim 3,
    상기 크래시 검출을 검증하는 단계는,The step of verifying the crash detection includes:
    상기 제2 입력 값을 상기 타겟 프로그램에 입력하여 상기 제2 기본 블록에서 크래시가 미검출되면, 상기 크래시 검출을 오검출로 판단하는When a crash is not detected in the second basic block by inputting the second input value into the target program, determining that the crash detection is an erroneous detection
    제어 방법.control method.
  6. 제1 항에 있어서,According to claim 1,
    상기 제3 함수를 획득하는 단계는,Obtaining the third function comprises:
    상기 제2 함수의 해를 획득하고,obtaining a solution of the second function,
    상기 획득된 제2 함수의 해를 바탕으로 제3 함수를 생성하는generating a third function based on the obtained solution of the second function
    제어 방법.control method.
  7. 제1 항에 있어서,According to claim 1,
    상기 제1 함수를 획득하는 단계는,Obtaining the first function comprises:
    상기 트레이스 데이터에 포함된 적어도 하나의 제약 조건을 식별하는 단계, 및identifying at least one constraint included in the trace data; and
    상기 식별된 제약 조건을 바탕으로 상기 제1 함수를 획득하는 단계를 포함하는obtaining the first function based on the identified constraint condition;
    제어 방법.control method.
  8. 전자 장치에 있어서,In an electronic device,
    적어도 하나의 인스트럭션을 저장하는 메모리; 및a memory storing at least one instruction; and
    프로세서;를 포함하고,processor; including;
    상기 프로세서는,The processor is
    타겟 프로그램에 대한 트레이스 데이터(trace data)를 획득하고,Acquire trace data for the target program,
    상기 트레이스 데이터를 바탕으로 적어도 하나의 제1 함수를 획득하고,obtaining at least one first function based on the trace data;
    상기 적어도 하나의 제1 함수 중 퍼징이 시작되는 제1 기본 블록에 대응되는 제2 함수를 식별하고,Identifies a second function corresponding to a first basic block in which fuzzing starts among the at least one first function,
    상기 제2 함수를 추상화하여 제3 함수를 획득하고,abstracting the second function to obtain a third function,
    상기 트레이스 데이터 및 상기 제3 함수를 바탕으로 퍼징(fuzzing)을 수행하는performing fuzzing based on the trace data and the third function
    전자 장치.electronic device.
  9. 제8 항에 있어서,9. The method of claim 8,
    상기 트레이스 데이터는 상기 타겟 프로그램에 대한 적어도 하나의 스냅샷 데이터(snapshot data)를 포함하고,The trace data includes at least one snapshot data for the target program,
    상기 프로세서는,The processor is
    상기 적어도 하나의 스냅샷 데이터 중 상기 제2 함수의 실행 시점에 대응되는 스냅샷 데이터를 식별하고, 상기 식별된 스냅샷 데이터를 로딩하고,Identifies snapshot data corresponding to an execution time of the second function from among the at least one snapshot data, and loads the identified snapshot data;
    상기 제3 함수를 바탕으로 상기 제1 기본 블록에 대한 제1 입력 값을 획득하고, 상기 제1 입력 값을 상기 제1 기본 블록에 입력하여 크래시(crash)를 검출하는obtaining a first input value for the first basic block based on the third function, and detecting a crash by inputting the first input value into the first basic block
    전자 장치.electronic device.
  10. 제9 항에 있어서,10. The method of claim 9,
    상기 프로세서는,The processor is
    상기 크래시가 검출되면, When the crash is detected,
    상기 제1 입력 값 및 상기 크래시에 대한 위치 정보를 바탕으로 상기 크래시 검출을 검증하되,Verifies the crash detection based on the first input value and the location information about the crash,
    상기 크래시가 검출된 제2 기본 블록에 대한 위치 정보를 획득하고,acquiring location information about the second basic block in which the crash is detected,
    상기 제1 입력 값 및 상기 제3 함수를 바탕으로 상기 타겟 프로그램에 대한 제2 입력 값을 획득하고,obtaining a second input value for the target program based on the first input value and the third function;
    상기 제2 기본 블록에 대한 위치 정보 및 상기 제2 입력 값을 바탕으로 상기 크래시 검출을 검증하는To verify the crash detection based on the location information on the second basic block and the second input value
    전자 장치.electronic device.
  11. 제10 항에 있어서,11. The method of claim 10,
    상기 프로세서는,The processor is
    상기 제2 입력 값을 상기 타겟 프로그램에 입력하여 상기 제2 기본 블록에서 크래시가 검출되면, 상기 크래시 검출을 진검출로 판단하는When a crash is detected in the second basic block by inputting the second input value into the target program, determining that the crash detection is a true detection
    전자 장치.electronic device.
  12. 제10 항에 있어서,11. The method of claim 10,
    상기 프로세서는,The processor is
    상기 제2 입력 값을 상기 타겟 프로그램에 입력하여 상기 제2 기본 블록에서 크래시가 미검출되면, 상기 크래시 검출을 오검출로 판단하는When a crash is not detected in the second basic block by inputting the second input value into the target program, determining that the crash detection is an erroneous detection
    전자 장치.electronic device.
  13. 제8 항에 있어서,9. The method of claim 8,
    상기 프로세서는,The processor is
    상기 제2 함수의 해를 획득하고obtain a solution of the second function, and
    상기 획득된 제2 함수의 해를 바탕으로 제3 함수를 생성하는generating a third function based on the obtained solution of the second function
    전자 장치.electronic device.
  14. 제8 항에 있어서,9. The method of claim 8,
    상기 프로세서는,The processor is
    상기 트레이스 데이터에 포함된 적어도 하나의 제약 조건을 식별하고,identify at least one constraint included in the trace data;
    상기 식별된 제약 조건을 바탕으로 상기 제1 함수를 획득하는obtaining the first function based on the identified constraint
    전자 장치.electronic device.
  15. 제8 항에 있어서,9. The method of claim 8,
    상기 제2 함수는,The second function is
    상기 제1 기본 블록과 연결되는 상위 브랜치에 대응되는 corresponding to the upper branch connected to the first basic block
    전자 장치.electronic device.
PCT/KR2021/000912 2020-03-19 2021-01-22 Electronic device and control method therefor WO2021187744A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020200033528A KR20210117408A (en) 2020-03-19 2020-03-19 Electronic apparatus and method for controlling thereof
KR10-2020-0033528 2020-03-19

Publications (1)

Publication Number Publication Date
WO2021187744A1 true WO2021187744A1 (en) 2021-09-23

Family

ID=77771336

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/000912 WO2021187744A1 (en) 2020-03-19 2021-01-22 Electronic device and control method therefor

Country Status (2)

Country Link
KR (1) KR20210117408A (en)
WO (1) WO2021187744A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150033079A1 (en) * 2012-02-14 2015-01-29 Microsoft Corporation Integrated Fuzzing
KR20180076550A (en) * 2016-12-28 2018-07-06 충남대학교산학협력단 Apparatus and method for inter-procedure static analysis
KR20190041912A (en) * 2018-09-28 2019-04-23 한국인터넷진흥원 System for detecting security vulnerability based on binary, method and program thereof
KR20190051301A (en) * 2017-11-06 2019-05-15 한국전자통신연구원 Fuzzing system, execution flow information extracting apparatus and method for fuzzing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150033079A1 (en) * 2012-02-14 2015-01-29 Microsoft Corporation Integrated Fuzzing
KR20180076550A (en) * 2016-12-28 2018-07-06 충남대학교산학협력단 Apparatus and method for inter-procedure static analysis
KR20190051301A (en) * 2017-11-06 2019-05-15 한국전자통신연구원 Fuzzing system, execution flow information extracting apparatus and method for fuzzing
KR20190041912A (en) * 2018-09-28 2019-04-23 한국인터넷진흥원 System for detecting security vulnerability based on binary, method and program thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MANES VALENTIN, HAN HYUNGSEOK, HAN CHOONGWOO, CHA SANG KIL, EGELE MANUEL, SCHWARTZ EDWARD J, WOO MAVERICK: "Fuzzing: Art, Science, and Engineering", ARXIV:1812.00140V1, 1 December 2018 (2018-12-01), XP055851817, Retrieved from the Internet <URL:https://arxiv.org/pdf/1812.00140v1.pdf> [retrieved on 20211015], DOI: 10.1109/TSE.2019.2946563 *

Also Published As

Publication number Publication date
KR20210117408A (en) 2021-09-29

Similar Documents

Publication Publication Date Title
US20090133126A1 (en) Apparatus and method for detecting dll inserted by malicious code
WO2018182126A1 (en) System and method for authenticating safe software
WO2019035610A1 (en) Game test automation device and method
WO2013089340A1 (en) Apparatus and method for detecting similarity between applications
WO2012002635A1 (en) System test apparatus
WO2012033237A1 (en) System testing method
WO2013165180A1 (en) Log monitoring method, server therefor and recording medium
US10366226B2 (en) Malicious code analysis device and method based on external device connected via USB cable
CN104978213B (en) Realize the link acquisition methods and device of application installation package
WO2014042297A1 (en) Method for automatically executing android application using code analysis and screen analysis
WO2013137615A1 (en) Method and apparatus for detecting leak of information resource of device
WO2018236099A1 (en) Method and apparatus for detecting macro-program
WO2018016671A2 (en) Dangerous code detection system for checking security vulnerability and method thereof
CN113497809A (en) MIPS framework vulnerability mining method based on control flow and data flow analysis
WO2013073762A1 (en) Method and apparatus for providing and collecting data about abnormal termination of program
WO2014181946A1 (en) System and method for extracting big data
US11366800B2 (en) System and method to automate validating media redirection in testing process
WO2015046775A1 (en) Method of verifying integrity of program using hash
WO2011002146A2 (en) System and method for detecting malicious code
WO2021187744A1 (en) Electronic device and control method therefor
KR101851330B1 (en) Apparatus and method for detecting code reuse attack
WO2023229066A1 (en) Reversing engine-based document action determination method, and device therefor
WO2011037321A2 (en) Windows kernel alteration searching method
WO2016190485A1 (en) Method for blocking unauthorized access to data and computing device having same function
EP3504597A1 (en) Identification of deviant engineering modifications to programmable logic controllers

Legal Events

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

Ref document number: 21771145

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21771145

Country of ref document: EP

Kind code of ref document: A1