KR20090129609A - Apparatus and method for checking virus program by distinguishing compiler - Google Patents

Apparatus and method for checking virus program by distinguishing compiler Download PDF

Info

Publication number
KR20090129609A
KR20090129609A KR1020080055619A KR20080055619A KR20090129609A KR 20090129609 A KR20090129609 A KR 20090129609A KR 1020080055619 A KR1020080055619 A KR 1020080055619A KR 20080055619 A KR20080055619 A KR 20080055619A KR 20090129609 A KR20090129609 A KR 20090129609A
Authority
KR
South Korea
Prior art keywords
compiler
file
value
code
classification
Prior art date
Application number
KR1020080055619A
Other languages
Korean (ko)
Other versions
KR100968267B1 (en
Inventor
고흥환
Original Assignee
주식회사 안철수연구소
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 안철수연구소 filed Critical 주식회사 안철수연구소
Priority to KR1020080055619A priority Critical patent/KR100968267B1/en
Publication of KR20090129609A publication Critical patent/KR20090129609A/en
Application granted granted Critical
Publication of KR100968267B1 publication Critical patent/KR100968267B1/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/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements

Abstract

PURPOSE: A malicious code diagnostic device using diagnosis data classified into each compiler and a method thereof are provided to efficiency reduce a malicious code diagnostic time by remarkably reducing a comparison frequency of the diagnostic data. CONSTITUTION: A PE(Portable Executable) file collector(300) collects a PE files, which are a target for checking a malicious code in a computer. A compiler classifier(302) classifies compilers by analyzing the compiler generating each collected PE file. A diagnostic unit(304) diagnoses the malicious code from the collected PE files by using diagnostic data set to each classified compiler.

Description

컴파일러 구분에 의한 악성코드 진단장치 및 방법{APPARATUS AND METHOD FOR CHECKING VIRUS PROGRAM BY DISTINGUISHING COMPILER}Apparatus and method for diagnosing malware by compiler classification {APPARATUS AND METHOD FOR CHECKING VIRUS PROGRAM BY DISTINGUISHING COMPILER}

본 발명은 컴퓨터상 실행되는 실행파일에 대한 악성코드 진단방법에 관한 것으로, 특히 컴퓨터상 실행되는 실행파일의 PE(Portable Executable) 파일을 컴파일러(compiler)별로 구분하고 컴파일러별로 수립된 진단 데이터를 이용하여 악성코드 검사를 보다 신속하게 수행할 수 있도록 하는 PE 컴파일러 구분에 의한 악성코드 진단장치 및 방법에 관한 것이다.The present invention relates to a method for diagnosing malicious code for an executable file executed on a computer. In particular, a PE (Portable Executable) file of an executable file executed on a computer is classified for each compiler and using diagnostic data established for each compiler. The present invention relates to an apparatus and method for diagnosing malicious codes by distinguishing PE compilers that enable faster malware inspection.

통상적으로, Windows OS에서 실행되는 실행파일은 독립적으로 메모리에 로드되고, CPU가 실행 가능한 형태의 PE(Portable Executable) 파일 형식으로 정의된다. 이러한 실행 가능 파일은 프로그램 언어(C, C++, Pascal, Java, Basic 등)를 이용하여 구현되며, 프로그램 언어를 통해 구현된 파일은 다시 Visual C++, 비쥬얼 베이직(Visual Basic), 델파이(Delphi), C++, 빌더(Builder) 등의 컴파일러를 통해 PE 파일형식의 바이너리 데이터(binary data)로 생산된다.Typically, executables that run on a Windows OS are independently loaded into memory and are defined in the form of a Portable Executable (PE) file in the form of CPU execution. These executable files are implemented using a programming language (C, C ++, Pascal, Java, Basic, etc.), and the files implemented through the programming language are again Visual C ++, Visual Basic, Delphi, C ++. It is produced as binary data in PE file format through compilers such as Builder and Builder.

한편, Windows 기반의 악성코드는 프로그램 되어진 PE 파일로 이루어져 있으 며, 안티바이러스(anti-virus) 업체에서는 PE 파일을 다른 MZ(DOS OS 실행파일)파일이나 NE(Unix OS 실행파일) 등과 구분하여 그 형식에 맞는 진단 알고리즘과 데이터를 추출하여 악성코드와 정상코드를 진단하고 있다.On the other hand, Windows-based malware consists of programmed PE files, and anti-virus companies distinguish PE files from other MZ (DOS OS executable) files or NE (Unix OS executable) files. Malware and normal code are diagnosed by extracting diagnosis algorithm and data according to format.

즉, 종래 일반적인 악성코드 진단 알고리즘에서는 PE 파일 전체에 대한 해쉬(hash)를 통해 PE 헤더(header)의 특징과 실행시작위치의 코드, PE 파일의 마지막 섹션 또는 섹션의 특성, PE 파일의 크기와 경로, 이름, MD5 등의 진단 데이터를 추출하여 악성코드 여부를 진단한다.That is, in the conventional general malware diagnosis algorithm, the characteristics of the PE header and the code of execution start position, the characteristics of the last section or section of the PE file, and the size and path of the PE file are provided through a hash of the entire PE file. Diagnose malicious code by extracting diagnostic data such as name, MD5, etc.

그러나, 위와 같은 종래 PE 파일을 이용한 악성코드 검사에서는 도 1에서 보여지는 바와 같이, 예를 들어 검사해야할 10000개의 진단 데이터가 존재하는 경우에는 각각의 PE 파일에 대해 10000개의 진단 데이터와 일일이 비교를 수행해야 함에 따라 악성코드 진단을 위한 검사시간이 너무 많이 소요되어 효율적이지 못한 문제점이 있었다.However, in the conventional malware inspection using the above-described PE file, as shown in FIG. 1, for example, if there are 10000 diagnostic data to be checked, 10000 diagnostic data are compared with each PE file. As a result, the scan time for diagnosing the malicious code takes too much time and was not efficient.

상술한 본 발명은 컴파일러 구분에 의한 악성코드 진단장치로서, 컴퓨터상 악성코드 여부 검사대상이 되는 실행파일들의 PE파일을 수집하는 PE 파일 수집부와, 상기 PE 파일 수집부에서 수집된 PE 파일에 대해 각 PE 파일을 생성한 컴파일러를 분석하여 컴파일러별로 분류하는 컴파일러 분류부와, 상기 컴파일러 분류부로부터 분류된 PE 파일에 대해 각 컴파일러별로 수립된 진단 데이터를 이용하여 악성코드 여부를 검사하는 진단부와, 상기 PE 파일에 대한 컴파일러별 악성코드 검사를 위해 컴파일러별 진단 데이터를 저장하고 있는 진단 데이터 DB를 포함하며, 상기 진단부는, 상기 컴파일러별 분류된 각 PE 파일에 대해 엔트리 포인트값과, 프로젝트 정보값, 사용자 함수값을 추출하여 악성코드의 판단을 위해 컴파일러별로 미리 저장된 각각의 진단 데이터와 비교하고 일치하는 경우 악성코드를 판단하는 것을 특징으로 한다.The present invention described above is a device for diagnosing malware by compiler classification, and includes a PE file collecting unit for collecting PE files of executable files to be scanned for malicious code on a computer, and a PE file collected by the PE file collecting unit. A compiler classification unit that analyzes the compiler generating each PE file and classifies the compiler into compilers, a diagnosis unit that checks whether malicious code is detected by using diagnostic data established for each compiler, for the PE files classified from the compiler classification unit; Comprising a diagnostic data DB for storing the diagnostic data for each compiler for compiler-specific malware inspection for the PE file, the diagnostic unit, for each PE file classified by the compiler, the entry point value, project information value, Each diagnostic data stored in advance for each compiler for extracting user function value and determining malicious code Compare with and match the malicious code characterized in that judging.

또한, 본 발명은 컴파일러 구분에 의해 악성코드를 진단하는 방법으로서, 컴퓨터상 활성화된 실행파일의 PE 파일을 악성코드 여부 검사를 위해 수집하는 단계와, 상기 수집된 검사대상 PE 파일에 대해 각 PE 파일을 생성한 컴파일러를 분석하여 컴파일러별로 분류하는 단계와, 상기 컴파일러별로 분류된 PE 파일에 대해 각 컴파일러별로 수립된 진단 데이터를 이용하여 악성코드 여부를 진단하는 단계를 포함하며, 상기 진단 단계는 상기 컴파일러별 분류된 각 PE 파일에 대해 엔트리 포인트값과, 프로젝트 정보값, 사용자 함수값을 추출하는 단계와, 상기 추출된 각 값에 대해 컴파일러별로 미리 저장된 제1, 제2, 제3 진단데이터와 각각 비교하는 단계와, 상기 추출된 각 값이 각각의 진단 데이터와 일치하는 경우 악성코드로 진단하는 단계를 포함하는 것을 특징으로 한다.In addition, the present invention is a method for diagnosing malware by compiler classification, the step of collecting the PE file of the executable file activated on the computer for the malicious code check, and each PE file for the collected PE files Classifying each compiler by analyzing the generated compiler, and diagnosing the presence of malicious codes using diagnostic data established for each compiler for the PE files classified by the compiler. Extracting an entry point value, a project information value, and a user function value for each classified PE file, and comparing the extracted values with the first, second, and third diagnostic data previously stored for each compiler; And diagnosing with a malicious code when each of the extracted values matches the respective diagnostic data. And a gong.

본 발명에서는 컴퓨터상 실행되는 실행 파일들에 대한 악성코드 진단에 있어서, PE 파일을 컴파일러별로 분류한 후, 컴파일러별 수립된 진단 데이터를 이용하여 악성코드 진단을 수행함으로써, 진단 데이터와의 비교횟수를 현저히 줄일 수 있어 악성코드 진단을 시간을 보다 효율적으로 단축시킬 수 있는 이점이 있다. In the present invention, in the malware diagnosis of the executable files running on the computer, after classifying the PE file by compiler, by performing the malware diagnosis using the diagnostic data established for each compiler, the number of comparison with the diagnostic data Significantly reduced, there is an advantage that can shorten the time for more efficient malware diagnosis.

또한, 최근의 악성코드 특성상 동일한 프로젝트(project)와 소스(source)를 이용하여 변수 또는 문자열 변경에 의한 제작이 늘고 있는 것을 감안하여 사용자 함수값에 대한 진단 데이터 비교 시 다양한 사용자 함수값을 선택하면서 재차 진단을 수행함으로써, 동일한 컴파일러를 통해 생성된 동일한 프로젝트에 대한 변형 악 성코드도 찾을 수 있어 악성코드 진단 신뢰성을 높일 수 있는 이점이 있다.In addition, considering the recent increase in production by changing variables or strings using the same project and source due to the characteristics of malicious codes, it is necessary to select various user function values again when comparing diagnostic data with respect to user function values. By performing the diagnosis, the modified malicious code for the same project generated by the same compiler can be found, thereby increasing the reliability of the malware diagnosis.

따라서, 본 발명에서는 컴퓨터상 실행되는 실행파일의 PE 파일을 컴파일러별로 구분하고 컴파일러별로 수립된 진단 데이터를 이용하여 악성코드 검사를 보다 신속하게 수행할 수 있도록 하는 PE 컴파일러 구분에 의한 악성코드 진단장치 및 방법을 제공하고자 한다.Therefore, in the present invention, a malware diagnosis apparatus according to the PE compiler classification to divide the PE file of the executable file running on the computer by compiler and to perform the malicious code inspection more quickly using the diagnostic data established for each compiler and To provide a method.

이하, 첨부된 도면을 참조하여 본 발명의 동작 원리를 상세히 설명한다. 하기에서 본 발명을 설명함에 있어서 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 그리고 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다. Hereinafter, with reference to the accompanying drawings will be described in detail the operating principle of the present invention. In the following description of the present invention, when it is determined that a detailed description of a known function or configuration may unnecessarily obscure the subject matter of the present invention, the detailed description thereof will be omitted. Terms to be described later are terms defined in consideration of functions in the present invention, and may be changed according to intentions or customs of users or operators. Therefore, the definition should be made based on the contents throughout the specification.

도 2는 본 발명의 실시 예에 따른 PE 컴파일러 구분에 의한 악성코드 진단 개념을 도시한 것으로, 위 도 2에서 보여지는 바와 같이, 다양한 컴파일러들로 생성된 PE 파일에 대해 각각의 컴파일러에 의한 진단 데이터로 세분화하여 그룹 지운 후, 컴파일러별로 악성코드를 검사하는 경우, 위 도 1에서와 같이 단일한 PE 기반의 진단 데이터들로 검사하는 경우 보다 진단 데이터 비교횟수가 몇 배로 줄어들게 되어 파일에 대한 악성코드 검사시간을 현저하게 줄일 수 있게 된다.FIG. 2 is a diagram illustrating a concept of diagnosing malware based on the classification of a PE compiler according to an embodiment of the present invention. As shown in FIG. 2, diagnostic data of each compiler is generated for a PE file generated by various compilers. After subdividing into groups and checking malicious code by compiler, the number of diagnostic data comparisons is reduced several times than that of single PE-based diagnostic data as shown in FIG. The time can be significantly reduced.

즉, 도 2에서 같이, PE 파일이 컴파일러별로 구분하는 경우 컴파일러별 진단 데이터가 2500개로 가정한다면, PE 파일을 세분화시킨 컴파일러에 의한 진단 데이터 비교횟수가 2500번이 되는 것으로, 이는 종래 위 도 1에서 각 PE 파일당 소요되는 10000번의 비교횟수에 비해 4배 정도로 검사시간이 줄어들게 됨을 의미한다. 이때 위 도 2의 예시에서는 컴파일러로 주로 사용되는 Visual C++, Visual Basic, C++, Builder, Delphi 등에 대해서 예를 들었으며, 모두 동일한 크기의 진단 데이터를 가지는 것을 가정하였다.That is, as shown in FIG. 2, when the PE file is divided by compiler, assuming that the diagnostic data for each compiler is 2500, the number of comparisons of the diagnostic data by the compiler that divided the PE file is 2500 times. This means that the inspection time is reduced by 4 times compared to 10000 comparisons per PE file. In the example of FIG. 2, examples of Visual C ++, Visual Basic, C ++, Builder, Delphi, etc., which are mainly used as compilers, are assumed, and it is assumed that all have the same size of diagnostic data.

도 3은 본 발명의 실시 예에 따른 PE 컴파일러 구분에 의한 악성코드 진단 장치의 모듈 구성을 도시한 것이다. 위 악성코드 진단장치는 안티바이러스 업체에 의해 개발되어 컴퓨터상 설치되는 백신 프로그램을 기능적으로 모듈(module)화하여 도시한 것이다.3 illustrates a module configuration of an apparatus for diagnosing malware by PE compiler classification according to an embodiment of the present invention. The above malware diagnosis device is a functional module of the antivirus program developed by an antivirus company and installed on a computer.

이하, 위 도 3을 참조하여 본 발명의 악성코드 진단장치 각 모듈에서의 동작을 상세히 설명하기로 한다.Hereinafter, the operation of each module of the malware diagnosis apparatus of the present invention will be described in detail with reference to FIG. 3.

먼저, PE 파일 수집부(300)는 컴퓨터상 활성화되어 실행되는 EXE, DLL 등의 실행파일에서 악성코드 검사를 위해 실행파일들의 PE 파일을 수집한다.First, the PE file collection unit 300 collects the PE files of the executable files for malware inspection from the executable files such as EXEs and DLLs that are activated and executed on a computer.

컴파일러 분류부(302)는 PE 파일 수집부(300)에서 수집된 PE 파일에 대해 각 PE 파일을 생성한 컴파일러를 분석하여 컴파일러별로 분류한다. 위 PE 파일은 기계어로 구성된 바이너리 데이터로 Visual C++, Visual Basic, C++, Builder, Delphi 등의 다양한 컴파일러에 의해서 생산되는데, 모든 PE 파일은 각각의 컴파일러 특성 에 의한 구조적인 특성을 나타내게 된다. 즉, PE 파일의 실행코드 영역인 .Text 섹션 내에는 고유 컴파일러의 정보와 구조체, 프로젝트의 정보, 자원에 대한 링크정보, 컴파일러 자체의 고유코드 등 컴파일러 자신만의 고유한 특성정보를 가지고 있다.The compiler classification unit 302 analyzes a compiler that generates each PE file with respect to the PE file collected by the PE file collecting unit 300 and classifies the compiler by compiler. The above PE file is binary data composed of machine language. It is produced by various compilers such as Visual C ++, Visual Basic, C ++, Builder, Delphi, etc. All PE files show the structural characteristics by their compiler characteristics. In other words, in the .Text section of the executable file of the PE file, the compiler has its own characteristic information such as the information and structure of the native compiler, the information of the project, the link information about the resources, and the native code of the compiler itself.

이러한 고유 컴파일러의 정보들 중에는 프로젝트 정보라는 전체 프로그램의 기본정보가 존재하게 되며, 각각의 컴파일러마다 프로젝트의 구조와 원리, 성분은 다르게 구성되어 있으나 그 기본적인 특성은 같다고 할 수 있다. 따라서 위와 같은 프로젝트 정보는 동일한 컴파일러로부터 파생한 PE 파일을 구분하는 독립적 데이터로 이용 가능하게 된다. 즉, 컴파일러 분류부(302)는 PE 파일의 실행코드내 존재하는 프로젝트 정보(project information)를 분석하여 PE 파일의 구조와 내부 기계어의 구성, 리소스(resource), 임포트 라이브러리(import library), 각 컴파일러의 스텁코드(stupcode) 등을 확인함으로써 각 PE 파일이 어떤 컴파일러를 통해 생성되었는지 검사한 후, 컴파일러별로 분류하게 된다.Among the information of these unique compilers, basic information of the entire program, such as project information, exists, and the structure, principle, and components of the project are different for each compiler, but the basic characteristics are the same. Therefore, the above project information can be used as independent data to distinguish PE files derived from the same compiler. That is, the compiler classification unit 302 analyzes project information existing in the executable code of the PE file to configure the structure of the PE file, internal machine language, resources, import libraries, and each compiler. By checking the stubcode of the program, the compiler checks which compiler the PE file is generated and classifies by compiler.

진단부(304)는 컴파일러 분류부(302)로부터 컴파일러별 분류된 각 PE 파일에 대해 엔트리 포인트(entry point)값과, 프로젝트 정보(project information)값, 사용자 함수(user function)값을 추출하여 진단 데이터 DB(Data Base)(306)내 각 컴파일러별로 저장된 대응되는 진단 데이터와 각각 비교하고, 일치하는 경우 악성코드를 진단하게 된다.The diagnosis unit 304 extracts an entry point value, a project information value, and a user function value for each PE file classified by the compiler from the compiler classification unit 302 to diagnose the diagnosis. Compared with the corresponding diagnostic data stored for each compiler in the data base 306, the malicious code is diagnosed.

즉, 진단부(304)는 PE 파일의 헤더내 실행코드 시작 시점을 지시하는 엔트리 포인트값을 추출하여 해당 컴파일러의 악성코드로 미리 알려진 PE 파일 엔트리 포 인트값의 집합인 제1 진단 데이터와 비교하여 일치여부를 검사한다. 또한, PE 파일의 실행 코드내 컴파일러 특성 정보를 포함하는 프로젝트 정보 값을 추출하여 해당 컴파일러의 악성코드로 미리 알려진 PE 파일에 대한 프로젝트 정보값의 집합인 제2 진단 데이터와 비교하여 일치여부를 검사한다. That is, the diagnostic unit 304 extracts an entry point value indicating the start point of execution code in the header of the PE file and compares it with the first diagnostic data which is a set of PE file entry point values previously known as malware of the corresponding compiler. Check for match. In addition, the project information value including the compiler characteristic information in the executable code of the PE file is extracted and compared with the second diagnostic data, which is a set of project information values for the PE file known as the malicious code of the compiler, to check for a match. .

또한, 진단부(304)는 PE 파일의 일치된 제1 진단 데이터, 제2 진단 데이터로부터 진단 데이터 DB(306)내에 존재하는 사용자 함수의 파일 오프셋 위치와 함수 크기를 바탕으로 검사대상 PE 파일의 제3 진단 데이터인 사용자 함수 OP 코드값(OPcode value)을 계산하여 진단 데이터 DB(306)의 제3 진단 데이터 사용자 함수 OP 코드값과 비교하여 일치여부를 검사한다.In addition, the diagnosis unit 304 is configured to generate the target PE file based on the file offset position and the function size of the user function existing in the diagnosis data DB 306 from the first diagnosis data and the second diagnosis data of the PE file. 3, the user function OPcode value, which is diagnostic data, is calculated and compared with the third diagnostic data user function OP code value of the diagnostic data DB 306 to check whether there is a match.

이때, 진단부(304)는 진단 데이터 DB(306)에 존재하는 사용자 함수 파일 오프셋의 위치부터 함수 크기만큼으로 연산된 사용자 함수 OP 코드값이 진단 데이터 DB(306)의 제3 진단 데이터인 사용자 함수 OP코드값과 일치하지 않을 경우, 변형된 악성코드의 진단을 위해 PE파일의 실행코드내 프로젝트 구조를 분석하여 실행코드내 삽입된 사용자 함수 중 파일 크기가 가장 크거나 가장 작은 함수 또는 제일 처음 위치한 함수거나 마지막 함수를 검색하고, 임의로 하나의 함수를 선택하여 사용자 함수값을 얻은 후 제3 진단 데이터와 재차 비교를 수행한다.In this case, the diagnosis unit 304 may determine that the user function OP code value calculated by the function size from the position of the user function file offset present in the diagnosis data DB 306 is the third diagnosis data of the diagnosis data DB 306. If the OP code value does not match, the project structure in the executable code of the PE file is analyzed to diagnose the modified malicious code, and the largest or smallest file size among the user functions inserted in the executable code, or the function located first Alternatively, the last function is searched, and one function is arbitrarily selected to obtain a user function value, and then the third diagnostic data is compared again.

도 4는 본 발명의 실시 예에 따른 컴파일러 구분에 의해 악성코드를 진단하는 동작 제어 흐름을 도시한 것이다. 이하 도 3 및 도 4를 참조하여 본 발명의 실시 예를 상세히 설명하기로 한다.4 is a flowchart illustrating an operation control flow for diagnosing malicious code by classifying compilers according to an embodiment of the present invention. Hereinafter, embodiments of the present invention will be described in detail with reference to FIGS. 3 and 4.

먼저, 컴퓨터상 본 발명의 안티바이러스 프로그램인 악성코드 진단장치가 활 성화되는 경우, 악성코드 진단장치내 PE 파일 수집부(300)는 (S400)단계에서 컴퓨터상 실행되는 EXE, DLL 등의 실행파일로부터 PE 파일을 수집한다. 이어, 컴파일러 분류부(302)는 (S402)단계에서 PE 파일 수집부(300)를 통해 수집된 PE 파일에 대해 프로젝트 정보를 분석하여 각 PE 파일을 컴파일러별로 분류한다.First, when the anti-malware diagnosis apparatus of the present invention on the computer is activated, the PE file collection unit 300 in the malware diagnosis apparatus is executed executable files, such as EXE, DLL, etc. executed on the computer in step (S400) Collect PE files from. Subsequently, the compiler classification unit 302 analyzes project information on the PE files collected through the PE file collection unit 300 in step S402 to classify each PE file by compiler.

위와 같이, 컴퓨터상 실행되는 악성코드 검사대상 PE 파일에 대한 수집 및 컴파일러별 분류가 수행된 경우, 진단부(304)는 (S404)∼(S408)단계를 수행하면서 각 PE 파일에 대해 컴파일러별 수립된 진단 데이터를 이용한 악성코드 여부 검사를 수행하게 된다.As described above, when collecting and classifying compiler-specific PE files to be executed on the computer is performed by the compiler, the diagnostic unit 304 establishes each compiler file for each PE file while performing steps (S404) to (S408). Malware detection is performed using the diagnostic data.

즉, 진단부(304)는 (S404)단계에서 검사대상 PE 파일내 이미지 옵셔널(image optional) 헤더 구조체에 존재하는 AddressOfEntryPoint 필드(field)값을 추출하여, 도 5에서 보여지는 바와 같이 PE 파일의 실행시작 시점인 엔트리 포인트값으로 추출한다. 그런 후, 진단부(304)는 위와 같이 추출된 검사 대상 PE 파일의 엔트리 포인트값을 해당 컴파일러의 악성코드로 미리 알려진 PE 파일 엔트리 포인트값의 집합인 제1 진단 데이터와 비교하여 일치여부를 검사한다. That is, the diagnostic unit 304 extracts the AddressOfEntryPoint field value present in the image optional header structure in the inspection target PE file in step S404, and as shown in FIG. Extract to the entry point value that is the start of execution. Thereafter, the diagnosis unit 304 compares the entry point value of the extracted PE file to be examined with the first diagnostic data, which is a set of PE file entry point values previously known as malware of the corresponding compiler, and checks whether there is a match. .

이어, 진단부(304)는 (S406)단계에서 PE 파일의 실행 코드내 컴파일러 특성 정보를 포함하는 프로젝트 정보 값을 추출한다. 이때 위 프로젝트 정보는 구조체 등으로 표현될 수 있는데, 진단부(304)는 해당 구조체의 특정 값들을 해쉬 또는 MD5, CRC 등의 암호화 방식으로 도 5에서 보여지는 바와 같이 기설정된 n 바이트 값 즉 예를 들어 고유한 4 바이트(bite) 값으로 만들어 활용하게된다. 진단부(304)는 위와 같이 추출된 검사 대상 PE 파일의 프로젝트 정보값을 해당 컴파일러의 악 성코드로 미리 알려진 PE 파일에 대한 프로젝트 정보값의 집합인 제2 진단 데이터와 비교하여 일치여부를 검사한다. Subsequently, the diagnosis unit 304 extracts a project information value including compiler characteristic information in the execution code of the PE file in step S406. In this case, the above project information may be represented by a structure, etc. The diagnostic unit 304 hashes a specific value of the corresponding structure by using a predetermined n-byte value, as shown in FIG. 5, using an encryption scheme such as MD or CRC. For example, a unique 4-byte value is used. The diagnosis unit 304 compares the project information value of the extracted test target PE file with the second diagnostic data, which is a set of project information values for the PE file previously known as the malicious code of the corresponding compiler, and checks whether there is a match. .

이어, 진단부(304)는 (S408)단계에서 PE 파일의 실행 코드내 삽입된 사용자 함수값을 추출하여 해당 컴파일러의 악성코드로 미리 알려진 사용자 함수값의 집합인 제3 진단 데이터와 비교하여 일치여부를 검사한다. 이때, 위 사용자 함수값은 PE 파일의 실행코드내 사용자에 의해 삽입되는 함수에 대한 관련 데이터를 의미하는 것으로, 도 5에서 보여지는 바와 같이 사용자 함수의 시작 지점의 파일 오프셋값과, 함수 크기값 및 파일 오프셋에서부터 함수 크기만큼의 사용자 함수 OP 코드값을 의미한다. Subsequently, the diagnosis unit 304 extracts a user function value inserted into the executable code of the PE file in operation S408 and compares the result with the third diagnostic data which is a set of user function values previously known as malware of the corresponding compiler. Check it. In this case, the value of the user function means the relevant data for the function inserted by the user in the executable code of the PE file. As shown in FIG. 5, the file offset value, the function size value, User function OP code value from the file offset to the function size.

위 사용자 함수값 중 첫 번째 값인 파일 오프셋값은 예를 들어 사용자 함수에서 가장 크기가 큰 함수, 사용자 함수 중에서 가장 크기가 작은 함수, 사용자 함수 중에서 제일 첫 파일 오프셋에 위치한 함수 등으로 임의로 선택될 수 있다. 위와 같이 사용자 함수가 선택된 이후 사용자 함수값의 두 번째 값으로 해당 사용자 함수의 함수 크기값이 추출되며, 사용자 함수값의 세 번째 값으로 파일 오프셋에서부터 함수 크기만큼의 OP 코드값이 추출된다. 이때, 사용자 함수값에 대한 파일 오프셋값, 함수 크기값, OP 코드값에 대해 해쉬, MD5, CRC 등의 암호화 방식으로 기설정된 n 바이트 값 즉 예를 들어 고유한 4바이트 값으로 만들게 된다.The file offset value, which is the first of the above user function values, may be arbitrarily selected as, for example, the largest function of the user function, the smallest of the user functions, or the function located at the first file offset of the user functions. . After the user function is selected as above, the function size value of the user function is extracted as the second value of the user function value, and the OP code value as much as the function size is extracted from the file offset as the third value of the user function value. At this time, the file offset value, the function size value, and the OP code value for the user function value are made into n-byte values that are predetermined by encryption methods such as hash, MD5, CRC, for example, unique 4-byte values.

또한, 진단부(304)는 PE 파일이 진단 데이터 DB(306)의 제1 진단 데이터 그리고 제2 진단 데이터가 일치하는 진단 데이터 레코드로부터 제3 진단 데이터의 사용자 함수 파일 오프셋위치에서 함수 크기만큼을 사용자 함수 OP 코드값을 계산하 여 제3 진단 데이터의 사용자 함수 OP 코드값과 비교하게 된다. 만약 일치하지 않을 경우, 변형된 악성코드의 진단을 위해서 진단부(304)는 PE 파일의 실행코드내 프로젝트 구조를 분석하여 실행코드내 삽입된 사용자 함수 중 파일 크기가 가장 크거나 가장 작은 함수 또는 제일 처음 위치한 함수거나 마지막 함수를 검색하고, 임의로 하나의 함수를 선택하여 사용자 함수값을 얻은 후, 다시 제3 진단 데이터인 사용자 함수 OP 코드값과 비교하게 된다. 이에 따라 동일한 컴파일러에 대한 동일한 프로젝트에서의 다양한 변종의 악성코드를 진단할 수 있게 된다.In addition, the diagnostic unit 304 is a user of the PE file as much as the size of the function at the user function file offset position of the third diagnostic data from the diagnostic data record in which the first diagnostic data and the second diagnostic data of the diagnostic data DB 306 match. The function OP code value is calculated and compared with the user function OP code value of the third diagnostic data. If it does not match, the diagnosis unit 304 analyzes the project structure in the executable code of the PE file to diagnose the modified malicious code, and has the largest or smallest file function among the user functions inserted in the executable code or the first. The first function or the last function is searched, and one function is arbitrarily selected to obtain a user function value, and then compared with the user function OP code value, which is the third diagnostic data. This makes it possible to diagnose various variants of malware in the same project for the same compiler.

위와 같이, 진단부(304)는 (S404)∼(S408)단계를 통해 PE 파일로 추출된 악성코드 검사를 위한 고유 진단값과 컴파일러별 수립된 진단 데이터와의 비교를 수행한 후, 검사 대상 PE 파일로부터 추출된 고유 진단값이 컴파일러별 대응되는 진단 데이터와 일치하는 경우에는 (S410)단계에서 (S412)단계로 진행하여 해당 PE 파일에 대하여 악성코드로 진단한다. 그런 후, 진단부(304)는 (S414)단계로 진행해서 악성코드로 진단된 해당 PE 파일을 포함하는 실행파일에 대해 바이러스를 치료하거나 치료가 불가능한 경우 삭제시킴으로써 컴퓨터상 악성코드 프로그램의 실행을 차단시키게 되는 것이다.As described above, the diagnostic unit 304 performs a comparison between the unique diagnostic value for checking the malicious code extracted into the PE file and the diagnostic data established for each compiler through the steps S404 to S408, and then checks the target PE. If the unique diagnostic value extracted from the file matches the corresponding diagnostic data for each compiler, the process proceeds from step S410 to step S412 to diagnose the PE file as malicious code. Then, the diagnostic unit 304 proceeds to step (S414) to block the execution of the malware program on the computer by deleting the virus or if it is impossible to clean the executable file containing the PE file diagnosed as malicious code It is to be made.

도 6은 본 발명의 실시 예에 따른 컴파일러별 구분에 의한 악성코드 진단 과정 중 특히 비쥬얼 베이직 컴파일러(Visual Basic compiler)에서 진단 데이터 설정 및 악성코드 진단 처리 흐름을 도시한 것이다. 이하, 도 3, 도 4 및 도 6을 참조하여 본 발명의 실시 예를 상세히 설명하기로 한다.FIG. 6 is a flowchart illustrating a process of setting diagnostic data and a malicious code diagnosis process in a visual basic compiler, in particular, during a malicious code diagnosis process according to a compiler classification according to an embodiment of the present invention. Hereinafter, embodiments of the present invention will be described in detail with reference to FIGS. 3, 4, and 6.

먼저, 비쥬얼 베이직 컴파일러로 생성된 PE 파일은 OOP(Object Oriented Program)에 기반된 구조화된 .Text 섹션을 가지고 있으며, 실행파일에 대한 전반적으로 구체적인 정보와 사용자 함수 정보를 알려준다. 모든 비쥬얼 베이직 프로그램은 VB_HEADER 라는 프로젝트 구조체를 기반으로 PROJECT_INFO, GUI_OBJECT, COMPONENT, COM_REG_DATA 의 4개의 중요한 구조체 정보를 가지고 있다. 위에서 프로젝트 정보(PROJECT_INFO) 구조체는 실제 내포하고 있는 비쥬얼 베이직의 오브젝트(object)에 대한 정보를 가지고 있으며, 각 오브젝트는 제어(control) 또는 방법(method)에 대한 정보를 링크하고 있다.First, the PE file generated by the Visual Basic compiler has a structured .Text section based on an object-oriented program (OOP), which provides general information about the executable and user function information. Every Visual Basic program has four important structure information based on a project structure called VB_HEADER: PROJECT_INFO, GUI_OBJECT, COMPONENT, and COM_REG_DATA. The project information (PROJECT_INFO) structure contains information about the objects of Visual Basic that are actually contained, and each object links information about a control or a method.

위와 같은 비쥬얼 베이직 컴파일링된 PE 파일의 진단 데이터는 도 7에서 보여지는 바와 같이 PE 파일 실행코드의 코드 특성에 따라 P 코드 형식의 진단 데이터와 Native 형식의 진단 데이터로 구분된다. 또한 P 코드는 비쥬얼 베이직의 가상머신(MSVBVM50.DLL, MSVBVM60.DLL)에서 스택을 기반으로 하는 가상엔진의 OP 코드로서 x86 CPU 계열의 레지스터와 스택을 기반으로 하는 Native 코드와 구별된다.As shown in FIG. 7, the diagnosis data of the Visual Basic compiled PE file is divided into P data type diagnostic data and Native type diagnostic data according to the code characteristics of the PE file execution code. In addition, P code is a stack-based virtual engine's OP code in Visual Basic's virtual machines (MSVBVM50.DLL and MSVBVM60.DLL), which is distinct from the x86 CPU family of registers and stack-based native code.

즉, 진단부(304)는 비쥬얼 베이직으로 컴파일링된 것으로 분류된 PE 파일에 대해서 (S600)단계에서 PE 파일의 코드 시작 시점 정보인 엔트리 포인트값을 추출하고, (S602)단계에서 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 엔트리 포인트값인 제1 진단 데이터와 일치하는지 여부를 검사한다.That is, the diagnostic unit 304 extracts an entry point value, which is information about a start point of the code of the PE file, in step S600 for a PE file classified as compiled in visual basic, and in step S602, visual basic compilation. The first diagnostic data, which is an entry point value previously known as malicious code, is checked in the PE file.

이때, 검사대상 PE 파일의 코드 시작 시점 정보인 엔트리 포인트값과 제1 진단 데이터가 일치하지 않는 경우 진단부(304)는 (S602)단계에서 (S604)단계로 진행해서 해당 PE 파일에 대해 악성코드가 아님을 진단한다.At this time, when the entry point value, which is the code start time information of the test target PE file, and the first diagnostic data do not match, the diagnostic unit 304 proceeds from step S602 to step S604 to perform malicious code on the corresponding PE file. Diagnose not

그러나, 검사대상 PE 파일의 코드 시작 시점 정보인 엔트리 포인트값과 제1 진단 데이터가 일치하는 경우 진단부(304)는 (S602)단계에서 (S606)단계로 진행해서 검사 대상 PE 파일의 실행 코드내 비쥬얼 베이직 컴파일러의 특성 정보를 포함하는 프로젝트 정보를 추출하고, (S608)단계에서 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 프로젝트 정보값인 제2 진단 데이터와 일치하는지 여부를 검사한다. 이때 위 프로젝트 정보값은 비쥬얼 베이직 실행파일에 대한 프로젝트의 정보 구조체인 VB_HEADER 구조체의 특정 고유데이터 정보를 해쉬(hash), MD5, CRC 등의 암호화 방식을 통해 기설정된 n 바이트 값 즉 예를 들어 고유한 4바이트 값으로 만들게 된다.However, when the entry point value, which is the code start time information of the inspection target PE file, and the first diagnosis data coincide, the diagnosis unit 304 proceeds from operation S602 to operation S606 to execute the execution code of the inspection target PE file. Project information including the characteristic information of the Visual Basic compiler is extracted, and in step S608, it is checked whether the Visual Basic compiled PE file is consistent with the second diagnostic data which is a project information value known as a malicious code. At this time, the above project information value is the n-byte value that is set by using encryption method such as hash, MD5, CRC, etc., for example, specific unique data information of the VB_HEADER structure which is the project information structure for the Visual Basic executable file. It will be made into a 4-byte value.

이때, 검사대상 PE 파일의 프로젝트 정보값과 제2 진단 데이터가 일치하지 않는 경우 진단부(304)는 (S608)단계에서 (S604)단계로 진행해서 해당 PE 파일에 대해 악성코드가 아님을 진단한다.At this time, if the project information value of the inspection target PE file and the second diagnostic data does not match, the diagnostic unit 304 proceeds from step S608 to step S604 to diagnose that the PE file is not malicious code. .

그러나, 검사대상 PE 파일의 프로젝트 정보값과 제2 진단 데이터가 일치하는 경우 진단부(304)는 (S608)단계에서 (S610)단계로 진행해서 PE 파일내 사용자 함수값을 추출하기 위해 PE 파일의 실행코드가 어떤 코드로 작성되었는지 여부를 검사하고, (S612)단계에서 PE 파일의 실행코드 특성에 따라 사용자 함수값을 추출을 위한 사용자 함수의 파일 오프셋값을 산출한다.However, when the project information value of the inspection target PE file and the second diagnostic data match, the diagnostic unit 304 proceeds from step S608 to step S610 to extract user function values in the PE file. It is checked whether the executable code is written in any code, and in operation S612, a file offset value of the user function for extracting the user function value according to the executable code characteristic of the PE file is calculated.

이어, 진단부(304)는 (S614)단계로 진행해서 검사 대상 PE 파일의 실행코드 특성에 따라 사용자 함수가 위치한 PE 파일 실행코드내 오프셋값을 산출하여 사용자 함수값을 추출한다.Subsequently, the diagnostic unit 304 proceeds to step S614 and calculates an offset value in the PE file execution code in which the user function is located according to the execution code characteristics of the PE file to be examined to extract the user function value.

즉, 비쥬얼 베이직으로 컴파일링된 PE 파일은 그 실행코드의 생성에 있어서 P 코드 또는 Native 코드로 서로 다른 종류의 코드로 생성될 수 있다. 따라서 비쥬얼 베이직 컴파일링된 PE 파일에서의 사용자 함수값 추출 시에는, 검사 대상 PE 파일의 비쥬얼 베이직 컴파일링된 실행코드가 P 코드로 생성되었는지 또는 Native 코드로 생성되었는지에 따라 사용자 함수값을 추출을 위한 파일 오프셋값을 다르게 설정하여야 한다.That is, a PE file compiled with Visual Basic may be generated with different kinds of code as P code or Native code in generating the execution code. Therefore, when extracting the user function value from the Visual Basic compiled PE file, it is necessary to extract the user function value according to whether the Visual Basic compiled executable code of the target PE file is generated in P code or Native code. The file offset value must be set differently.

예를 들어, 비쥬얼 베이직으로 컴파일링된 PE 파일이 P 코드로 생성된 경우 진단부(304)는 비쥬얼 베이직 실행파일에 대한 프로젝트 구조를 통해서 얻은 사용자 함수들로부터 크기가 가장 크거나 작은 함수 또는 제일 처음 위치한 함수거나 또는 마지막 함수 등 적절한 사용자 함수 선정 알고리즘에 의해서 선정된 사용자 함수에 대해 사용자 함수의 시작 지점의 파일 오프셋값과 함수 크기값을 얻고 파일 오프셋에서부터 함수 크기 만큼의 OP 코드 데이터를 해쉬, MD5, CRC 등의 암호화 방식으로 기설정된 n 바이트 값 즉 예를 들어 4바이트 고유데이터 값으로 추출한다.For example, if a PE file compiled with Visual Basic is generated in P code, the diagnostic unit 304 may generate the largest or smallest function or the first from the user functions obtained through the project structure for the Visual Basic executable. For the user function selected by the appropriate user function selection algorithm such as the located function or the last function, the file offset value and the function size value of the starting point of the user function are obtained, and the OP code data of the function size from the file offset is hashed, MD5, It extracts n-byte values, that is, 4-byte unique data values, which are preset by an encryption method such as CRC.

또한, 이와 달리 비쥬얼 베이직으로 컴파일링된 PE 파일이 Native 코드로 생성된 경우 진단부(304)는 프로젝트 구조를 통해서 얻은 사용자 함수들로부터 크기가 가장 크거나 작은 함수 또는 제일 처음 위치한 함수거나 또는 마지막 함수 등 적절한 사용자 함수 선정 알고리즘에 의해서 선정된 사용자 함수에 대해 사용자 함수의 시작 지점의 파일 오프셋값과 함수 크기값을 얻는 것은 P 코드 방식에서와 동일하게 수행하나, 사용자 함수 시작에서부터 사용자 함수 파일 크기만큼의 OP 코드데이터 중 첫 데이터만을 추출한 데이터들에 대해서 해쉬, MD5, CRC 등의 암호화 방식으로 기설정된 n 바이트 값 즉 예를 들어 4바이트 고유데이터 값으로 추출한다. In contrast, when a PE file compiled with Visual Basic is generated as native code, the diagnosis unit 304 may have the largest or smallest function, the first or last function, or the last function from user functions obtained through the project structure. For the user function selected by the appropriate user function selection algorithm, obtaining the file offset value and the function size value of the starting point of the user function is performed in the same way as in the P code method. Data extracted from only the first data of the OP code data is extracted as a predetermined n-byte value, that is, a 4-byte unique data value by an encryption method such as hash, MD5, CRC, or the like.

이때, 제3 진단 데이터와 비교되는 PE 파일의 사용자 함수값 추출에 있어서, 비쥬얼 베이직 컴파일러의 특성상 비쥬얼 베이직 PE 파일은 EXE 또는 DLL, P 코드 또는 Native 코드, Form 또는 Module 로 구분되어 사용자 함수의 파일 오프셋값이 달라질 수 있다. 따라서, P 코드와 Native 코드의 차이에 따른 사용자 함수의 파일 오프셋값 뿐만 아니라 EXE 또는 DLL, P 코드 또는 Native 코드, Form 또는 Module 등의 특성도 고려하여 사용자 함수값을 추출하게 된다.At this time, in extracting the user function value of the PE file compared with the third diagnostic data, the VB file is divided into an EXE or a DLL, a P code or a native code, a form or a module, and a file offset of the user function due to the characteristics of the VB compiler. The value can vary. Therefore, the user function value is extracted by considering not only the file offset value of the user function according to the difference between the P code and the native code, but also the characteristics of an EXE or DLL, a P code or a native code, a form, or a module.

이어, 진단부(304)는 (S616)단계에서 검사대상 PE 파일로부터 추출된 사용자 함수값을 해쉬, MD5, CRC 등의 암호화 방식으로 기설정된 n 바이트 값 즉 예를 들어 4바이트 진단 값으로 만들어 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 제3 진단 데이터와 일치하는지 여부를 검사한다. Subsequently, the diagnostic unit 304 visually makes the user function value extracted from the PE file to be inspected in step S616 into an n-byte value, that is, a 4-byte diagnostic value, which is preset by an encryption method such as hash, MD5, CRC, or the like. In the basic compiled PE file, it is checked whether it matches the third diagnostic data known as malware.

이때 만일 검사대상 PE 파일로부터 추출된 사용자 함수값이 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 제3 진단 데이터와 일치하는 경우 진단부(304)는 (S624)단계로 진행해서 해당 검사대상 PE 파일을 악성코드로 진단한다.At this time, if the user function value extracted from the PE file to be examined matches the third diagnostic data previously known as malicious code in the Visual Basic compiled PE file, the diagnostic unit 304 proceeds to step S624 and the corresponding test object. Diagnose PE file as malware.

그러나, 이와 달리, (S616)단계 검사결과 검사대상 PE 파일로부터 추출된 사용자 함수값이 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 제3 진단 데이터와 일치하지 않는 경우 진단부(304)는 (S618)단계로 진행해서 다시 사용자 함수 선정 알고리즘을 동일하게 적용하여 검사대상 PE 파일내 다른 사용자 함 수를 선택한다. On the contrary, if the user function value extracted from the inspection result PE file (S616) does not match the third diagnosis data previously known as malicious code in the Visual Basic compiled PE file, the diagnosis unit 304 In step S618, the user function selection algorithm is applied again to select another user function in the PE file to be examined.

이어 진단부(304)는 (S620)단계에서 해당 사용자 함수로부터 사용자 함수값을 추출한 후, (S622)단계에서 이를 해쉬, MD5, CRC 등의 암호화 방식으로 기설정된 n 바이트 값 즉 예를 들어 4바이트 진단 값으로 만들어 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 제3 진단 데이터와 일치하는지 여부를 재차 검사한다. 이에 따라 동일한 컴파일러를 통해 생성된 동일한 프로젝트에 대한 변형 악성코드를 찾을 수 있게 된다.Next, the diagnostic unit 304 extracts a user function value from the corresponding user function in step S620, and then n-byte value, that is, 4 bytes, preset by an encryption method such as hash, MD5, CRC, etc. in step S622. The diagnostic value is re-checked to match the third diagnostic data known as malicious code in the Visual Basic compiled PE file. This allows you to find modified malware for the same project generated by the same compiler.

그런 후, 진단부(304)는 검사대상 PE 파일로부터 다시 추출된 사용자 함수값이 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 제3 진단 데이터와 일치하는 경우에는 (S624)단계로 진행해서 해당 검사대상 PE 파일을 악성코드로 진단한다. 그러나, 이와 달리, (S622)단계 검사결과 검사대상 PE 파일로부터 재차 추출된 사용자 함수값이 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 제3 진단 데이터와 일치하지 않는 경우 진단부(304)는 (S604)단계로 진행해서 해당 PE 파일이 악성코드가 아닌 것으로 진단한다.Then, the diagnostic unit 304 proceeds to step S624 when the user function value extracted from the PE file to be inspected coincides with the third diagnostic data previously known as malicious code in the Visual Basic compiled PE file. Diagnose the target PE file as malicious code. However, unlike this, if the user function value extracted again from the inspection target PE file (S622) does not match the third diagnostic data previously known as malicious code in the Visual Basic compiled PE file, the diagnosis unit 304 Proceeds to step S604 to diagnose that the PE file is not malicious code.

상기한 바와 같이 본 발명에서는 컴퓨터상 실행되는 실행 파일들에 대한 악성코드 진단에 있어서, PE 파일을 컴파일러별로 분류한 후, 컴파일러별 수립된 진단 데이터를 이용하여 악성코드 진단을 수행함으로써, 진단 데이터와의 비교횟수를 현저히 줄일 수 있어 악성코드 진단을 시간을 보다 효율적으로 단축시킬 수 있게 된다. 또한, 최근의 악성코드 특성상 동일한 프로젝트와 소스를 이용하여 변수 또는 문자열 변경에 의한 제작이 늘고 있는 것을 감안하여 사용자 함수값에 대한 진 단 데이터 비교 시 다양한 사용자 함수값을 선택하면서 재차 진단을 수행함으로써, 동일한 컴파일러를 통해 생성된 동일한 프로젝트에 대한 변형 악성코드도 찾을 수 있어 악성코드 진단 신뢰성을 높일 수 있다.As described above, in the present invention, in the diagnosis of malicious codes for executable files executed on a computer, the PE files are classified by compilers, and then the malicious codes are diagnosed using the diagnostic data established for each compiler. The number of comparisons can be significantly reduced, which can shorten the time for malicious code diagnosis more efficiently. In addition, considering the recent increase in production by changing variables or strings using the same project and source due to the characteristics of malware, by performing various diagnostics while selecting various user function values when comparing diagnostic data on user function values, Modified malware for the same project generated by the same compiler can also be found, increasing the reliability of malware diagnosis.

한편 상술한 본 발명의 설명에서는 구체적인 실시 예에 관해 설명하였으나, 여러 가지 변형이 본 발명의 범위에서 벗어나지 않고 실시될 수 있다. 따라서 발명의 범위는 설명된 실시 예에 의하여 정할 것이 아니고 특허청구범위에 의해 정하여져야 한다.Meanwhile, in the above description of the present invention, specific embodiments have been described, but various modifications may be made without departing from the scope of the present invention. Therefore, the scope of the invention should be determined by the claims rather than by the described embodiments.

도 1은 종래 PE 파일 악성코드 진단 개념도,1 is a conceptual diagram of a conventional PE file malware diagnosis,

도 2는 본 발명의 실시 예에 따른 PE 컴파일러 구분에 의한 악성코드 진단 개념도,2 is a conceptual diagram of malicious code diagnosis according to PE compiler classification according to an embodiment of the present invention;

도 3은 본 발명의 실시 예에 따른 컴파일러 구분에 의한 악성코드 진단 장치의 블록 구성도,3 is a block diagram of an apparatus for diagnosing malware by compiler classification according to an embodiment of the present invention;

도 4는 본 발명의 실시 예에 따른 컴파일러 구분에 의해 악성코드를 진단하는 동작 제어 흐름도,4 is an operation control flowchart for diagnosing malicious code by classifying a compiler according to an embodiment of the present invention;

도 5는 본 발명의 실시 예에 따른 컴파일러별 특성에 따른 고유 진단값 예시도,5 is a diagram illustrating intrinsic diagnostic values according to characteristics of each compiler according to an embodiment of the present invention;

도 6은 본 발명의 실시 예에 따른 비쥬얼 베이직 컴파일링된 PE 파일의 악성코드 진단 처리 흐름도,6 is a flowchart illustrating a malware diagnosis process of a Visual Basic compiled PE file according to an embodiment of the present invention;

도 7은 본 발명의 실시 예에 따른 비쥬얼 베이직 컴파일러 특성에 따른 고유 진단값 예시도.7 is a diagram illustrating intrinsic diagnostic values according to characteristics of a visual basic compiler according to an embodiment of the present invention.

<도면의 주요 부호에 대한 간략한 설명><Brief description of the major symbols in the drawings>

300 : PE 파일 수집부 302 : 컴파일러 분류부300: PE file collection unit 302: compiler classification unit

304 : 진단부 306 : 진단 데이터 DB304: diagnostic unit 306: diagnostic data DB

Claims (49)

컴파일러 구분에 의한 악성코드 진단장치로서,As a malware diagnosis device by compiler classification, 컴퓨터상 악성코드 여부 검사대상이 되는 실행파일들의 PE파일을 수집하는 PE 파일 수집부와,PE file collection unit for collecting the PE files of the executable files to be scanned for malicious code on the computer, 상기 PE 파일 수집부에서 수집된 PE 파일에 대해 각 PE 파일을 생성한 컴파일러를 분석하여 컴파일러별로 분류하는 컴파일러 분류부와,Compiler classification unit for analyzing the compiler for generating each PE file with respect to the PE file collected by the PE file collection unit and classifies by compiler, 상기 컴파일러 분류부로부터 분류된 PE 파일에 대해 각 컴파일러별로 기 수립된 진단 데이터를 이용하여 악성코드 여부를 검사하는 진단부Diagnosis unit for checking the malicious code for the PE files classified by the compiler classification unit using the diagnostic data established for each compiler 를 포함하는 컴파일러 구분에 의한 악성코드 진단장치.Malware diagnosis apparatus by the compiler classification, including. 제 1 항에 있어서,The method of claim 1, 상기 악성코드 진단장치는,The malware diagnosis device, 상기 PE 파일에 대한 컴파일러별 악성코드 검사를 위해 컴파일러별 진단 데이터를 저장하고 있는 진단 데이터 DBDiagnostic data DB that stores diagnostic data for each compiler to check malware for each compiler for the PE file 를 더 포함하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.Malware diagnosis apparatus by the compiler classification, characterized in that it further comprises. 제 1 항에 있어서,The method of claim 1, 상기 진단부는,The diagnostic unit, 상기 컴파일러별 분류된 각 PE 파일에 대해 엔트리 포인트값과, 프로젝트 정보값, 사용자 함수값을 추출하여 악성코드의 판단을 위해 컴파일러별로 미리 저장된 각각의 진단 데이터와 비교하고 일치하는 경우 악성코드를 판단하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.For each PE file classified by the compiler, an entry point value, a project information value, and a user function value are extracted and compared with each diagnostic data previously stored for each compiler to determine the malicious code. Malware diagnosis apparatus by the compiler classification, characterized in that. 제 3 항에 있어서,The method of claim 3, wherein 상기 진단부는, The diagnostic unit, 상기 PE 파일의 헤더내 실행코드 시작 시점을 지시하는 엔트리 포인트값을 추출하여 해당 컴파일러의 제1 진단 데이터와 비교하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.An apparatus for diagnosing malware according to compiler classification, comprising: extracting an entry point value indicative of a start point of execution code in a header of the PE file and comparing it with first diagnostic data of a corresponding compiler; 제 4 항에 있어서,The method of claim 4, wherein 상기 제1 진단 데이터는,The first diagnostic data, 컴파일러별 악성코드로 미리 알려진 PE 파일 엔트리 포인트값의 집합으로, 상기 검사대상 PE 파일의 엔트리 포인트값과 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.A set of PE file entry point values previously known as compiler-specific malware, and the malware diagnosis apparatus according to the compiler classification, characterized in that compared with the entry point value of the PE file to be inspected. 제 3 항에 있어서,The method of claim 3, wherein 상기 진단부는,The diagnostic unit, 상기 PE 파일의 실행 코드내 컴파일러 특성 정보를 포함하는 프로젝트 정보 값을 추출하여 해당 컴파일러의 제2 진단 데이터와 비교하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.The apparatus for diagnosing malware according to compiler classification, comprising: extracting a project information value including compiler characteristic information in executable code of the PE file and comparing it with second diagnostic data of a corresponding compiler; 제 6 항에 있어서,The method of claim 6, 상기 제2 진단 데이터는,The second diagnostic data is, 컴파일러별 악성코드로 미리 알려진 PE 파일에 대한 프로젝트 정보값의 집합으로 상기 검사대상 PE 파일의 프로젝트 정보 값과 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.A device for diagnosing malware according to a compiler classification, wherein a set of project information values for a PE file known as malware for each compiler is compared with project information values of the PE file to be inspected. 제 3 항에 있어서,The method of claim 3, wherein 상기 진단부는,The diagnostic unit, 상기 검사대상 PE 파일의 실행 코드내 삽입된 사용자 함수값을 추출하여 해당 컴파일러의 제3 진단 데이터와 비교하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.The apparatus for diagnosing malware according to compiler classification, comprising: extracting a value of a user function inserted into an execution code of the test target PE file and comparing it with third diagnostic data of a corresponding compiler. 제 8 항에 있어서,The method of claim 8, 상기 진단부는,The diagnostic unit, 상기 PE 파일의 실행코드내 프로젝트 구조를 분석하여 상기 실행코드내 삽입된 사용자 함수 중 파일 크기가 가장 크거나 가장 작은 함수 또는 제일 처음 위치한 함수거나 마지막 함수를 선택하여 사용자 함수값을 얻는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.Analyzing the project structure in the executable code of the PE file to obtain a user function value by selecting the largest or smallest file size or the first position or the last function among the user functions inserted into the executable code Malware diagnosis device by compiler classification. 제 9 항에 있어서,The method of claim 9, 상기 진단부는, The diagnostic unit, 상기 선택된 사용자 함수의 시작 지점의 파일 오프셋값과 파일 크기값을 얻고, 상기 파일 오프셋에서부터 파일 크기만큼의 사용자 함수 OP 코드값을 산출하여 상기 제3 진단 데이터와의 비교를 위한 사용자 함수값을 얻는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.Obtaining a file offset value and a file size value of a starting point of the selected user function, and calculating a user function OP code value corresponding to the file size from the file offset to obtain a user function value for comparison with the third diagnostic data. Malware diagnosis apparatus by distinguishing the compiler. 제 10 항에 있어서,The method of claim 10, 상기 진단부는,The diagnostic unit, 상기 선택된 사용자 함수로부터 추출된 사용자 함수값이 상기 제3 진단 데이터와 일치하지 않는 경우, 상기 PE 파일의 실행코드내 삽입된 다른 사용자 함수를 선택하여 재차 상기 제3 진단 데이터와 비교를 수행하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.If the user function value extracted from the selected user function does not match the third diagnostic data, select another user function inserted in the execution code of the PE file and perform comparison with the third diagnostic data again. Malware diagnosis device by compiler classification. 제 8 항에 있어서,The method of claim 8, 상기 제3 진단 데이터는,The third diagnostic data is, 컴파일러별 악성코드로 미리 알려진 PE 파일에 대한 사용자 함수값의 집합으로, 상기 검사대상 PE 파일의 사용자 함수값과 각각 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.A set of user function values for PE files known in advance as malware for each compiler, and the malware diagnosis apparatus according to compiler classification, characterized in that compared with the user function values of the PE file to be inspected. 제 3 항에 있어서,The method of claim 3, wherein 상기 프로젝트 정보 값과 사용자 함수값은, The project information value and the user function value, 미리 설정된 암호화 방식으로 기 설정된 n 바이트 값으로 생성되어 각각의 진단 데이터와 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.An apparatus for diagnosing malware according to a compiler classification, which is generated with a preset n-byte value by a preset encryption method and compared with each diagnostic data. 제 13 항에 있어서,The method of claim 13, 상기 n 바이트 값은,The n byte value is 해쉬, MD5 또는 CRC 방식을 통해 4바이트로 생성되는 값인 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.Malware diagnosis apparatus according to the compiler classification, characterized in that the value generated by four bytes through the hash, MD5 or CRC method. 제 1 항에 있어서,The method of claim 1, 상기 컴파일러 분류부는,The compiler classification unit, 상기 PE 파일의 실행코드내 프로젝트 정보 내용을 분석하여 상기 PE 파일을 생성한 컴파일러 종류를 판별하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.An apparatus for diagnosing malware according to a compiler classification, characterized in that the type of compiler that generates the PE file is determined by analyzing the project information in the executable code of the PE file. 제 1 항에 있어서,The method of claim 1, 상기 PE 파일을 생성하는 컴파일러는,Compiler for generating the PE file, 비쥬얼 베이직, 비쥬얼 C++, 델파이, C++ 또는 빌더인 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.Visual Basic, Visual C ++, Delphi, C ++ or Builder malware diagnosis apparatus according to the compiler classification, characterized in that. 제 1 항에 있어서,The method of claim 1, 상기 진단부는,The diagnostic unit, 상기 컴파일러 중 비쥬얼 베이직 컴파일러로 생성된 검사대상 PE 파일에 대해서, 엔트리 포인트값과, 프로젝트 정보값을 추출한 후, 상기 비쥬얼 베이직 컴파일링된 PE 파일의 실행코드 특성에 대응되게 사용자 함수값을 추출하여 악성코드의 판단을 위해 미리 저장된 각각의 진단 데이터와 비교하고 일치하는 경우 악성코드를 판단하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.After extracting the entry point value and the project information value for the inspected PE file generated by the Visual Basic compiler among the compilers, the user function value is extracted to correspond to the executable code characteristics of the Visual Basic compiled PE file. The apparatus for diagnosing malware according to a compiler classification, characterized in that it compares with each of the previously stored diagnostic data for the judgment of the code, and determines the malicious code if the code matches. 제 17 항에 있어서,The method of claim 17, 상기 진단부는, The diagnostic unit, 상기 PE 파일의 헤더내 실행코드의 시작 시점을 지시하는 엔트리 포인트값을 추출하여 상기 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 엔트리 포인트값인 제1 진단 데이터와 비교하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.A compiler for extracting an entry point value indicating a start time of an executable code in a header of the PE file and comparing it with first diagnostic data which is an entry point value previously known as a malicious code in the Visual Basic compiled PE file Malware diagnosis device by classification. 제 17 항에 있어서,The method of claim 17, 상기 진단부는,The diagnostic unit, 상기 PE 파일의 실행 코드내 상기 비쥬얼 베이직 컴파일러 특성 정보를 포함 하는 프로젝트 정보값을 추출하여 상기 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 프로젝트 정보값인 제2 진단 데이터와 비교하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.Extracting a project information value including the Visual Basic compiler characteristic information in the executable code of the PE file and comparing the extracted project information value with second diagnostic data which is a project information value known as malicious code in the Visual Basic compiled PE file Malware diagnosis device by compiler classification. 제 17 항에 있어서,The method of claim 17, 상기 진단부는,The diagnostic unit, 상기 검사대상 PE 파일의 비쥬얼 베이직 컴파일링된 실행코드가 P 코드 또는 Native 코드인지를 검사한 후, 검사된 코드 종류에 대응되게 상기 검사대상 PE 파일의 실행 코드내 삽입된 사용자 함수값을 추출하여 상기 비쥬얼 베이직 컴파일러의 제3 진단 데이터와 비교하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.After checking whether the Visual Basic compiled executable code of the check target PE file is a P code or a native code, extracting a user function value inserted in the execution code of the check target PE file corresponding to the checked code type An apparatus for diagnosing malware according to a compiler classification, characterized by comparing with third diagnostic data of a Visual Basic compiler. 제 20 항에 있어서,The method of claim 20, 상기 진단부는,The diagnostic unit, 상기 비쥬얼 베이직 컴파일링된 PE 파일의 실행코드내 프로젝트 구조를 분석하여 상기 실행코드내 삽입된 사용자 함수 중 파일 크기가 가장 크거나 가장 작은 함수 또는 제일 처음 위치한 함수거나 마지막 함수를 선택하여 사용자 함수값을 얻는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.Analyze the project structure in the executable code of the Visual Basic compiled PE file and select the function having the largest or smallest file size, the first located function or the last function among the user functions inserted in the executable code. Malware diagnosis apparatus by the compiler classification, characterized in that obtained. 제 21 항에 있어서,The method of claim 21, 상기 진단부는, The diagnostic unit, 상기 검사대상 PE 파일의 실행코드가 P 코드인 경우, 상기 선택된 사용자 함수의 시작 지점의 파일 오프셋값과 파일 크기값을 얻고, 상기 파일 오프셋에서부터 파일 크기만큼의 사용자 함수 OP 코드값을 산출하여 상기 제3 진단 데이터와의 비교를 위한 사용자 함수값을 얻는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.If the execution code of the PE file to be inspected is a P code, a file offset value and a file size value of a start point of the selected user function are obtained, and a user function OP code value corresponding to a file size is calculated from the file offset. 3 Malware diagnosis apparatus according to the compiler classification, characterized in that to obtain a user function value for comparison with the diagnostic data. 제 21 항에 있어서,The method of claim 21, 상기 진단부는,The diagnostic unit, 상기 PE 파일의 실행코드가 Native 코드인 경우에는, 상기 사용자 함수값 중 OP 코드값 산출에 있어서 상기 선택된 함수의 파일 오프셋 시작에서부터 파일 크기만큼의 OP 코드데이터중 OP 코드의 첫 데이터를 OP 코드값으로 산출하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.When the execution code of the PE file is a native code, the first data of the OP code among the OP code data corresponding to the file size from the start of the file offset of the selected function in calculating the OP code value among the user function values as the OP code value. Malware diagnosis apparatus by compiler classification, characterized in that the calculation. 제 21 항에 있어서,The method of claim 21, 상기 진단부는,The diagnostic unit, 상기 선택된 사용자 함수로부터 추출된 사용자 함수값이 상기 제3 진단 데이터와 일치하지 않는 경우, 상기 PE 파일의 실행코드내 삽입된 다른 사용자 함수를 선택하여 재차 상기 제3 진단 데이터와 비교를 수행하는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.If the user function value extracted from the selected user function does not match the third diagnostic data, select another user function inserted in the execution code of the PE file and perform comparison with the third diagnostic data again. Malware diagnosis device by compiler classification. 제 22 항 또는 제 23 항에 있어서,The method of claim 22 or 23, 상기 제3 진단 데이터는,The third diagnostic data is, 상기 비쥬얼 베이직 컴파일링된 PE 파일의 악성코드로 미리 알려진 사용자 함수값의 집합으로, 상기 검사대상 PE 파일의 사용자 함수값과 각각 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치. And a set of user function values previously known as malicious codes of the Visual Basic compiled PE file, and compared with user function values of the PE file to be inspected, respectively. 제 17 항에 있어서,The method of claim 17, 상기 프로젝트 정보 값과 사용자 함수값은, The project information value and the user function value, 미리 설정된 암호화 방식으로 기 설정된 n 바이트 값으로 생성되어 각각의 진단 데이터와 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.An apparatus for diagnosing malware according to a compiler classification, which is generated with a preset n-byte value by a preset encryption method and compared with each diagnostic data. 제 26 항에 있어서,The method of claim 26, 상기 n 바이트 값은,The n byte value is 해쉬, MD5 또는 CRC 방식을 통해 4바이트로 생성되는 값인 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단장치.Malware diagnosis apparatus according to the compiler classification, characterized in that the value generated by four bytes through the hash, MD5 or CRC method. 컴파일러 구분에 의해 악성코드를 진단하는 방법으로서,As a method of diagnosing malware by compiler classification, 컴퓨터상 활성화된 실행파일의 PE 파일을 악성코드 여부 검사를 위해 수집하는 단계와,Collecting PE files of activated executable files on the computer to check for malware; 상기 수집된 검사대상 PE 파일에 대해 각 PE 파일을 생성한 컴파일러를 분석하여 컴파일러별로 분류하는 단계와,Analyzing the compilers that generate each PE file with respect to the collected inspection target PE files, and classifying the compiler by compiler; 상기 컴파일러별로 분류된 PE 파일에 대해 각 컴파일러별로 수립된 진단 데이터를 이용하여 악성코드 여부를 진단하는 단계Diagnosing the presence of malicious code using diagnostic data established for each compiler for the PE files classified by the compiler 를 포함하는 컴파일러 구분에 의한 악성코드 진단방법.Malicious code diagnostic method by the compiler classification, including. 제 28 항에 있어서,The method of claim 28, 상기 진단단계는,The diagnostic step, 상기 컴파일러별 분류된 각 PE 파일에 대해 엔트리 포인트값과, 프로젝트 정보값, 사용자 함수값을 추출하는 단계와,Extracting an entry point value, a project information value, and a user function value for each PE file classified by the compiler; 상기 추출된 각 값에 대해 컴파일러별로 미리 저장된 제1, 제2, 제3 진단데이터와 각각 비교하는 단계와,Comparing each of the extracted values with first, second, and third diagnostic data stored in advance for each compiler; 상기 추출된 각 값이 각각의 진단 데이터와 일치하는 경우 악성코드로 진단하는 단계Diagnosing with malware when each value of the extracted data matches the respective diagnostic data 를 포함하는 컴파일러 구분에 의한 악성코드 진단방법.Malicious code diagnostic method by the compiler classification, including. 제 29 항에 있어서,The method of claim 29, 상기 엔트리 포인트값은, The entry point value is 상기 검사대상 PE 파일의 헤더내 존재하며, 상기 PE 파일의 실행코드 시작 시점을 지시하는 값인 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A method for diagnosing malicious code by distinguishing a compiler, which is present in a header of the test target PE file and indicates a starting point of execution code of the PE file. 제 30 항에 있어서,The method of claim 30, 상기 제1 진단 데이터는,The first diagnostic data, 컴파일러별 악성코드로 미리 알려진 PE 파일 엔트리 포인트값의 집합으로, 상기 검사대상 PE 파일의 엔트리 포인트값과 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A set of PE file entry point values previously known as compiler-specific malicious codes, and compared with an entry point value of the PE file to be inspected. 제 29 항에 있어서,The method of claim 29, 상기 프로젝트 정보값은, The project information value, 상기 검사대상 PE 파일의 실행 코드내 존재하며, 컴파일러 특성 정보를 포함하는 값인 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A method for diagnosing malicious code by classifying a compiler, which is present in the executable code of the test target PE file and includes compiler property information. 제 32 항에 있어서,The method of claim 32, 상기 제2 진단 데이터는,The second diagnostic data is, 컴파일러별 악성코드로 미리 알려진 PE 파일에 대한 프로젝트 정보값의 집합으로 상기 검사대상 PE 파일의 프로젝트 정보 값과 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A method for diagnosing malicious code by classifying a compiler, wherein the set of project information values for a PE file known as malware for each compiler is compared with the project information value of the PE file to be inspected. 제 29 항에 있어서,The method of claim 29, 상기 사용자 함수값은, The user function value is, 상기 검사대상 PE 파일의 실행 코드내 존재하며, 사용자에 의해 삽입된 함수의 시작지점의 파일 오프셋값과, 파일 크기값과 상기 파일 오프셋에서부터 파일 크기만큼의 사용자 함수 OP 코드값인 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.Compiler, which exists in the execution code of the PE file to be inspected, is a file offset value of the start point of the function inserted by the user, and a file size value and a user function OP code value corresponding to the file size from the file offset. Malware diagnosis method by classification. 제 34 항에 있어서,The method of claim 34, wherein 상기 사용자 함수값은, The user function value is, 상기 검사대상 PE 파일의 실행코드내 삽입된 사용자 함수 중 파일 크기가 가장 크거나 가장 작은 함수 또는 제일 처음 위치한 함수거나 마지막 함수 중 선택된 하나의 함수로부터 얻어지는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.Method for diagnosing malware by compiler classification, characterized in that the file size is obtained from one of the functions having the largest or smallest file size, the first located function or the last function among the user functions inserted into the execution code of the PE file to be scanned . 제 35 항에 있어서,36. The method of claim 35 wherein 상기 제3 진단 데이터는,The third diagnostic data is, 컴파일러별 악성코드로 미리 알려진 PE 파일에 대한 사용자 함수값의 집합으로, 상기 검사대상 PE 파일의 사용자 함수값과 각각 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A set of user function values for PE files known in advance as malware for each compiler, and the method for diagnosing malware by compiler classification, wherein the functions are compared with user function values of the PE file to be inspected. 제 36 항에 있어서,The method of claim 36, 상기 비교단계에서, In the comparison step, 상기 선택된 사용자 함수로부터 추출된 사용자 함수값이 상기 제3 진단 데이 터와 일치하지 않는 경우에는, 상기 PE 파일의 실행코드내 삽입된 다른 사용자 함수가 선택되어 재차 상기 제3 진단 데이터와 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.If the user function value extracted from the selected user function does not match the third diagnostic data, another user function inserted in the execution code of the PE file is selected and compared with the third diagnostic data again. How to diagnose malware by compiler classification. 제 29 항에 있어서,The method of claim 29, 상기 프로젝트 정보값과 사용자 함수값은, The project information value and the user function value, 미리 설정된 암호화 방식으로 기 설정된 n 바이트 값으로 생성되어 각각의 진단 데이터와 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A method of diagnosing malicious code by classifying a compiler, which is generated with a preset n-byte value using a preset encryption method and compared with each diagnostic data. 제 38 항에 있어서,The method of claim 38, 상기 n 바이트 값은,The n byte value is 해쉬, MD5 또는 CRC 방식을 통해 4바이트로 생성되는 값인 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.Method of diagnosing malware by compiler classification, characterized in that the value is generated by 4 bytes through hash, MD5 or CRC method. 컴파일러 구분에 의해 악성코드를 진단하는 방법으로서,As a method of diagnosing malware by compiler classification, 컴퓨터상 악성코드 여부 검사대상이 되는 실행파일들의 PE파일을 수집하는 단계와,Collecting PE files of executable files to be scanned for malicious code on a computer; 상기 수집된 PE 파일 중 비쥬얼 베이직 컴파일러로 생성된 PE 파일을 분류하는 단계와,Classifying the PE file generated by the Visual Basic compiler among the collected PE files; 상기 비쥬얼 베이직 컴파일러로 생성된 PE 파일로부터 엔트리 포인트값, 프로젝트 정보값, 사용자 함수값을 추출하는 단계와,Extracting an entry point value, a project information value, and a user function value from the PE file generated by the Visual Basic compiler; 상기 추출된 각 값을 악성코드 판단을 위해 미리 저장된 비쥬얼 베이직 컴파일러의 제1, 제2, 제3 진단 데이터와 각각 비교하는 단계와,Comparing the extracted values with first, second, and third diagnostic data of a visual basic compiler stored in advance to determine malicious codes; 상기 추출된 각 값이 각각의 진단 데이터와 일치하는 경우 악성코드로 진단하는 단계Diagnosing with malware when each value of the extracted data matches the respective diagnostic data 를 포함하는 컴파일러 구분에 의한 악성코드 진단방법.Malicious code diagnostic method by the compiler classification, including. 제 40 항에 있어서,The method of claim 40, 상기 엔트리 포인트값은, The entry point value is 상기 검사대상 PE 파일의 헤더내 존재하며, 상기 PE 파일의 실행코드 시작 시점을 지시하는 값으로, 상기 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 엔트리 포인트값인 제1 진단 데이터와 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A value in the header of the PE file to be inspected and indicating a start point of execution code of the PE file, which is compared with first diagnostic data which is an entry point value previously known as malicious code in the Visual Basic compiled PE file. Malicious code diagnostic method by the compiler classification, characterized in that. 제 40 항에 있어서,The method of claim 40, 상기 프로젝트 정보값은, The project information value, 상기 검사대상 PE 파일의 실행 코드내 존재하며, 상기 비쥬얼 베이직 컴파일러 특성 정보를 포함하는 값으로, 상기 비쥬얼 베이직 컴파일링된 PE 파일에서 악성코드로 미리 알려진 프로젝트 정보값인 제2 진단 데이터와 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A value that is included in the executable code of the PE file to be inspected and includes the Visual Basic compiler characteristic information, and is compared with second diagnostic data which is a project information value known as malicious code in the Visual Basic compiled PE file. Malicious code diagnosis method by distinguishing compiler. 제 40 항에 있어서,The method of claim 40, 상기 사용자 함수값은, The user function value is, 상기 검사대상 PE 파일의 실행코드내 사용자에 의해 삽입된 함수로, 상기 검사대상 PE 파일의 비쥬얼 베이직 컴파일링된 실행코드가 P코드 인 경우에는 사용자 함수의 시작지점의 파일 오프셋값과, 파일 크기값과 상기 파일 오프셋에서부터 파일 크기만큼의 사용자 함수 OP 코드값으로 추출되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A function inserted by a user in the executable code of the PE file to be inspected. When the Visual Basic compiled executable code of the PE file to be inspected is a P code, a file offset value and a file size value of the start point of the user function And a user function OP code value extracted as much as a file size from the file offset. 제 40 항에 있어서,The method of claim 40, 상기 사용자 함수값은, The user function value is, 상기 검사대상 PE 파일의 실행코드내 사용자에 의해 삽입된 함수로, 상기 검 사대상 PE 파일의 비쥬얼 베이직 컴파일링된 실행코드가 Native코드 인 경우에는 사용자 함수의 시작지점의 파일 오프셋값과, 파일 크기값과 상기 파일 오프셋에서부터 파일 크기만큼의 사용자 함수 OP 코드데이터 중 OP 코드의 첫 데이터가 OP 코드값으로 추출되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A function inserted by a user in the executable code of the PE file to be inspected. When the Visual Basic compiled executable code of the PE file to be scanned is a native code, a file offset value and a file size of the start point of the user function A method of diagnosing malware by compiler classification, wherein the first data of the OP code is extracted as an OP code value among user function OP code data corresponding to a file size from a value and the file offset. 제 43 항 또는 제 44 항에 있어서,The method of claim 43 or 44, 상기 사용자 함수값은, The user function value is, 상기 검사대상 PE 파일의 실행코드내 삽입된 사용자 함수 중 파일 크기가 가장 크거나 가장 작은 함수 또는 제일 처음 위치한 함수거나 마지막 함수 중 선택된 하나의 함수로부터 얻어지는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.Method for diagnosing malware by compiler classification, characterized in that the file size is obtained from one of the functions having the largest or smallest file size, the first located function or the last function among the user functions inserted into the execution code of the PE file to be scanned . 제 45 항에 있어서,The method of claim 45, 상기 제3 진단 데이터는,The third diagnostic data is, 상기 비쥬얼 베이직 컴파일링된 PE 파일의 악성코드로 미리 알려진 사용자 함수값의 집합으로, 상기 검사대상 PE 파일의 사용자 함수값과 각각 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.And a set of user function values previously known as malicious codes of the Visual Basic compiled PE file, and compared with user function values of the PE file to be inspected, respectively. 제 46 항에 있어서,The method of claim 46, 상기 비교단계에서, In the comparison step, 상기 선택된 사용자 함수로부터 추출된 사용자 함수값이 상기 제3 진단 데이터와 일치하지 않는 경우에는, 상기 PE 파일의 실행코드내 삽입된 다른 사용자 함수가 선택되어 재차 상기 제3 진단 데이터와 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.If the user function value extracted from the selected user function does not match the third diagnostic data, another user function inserted in the execution code of the PE file is selected and compared with the third diagnostic data again. How to diagnose malware by compiler classification. 제 40 항에 있어서,The method of claim 40, 상기 프로젝트 정보 값과 사용자 함수값은, The project information value and the user function value, 미리 설정된 암호화 방식으로 기 설정된 n 바이트 값으로 생성되어 각각의 진단 데이터와 비교되는 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.A method of diagnosing malicious code by classifying a compiler, which is generated with a preset n-byte value using a preset encryption method and compared with each diagnostic data. 제 48 항에 있어서,49. The method of claim 48 wherein 상기 n 바이트 값은,The n byte value is 해쉬, MD5 또는 CRC 방식을 통해 4바이트로 생성되는 값인 것을 특징으로 하는 컴파일러 구분에 의한 악성코드 진단방법.Method of diagnosing malware by compiler classification, characterized in that the value is generated by 4 bytes through hash, MD5 or CRC method.
KR1020080055619A 2008-06-13 2008-06-13 Apparatus and method for checking virus program by distinguishing compiler KR100968267B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080055619A KR100968267B1 (en) 2008-06-13 2008-06-13 Apparatus and method for checking virus program by distinguishing compiler

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080055619A KR100968267B1 (en) 2008-06-13 2008-06-13 Apparatus and method for checking virus program by distinguishing compiler

Publications (2)

Publication Number Publication Date
KR20090129609A true KR20090129609A (en) 2009-12-17
KR100968267B1 KR100968267B1 (en) 2010-07-06

Family

ID=41689517

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080055619A KR100968267B1 (en) 2008-06-13 2008-06-13 Apparatus and method for checking virus program by distinguishing compiler

Country Status (1)

Country Link
KR (1) KR100968267B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011108864A2 (en) * 2010-03-05 2011-09-09 주식회사 안철수연구소 Device and method for blocking malicious code using executable files
KR101299099B1 (en) * 2011-09-07 2013-09-16 주식회사 팬택 Apparatus and method for management of optimized virtualization module in embedded system
US9129109B2 (en) 2010-12-31 2015-09-08 Anhlab, Inc. Method and apparatus for detecting a malware in files
KR20210013433A (en) 2019-07-25 2021-02-04 호서대학교 산학협력단 TF-IDF-based Vector Conversion and Data Analysis Apparatus and Method
CN112989339A (en) * 2021-02-24 2021-06-18 西安理工大学 GCC compiler malicious code intrusion detection method based on machine learning

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101162051B1 (en) 2010-12-21 2012-07-03 한국인터넷진흥원 Using string comparison malicious code detection and classification system and method
KR101428781B1 (en) 2012-11-15 2014-08-08 한국전자통신연구원 Apparatus for classifying executable file using compiler information similarity and method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100494499B1 (en) * 2002-12-12 2005-06-10 주식회사 안철수연구소 Data retouching method for executing file on real time and virus elimination method using the data retouching method thereof
KR100620313B1 (en) * 2005-06-15 2006-09-06 (주)이월리서치 The system for detecting malicious code using the structural features of microsoft portable executable and its using method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011108864A2 (en) * 2010-03-05 2011-09-09 주식회사 안철수연구소 Device and method for blocking malicious code using executable files
WO2011108864A3 (en) * 2010-03-05 2012-01-12 주식회사 안철수연구소 Device and method for blocking malicious code using executable files
US9129109B2 (en) 2010-12-31 2015-09-08 Anhlab, Inc. Method and apparatus for detecting a malware in files
KR101299099B1 (en) * 2011-09-07 2013-09-16 주식회사 팬택 Apparatus and method for management of optimized virtualization module in embedded system
KR20210013433A (en) 2019-07-25 2021-02-04 호서대학교 산학협력단 TF-IDF-based Vector Conversion and Data Analysis Apparatus and Method
CN112989339A (en) * 2021-02-24 2021-06-18 西安理工大学 GCC compiler malicious code intrusion detection method based on machine learning
CN112989339B (en) * 2021-02-24 2023-05-02 西安理工大学 Machine learning-based malicious code intrusion detection method for GCC compiler

Also Published As

Publication number Publication date
KR100968267B1 (en) 2010-07-06

Similar Documents

Publication Publication Date Title
KR100968267B1 (en) Apparatus and method for checking virus program by distinguishing compiler
US10891378B2 (en) Automated malware signature generation
US8171551B2 (en) Malware detection using external call characteristics
US9525706B2 (en) Apparatus and method for diagnosing malicious applications
US20190319977A1 (en) Systems and Methods to Fingerprint and Classify Application Behaviors Using Telemetry
US9015814B1 (en) System and methods for detecting harmful files of different formats
US11048798B2 (en) Method for detecting libraries in program binaries
Ng et al. Expose: Discovering potential binary code re-use
US20160021174A1 (en) Computer implemented method for classifying mobile applications and computer programs thereof
KR100942798B1 (en) Apparatus and method for detecting a virus code
US20090133126A1 (en) Apparatus and method for detecting dll inserted by malicious code
KR101228899B1 (en) Method and Apparatus for categorizing and analyzing Malicious Code Using Vector Calculation
RU2427890C2 (en) System and method to compare files based on functionality templates
Ahmadi et al. Finding bugs using your own code: detecting functionally-similar yet inconsistent code
KR101110308B1 (en) Apparatus and method for detecting malicious code using packed file properties
CN111723380A (en) Method and device for detecting component bugs
Kim et al. Malicious behavior detection method using api sequence in binary execution path
CN114328168A (en) Anomaly detection method and device, computer equipment and storage medium
CN111753298A (en) File abnormity identification method, device, equipment and computer readable storage medium
Jin et al. Fumvar: a practical framework for generating f ully-working and u nseen m alware var iants
US11270000B1 (en) Generation of file digests for detecting malicious executable files
CN114925369A (en) Static analysis method and system for business system container safety
Santos et al. Generating Features of Windows Portable Executable Files for Static Analysis using Portable Executable Reader Module (PEFile)
CN112199684A (en) Java patch existence detection method based on cross-language code association
US20220245259A1 (en) Method for evaluating risk of data leakage in application, recording medium and device for performing the method

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130701

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20140630

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20160629

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20190701

Year of fee payment: 10