KR101995176B1 - Method and system for reverse engineering using big data based on dynamic context - Google Patents

Method and system for reverse engineering using big data based on dynamic context Download PDF

Info

Publication number
KR101995176B1
KR101995176B1 KR1020180147027A KR20180147027A KR101995176B1 KR 101995176 B1 KR101995176 B1 KR 101995176B1 KR 1020180147027 A KR1020180147027 A KR 1020180147027A KR 20180147027 A KR20180147027 A KR 20180147027A KR 101995176 B1 KR101995176 B1 KR 101995176B1
Authority
KR
South Korea
Prior art keywords
program
context
processor
computer
computer device
Prior art date
Application number
KR1020180147027A
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 KR1020180147027A priority Critical patent/KR101995176B1/en
Application granted granted Critical
Publication of KR101995176B1 publication Critical patent/KR101995176B1/en
Priority to PCT/KR2019/012480 priority patent/WO2020111482A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation

Abstract

Provided are a reverse engineering method utilizing big data based on a program execution context and a system thereof. According to one embodiment of the present invention, the reverse engineering method comprises the steps of: executing a program to be analyzed through a debugger; setting a break point in an instruction included in a region of interest of the program to be analyzed using the debugger; storing an execution context at a corresponding time point in a context database through an event handler for an event occurring in an instruction in which the break point is set; and generating information analysis results for the program to be analyzed by processing the data stored in the context database.

Description

프로그램 실행 컨텍스트 기반의 빅데이터를 활용한 역공학 방법 및 시스템{METHOD AND SYSTEM FOR REVERSE ENGINEERING USING BIG DATA BASED ON DYNAMIC CONTEXT}TECHNICAL FIELD [0001] The present invention relates to a reverse engineering method and system using big data based on a program execution context,

아래의 설명은 큰 사이즈의 바이너리 분석을 보다 효율적으로 하는 방법에 관한 것으로서, 더욱 상세하게는 프로그램 실행 컨텍스트를 모두 저장하고 저장한 컨텍스트를 효율적으로 분석하는 역공학 방법 및 시스템, 그리고 컴퓨터와 결합되어 본 발명의 실시예들에 따른 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램과 그 기록매체에 관한 것이다.The following description relates to a method for efficiently performing a large-sized binary analysis, more specifically, a reverse engineering method and system for efficiently storing and analyzing a context in which all program execution contexts are stored, To a computer program stored in a computer-readable recording medium for causing a computer to execute a method according to embodiments of the present invention, and a recording medium therefor.

임의의 프로그램(바이너리 혹은 소스코드)이 주어졌을 때, 해당 프로그램의 동작 방식을 분석하고 이해하는 것을 '역공학'이라고 부른다. 완성된 제품(바이너리)을 판매하는 기업의 입장에서는 그 제품에 해당 기업의 기술이 그대로 담겨 있기 때문에 제품의 역공학이 어렵게 되는 것을 원한다. 이와 비슷한 입장에 있는 또 다른 생산자의 예시로는 악성코드를 만들고 배포하는 공격자가 있을 수 있다. 반대로 바이너리만 주어진 상태에서 프로그램을 분석해야만 하는 경우가 있다. 프로그램의 취약점을 찾거나 악성코드의 동작 방식을 이해해야 하는 경우가 이에 해당한다. 이처럼 역공학이라는 주제를 놓고 창과 방패의 싸움이 꾸준히 이어져 오고 있으며 특정 방향이 반드시 옳은 방향이라고 단정지을 수 없는 상황이다.Given an arbitrary program (binary or source code), analyzing and understanding the behavior of the program is called reverse engineering. Companies that sell finished products (binary) want their products to be difficult to reverse engineer because they contain the technology of their companies. Another example of a producer in a similar position is an attacker who creates and distributes malicious code. Conversely, you may need to analyze your program with only binaries. This is the case when you need to look for program vulnerabilities or understand how malicious code works. As such, the fight against spear and shield has been steadily continuing on the subject of reverse engineering, and it can not be concluded that certain directions are necessarily the right direction.

본 발명은 역공학 기술 중에서도 '동적 분석'이라고 불리는 분야의 한 부분이다. 기존의 동적 분석 방법들 중 가장 기초가 되는 것은 '디버거'라고 불리는 툴을 활용하는 것이다. 디버거의 장점은 광범위한 환경에서 사용 가능하며 사용자가 원하는 프로그램의 지점에서 프로그램의 실행 컨텍스트를 모두 확인할 수 있다는 것이다. 프로그램은 명령어를 담고 있는 코드와 그 코드의 실행 배경이 되는 실행 컨텍스트를 바탕으로 하여 동작한다. 따라서 사용자는 디버거를 활용하여 원하는 프로그램의 지점에서 다음의 실행결과를 예측할 수 있고 이어 프로그램을 이해하는 부분까지 나아갈 수 있다. 또 다른 방법으로는 정적/동적 바이너리 수정이 있다. 일반적으로 이런 수정법은 함수/베이직블럭/명령어 단위로 사용자가 원하는 기능을 삽입/수정하여 프로그램의 행동을 이해하기 위해 이용될 수 있다.The present invention is a part of a field called " dynamic analysis " The most basic of the existing dynamic analysis methods is to use a tool called 'debugger'. The advantage of a debugger is that it can be used in a wide variety of environments and allows you to see the execution context of the program at the point of the program you want. The program operates on the basis of the code that contains the instruction and the execution context that is the execution background of the code. Therefore, the user can utilize the debugger to predict the next execution result at the point of the desired program and then proceed to the understanding of the program. Another alternative is static / dynamic binary modification. In general, these modifications can be used to understand the behavior of the program by inserting / modifying the functions desired by the user in units of functions / basic blocks / commands.

앞서 설명한 프로그램의 행동을 이해하기 위해 도움을 주는 분석 방법들은 프로그램이 담고 있는 모든 정보들을 사용자에게 주기에 충분하다. 그러나 주어진 프로그램의 크기가 클수록 사용자가 읽고 처리하기 위해 많은 시간이 걸리며 보다 효율적인 분석 방법을 요구한다. 따라서 디버거나 바이너리 수정을 통해 얻은 정보를 효율적으로 가공하는 것이 무엇보다 중요하다고 할 수 있다. 이 가공법이 얼마나 효과적이며 효율적이냐에 따라 분석자가 프로그램을 분석하기 위해 걸리는 시간이 크게 영향을 받는다. 이에 따라 본 발명에서는 실행 컨텍스트의 저장과 효율적인 가공을 제시하고 이 제안이 얼마나 효율적인지를 보인다.Analysis methods that help to understand the behavior of the program described above are sufficient to give the user all the information the program contains. However, the larger the size of a given program, the more time it takes for the user to read and process and requires a more efficient analysis method. Therefore, it is important to efficiently process the information obtained through debugger or binary modification. Depending on how effective and efficient this process is, the time it takes for the analyst to analyze the program is greatly affected. Accordingly, the present invention proposes storage of the execution context and efficient processing, and shows how efficient this proposal is.

