KR101110308B1 - Apparatus and method for detecting malicious code using packed file properties - Google Patents

Apparatus and method for detecting malicious code using packed file properties Download PDF

Info

Publication number
KR101110308B1
KR101110308B1 KR1020080131717A KR20080131717A KR101110308B1 KR 101110308 B1 KR101110308 B1 KR 101110308B1 KR 1020080131717 A KR1020080131717 A KR 1020080131717A KR 20080131717 A KR20080131717 A KR 20080131717A KR 101110308 B1 KR101110308 B1 KR 101110308B1
Authority
KR
South Korea
Prior art keywords
file
compression method
malicious code
list
header
Prior art date
Application number
KR1020080131717A
Other languages
Korean (ko)
Other versions
KR20100073126A (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 KR1020080131717A priority Critical patent/KR101110308B1/en
Publication of KR20100073126A publication Critical patent/KR20100073126A/en
Application granted granted Critical
Publication of KR101110308B1 publication Critical patent/KR101110308B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/28Error detection; Error correction; Monitoring by checking the correct order of processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • 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
    • 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
    • G06F21/561Virus type analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/033Test or assess software

Abstract

본 발명은 실행압축 특성을 이용한 악성코드 탐지장치 및 그 방법에 관한 것이다. 본 발명에 따른 실행압축 특성을 이용한 악성코드 탐지장치 및 그 방법은, 대상파일의 파일 헤더를 분석하여, 실행압축 여부를 판단하고, 대상 파일이 실행압축된 경우, 압축방법을 헤더 분석과 압축방법의 시그니처를 이용한 분석 방법을 이용하여 압축방법을 검출한다. 실행압축에 사용된 압축방법을 악성코드 압축용 압축방법 데이터베이스와 비교하여, 대상파일의 악성코드 여부를 판단한다. 따라서, 실행 압축된 악성코드의 경우에도 압축해제 없이 악성코드 여부를 판단할 수 있다.The present invention relates to an apparatus and method for detecting malware using execution compression characteristics. Malware detection apparatus and method using the execution compression characteristics according to the present invention, by analyzing the file header of the target file, to determine whether to compress the execution, if the target file is executable compression, the header compression method and compression method The compression method is detected using the analysis method using the signature of. The compression method used for the execution compression is compared with the compression method database for malicious code compression to determine whether the target file is malicious code. Therefore, even in the case of running compressed malicious code, it is possible to determine whether the malicious code is without decompression.

멜웨어, 악성코드, 악성코드탐지, 압축방법검출, 실행압축, PE 헤더 Malware, Malware, Malware Detection, Compression Method Detection, Execution Compression, PE Header

Description

실행압축 특성을 이용한 악성코드 탐지장치 및 그 방법 {Apparatus and method for detecting malicious code using packed file properties}Apparatus and method for detecting malicious code using packed file properties}

본 발명은 악성코드 탐지기술에 관한 것으로, 윈도우 기반 실행 파일인 PE(Portable Executable)파일이 실행 압축된 경우, 압축방법을 검출하여 해당 파일의 악성코드 여부를 판단하는 실행압축 특성을 이용한 악성코드 탐지장치 및 그 방법에 관한 것이다.The present invention relates to a malicious code detection technology, when the executable executable (PE) file, which is a Windows-based executable file, is compressed, detects a compression method and detects malware using an execution compression characteristic that determines whether the file is malicious code. An apparatus and a method thereof are provided.