선행기술문헌: 미국등록특허 US8,959,442B2Prior art document: U.S. Pat. No. 8,959,442 B2

바이너리의 크기가 아주 크거나 복잡한 경우에 분석자가 다루어야 하는 정보가 아주 많은 상황에서 분석자가 집중해야 하는 부분을 빠르게 찾아 프로그램의 행동을 이해하는 데에 걸리는 시간을 크게 단축시킬 수 있는 역공학 방법 및 시스템, 그리고 컴퓨터와 결합되어 본 발명의 실시예들에 따른 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램과 그 기록매체를 제공한다.Reverse engineering methods and systems that can quickly reduce the time required for analysts to understand the behavior of a program in a situation where the analyst needs to deal with a very large or complex binary size And a computer program stored on a computer-readable recording medium for causing a computer to execute a method according to embodiments of the present invention in combination with the computer, and a recording medium therefor.

분석 대상 프로그램을 디버거를 통해 실행하는 단계; 상기 디버거를 이용하여 상기 분석 대상 프로그램의 관심 영역에 포함된 인스트럭션에 브레이크 포인트를 설정하는 단계; 상기 브레이크 포인트가 설정된 인스트럭션에서 발생하는 이벤트에 대해 이벤트 핸들러를 통해 해당 시점에서의 실행 컨텍스트(execution context)를 컨텍스트 데이터베이스에 저장하는 단계; 및 상기 컨텍스트 데이터베이스에 저장된 데이터를 처리하여 상기 분석 대상 프로그램에 대한 정보 분석 결과를 생성하는 단계를 포함하는 역공학 방법을 제공한다.Executing a program to be analyzed through a debugger; Setting a breakpoint at an instruction included in a region of interest of the analysis target program using the debugger; Storing an execution context at a corresponding point in the context database through an event handler for an event occurring in the instruction for which the breakpoint is set; And processing the data stored in the context database to generate an information analysis result for the analysis target program.

일측에 따르면, 상기 정보 분석 결과를 생성하는 단계는, 상기 컨텍스트 데이터베이스에 저장된 데이터를 가공하는 단계; 및 시각화 도구를 활용하여 상기 가공된 데이터에 대한 정보 분석 결과를 리포트하는 단계를 포함하는 것을 특징으로 할 수 있다.According to one aspect, the step of generating the information analysis result includes: processing data stored in the context database; And reporting information analysis results on the processed data using a visualization tool.

다른 측면에 따르면, 상기 컨텍스트 데이터베이스에 저장되는 테이블의 컬럼(column)에 상기 실행 컨텍스트가 저장된 순서를 나타내는 인덱스 값이 포함되는 것을 특징으로 할 수 있다.According to another aspect of the present invention, an index value indicating a sequence in which the execution context is stored may be included in a column of a table stored in the context database.

또 다른 측면에 따르면, 상기 실행 컨텍스트는 상기 실행 컨텍스트에 대응하는 시점에서의 상기 분석 대상 프로그램에 대한 레지스터 값 및 메모리 상태 중 적어도 하나를 포함하는 것을 특징으로 할 수 있다.According to another aspect of the present invention, the execution context includes at least one of a register value and a memory state for the analysis target program at a time corresponding to the execution context.

컴퓨터 장치와 결합되어 상기 역공학 방법을 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.A computer program stored on a computer readable recording medium in combination with a computer device for executing the reverse engineering method on a computer device.

상기 역공학 방법을 컴퓨터 장치에 실행시키기 위한 프로그램이 기록되어 있는 컴퓨터에서 판독 가능한 기록매체를 제공한다.There is provided a computer-readable recording medium on which a program for causing a computer device to execute the reverse engineering method is recorded.

컴퓨터 장치에 있어서, 상기 컴퓨터 장치에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서에 의해, 분석 대상 프로그램을 디버거를 통해 실행하고, 상기 디버거를 이용하여 상기 분석 대상 프로그램의 관심 영역에 포함된 인스트럭션에 브레이크 포인트를 설정하고, 상기 브레이크 포인트가 설정된 인스트럭션에서 발생하는 이벤트에 대해 이벤트 핸들러를 통해 해당 시점에서의 실행 컨텍스트(execution context)를 컨텍스트 데이터베이스에 저장하고, 상기 컨텍스트 데이터베이스에 저장된 데이터를 처리하여 상기 분석 대상 프로그램에 대한 정보 분석 결과를 생성하는 것을 특징으로 하는 컴퓨터 장치를 제공한다.A computer device, comprising: at least one processor implemented to execute instructions readable by the computer device, wherein the at least one processor executes a program to be analyzed via a debugger, A breakpoint is set in an instruction included in a region of interest of a target program, an execution context at a corresponding time is stored in a context database through an event handler for an event occurring in an instruction in which the breakpoint is set, And processing the data stored in the context database to generate an information analysis result for the analysis target program.

바이너리의 분석자가 바이너리의 구조에 대한 이해가 아주 적은 경우에도 프로그램의 구조 분석을 하기 위한 시작점을 찾는 것을 용이하게 할 수 있다. 이는 프로그램 분석에 걸리는 시간을 단축시켜주는 효과를 제공한다.Even if the binary analyst has little understanding of the structure of the binary, it is easy to find a starting point for analyzing the structure of the program. This has the effect of shortening the time required for program analysis.

도 1은 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다.
도 2는 본 발명의 일실시예에 따른 역공학 과정의 예를 도시한 도면이다.
도 3은 본 발명의 일실시예에 있어서, 프로그램의 모든 명령어 지점에 브레이크포인트를 설정하고 해당 지점에서의 pc 값을 순차적으로 나타낸 그래프의 예를 도시한 도면이다.
도 4는 본 발명의 일실시예에 있어서, 문서 작성 프로그램의 화면 예를 도시한 도면이다.
도 5는 본 발명의 일실시예에 있어서, 메모리 동적 할당자 함수의 에필로그 부분의 예를 도시한 도면이다.
도 6은 에필로그 부분에 대응하는 지점에서의 esi 레지스터 값들을 도시한 그래프의 예를 도시한 도면이다.
도 7은 본 발명의 일실시예에 있어서, 문서 작성 프로그램의 화면 예를 도시한 도면이다.
도 8은 본 발명의 일실시예에 있어서, 메모리 동적 할당자 함수의 에필로그 부분에 대응하는 지점에서의 esi 레지스터 값들을 도시한 그래프의 다른 예를 도시한 도면이다.
도 9는 본 발명의 일실시예에 있어서, 메모리 주소의 예를 도시한 도면이다.
도 10은 본 발명의 일실시예에 따른 역공학 방법의 예를 도시한 흐름도이다.
1 is a block diagram illustrating an example of a computing device in accordance with an embodiment of the present invention.
FIG. 2 is a diagram illustrating an example of a reverse engineering process according to an embodiment of the present invention.
3 is a diagram illustrating an example of a graph in which break points are set at all command points of a program and pc values at corresponding points are sequentially shown in an embodiment of the present invention.
4 is a diagram showing an example of a screen of a document creating program according to an embodiment of the present invention.
5 is a diagram illustrating an example of an epilogue portion of a memory dynamic allocator function in an embodiment of the present invention.
6 is a diagram showing an example of a graph showing esi register values at a point corresponding to the epilogue portion.
7 is a diagram showing an example of a screen of a document creating program according to an embodiment of the present invention.
8 is a diagram illustrating another example of a graph showing esi register values at a point corresponding to an epilogue portion of a memory dynamic allocator function, in an embodiment of the present invention.
9 is a diagram showing an example of a memory address in an embodiment of the present invention.
10 is a flowchart illustrating an example of a reverse engineering method according to an embodiment of the present invention.

이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.

본 발명의 실시예들에 따른 역공학 방법은 이후 설명될 컴퓨터 장치를 통해 구현될 수 있다. 이때, 컴퓨터 장치에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 컴퓨터 장치는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 실시예들에 따른 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터 장치와 결합되어 본 발명의 실시예들에 따른 방법을 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.The reverse engineering method according to embodiments of the present invention may be implemented through a computer apparatus to be described later. At this time, a computer program may be installed and operated in accordance with an embodiment of the present invention, and the computer device may perform a method according to embodiments of the present invention under the control of a computer program that is executed. The above-described computer program may be stored on a computer-readable recording medium in combination with a computer apparatus to cause a computer apparatus to execute a method according to embodiments of the present invention.

도 1은 본 발명의 일실시예에 따른 컴퓨터 장치의 예를 도시한 블록도이다. 이미 설명한 바와 같이, 본 발명의 실시예들에 따른 역공학 방법은 도 1을 통해 도시된 컴퓨터 장치(100)에 의해 실행될 수 있다.1 is a block diagram illustrating an example of a computing device in accordance with an embodiment of the present invention. As described above, the reverse engineering method according to embodiments of the present invention can be executed by the computer apparatus 100 shown in FIG.