본 발명은 지식경제부 및 정보통신연구진흥원의 IT성장동력기술개발의 일환으로 수행한 연구로부터 도출된 것이다[과제관리번호: 2006-S-042-03, 과제명: Network 위협의 Zero-Day Attack 대응을 위한 실시간 공격 Signature 생성 및 관리 기술 개발]The present invention is derived from the research conducted as part of the IT growth engine technology development of the Ministry of Knowledge Economy and the Ministry of Information and Communication Research and Development. [Task management number: 2006-S-042-03, Task name: Countering Zero-Day Attack of Network Threat Development of Real Time Attack Signature Generation and Management Technique

악성코드를 실행압축 하는 이유는 악성코드 검색엔진의 탐색을 우회하거나, 리버스 엔지니어링을 통한 악성코드 분석을 막기 위한 목적으로 사용되고 있다. Black Hat 2006 학회는 Wildlist에 등록된 악성코드 중 92%가 실행압축되어 있다고 발표하였으며, PandaLab의 보고서는 새로운 악성코드의 79%가 실행압축되어 있다고 발표하였다. 또한, 새롭게 출현하는 악성코드의 50% 이상이 기존의 악성코드를 다 른 압축방법으로 압축한 형태라는 통계도 있다. 압축된 악성코드가 증가하는 이유는 압축방법의 소스코드가 공개되어 누구라도 쉽게 알고리즘 또는 소스코드를 수정하여 다양한 종류의 압축방법을 만들 수 있기 때문이다.The reason for compressing the execution of malware is to bypass the search of the malware search engine or to prevent the analysis of malware through reverse engineering. The Black Hat 2006 Society reported that 92 percent of Wildlist-registered malware was compressed, and PandaLab's report found that 79 percent of new malware was compressed. In addition, there are statistics that more than 50% of newly appeared malicious codes are compressed by other compression methods. The reason why the compressed malicious code is increased is that the source code of the compression method is disclosed and anyone can easily modify the algorithm or the source code to create various kinds of compression methods.

일반적으로 악성코드 검색엔진은 실행압축된 악성코드를 사전 탐지한 후, 추가적인 분석 작업을 수행한다. 압축해제 과정 전의 실행 파일은 악성코드 시그니쳐 검사를 통과할 수 있으므로, 반드시 압축해제 과정을 거친 후 검사를 해야 한다. 수동 압축해제 방식은 많은 시간과 노력이 필요하며, 자동 압축해제 방식은 모든 압축방법에 대해 압축해제 루틴을 구현해야 하므로 매우 복잡하고, 완벽하게 구현하는 것이 어렵다. In general, the malware search engine detects compressed compressed code and performs additional analysis. The executable file before the decompression process can pass the malware signature check, so it must be scanned after the decompression process. Manual decompression requires a lot of time and effort, and automatic decompression requires complex decompression routines for all compression methods, making it very complex and difficult to implement completely.

본 발명의 목적은 악성코드 탐지를 위해, 해당 파일의 압축방법을 PE 헤더 분석기법과 시그니처 분석기법을 이용하여 탐지한 후, 압축해제 과정 없이 압축방법을 비교하여 악성코드 여부를 판단하는 실행압축 특성을 이용한 악성코드 탐지 장치 및 그 방법을 제공하는 것이다.An object of the present invention is to detect the compression method of the file using the PE header analysis method and the signature analysis method for the detection of malicious code, and then compare the compression method without decompression process to determine the execution compression characteristics to determine whether or not malicious code The present invention provides a malware detection apparatus and method thereof.

상기 목적은, 대상파일의 파일 헤더를 분석하여 상기 대상파일의 PE 파일 여부를 판단하는 PE 파일 판단부, 상기 대상파일이 PE 파일인 경우, 상기 대상파일의 섹션 헤더 분석을 통해 실행압축 여부 및 압축방법을 검출하는 압축방법 검출부 및, 압축방법별 악성코드 여부를 표시하는 제1 데이터 베이스를 포함하고, 상기 제1 데이터 베이스와 상기 압축방법을 비교하여, 상기 대상파일의 악성코드 여부를 판단하는 악성코드 판단부를 포함하는 실행압축 특성을 이용한 악성코드 탐지장치에 의해 달성된다.The object of the present invention is a PE file determination unit that analyzes a file header of a target file to determine whether the target file is a PE file, and if the target file is a PE file, whether or not to execute compression through section header analysis of the target file. Compression method detection unit for detecting a method, and a first database for indicating whether or not malicious code for each compression method, comprising a comparison of the first database and the compression method, malicious to determine whether the target file malicious code It is achieved by a malware detection apparatus using the execution compression characteristics including a code determination unit.

또한, 대상 파일을 입력받고, 상기 대상파일이 PE 파일인지 확인하는 PE 파일 확인 단계, 상기 대상파일이 PE 파일인 경우, 상기 대상파일의 섹션 헤더 이름 및 특성 항목을 분석하여, 압축방법을 검출하는 압축방법 검출단계, 상기 압축방법과 압축방법별 악성코드 여부를 저장하고 있는 제1 데이터 베이스와 비교하여 악성코드를 검출하는 악성코드 검출단계 및, 상기 대상파일의 악성코드 여부를 출력하는 단계를 포함하는 실행압축 특성을 이용한 악성코드 탐지 방법에 의해 달성된다.In addition, a PE file checking step of receiving a target file, and checking whether the target file is a PE file, and if the target file is a PE file, analyzing a section header name and a characteristic item of the target file and detecting a compression method. Detecting a compression method, a malicious code detection step for detecting malicious code compared to the first database that stores the compression method and whether the malicious code for each compression method, and outputting whether the target file malicious code It is achieved by the malware detection method using the execution compression characteristic.

본 발명에 따르면, 실행압축된 대상파일을 압축해제 하지 않고, 악성코드 여부를 판단할 수 있다. 또한, 본 발명을 기존의 악성코드 탐색기법이 적용된 검색 엔진에 적용하면, 악성코드 검색속도와 정확도를 높일 수 있다.According to the present invention, it is possible to determine whether or not malicious code without decompressing the execution compressed target file. In addition, if the present invention is applied to a search engine to which the existing malware search method is applied, it is possible to increase the speed and accuracy of malware search.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세하게 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail a preferred embodiment of the present invention.

본 실행압축 특성을 이용한 악성코드 탐지장치 및 그 방법을 개괄적으로 설명하면 다음과 같다. 먼저 대상파일의 파일 헤더를 검사하여 PE 파일임을 확인한다. 대상파일이 PE 파일인 경우, 섹션헤더의 이름(Name)과 특성(Characteristics)항목을 조사하여 사용된 압축방법을 검출한다. 이때, 검출된 압축방법이 악성코드 압축용 압축방법인 경우, 대상파일을 악성코드로 판단한다. 그러나, 압축방법만으로 대상파일의 악성코드 여부를 판단할 수 없는 경우에는 대상파일에서 MD5와 파일크기를 추출하여, 악성코드의 압축방법, MD5, 파일크기가 저장된 악성코드 데이터베이스와 비교하여 대상파일의 악성코드 여부를 판단한다.An apparatus and method for detecting malicious codes using the present compression characteristics are described as follows. First, check the file header of the target file to verify that it is a PE file. If the target file is a PE file, the section header's Name and Characteristic items are examined to detect the compression method used. At this time, if the detected compression method is a compression method for compressing malicious codes, the target file is determined as malicious code. However, if it is not possible to determine the malicious code of the target file only by the compression method, extract MD5 and file size from the target file, and compare the target file with the malicious code compression method, MD5, and the malicious code database. Determine if malicious code

도 1은 마이크로소프트의 실행파일인 PE파일의 구조도이다.1 is a structural diagram of a PE file which is an executable file of Microsoft.

PE파일은 MS-DOS MZ 헤더(101), PE 시그니처(111)를 포함하는 PE 파일 헤더(113) 및 PE Optional 헤더(115)를 포함하는 NT 헤더(110), 섹션 헤더(120) 및 섹션 데이터(130)를 포함한다.The PE file is composed of an MS-DOS MZ header 101, an NT header 110 including a PE file header 113 including a PE signature 111 and a PE Optional header 115, a section header 120 and section data. 130.

MS-DOS MZ 헤더(101)은 마이크로소프트의 이전 운영체제인 MS-DOS와의 호환 을 위한 파일 헤더로, "MZ"문자열이 헤더의 시작위치에 존재하는 것을 특징으로 한다.MS-DOS MZ header 101 is a file header for compatibility with Microsoft's previous operating system, MS-DOS, characterized in that the "MZ" string is present at the beginning of the header.

NT 헤더(110)는 PE 시그니처(111), PE 파일 헤더(113) 및 PE Optional 헤더(115)를 포함한다.NT header 110 includes a PE signature 111, a PE file header 113, and a PE Optional header 115.

PE 시그니처(111)는 "PE00"의 문자열로 구성되어 있으며, 당해파일이 PE 파일임을 나타낸다. PE 시그니처(111)는 NT 헤더(110)의 시작위치에 존재하는 것을 특징으로 한다.The PE signature 111 is composed of a string of "PE00", indicating that the file is a PE file. PE signature 111 is characterized in that present in the start position of the NT header (110).

PE 파일 헤더(113)는 섹션의 갯수, 실행 가능한 컴퓨터의 타입, 파일의 최종변경시간 등을 알 수 있는 파일 특성에 관한 정보를 포함하고 있다. PE Optional 헤더(115)는 프로그램 코드의 엔트리 포인트등 프로그램을 실행하기 위한 정보를 포함하고 있다.The PE file header 113 includes information on file characteristics, such as the number of sections, the type of executable computer, the last modification time of the file, and the like. The PE Optional header 115 contains information for executing a program, such as an entry point of program code.

섹션 헤더(120)는 NT 헤더(110) 다음에 위치하며, NT 헤더(110)에 섹션 헤더의 기본정보가 포함되어 있다. 섹션 헤더(120)는 각 섹션별 섹션이름, 섹션크기 및 색션특성에 대한 정보를 포함한다.The section header 120 is located after the NT header 110, and the NT header 110 includes basic information of the section header. The section header 120 includes information about a section name, section size, and section characteristics of each section.

섹션 데이터(130)는 섹션 헤더(120) 뒤에 위치하며, 각 섹션의 특성별로 프로그램 코드나, 데이터 저장 공간 등으로 사용된다.The section data 130 is located behind the section header 120 and is used as program code or data storage space for each section characteristic.

도 2는 본 발명의 일 실시예인 실행압축 특성을 이용한 악성코드 탐지장치의 구성도이다.2 is a block diagram of a malicious code detection apparatus using an execution compression feature that is an embodiment of the present invention.

실행압축 특성을 이용한 악성코드 탐지장치(200)는 PE파일 검출부(210), 압축방법 검출부(220), 악성코드 검출부(230) 및 압축방법 데이터베이스(240)를 포함 하고 있다.The malware detection apparatus 200 using the execution compression characteristic includes a PE file detection unit 210, a compression method detection unit 220, a malicious code detection unit 230 and a compression method database 240.

PE파일 검출부(210)는, 대상파일의 헤더를 검사하여 "MZ"문자열로 시작되는지 확인한다. 대상파일의 PE파일 검출부(210)는 대상 파일의 헤더가 "MZ"로 시작하면, 시작위치로부터 일정비트 뒤에 존재하는 NT 헤더(110)를 검사한다. NT 헤더는 PE 시그니처(111)로 시작하며, PE 파일인 경우, "PE00"으로 NT 헤더(110)를 시작한다. 헤더가 "MZ"로 시작하고, NT 헤더에 PE 시그니처인 "PE00" 문자열이 존재하면 마이크로소프트의 운영체제에서 실행가능한 파일임을 나타낸다.The PE file detection unit 210 checks the header of the target file to see if it starts with the "MZ" string. When the header of the target file starts with "MZ", the PE file detection unit 210 of the target file checks the NT header 110 existing after a certain bit from the start position. The NT header starts with the PE signature 111 and, in the case of a PE file, the NT header 110 with "PE00". The header starts with "MZ" and the PE signature "PE00" string in the NT header indicates that the file is executable on the Microsoft operating system.

압축방법 검출부(220)는 섹션헤더 분석부(221)와 시그니처 검색부(223)를 포함한다.The compression method detector 220 includes a section header analyzer 221 and a signature searcher 223.

섹션헤더 분석부(221)는 대상파일이 PE 파일인 경우, 대상 파일의 섹션헤더(120)의 섹션 이름과 섹션 특성 정보를 분석하여, 압축방법을 검출한다.When the target file is a PE file, the section header analyzer 221 analyzes the section name and the section characteristic information of the section header 120 of the target file to detect a compression method.

일반적인 컴파일러에 의해 생성된 실행파일은 표준 섹션이름을 사용한다. 예를 들면, .text, .data, .rsrc, .reloc, .rdata, .idata, CODE, DATA 등이다. 그러나, PE 파일이 실행압축 되어 있는 경우, 압축방법마다 고유의 섹션이름을 사용한다. 예를 들면, 압축방법 ASPack는 섹션이름으로.aspack을, UPX는 UPX0, UPX1, UPX2를, Upack은 Upack 및 Yoda's Crypter는 yC를 사용한다. 따라서, 섹션이름을 분석하면 실행압축방법을 검출할 수 있다.Executables generated by common compilers use standard section names. For example, .text, .data, .rsrc, .reloc, .rdata, .idata, CODE, DATA, and so on. However, if the PE file is compressed, use a unique section name for each compression method. For example, the compression method ASPack uses .aspack as the section name, UPX uses UPX0, UPX1, UPX2, Upack uses Upack and Yoda's Crypter yC. Therefore, analyzing the section name can detect the execution compression method.

또한, 섹션특성 항목에는 해당 섹션이 읽기, 쓰기 및 실행가능 여부를 나타내는 값이 설정되어 있다. 일반적으로 실행압축된 경우, 실제 파일이 실행될 때, 해당 섹션을 압축해제해야 하므로, 섹션특성 항목은 쓰기와 실행가능이 동시에 설 정되어 있다.Also, a section property item is set with a value indicating whether the section can be read, written, or executed. In general, when the executable is compressed, the section property is set to be both writeable and executable because the section must be decompressed when the actual file is executed.

따라서, 섹션이름과 섹션특성을 분석하면, 대상파일의 실행압축 여부와, 압축방법을 검출할 수 있다.Therefore, by analyzing the section name and the section characteristics, it is possible to detect whether the target file is executed or not and how to compress it.

시그니처 검색부(223)는 대상파일의 헤더 안에 특정 문자열 패턴이 있는지 검색한다. 일반적인 실행압축 방법은 대상파일의 헤더 안에 고유한 Fingerprint를 남기므로, 이를 탐지하여 압축방법을 검출할 수 있다.The signature search unit 223 searches whether a specific string pattern exists in the header of the target file. The general execution compression method leaves a unique fingerprint in the header of the target file, so that the compression method can be detected by detecting it.

악성코드 검출부(230)은 압축방법 검출부(220)에서 검출한 압축방법과 압축방법 데이터베이스(240)를 비교하여 해당파일의 악성코드 여부를 검사한다.The malicious code detection unit 230 compares the compression method detected by the compression method detection unit 220 with the compression method database 240 and checks whether the corresponding file is malicious code.

압축방법 데이터베이스(240)는 악성코드의 압축방법을 저장한 제1 데이터베이스(241) 및 악성코드의 압축방법, 악성코드의 MD5, 악성코드의 파일크기를 포함하는 제2 데이터베이스(243)를 포함한다.The compression method database 240 includes a first database 241 storing a compression method of malicious codes, and a second database 243 including a compression method of malicious codes, MD5 of malicious codes, and file sizes of malicious codes. .

제1 데이터베이스(241)는 압축방법을 블랙리스트, 화이트리스트, 그레이리스트로 구분하여 저장한다. 블랙리스트에는 악성코드 압축에 사용되는 압축방법을 포함하며, 화이트리스트에는 일반적으로 악성코드 압축에 사용되지 않는 상용 압축방법을 포함한다. 악성코드에 사용되는 압축방법은 Upack, NsPack, Mew, Pex, Yoda's Crypter, PolyCryptPE 등이 포함되며, 상용 압축방법은 Themida, Armadillo, AsProtect, UPX, PeCompact, AsPack 등이 포함된다. 다만, 정상코드와 악성코드 양쪽 모두에 사용될 수 있는 압축방법의 경우에는 그레이리스트에 저장되며, 압축방법 중 FSG, Morphine등이 포함된다.The first database 241 stores the compression method into blacklist, whitelist, and graylist. Blacklists include compression methods used to compress malware, and whitelists include commercial compression methods that are not commonly used to compress malware. Compression methods used for malware include Upack, NsPack, Mew, Pex, Yoda's Crypter, PolyCryptPE, and commercial compression methods include Themida, Armadillo, AsProtect, UPX, PeCompact, AsPack, and others. However, the compression method that can be used for both normal and malicious code is stored in the gray list, and the compression methods include FSG and Morphine.

제1 데이터베이스(241)의 그레이리스트에 포함된 압축방법일 경우, 제1 데이 터베이스와의 비교만으로 대상파일의 악성코드 여부를 판단할 수 없다. 따라서, 악성코드의 압축방법, MD5 및 악성코드의 크기를 포함한 제2 데이터베이스(243)와 비교하여 대상파일의 악성코드 여부를 최종 판단한다.In the case of the compression method included in the gray list of the first database 241, it is not possible to determine whether the target file is a malicious code only by comparing with the first database. Therefore, it is finally determined whether or not the target file is malicious code as compared with the second database 243 including the malicious code compression method, MD5, and the size of the malicious code.

MD5는 대상파일을 입력 받아, 128비트 고정 길이의 출력값으로 변경된 것으로, 대상파일을 나타내는 고유의 값을 나타낸다.MD5 receives the target file, changes it to a 128-bit fixed-length output, and represents a unique value representing the target file.

도 3은 본 발명의 일 실시예인 실행압축 특성을 이용한 악성코드 탐지방법의 흐름도이다.3 is a flowchart illustrating a malicious code detection method using an execution compression feature that is an embodiment of the present invention.

PE 파일 검출부(210)에 검사 대상파일이 입력되면(S100), 대상파일의 헤더를 분석하여 PE 파일 여부를 검사한다(S101). When the test target file is input to the PE file detection unit 210 (S100), the header of the target file is analyzed to check whether the PE file is present (S101).

대상 파일이 PE 파일인 경우, 압축방법 검출부(220)는 대상파일의 섹션헤더를 분석하여 섹션이름과 특성항목을 추출한다(S103). 압축방법 검출부(220)는 추출된 섹션이름과 특성항목을 분석하여 대상파일의 실행압축 여부 및 압축방법을 검출한다. 다만, 추출된 섹션이름과 특성항목 분석을 통해 압축방법을 검출할 수 없는 경우에는 압축방법 검출부(220)는 대상파일의 헤더파일에 압축방법 고유의 Fingerprint를 포함하는지 검사하여, 압축방법을 검출한다(S105). If the target file is a PE file, the compression method detection unit 220 analyzes the section header of the target file and extracts the section name and the characteristic item (S103). The compression method detection unit 220 analyzes the extracted section name and characteristic items and detects whether the target file is executed or not and compresses the execution file. However, if the compression method cannot be detected through the analysis of the extracted section name and the characteristic item, the compression method detection unit 220 detects whether the header file of the target file includes a fingerprint unique to the compression method, and detects the compression method. (S105).

압축방법 검출부(220)에서 압축방법이 검출된 경우, 악성코드 검출부(230)는 악성코드용 압축방법의 사용여부를 검사하여 해당 파일의 악성코드 여부를 판단한다(S107).When the compression method is detected by the compression method detection unit 220, the malicious code detection unit 230 determines whether or not the malicious code of the file by checking the use of the compression method for malicious code (S107).

압축방법 검출부(220)에서 압축방법이 검출된 경우, 악성코드 검출부(230)는 먼저 안전한 압축방법이 등록된 화이트리스트에 포함되는지 검사한다(S107). 대상 파일이 화이트리스트에 포함된 경우, 대상파일을 안전한 파일로 판단한다. 대상파일의 압축방법이 화이트 리스트에 등록되지 않은 경우에는, 악성코드용 압축방법이 등록된 블랙리스트에 포함되는지 검사한다(S109). 블랙리스트에 포함된 경우에는 대상파일을 악성코드로 판단한다. 블랙리스트에 등록되지 않은 경우에는 검출된 압축방법이 그레이리스트에 포함되는지 검사한다(S111). 그레이리스트에 등록된 압축방법은 압축방법만으로는 대상파일의 악성코드여부를 판단할 수 없다. 따라서, 악성코드 검출부(230)는 대상파일의 MD5와 파일크기를 추출한다(S113). 추출된 대상파일의 MD5와 파일크기를 저장된 악성코드와 비교하여, 악성코드 여부를 최종 판단한다(S115). 마지막으로, 악성코드 검출부(230)의 판단결과를 출력한다(S117).When the compression method is detected by the compression method detection unit 220, the malicious code detection unit 230 first checks whether the safe compression method is included in the registered white list (S107). If the target file is included in the whitelist, the target file is determined to be a safe file. If the compression method of the target file is not registered in the white list, it is checked whether the compression method for malicious code is included in the registered black list (S109). If it is included in the blacklist, the target file is determined to be malicious code. If not registered in the black list, it is checked whether the detected compression method is included in the gray list (S111). The compression method registered in the gray list cannot determine whether the target file is malicious code only by the compression method. Therefore, the malware detection unit 230 extracts the MD5 and the file size of the target file (S113). By comparing the MD5 and the file size of the extracted target file with the stored malicious code, it is finally determined whether the malicious code (S115). Finally, the determination result of the malicious code detection unit 230 is output (S117).

이상 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안 될 것이다.While the preferred embodiments of the present invention have been shown and described, the present invention is not limited to the specific embodiments described above, and the present invention is not limited to the specific embodiments of the present invention, without departing from the spirit of the invention as claimed in the claims. Various modifications can be made by those skilled in the art, and these modifications should not be individually understood from the technical spirit or the prospect of the present invention.

도 1은 마이크로소프트가 정의한 PE 파일의 구조도,1 is a structural diagram of a PE file defined by Microsoft;

도 2는 본 발명의 일 실시예에 따른 실행압축 특성을 이용한 악성코드 탐지장치의 블록도, 그리고,2 is a block diagram of a malicious code detection apparatus using execution compression characteristics according to an embodiment of the present invention, and

도 3은 본 발명의 일 실시예에 따른 실행압축 특성을 이용한 악성코드 탐지방법의 흐름도이다.3 is a flowchart illustrating a malicious code detection method using execution compression characteristics according to an embodiment of the present invention.

Claims (10)

검사 대상 파일의 파일헤더에 PE 파일임을 식별하는 PE 시그니처를 포함하는지 검사하는 PE 파일 판단부;A PE file determination unit that checks whether the file header of the file to be checked includes a PE signature that identifies the PE file; 상기 파일헤더에 상기 PE 시그니처가 포함될 때, 상기 파일헤더의 섹션헤더에서 실행압축 여부 및 압축방법을 검출하는 압축방법 검출부; A compression method detector configured to detect whether or not an execution compression is performed and a compression method in a section header of the file header when the file header includes the PE signature; 악성코드가 아닌 정상코드에만 사용되는 압축방법을 저장한 제1리스트를 포함하고, 검사 대상인 상기 파일의 압축방법이 상기 제1리스트에 포함되는지 비교하여 상기 파일의 악성코드 여부를 판단하는 제1악성코드 판단부;A first malicious file including a first list storing a compression method used only for a normal code and not a malicious code, and comparing the compression method of the file to be included in the first list to determine whether the file is malicious code; Code determination unit; 악성코드에만 사용되는 압축방법을 저장하는 제2리스트를 포함하고, 상기 파일의 압축방법이 상기 제1 리스트에 포함되지 않으면, 상기 제2리스트에 포함되는지 비교하여 상기 파일의 악성코드 여부를 판단하는 제2악성코드 판단부; 및And a second list for storing a compression method used only for malicious code, and if the compression method of the file is not included in the first list, comparing the file with the second list to determine whether the file is malicious code. A second malicious code determination unit; And 악성코드 및 정상코드 모두에 사용되는 압축방법을 저장하는 제3리스트를 포함하고, 상기 파일의 압축방법이 상기 제1 리스트와 제2 리스트 모두에 포함되지 않으면, 상기 제3리스트에 포함되는지 비교하고, A third list storing a compression method used for both malicious code and normal code, and if the compression method of the file is not included in both the first list and the second list, compares whether the file is included in the third list, and , 상기 파일의 압축방법이 상기 제3 리스트에 포함되면, 압축방법, 파일의 MD5값, 파일크기 및 악성코드 플래그를 포함하는 제2 데이터베이스로부터 상기 파일의 MD5 및 파일크기를 추출하여 상기 제3리스트 데이터베이스와 비교하여 상기 파일의 악성코드 여부를 판단하는 제3 악성코드 판단부;를 포함하는 실행압축 특성을 이용한 악성코드 탐지장치.If the compression method of the file is included in the third list, the third list database is extracted by extracting the MD5 and file size of the file from a second database including a compression method, an MD5 value of the file, a file size, and a malicious code flag. And a third malicious code determiner that determines whether the file is malicious in comparison with the malicious code. 제 1항에 있어서,The method of claim 1, 상기 압축방법 검출부는, 상기 섹션헤더에서 섹션이름 및 특성항목을 추출한 후, 추출된 상기 섹션이름이 상기 악성 코드에 사용되지 않은 압축방법에서 사용되는 섹션이름인지 검사하고, 상기 특성항목이 쓰기 및 실행가능으로 설정되었는지 검사하여 상기 압축방법을 검출하는 섹션헤더 분석부;를 더 포함하는 실행압축 특성을 이용한 악성코드 탐지장치.The compression method detecting unit extracts a section name and a feature item from the section header, and then checks whether the extracted section name is a section name used in a compression method not used in the malicious code, and writes and executes the feature item. And a section header analyzer for detecting the compression method by checking whether it is set to be enabled. 제 1항에 있어서,The method of claim 1, 상기 압축방법 검출부는, 상기 파일헤더에 압축방법별 고유의 시그니처를 포함하는지 검사하여 상기 압축방법을 검출하는 시그니처 검색부;를 더 포함하는 실행압축 특성을 이용한 악성코드 탐지장치.The compression method detection unit, the signature detection unit for detecting the compression method by checking whether the file header includes a signature unique to each compression method; malware detection apparatus using the execution compression characteristics further comprising. 삭제delete 삭제delete 악성코드 검사장치의 PE 파일 판단부가, 검사 대상 파일의 파일헤더로부터 PE 파일임을 식별하는 PE 시그니처를 포함하는지 검사하는 단계;Checking whether the PE file determination unit of the malware inspection apparatus includes a PE signature that identifies the PE file from the file header of the file to be scanned; 상기 파일헤더에 상기 PE 시그니처가 포함될 때, 압축방법 검출부가 상기 파일헤더의 섹션헤더에서 압축 여부와 압축방법을 검출하는 단계;When the file header includes the PE signature, detecting a compression method and a compression method in a section header of the file header by a compression method detector; 제1악성코드 판단부가, 상기 파일의 압축방법이 기 저장된 제1리스트에 포함되는지 비교하여 상기 파일의 악성코드 여부를 판단하는 단계;A first malicious code determining unit determining whether the file is malicious code by comparing whether the compression method of the file is included in a previously stored first list; 상기 파일의 압축방법이 상기 제1 리스트에 포함되지 않으면, 제2악성코드 판단부가, 상기 파일의 압축방법이 악성코드에만 사용되는 압축방법을 저장하는 제2리스트에 포함되는지 비교하여 상기 파일의 악성코드 여부를 판단하는 단계; 및 If the compression method of the file is not included in the first list, the second malicious code determination unit compares whether the compression method of the file is included in a second list that stores a compression method used only for malicious code. Determining whether a code; And 상기 파일의 압축방법이 상기 제 1 리스트와 상기 제 2 리스트 어느 것에도 포함되지 않는 경우, 제 3 악성코드 판단부가 상기 파일의 압축방법이 제 3리스트에 포함되는지 비교하고, 만약 포함된다면 파일의 MD5 및 파일크기를 추출하고, 압축방법, MD5값, 파일크기 및 악성코드 플래그를 포함하는 제3리스트 데이터베이스와 비교하여 상기 파일의 악성코드 여부를 판단하는 단계;를 포함하는 실행압축 특성을 이용한 악성코드 탐지 방법.If the compression method of the file is not included in either the first list or the second list, a third malicious code determination unit compares whether the compression method of the file is included in the third list, and if so, MD5 of the file. And extracting the file size and determining whether the file is malicious by comparing with a third list database including a compression method, an MD5 value, a file size, and a malicious code flag. Detection method. 제 6항에 있어서,The method of claim 6, 상기 섹션헤더에서 압축방법을 검출할 수 없을 때, 상기 압축방법 검출부가 상기 섹션헤더에서 섹션이름 및 특성항목을 추출하여 상기 섹션이름을 상기 악성 코드에 사용되지 않은 압축방법에 사용되는 섹션이름과 비교하고, 상기 특성항목이 쓰기 및 실행가능으로 설정되었는지를 검사하여 상기 파일의 압축방법을 검출하는 단계;를 더 포함하는 실행압축 특성을 이용한 악성코드 탐지방법.When the compression method cannot be detected in the section header, the compression method detection unit extracts a section name and a characteristic item from the section header and compares the section name with the section name used in the compression method not used in the malicious code. And detecting whether a compression method of the file is detected by checking whether the characteristic item is set to be writeable and executable. 제 7항에 있어서,The method of claim 7, wherein 상기 섹션이름 및 특성 항목을 추출하여 압축방법을 판단할 수 없을 때, 상기 압축방법 검출부가 상기 섹션헤더에 압축방법별 고유의 시그니처를 포함하는지 검사하여 압축방법을 검출하는 단계;를 더 포함하는 실행압축 특성을 이용한 악성코드 탐지방법.And when it is impossible to determine the compression method by extracting the section name and the characteristic item, detecting the compression method by checking whether the compression method detection unit includes a signature specific to each compression method in the section header. Malware detection method using compression characteristics. 삭제delete 삭제delete
KR1020080131717A 2008-12-22 2008-12-22 Apparatus and method for detecting malicious code using packed file properties KR101110308B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080131717A KR101110308B1 (en) 2008-12-22 2008-12-22 Apparatus and method for detecting malicious code using packed file properties

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080131717A KR101110308B1 (en) 2008-12-22 2008-12-22 Apparatus and method for detecting malicious code using packed file properties

Publications (2)

Publication Number Publication Date
KR20100073126A KR20100073126A (en) 2010-07-01
KR101110308B1 true KR101110308B1 (en) 2012-02-15

Family

ID=42636143

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080131717A KR101110308B1 (en) 2008-12-22 2008-12-22 Apparatus and method for detecting malicious code using packed file properties

Country Status (1)

Country Link
KR (1) KR101110308B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101427566B1 (en) * 2013-02-05 2014-09-23 주식회사 잉카인터넷 system and method for reducing the danger of misdiagnosis
KR20210113872A (en) 2020-03-09 2021-09-17 박근홍 Method for Detecting Malicious Codes of Compressed File

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101217709B1 (en) 2010-12-31 2013-01-02 주식회사 안랩 Apparatus and Method for Detecting Malicious Code
KR101327865B1 (en) * 2011-12-29 2013-11-12 주식회사 시큐아이 Homepage infected with a malware detecting device and method
US9471783B2 (en) 2013-03-15 2016-10-18 Mcafee, Inc. Generic unpacking of applications for malware detection
CN104573514B (en) * 2013-10-29 2018-09-04 腾讯科技(深圳)有限公司 The detection method and device of compressed file
CN105765531A (en) 2013-12-26 2016-07-13 迈克菲公司 Generic unpacking of program binaries
KR101645412B1 (en) * 2014-05-28 2016-08-04 주식회사 안랩 Malicious file diagnosis device and control method thereof
KR102390355B1 (en) * 2015-11-16 2022-04-26 한국전자통신연구원 Method and apparatus for detecting attaks and generating attack signatures based on signature merging

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101427566B1 (en) * 2013-02-05 2014-09-23 주식회사 잉카인터넷 system and method for reducing the danger of misdiagnosis
KR20210113872A (en) 2020-03-09 2021-09-17 박근홍 Method for Detecting Malicious Codes of Compressed File

Also Published As

Publication number Publication date
KR20100073126A (en) 2010-07-01

Similar Documents

Publication Publication Date Title
KR101110308B1 (en) Apparatus and method for detecting malicious code using packed file properties
US9454658B2 (en) Malware detection using feature analysis
US20070152854A1 (en) Forgery detection using entropy modeling
CN102664875B (en) Malicious code type detection method based on cloud mode
JP4711949B2 (en) Method and system for detecting malware in macros and executable scripts
US20100011441A1 (en) System for malware normalization and detection
US20150256552A1 (en) Imalicious code detection apparatus and method
KR20160082644A (en) Method and apparatus for detecting malware by code block classification
KR20090051956A (en) The method and apparatus for judging dll inserted by malicious code in an operation system
CN109992969B (en) Malicious file detection method and device and detection platform
KR20140030989A (en) Method of obtaining signature of apk files for android operating system, and computer-readable recording medium with apk file signature computing program for the same
RU2728497C1 (en) Method and system for determining belonging of software by its machine code
CN113158197B (en) SQL injection vulnerability detection method and system based on active IAST
CN105718795A (en) Malicious code evidence obtaining method and system on the basis of feature code under Linux
EP2189920B1 (en) Malware signature builder and detection for executable code
KR101161008B1 (en) system and method for detecting malicious code
US7367056B1 (en) Countering malicious code infections to computer files that have been infected more than once
CN105468972B (en) A kind of mobile terminal document detection method
KR20160100887A (en) Method for detecting malware by code block comparison
KR20130074224A (en) Apparatus and method of collecting action pattern of malicious code
Akram et al. The making of indicator of compromise using malware reverse engineering techniques
CN108573148B (en) Confusion encryption script identification method based on lexical analysis
Ravula et al. Learning attack features from static and dynamic analysis of malware
KR101792631B1 (en) Api-based software similarity measuring method and system using fuzzy hashing
CN114925369A (en) Static analysis method and system for business system container safety

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: 20141229

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20170119

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20180118

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20190122

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20200120

Year of fee payment: 9