이러한 컴퓨터 장치(100)는 도 1에 도시된 바와 같이, 메모리(110), 프로세서(120), 통신 인터페이스(130) 그리고 입출력 인터페이스(140)를 포함할 수 있다. 메모리(110)는 컴퓨터에서 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(110)와는 구분되는 별도의 영구 저장 장치로서 컴퓨터 장치(100)에 포함될 수도 있다. 또한, 메모리(110)에는 운영체제와 적어도 하나의 프로그램 코드가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(110)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 메모리(110)로 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 인터페이스(130)를 통해 메모리(110)에 로딩될 수도 있다. 예를 들어, 소프트웨어 구성요소들은 네트워크(160)를 통해 수신되는 파일들에 의해 설치되는 컴퓨터 프로그램에 기반하여 컴퓨터 장치(100)의 메모리(110)에 로딩될 수 있다.The computer device 100 may include a memory 110, a processor 120, a communication interface 130, and an input / output interface 140, as shown in FIG. The memory 110 may be a computer-readable recording medium and may include a permanent mass storage device such as a random access memory (RAM), a read only memory (ROM), and a disk drive. Herein, the non-decaying mass storage device such as the ROM and the disk drive may be included in the computer device 100 as a separate permanent storage device separate from the memory 110. [ The memory 110 may also store an operating system and at least one program code. These software components may be loaded into the memory 110 from a computer readable recording medium separate from the memory 110. [ Such a computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, and a memory card. In other embodiments, the software components may be loaded into the memory 110 via the communication interface 130 rather than from a computer-readable recording medium. For example, the software components may be loaded into the memory 110 of the computer device 100 based on the computer program installed by the files received via the network 160.

프로세서(120)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(110) 또는 통신 인터페이스(130)에 의해 프로세서(120)로 제공될 수 있다. 예를 들어 프로세서(120)는 메모리(110)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다.The processor 120 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and I / O operations. The instructions may be provided to the processor 120 by the memory 110 or communication interface 130. [ For example, the processor 120 may be configured to execute instructions received in accordance with the program code stored in a recording device, such as the memory 110. [

통신 인터페이스(130)은 네트워크(160)를 통해 컴퓨터 장치(100)가 다른 장치(일례로, 앞서 설명한 저장 장치들)와 서로 통신하기 위한 기능을 제공할 수 있다. 일례로, 컴퓨터 장치(100)의 프로세서(120)가 메모리(110)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이나 명령, 데이터, 파일 등이 통신 인터페이스(130)의 제어에 따라 네트워크(160)를 통해 다른 장치들로 전달될 수 있다. 역으로, 다른 장치로부터의 신호나 명령, 데이터, 파일 등이 네트워크(160)를 거쳐 컴퓨터 장치(100)의 통신 인터페이스(130)를 통해 컴퓨터 장치(100)로 수신될 수 있다. 통신 인터페이스(130)를 통해 수신된 신호나 명령, 데이터 등은 프로세서(120)나 메모리(110)로 전달될 수 있고, 파일 등은 컴퓨터 장치(100)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The communication interface 130 may provide functionality for the computer device 100 to communicate with another device (e.g., the storage devices discussed above) via the network 160. For example, a request, command, data, file, or the like, generated by the processor 120 of the computer device 100 according to the program code stored in the recording device such as the memory 110, 160 to other devices. Conversely, signals, commands, data, files, etc., from other devices may be received by the computer device 100 via the communications interface 130 of the computer device 100 via the network 160. Data or the like received through the communication interface 130 can be transferred to the processor 120 or the memory 110 and the files and the like can be transferred to a storage medium that can be further included in the computer apparatus 100 Permanent storage).

입출력 인터페이스(140)는 입출력 장치(150)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 마이크, 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(140)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(150)는 컴퓨터 장치(100)와 하나의 장치로 구성될 수도 있다.The input / output interface 140 may be a means for interfacing with the input / output device 150. For example, the input device may include a device such as a microphone, a keyboard or a mouse, and an output device may include a device such as a display, a speaker, and the like. As another example, the input / output interface 140 may be a means for interfacing with a device having integrated functions for input and output, such as a touch screen. The input / output device 150 may be composed of the computer device 100 and one device.

또한, 다른 실시예들에서 컴퓨터 장치(100)는 도 1의 구성요소들보다 더 적은 혹은 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 컴퓨터 장치(100)는 상술한 입출력 장치(150) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다.Also, in other embodiments, the computing device 100 may include fewer or more components than the components of FIG. However, there is no need to clearly illustrate most prior art components. For example, the computer device 100 may be implemented to include at least some of the input / output devices 150 described above, or may further include other components such as a transceiver, database, and the like.

통신 방식은 제한되지 않으며, 네트워크(160)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망)을 활용하는 통신 방식뿐만 아니라 블루투스(Bluetooth)나 NFC(Near Field Communication)와 같은 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크(160)는, PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(160)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited and may be applied to a communication method using a communication network (e.g., a mobile communication network, a wired Internet, a wireless Internet, a broadcasting network) May also be included. For example, the network 160 may be a personal area network (LAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN) , A network such as the Internet, and the like. In addition, the network 160 may include any one or more of a network topology including a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree or a hierarchical network, It is not limited.

본 발명의 실시예들에 따른 역공학 방법에서는 우선 실행하고자 하는 프로그램의 실행 당시의 컨텍스트 수집을 필요로 한다. 일례로, 소프트웨어 브레이크 포인트(break point)와 브레이크 포인트 핸들러를 이용한 방식이 활용될 수 있다.In the reverse engineering method according to the embodiments of the present invention, context collection at the time of execution of a program to be executed first is required. For example, a software breakpoint and a breakpoint handler approach can be utilized.

도 2는 본 발명의 일실시예에 따른 역공학 과정의 예를 도시한 도면이다. 도 2는 디버거(210), 이벤트 핸들러(220) 및 컨텍스트 데이터베이스(230)를 나타내고 있다.FIG. 2 is a diagram illustrating an example of a reverse engineering process according to an embodiment of the present invention. FIG. 2 shows a debugger 210, an event handler 220, and a context database 230.

일례로, 컴퓨터 장치(100)는 관찰하고자 하는 프로그램에 디버거(210)를 붙여 실행시킬 수 있다. 이때, 프로그램에서 관심있는 부분(또는 프로그램 전체)의 모든 인스트럭션에 브레이크 포인트를 설정해주면, 해당 부분에서 이벤트가 발생하게 되는데, 이때 컴퓨터 장치(100)는 미리 정의해 둔 이벤트 핸들러(220)를 통해 해당 시점에서의 실행 컨텍스트(execution context)를 컨텍스트 데이터베이스(230)에 저장할 수 있다. 추출되는 컨텍스트는 경우에 따라 다를 수 있기 때문에 정확한 DB 테이블의 형태는 중요하지 않으며, 테이블의 컬럼(column)에는 컨텍스트가 저장된 순서를 알 수 있는 인덱스 역할을 위한 값이 포함될 수 있다. 실행 컨텍스트란 프로그램이 실행되는 시점의 레지스터 값이나 메모리 상태를 의미할 수 있다. 프로그램이 같은 명령어를 실행하더라도 실행 컨텍스트가 다르면 그 결과는 달라지는데, 예를 들어 인텔 아키텍쳐에서 'mov eax, [ebx]' 라는 명령어를 실행할 때 ebx 레지스터가 어떤 값을 가지고 있느냐에 따라 메모리에서 값을 참조하는 위치가 달라지게 되어 프로그램, 혹은 프로그램을 실행하는 머신의 동작 방식이 달라질 수 있다.For example, the computer apparatus 100 can execute a program to be observed by attaching a debugger 210 thereto. At this time, when a break point is set to all the instructions of the part of interest (or the entire program) in the program, an event is generated in the corresponding part. At this time, the computer device 100, The execution context at the time of execution can be stored in the context database 230. The exact context of the DB table is not important because the context to be extracted may vary from case to case, and the column of the table may contain a value for the index role to know the order in which the context is stored. An execution context may mean a register value or a memory state at the time the program is executed. For example, when executing the command 'mov eax, [ebx]' in the Intel architecture, the value in memory depends on the value of the ebx register when the program executes the same command but the execution context is different. The operation of the program or the machine executing the program may be changed.

이렇게 구축되는 컨텍스트 데이터베이스(230)는 분석자의 상황에 따라 필요한 정보를 가공하여 적당한 시각화 도구를 통해 충분한 정보를 분석자에게 전달 가능하다.The context database 230 constructed in this way can process necessary information according to the situation of the analyst and transmit sufficient information to the analyst through a proper visualization tool.

도 3은 본 발명의 일실시예에 있어서, 프로그램의 모든 명령어 지점에 브레이크포인트를 설정하고 해당 지점에서의 pc 값을 순차적으로 나타낸 그래프의 예를 도시한 도면이다. 이때, 그래프의 x-축은 값이 증가할수록 나중에 실행된 명령어라는 의미를 갖는 pc(program count)에 대응할 수 있으며, y-축은 그 명령어가 메모리상에서 어떤 주소에 저장되어 있는지를 표현할 수 있다. 이러한 pc(program count) 값들을 추출하는 동안 타겟 프로그램은 점선박스(310)에 나타난 바와 같이 같은 종류의 행동을 5번 수행하였다. 도 3의 그래프를 살펴보았을 때, 프로그램 명령어 중 어느 부분이 그 종류의 행동을 수행한 코드인지는 굉장히 명확하게 드러난다. 이 그래프가 표현하고 있는 부분과 그 종류의 행동을 수행한 코드가 정확하게 일치한다고 단정짓기는 어렵지만, 저 코드의 실행 근방에 그 행동을 수행한 코드가 존재할 확률이 아주 높다고 생각하는 것은 자연스럽다. 도 3의 그래프는 비교적 작고 단순한 프로그램이므로, 보다 크고 널리 이용되는 프로그램을 대상으로 한 예시도 살펴볼 수 있다.3 is a diagram illustrating an example of a graph in which break points are set at all command points of a program and pc values at corresponding points are sequentially shown in an embodiment of the present invention. At this time, as the value increases, the x-axis of the graph can correspond to a pc (program count) which means a command executed later, and the y-axis can express to which address the command is stored in the memory. During the extraction of these pc (program count) values, the target program performed the same kind of behavior 5 times as shown in the dashed box 310. Looking at the graph of FIG. 3, it is very clear which part of the program command is the code that performed that type of action. It is difficult to say that the part of the graph that represents the graph exactly matches the code that performed the kind of behavior, but it is natural to think that the probability that the code that performed the behavior in the vicinity of that code is very likely to exist. Since the graph of FIG. 3 is a relatively small and simple program, an example of a larger and more widely used program can also be seen.

도 4는 본 발명의 일실시예에 있어서, 문서 작성 프로그램의 화면 예를 도시한 도면이다. 도 4는 임의의 컴퓨터 장치에서 널리 사용중인 문서 작성 프로그램을 이용하여 특정 문서파일을 실행(open)함에 따라 임의의 컴퓨터 장치의 디스플레이 장치에 표시된 화면의 일부(400)를 나타내고 있다. 만약, 분석자가 해당 문서 작성 프로그램을 이용하여 특정 문서파일을 열 때 일어나는 과정에 대해서 분석하고자 하는 경우를 가정할 수 있다. 이때, 임의의 컴퓨터 장치에서 특정 문서파일을 열 때, 임의의 컴퓨터 장치에서 메모리 동적 할당자가 어떠한 크기로 메모리를 동적으로 할당하는가에 대한 정보를 도 3의 방법과 유사한 방법을 통해 얻을 수 있게 된다.4 is a diagram showing an example of a screen of a document creating program according to an embodiment of the present invention. 4 shows a part 400 of a screen displayed on a display device of an arbitrary computer device as a specific document file is opened using a document creating program widely used in any computer device. It can be assumed that the analyst wishes to analyze the process that occurs when a specific document file is opened using the document creation program. At this time, when a specific document file is opened in a certain computer device, information on how much memory dynamic allocator dynamically allocates memory in any computer device can be obtained by a method similar to the method of FIG.

도 5는 본 발명의 일실시예에 있어서, 메모리 동적 할당자 함수의 에필로그 부분의 예를 도시한 도면이고, 도 6은 에필로그 부분에 대응하는 지점에서의 esi 레지스터 값들을 도시한 그래프의 예를 도시한 도면이다. 도 6의 그래프에서 x-축은 값이 증가할수록 나중에 실행된 명령어라는 의미를 갖고 있으며, y-축은 해당 명령어를 실행하는 시점에 esi 레지스터가 가지고 있는 값을 표현하고 있다. 도 6의 그래프는 특히 1000보다 작은 크기(ESI(Extended Source Pointer) 레지스터 값이 100 미만인 크기)의 메모리를 할당한 모습을 나타내고 있다. 여기서, esi 레지스터 값은 메모리 할당 함수가 할당한 메모리의 크기 값을 의미할 수 있다. 이 값은 사용자가 시스템에 요청한 메모리의 크기와는 다소 차이가 있을 수 있다. 이때, 도 6의 그래프에서는 아무런 특징점을 찾을 수 없다.Figure 5 is an illustration of an example epilogue portion of a memory dynamic allocator function in one embodiment of the present invention and Figure 6 is an example of a graph showing esi register values at a point corresponding to an epilogue portion. Fig. In the graph of FIG. 6, the x-axis means an instruction executed later as the value increases, and the y-axis expresses the value held by the esi register at the time of executing the instruction. The graph of FIG. 6 particularly shows the allocation of memory of a size smaller than 1000 (the size of an ESI (Extended Source Pointer) register value is less than 100). Here, the esi register value may mean the size value of the memory allocated by the memory allocation function. This value may be slightly different from the amount of memory the user requested for the system. At this time, no characteristic point can be found in the graph of FIG.

도 7은 본 발명의 일실시예에 있어서, 문서 작성 프로그램의 화면 예를 도시한 도면이고, 도 8은 본 발명의 일실시예에 있어서, 메모리 동적 할당자 함수의 에필로그 부분에 대응하는 지점에서의 esi 레지스터 값들을 도시한 그래프의 다른 예를 도시한 도면이다. 도 7에서는 도 4를 통해 설명한 것과 동일한 문서 작성 프로그램을 이용하여 임의의 컴퓨터 장치에서 특정 문서파일을 실행함에 따라 임의의 컴퓨터 장치의 디스플레이 장치에 표시된 화면의 일부(700)를 나타내고 있다. 도 4에서는 특정 문서파일이 단어 "CODEGATE"를 하나만 포함하고 있던 것에 비해 도 7에서는 특정 문서파일이 동일한 단어 "CODEGATE"가 다수 개 포함하고 있는 예를 나타내고 있다. 이때, 도 8의 그래프에서 점선박스(810)는 일정한 값을 연속적으로 표현하고 있다. 이 경우, 분석자는 도 7에 나타난 특정 문서 파일을 문서 작성 프로그램이 다룰 때, 어떤 크기의 메모리를 동적으로 사용하고 있는가에 대해 알 수 있고, 프로세스 전체 메모리에서 해당 크기를 갖고 있는 메모리 공간을 모두 검색함으로써 프로그램이 어떤 단위 혹은 구조체로 이 문서파일을 다루고 있는가에 대한 추가적인 이해를 얻을 수 있게 된다.FIG. 7 is a diagram showing an example of a screen of a document creating program according to an embodiment of the present invention, and FIG. 8 is a block diagram showing an example of the memory dynamic allocator function lt; RTI ID = 0.0 > esi < / RTI > register values. 7 shows a portion 700 of a screen displayed on a display device of an arbitrary computer apparatus as a specific document file is executed by an arbitrary computer apparatus using the same document creating program as described with reference to Fig. In FIG. 4, a specific document file contains only one word "CODEGATE" whereas FIG. 7 shows an example in which a specific document file contains a plurality of identical words "CODEGATE ". At this time, in the graph of FIG. 8, the dotted box 810 continuously expresses a certain value. In this case, when the document creating program deals with the specific document file shown in FIG. 7, the analyst can know what size of the memory is being used dynamically, and if the memory space having the corresponding size is searched This will give you an additional understanding of what unit or structure the program is handling this document file.

도 9는 본 발명의 일실시예에 있어서, 메모리 주소의 예를 도시한 도면이다. 도 9는 점선박스(910)는 문서에 적어 넣은 문자열이 실제 메모리 주소를 통해 확인될 수 있는 메모리 공간상에 그대로 존재하고 있음을 나타내고 있다.9 is a diagram showing an example of a memory address in an embodiment of the present invention. 9, the dotted box 910 indicates that the character string written in the document exists in the memory space that can be confirmed through the actual memory address.

도 10은 본 발명의 일실시예에 따른 역공학 방법의 예를 도시한 흐름도이다. 본 실시예에 따른 역공학 방법은 일례로 앞서 설명한 컴퓨터 장치(100)에 의해 수행될 수 있다. 예를 들어, 컴퓨터 장치(100)의 프로세서(120)는 메모리(110)가 포함하는 운영체제의 코드나 적어도 하나의 컴퓨터 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(120)는 컴퓨터 장치(100)에 저장된 코드가 제공하는 제어 명령에 따라 컴퓨터 장치(100)가 도 10의 방법이 포함하는 단계들(1010 내지 1040)을 수행하도록 컴퓨터 장치(100)를 제어할 수 있다. 여기서 상술한 적어도 하나의 컴퓨터 프로그램은 역공학 방법을 위해 컴퓨터 장치(100)에 설치(install)된 프로그램일 수 있으며, 이후 설명되는 분석 대상 프로그램과는 별도의 프로그램일 수 있다.10 is a flowchart illustrating an example of a reverse engineering method according to an embodiment of the present invention. The reverse engineering method according to the present embodiment can be performed, for example, by the computer apparatus 100 described above. For example, the processor 120 of the computer device 100 may be implemented to execute control instructions in accordance with the code of the operating system or the code of at least one computer program that the memory 110 contains. Here, the processor 120 may cause the computer device 100 to perform steps 1010 through 1040, including the method of Figure 10, in accordance with a control command provided by a code stored in the computer device 100. [ Can be controlled. The at least one computer program described above may be a program installed in the computer device 100 for the reverse engineering method and may be a program separate from the analysis target program described later.

단계(1010)에서 컴퓨터 장치(100)는 분석 대상 프로그램을 디버거를 통해 실행할 수 있다. 디버거는 일례로, 에러를 포함하고 있는 프로그램에 관하여 그 에러의 원인을 색출하기 위하여 보조적으로 이용되는 프로그램으로, 프로그램을 추적하거나 특정 변수 간의 관계식을 프로그램의 구절마다 조사하여 가급적 빠른 시점에 프로그램의 이상 동적을 검출하는데 사용되는 프로그램일 수 있다. 컴퓨터 장치(100)는 이러한 디버거 프로그램을 이용하여 분석 대상 프로그램을 실행시킬 수 있다.In step 1010, the computer device 100 may execute the analysis target program through a debugger. A debugger is, for example, a program that is used as an auxiliary to search for the cause of an error with respect to a program including an error. It traces a program or investigates a relational expression between specific variables for each phrase of a program. And may be a program used for detecting dynamic. The computer device 100 can execute the analysis target program using such a debugger program.

단계(1020)에서 컴퓨터 장치(100)는 디버거를 이용하여 분석 대상 프로그램의 관심 영역에 포함된 인스트럭션에 브레이크 포인트를 설정할 수 있다. 브레이크 포인트는 소프트웨어 개발에서 프로그램을 의도적으로 잠시 또는 아예 멈추게 하는 위치를 가리키며 디버깅을 목적으로 활용될 수 있다. 브레이크 포인트는 이미 실행중인 프로그램에 대한 정보를 알아내기 위한 수단으로 사용되며, 이를 이용하여 프로그램 실행이 중단되어 있는 상황에서 분석자가 각종 테스트 환경 (일반 목적의 레지스터, 메모리, 로그, 파일 등)을 점검하여 프로그램이 예측한대로 기능하고 있는지, 그렇지 않을 경우 문제점이 무엇인지 등을 파악할 수 있다. 실시예에 따라 브레이크 포인트는 원하는 순간에 프로그램 실행을 중단하기 위한 조건을 포함할 수도 있다.In step 1020, the computer device 100 may use the debugger to set a breakpoint on the instructions contained in the region of interest of the analysis target program. Breakpoints are places where software development is intended to temporarily or temporarily stop a program and can be used for debugging purposes. A breakpoint is used as a means to find out information about a program that is already running. In this situation, the analyzer checks various test environments (general purpose registers, memory, logs, files, etc.) So that the program can function as expected, and if not, what is the problem. Depending on the embodiment, the breakpoint may include a condition for aborting program execution at a desired instant.

단계(1030)에서 컴퓨터 장치(100)는 브레이크 포인트가 설정된 인스트럭션에서 발생하는 이벤트에 대해 이벤트 핸들러를 통해 해당 시점에서의 실행 컨텍스트(execution context)를 컨텍스트 데이터베이스에 저장할 수 있다. 이미 설명한 바와 같이, 추출되는 컨텍스트는 경우에 따라 다를 수 있기 때문에 정확한 DB 테이블의 형태는 중요하지 않지만, 컨텍스트 데이터베이스에 저장되는 테이블의 컬럼(column)에는 실행 컨텍스트가 저장된 순서를 나타내는 인덱스 값이 포함될 수 있다. 한편, 실행 컨텍스트는 상기 실행 컨텍스트에 대응하는 시점에서의 상기 분석 대상 프로그램에 대한 레지스터 값 및/또는 메모리 상태를 포함할 수 있다. 일례로, 앞에서 PC 값 및/또는 ESI 레지스터 값을 활용하는 예시들을 설명한 바 있다.In step 1030, the computer device 100 may store an execution context at a corresponding point in the context database through an event handler for an event occurring in an instruction for which a breakpoint is set. As described above, since the extracted context may differ depending on the case, the exact DB table type is not important, but a column of the table stored in the context database may include an index value indicating the order in which the execution context is stored have. On the other hand, the execution context may include a register value and / or a memory state for the analysis target program at a time corresponding to the execution context. As an example, we have previously described examples utilizing a PC value and / or an ESI register value.

단계(1040)에서 컴퓨터 장치(100)는 컨텍스트 데이터베이스에 저장된 데이터를 처리하여 분석 대상 프로그램에 대한 정보 분석 결과를 생성할 수 있다. 이때, 컴퓨터 장치(100)는 정보 분석 결과를 생성하기 위해, 빅데이터 기술 등을 활용하여 컨텍스트 데이터베이스에 저장된 데이터를 가공할 수 있으며, 시각화 도구를 활용하여 가공된 데이터에 대한 정보 분석 결과를 분석자에게 리포트할 수 있다. 리포트되는 정보 분석 결과의 예시는 도 4, 도 6 및 도 8을 통해 설명한 바 있다.In step 1040, the computer device 100 may process the data stored in the context database to generate an information analysis result for the analysis target program. At this time, the computer device 100 can process the data stored in the context database using the big data technology or the like to generate the information analysis result, and the information analysis result on the processed data using the visualization tool can be provided to the analyzer You can report. An example of the information analysis result to be reported has been described with reference to FIG. 4, FIG. 6, and FIG.

이처럼 본 발명의 실시예들에 따르면, 바이너리의 분석자가 바이너리의 구조에 대한 이해가 아주 적은 경우에도 프로그램의 구조 분석을 하기 위한 시작점을 찾는 것을 용이하게 함으로써 프로그램 분석에 걸리는 시간을 줄일 수 있다.According to the embodiments of the present invention, it is possible to reduce the time required for analyzing a program by making it easy to find a starting point for analyzing the structure of a program even when the binary analyzer has a small understanding of the structure of the binary.

이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The system or apparatus described above may be implemented as a hardware component, or a combination of hardware components and software components. For example, the apparatus and components described in the embodiments may be implemented within a computer system, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA) , A programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For ease of understanding, the processing apparatus may be described as being used singly, but those skilled in the art will recognize that the processing apparatus may have a plurality of processing elements and / As shown in FIG. For example, the processing unit may comprise a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as a parallel processor.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the foregoing, and may be configured to configure the processing device to operate as desired or to process it collectively or collectively Device can be commanded. The software and / or data may be in the form of any type of machine, component, physical device, virtual equipment, computer storage media, or device As shown in FIG. The software may be distributed over a networked computer system and stored or executed in a distributed manner. The software and data may be stored on one or more computer readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 애플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to an embodiment may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The medium may be one that continues to store computer executable programs, or temporarily store them for execution or download. In addition, the medium may be a variety of recording means or storage means in the form of a combination of a single hardware or a plurality of hardware, but is not limited to a medium directly connected to a computer system, but may be dispersed on a network. Examples of the medium include a magnetic medium such as a hard disk, a floppy disk and a magnetic tape, an optical recording medium such as CD-ROM and DVD, a magneto-optical medium such as a floptical disk, And program instructions including ROM, RAM, flash memory, and the like. As another example of the medium, a recording medium or a storage medium managed by a site or a server that supplies or distributes an application store or various other software to distribute the application may be mentioned. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. For example, it is to be understood that the techniques described may be performed in a different order than the described methods, and / or that components of the described systems, structures, devices, circuits, Lt; / RTI > or equivalents, even if it is replaced or replaced.

그러므로, 다른 구현들, 다른 실시예들 및 청구범위와 균등한 것들도 후술하는 청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

Claims (10)

적어도 하나의 프로세서를 포함하는 컴퓨터 장치가 수행하는 역공학 방법에 있어서,
상기 적어도 하나의 프로세서에 의해, 분석 대상 프로그램을 디버거를 통해 실행하는 단계;
상기 적어도 하나의 프로세서에 의해, 상기 디버거를 이용하여 상기 분석 대상 프로그램의 관심 영역에 포함된 인스트럭션들 각각에 브레이크 포인트를 설정하는 단계;
상기 적어도 하나의 프로세서에 의해, 상기 브레이크 포인트가 설정된 인스트럭션에서 발생하는 이벤트에 대해 이벤트 핸들러를 통해 해당 시점에서의 실행 컨텍스트(execution context)를 컨텍스트 데이터베이스에 저장하는 단계; 및
상기 적어도 하나의 프로세서에 의해, 상기 컨텍스트 데이터베이스에 저장된 데이터를 처리하여 상기 분석 대상 프로그램에 대한 정보 분석 결과를 생성하는 단계
를 포함하고,
상기 실행 컨텍스트는 상기 실행 컨텍스트에 대응하는 시점에서의 상기 분석 대상 프로그램에 대한 레지스터 값 및 메모리 상태 중 적어도 하나를 포함하고,
상기 정보 분석 결과를 생성하는 단계는,
상기 컨텍스트 데이터베이스에 저장된 데이터를 가공하여 시간의 흐름에 따른 레지스터 값의 시퀀스 및 시간의 흐름에 따른 메모리 상태의 시퀀스 중 적어도 하나를 포함하는 정보 분석 결과를 생성하는 것을 특징으로 하는 역공학 방법.
A method for reverse engineering performed by a computing device comprising at least one processor,
Executing, by the at least one processor, a program to be analyzed through a debugger;
Setting a breakpoint in each of the instructions included in the region of interest of the analysis target program by the at least one processor using the debugger;
Storing, by the at least one processor, an execution context at a corresponding point in the context database through an event handler for an event occurring in an instruction for which the breakpoint is set; And
Processing the data stored in the context database by the at least one processor to generate an analysis result of the analysis target program
Lt; / RTI >
Wherein the execution context includes at least one of a register value and a memory state for the analysis target program at a time corresponding to the execution context,
The step of generating the information analysis result includes:
Processing the data stored in the context database to generate an information analysis result including at least one of a sequence of register values according to a time and a sequence of a memory state according to time.
제1항에 있어서,
상기 정보 분석 결과를 생성하는 단계는,
시각화 도구를 활용하여 상기 정보 분석 결과를 리포트하는 단계
를 포함하는 것을 특징으로 하는 역공학 방법.
The method according to claim 1,
The step of generating the information analysis result includes:
A step of reporting the information analysis result using a visualization tool
And a reverse engineering method.
제1항에 있어서,
상기 컨텍스트 데이터베이스에 저장되는 테이블의 컬럼(column)에 상기 실행 컨텍스트가 저장된 순서를 나타내는 인덱스 값이 포함되는 것을 특징으로 하는 역공학 방법.
The method according to claim 1,
Wherein an index value indicating an order in which the execution context is stored is included in a column of a table stored in the context database.
삭제delete 컴퓨터 장치와 결합되어 제1항 내지 제3항 중 어느 한 항의 방법을 컴퓨터 장치에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램.A computer program stored on a computer-readable medium for causing a computer device to execute the method of any one of claims 1 to 3 in combination with the computer device. 제1항 내지 제3항 중 어느 한 항의 방법을 컴퓨터 장치에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 컴퓨터 판독 가능한 기록매체.A computer program for causing a computer apparatus to execute the method according to any one of claims 1 to 3. 컴퓨터 장치에 있어서,
상기 컴퓨터 장치에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서
를 포함하고,
상기 적어도 하나의 프로세서에 의해,
분석 대상 프로그램을 디버거를 통해 실행하고,
상기 디버거를 이용하여 상기 분석 대상 프로그램의 관심 영역에 포함된 인스트럭션들 각각에 브레이크 포인트를 설정하고,
상기 브레이크 포인트가 설정된 인스트럭션에서 발생하는 이벤트에 대해 이벤트 핸들러를 통해 해당 시점에서의 실행 컨텍스트(execution context)를 컨텍스트 데이터베이스에 저장하고,
상기 컨텍스트 데이터베이스에 저장된 데이터를 처리하여 상기 분석 대상 프로그램에 대한 정보 분석 결과를 생성하고,
상기 실행 컨텍스트는 상기 실행 컨텍스트에 대응하는 시점에서의 상기 분석 대상 프로그램에 대한 레지스터 값 및 메모리 상태 중 적어도 하나를 포함하고,
상기 적어도 하나의 프로세서에 의해 상기 정보 분석 결과를 생성하기 위해, 상기 컨텍스트 데이터베이스에 저장된 데이터를 가공하여 시간의 흐름에 따른 레지스터 값의 시퀀스 및 시간의 흐름에 따른 메모리 상태의 시퀀스 중 적어도 하나를 포함하는 정보 분석 결과를 생성하는 것
을 특징으로 하는 컴퓨터 장치.
A computer device comprising:
At least one processor configured to execute instructions readable by the computer device
Lt; / RTI >
By said at least one processor,
The program to be analyzed is executed through the debugger,
Setting a breakpoint in each of the instructions included in the region of interest of the analysis target program using the debugger,
Storing an execution context at a corresponding point in the context database through an event handler for an event occurring in the instruction for which the breakpoint is set,
Processing the data stored in the context database to generate information analysis results for the analysis target program,
Wherein the execution context includes at least one of a register value and a memory state for the analysis target program at a time corresponding to the execution context,
Processing the data stored in the context database to generate the information analysis result by the at least one processor, wherein the at least one processor comprises at least one of a sequence of register values over time and a sequence of memory states over time, Generating information analysis results
The computer device comprising:
제7항에 있어서,
상기 적어도 하나의 프로세서에 의해,
시각화 도구를 활용하여 상기 정보 분석 결과를 리포트하는 것
을 특징으로 하는 컴퓨터 장치.
8. The method of claim 7,
By said at least one processor,
To report the above information analysis result using a visualization tool
The computer device comprising:
제7항에 있어서,
상기 컨텍스트 데이터베이스에 저장되는 테이블의 컬럼(column)에 상기 실행 컨텍스트가 저장된 순서를 나타내는 인덱스 값이 포함되는 것을 특징으로 하는 컴퓨터 장치.
8. The method of claim 7,
Wherein an index value indicating an order in which the execution context is stored is included in a column of a table stored in the context database.
삭제delete
KR1020180147027A 2018-11-26 2018-11-26 Method and system for reverse engineering using big data based on dynamic context KR101995176B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020180147027A KR101995176B1 (en) 2018-11-26 2018-11-26 Method and system for reverse engineering using big data based on dynamic context
PCT/KR2019/012480 WO2020111482A1 (en) 2018-11-26 2019-09-26 Reverse engineering method and system utilizing big data based on program execution context

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180147027A KR101995176B1 (en) 2018-11-26 2018-11-26 Method and system for reverse engineering using big data based on dynamic context

Publications (1)

Publication Number Publication Date
KR101995176B1 true KR101995176B1 (en) 2019-07-01

Family

ID=67255220

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180147027A KR101995176B1 (en) 2018-11-26 2018-11-26 Method and system for reverse engineering using big data based on dynamic context

Country Status (2)

Country Link
KR (1) KR101995176B1 (en)
WO (1) WO2020111482A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210039654A (en) * 2019-10-02 2021-04-12 (주)디지탈쉽 Data processing for detecting outlier method and device thereof
KR20230067214A (en) 2021-11-09 2023-05-16 한국전자통신연구원 Apparatus for analyzing non-informative firmware and method using the same

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040076915A (en) * 2003-02-27 2004-09-04 엘지전자 주식회사 Real-time debugging method of digital signal processor
KR20100073180A (en) * 2008-12-22 2010-07-01 한국전자통신연구원 Visual debugging apparatus and method thereof
US20130326547A1 (en) * 2011-04-14 2013-12-05 Huawei Technologies Co., Ltd. Breakpoint information management method and breakpoint information manager

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7162664B2 (en) * 2003-06-20 2007-01-09 Microsoft Corporation Debugging breakpoints on pluggable components
US7222264B2 (en) * 2004-03-19 2007-05-22 Intel Corporation Debug system and method having simultaneous breakpoint setting

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040076915A (en) * 2003-02-27 2004-09-04 엘지전자 주식회사 Real-time debugging method of digital signal processor
KR20100073180A (en) * 2008-12-22 2010-07-01 한국전자통신연구원 Visual debugging apparatus and method thereof
US20130326547A1 (en) * 2011-04-14 2013-12-05 Huawei Technologies Co., Ltd. Breakpoint information management method and breakpoint information manager

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210039654A (en) * 2019-10-02 2021-04-12 (주)디지탈쉽 Data processing for detecting outlier method and device thereof
KR102262279B1 (en) 2019-10-02 2021-06-08 (주)디지탈쉽 Data processing for detecting outlier method and device thereof
KR20230067214A (en) 2021-11-09 2023-05-16 한국전자통신연구원 Apparatus for analyzing non-informative firmware and method using the same

Also Published As

Publication number Publication date
WO2020111482A1 (en) 2020-06-04

Similar Documents

Publication Publication Date Title
US8726255B2 (en) Recompiling with generic to specific replacement
US8850581B2 (en) Identification of malware detection signature candidate code
KR101740604B1 (en) Generic unpacking of applications for malware detection
US9256409B2 (en) Building reusable function summaries for frequently visited methods to optimize data-flow analysis
US8671397B2 (en) Selective data flow analysis of bounded regions of computer software applications
JP2019502197A (en) System and method for detection of malicious code in runtime generated code
EP3147783A1 (en) Automatic determination of compiler configuration
EP3270292A1 (en) Automation of software verification
KR101995176B1 (en) Method and system for reverse engineering using big data based on dynamic context
US11868465B2 (en) Binary image stack cookie protection
EP3147781A1 (en) Wrapper calls identification
US8769498B2 (en) Warning of register and storage area assignment errors
CN110727476A (en) Method, device, equipment and storage medium for generating authorization configuration file
Lawall et al. WYSIWIB: exploiting fine‐grained program structure in a scriptable API‐usage protocol‐finding process
US9064042B2 (en) Instrumenting computer program code by merging template and target code methods
EP3506136B1 (en) Detecting stack cookie utilization in a binary software component using binary static analysis
KR102323621B1 (en) Apparatus and method for fuzzing firmware
US20190102279A1 (en) Generating an instrumented software package and executing an instance thereof
WO2022180702A1 (en) Analysis function addition device, analysis function addition program, and analysis function addition method
US11593249B2 (en) Scalable points-to analysis via multiple slicing
CN114691197A (en) Code analysis method and device, electronic equipment and storage medium
US10698802B1 (en) Method and system for generating a validation test
Hu et al. PEDAL: a dynamic analysis tool for efficient concurrency bug reproduction in big data environment
US20230079426A1 (en) Randomized compiler optimization selection for improved computer security
JP7355211B2 (en) Signature generation device, signature generation method, and signature generation program

Legal Events

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