KR20080047251A - Apparatus and method for detecting packed file - Google Patents

Apparatus and method for detecting packed file Download PDF

Info

Publication number
KR20080047251A
KR20080047251A KR1020070072912A KR20070072912A KR20080047251A KR 20080047251 A KR20080047251 A KR 20080047251A KR 1020070072912 A KR1020070072912 A KR 1020070072912A KR 20070072912 A KR20070072912 A KR 20070072912A KR 20080047251 A KR20080047251 A KR 20080047251A
Authority
KR
South Korea
Prior art keywords
executable
file
executable file
section
compression
Prior art date
Application number
KR1020070072912A
Other languages
Korean (ko)
Other versions
KR100896319B1 (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 US11/860,599 priority Critical patent/US20080127038A1/en
Publication of KR20080047251A publication Critical patent/KR20080047251A/en
Application granted granted Critical
Publication of KR100896319B1 publication Critical patent/KR100896319B1/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
    • G06F21/562Static detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A device and a method for detecting executable compression of an executable program are provided to detect the executable compression from a mutated PE(Portable Executable) file, the PE file having a modified or corrected file header, and the file having a knowledge executable compression pattern. An abnormal PE file format detecting module(42) checks over whether a target file is executable by including an executable file format, and checks a PE file section name and property of the executable file. An abnormal instruction checking module(44) determines whether an instruction moved to a memory range area of other section by checking the instruction of a section including an entry point of the doubtable executable file based on a checking result. An executable compression determining module(46) determines that the executable compression is applied to the target file when the instruction moving to the memory range area of other sections is found. The target file is provided from an external storing part(20) by a command of a key input part(10).

Description

실행 프로그램의 실행 압축 유무 탐지 장치 및 방법{APPARATUS AND METHOD FOR DETECTING PACKED FILE}Apparatus and method for detecting execution compression of executable program {APPARATUS AND METHOD FOR DETECTING PACKED FILE}

도 1은 본 발명에 따른 실행 프로그램의 실행 압축 유무 탐지 장치의 일 실시예를 나타낸 블록도,1 is a block diagram showing an embodiment of an apparatus for detecting the presence or absence of execution compression of an execution program according to the present invention;

도 2는 본 발명에 따른 실행 프로그램의 실행 압축 유무 탐지 방법의 일 실시예를 단계별로 나타낸 순서도.Figure 2 is a flow chart showing step by step an embodiment of a method for detecting the presence or absence of execution compression of the execution program according to the present invention.

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

10: 키 입력부10: key input unit

20: 저장부20: storage

30: 표시부30: display unit

40: 프로그램 운영 시스템40: program operating system

42: 비정상적인 PE 파일 포맷 탐지 모듈42: Abnormal PE file format detection module

44: 비정상적인 인스트럭션 검사 모듈44: abnormal instruction check module

46: 실행 압축 유무 판단 모듈46: execution compression determination module

본 발명은 실행 프로그램의 실행 압축 유무 탐지 장치 및 방법에 관한 것으로, 특히, 실행 프로그램의 분석을 통하여 해당 실행 프로그램의 실행 압축 유무를 탐지하는 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for detecting the execution compression of an execution program, and more particularly, to an apparatus and a method for detecting the execution compression of an execution program by analyzing the execution program.

실행 압축은 일반적으로 많이 알려져 있는 zip, rar와 같은 류의 방식으로 압축 및 암호화 알고리즘을 이용하여 파일의 크기를 압축하여 크기를 줄이거나 역공학에 의한 프로그램 보호 등의 용도로 원래 개발이 되었으나 최근 들어 악성코드 제작자에 의해 악성코드의 변종을 제작하기 위하여 악용이 되고 있다. 실행압축 방식은 zip, rar와 같은 데이터 파일의 압축과는 다른 특징을 가지며 실행 파일을 압축하는데 가장 큰 목적이 있다. 최근까지 알려져 있는 실행압축 프로그램과 암호화 프로그램은 매우 다양하며, 악성코드 제작자들이 이런 종류의 프로그램을 악성프로그램 변형에 사용하고 있고, 계속해서 다양한 실행압축과 암호화 프로그램들이 개발되어 인터넷에 소스와 함께 공개가 되고 있다. 가장 대표적인 실행압축은 UPX, ASPack, FSG, Telock, PECompact, WWPack32, EZip, Pex, JDPack, DoomPack, Mew 등을 들 수 있고, 암호화 프로그램으로는 PE-Crypt, Yoda, PESpin, PE-Encrypter, VGCrypt 등이 있으며 이런 프로그램들은 인터넷에 자유롭게 배포되어 일반사용자들도 쉽게 접할 수 있으며 전세계에 수천가지 종류의 실행압축 프로그램이 존재하며 계속적으로 제작되어 배포되고 있다. 기존의 알려진 실행파일의 실행압축 유무를 탐지하는 기법은 실행압축 파일의 헤드 부분의 일정 부분의 패턴을 수집하여 패턴 매칭 방법을 통해 탐지가 가능하였다. 이러한 방식으로는 PEID가 가장 많이 알려져 있는 프로그램이다. 그렇지만, 이 방법은 파일 헤드 부분의 일부분만 수정 및 변형이 되면 실행 압축 유무를 탐지하는데 많은 어려움을 가지고 있다.Execution compression is a commonly known method such as zip and rar. It was originally developed to reduce the size by compressing the file size using compression and encryption algorithms or to protect the program by reverse engineering. It is being exploited by malware authors to produce variants of malware. Execution compression method is different from the compression of data files such as zip and rar, and has the biggest purpose of compressing the execution file. There are a variety of executable and encryption programs known to date, and malware writers are using these kinds of programs to transform them, and various executable compression and encryption programs have been developed and released on the Internet. It is becoming. The most representative execution compression is UPX, ASPack, FSG, Telock, PECompact, WWPack32, EZip, Pex, JDPack, DoomPack, Mew, etc.For encryption programs, PE-Crypt, Yoda, PESpin, PE-Encrypter, VGCrypt, etc. These programs are freely distributed on the Internet, accessible to the general public, and there are thousands of executable compression programs all over the world. Conventionally, a method for detecting the execution compression of a known executable file was detected through a pattern matching method by collecting a pattern of a portion of the head of the executable compressed file. In this way, PEID is the most known program. However, this method has a lot of difficulties in detecting the presence or absence of execution compression when only a part of the file head portion is modified and modified.

본 발명은 전술한 과제를 해결하기 위하여 안출한 것으로, 실행 프로그램의 분석을 통하여 해당 실행 프로그램의 실행 압축 유무를 탐지하는 실행 프로그램의 실행 압축 유무 탐지 장치 및 방법을 제공하는데 그 목적이 있다.The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an apparatus and method for detecting execution compression of an execution program that detects the execution compression of the execution program by analyzing the execution program.

이와 같은 목적을 달성하기 위하여,In order to achieve this purpose,

본 발명의 일 형태에 따르면, 키 입력부로부터 제공되는 명령에 따라 실행 프로그램의 실행 압축 유무를 탐지하는 장치로서, 검사 대상 파일에 실행 파일 포맷이 포함되어 실행 가능한지 여부, 해당 실행 파일의 PE 파일 섹션 이름 및 특성을 검사하는 비정상적인 PE 파일 포맷 탐지 모듈; 상기 검사 결과, 의심이 가는 실행 파일의 엔트리 포인트(Entry Point)가 존재하는 섹션에 대해 인스트럭션(Instruction)을 검사하여, 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는지를 판단하는 비정상적인 인스트럭션 검사 모듈; 상기 판단 결과, 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는 경우 상기 검사 대상 파일이 실행 압축되었다고 판단하는 실행 압축 유무 판단 모듈을 포함하여 이루어지는 것을 특징으로 하는 것이 제공된다.According to one embodiment of the present invention, an apparatus for detecting the execution compression of an executable program according to a command provided from a key input unit, and includes: an executable file format included in an inspection target file and executable name, and a PE file section name of the executable file. And an abnormal PE file format detection module for examining the characteristics. An abnormal instruction checking module that checks an instruction for a section in which an entry point of a suspect executable file exists and determines whether there is an instruction to move to a memory range region of another section; As a result of the determination, when there is an instruction to move to a memory range region of another section, it is provided that the execution compression determining module that determines whether the inspection target file is executable compression.

바람직하게는 상기 검사 대상 파일은 외부의 저장부로부터 상기 키 입력부의 명령에 따라 제공되는 것이 좋다.Preferably, the inspection target file may be provided according to a command of the key input unit from an external storage unit.

상기 실행 파일 포맷은 MZ 헤더(Header)와 PE 헤더를 포함하는 것이 좋다.The executable file format may include an MZ header and a PE header.

상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 실행 파일 포맷이 포함된 실행 파일이다. 상기 실행 파일 포맷은 MZ 헤더와 PE 헤더를 포함할 수 있다.The suspected executable file is an executable file including an executable file format in the inspection target file. The executable file format may include an MZ header and a PE header.

상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 실행 파일의 PE 파일의 비정상적인 섹션 이름이 있는 실행 파일이다.The suspect executable file is an executable file with an abnormal section name of the PE file of the executable file in the file to be scanned.

상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 읽기/쓰기/실행이 가능한 섹션이 두 개 이상 존재하는 실행 파일인 것이 좋다.The suspicious executable file is preferably an executable file having two or more sections that can be read / write / executed from the inspection target file.

상기 인스트럭션 검사는 상기 엔트리 포인트가 존재하는 섹션에 대해 역어셈블링을 통해 수행되는 것이 바람직하다.Preferably, the instruction check is performed through disassembly on the section in which the entry point exists.

상기 다른 섹션의 메모리범위 영역은 읽기/쓰기/실행 특성을 가지는 다른 섹션의 메모리범위 영역인 것이 좋다.The memory range area of the other section may be a memory range area of another section having read / write / execute characteristics.

본 발명의 다른 형태에 따르면, 키 입력부로부터 제공되는 명령에 따라 실행 프로그램의 실행 압축 유무를 탐지하는 장치에서 실행 압축 유무를 탐지하는 방 법으로서, (a) 검사 대상 파일에 실행 파일 포맷이 포함되어 실행 가능한지 여부, 해당 실행 파일의 PE 파일 섹션 이름 및 특성을 검사하는 단계; (b) 상기 검사 결과, 비정상적인 PE 파일 포맷이 존재하는 경우 의심이 가는 실행 파일의 엔트리 포인트가 존재하는 섹션에 대해 인스트럭션을 검사하여, 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는지를 판단하는 단계; (c) 상기 판단 결과, 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는 경우 상기 검사 대상 파일이 실행 압축되었다고 판단하는 단계를 포함하여 이루어지는 것을 특징으로 하는 것이 제공된다.According to another aspect of the present invention, a method for detecting the presence or absence of execution compression in a device that detects the execution compression of an execution program according to a command provided from a key input unit, includes: (a) Executable file format is included in a file to be scanned; Checking whether it is executable, the PE file section name and attributes of the executable file; (b) if the abnormal result of the PE file format exists, inspecting an instruction for a section in which an entry point of a suspect executable file exists, and determining whether there is an instruction to move to a memory range region of another section. ; and (c) determining that the file to be inspected is compressed when there is an instruction to move to a memory range area of another section as a result of the determination.

바람직하게는 상기 실행 파일 포맷은 MZ 헤더와 PE 헤더를 포함하는 것이 좋다.Preferably, the executable file format includes an MZ header and a PE header.

상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 실행 파일 포맷이 포함된 실행 파일이다. 상기 실행 파일 포맷은 MZ 헤더와 PE 헤더를 포함할 수 있다.The suspected executable file is an executable file including an executable file format in the inspection target file. The executable file format may include an MZ header and a PE header.

상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 실행 파일의 PE 파일의 비정상적인 섹션 이름이 있는 실행 파일이다.The suspect executable file is an executable file with an abnormal section name of the PE file of the executable file in the file to be scanned.

상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 읽기/쓰기/실행이 가능한 섹션이 두 개 이상 존재하는 실행 파일일 수 있다.The suspect file may be an executable file having two or more sections that can be read / write / executed from the inspection target file.

상기 인스트럭션 검사는 상기 엔트리 포인트가 존재하는 섹션에 대해 역어셈블링을 통해 수행되는 것이 좋다.The instruction check may be performed by disassembling the section in which the entry point exists.

상기 다른 섹션의 메모리범위 영역은 읽기/쓰기/실행 특성을 가지는 다른 섹션의 메모리범위 영역인 것이 바람직하다.The memory range area of the other section is preferably a memory range area of another section having read / write / execute characteristics.

이하, 첨부된 도면을 참조하여 본 발명에 따른 실시예를 상세히 설명하면 다음과 같다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 따른 실행 프로그램의 실행 압축 유무 탐지 장치의 일 실시예를 나타낸 블록도로, 키 입력부(10), 저장부(20), 표시부(30) 및 프로그램 운영 시스템(40)으로 구성된다.1 is a block diagram illustrating an embodiment of an apparatus for detecting execution compression of an execution program according to the present invention, and includes a key input unit 10, a storage unit 20, a display unit 30, and a program operating system 40. .

동 도면에 있어서, 키 입력부(10)는 키 보드, 마우스 등으로 구성될 수 있고, 사용자의 조작에 의거하여 해당 실행 프로그램의 실행 압축 유무 탐지를 수행하도록 하는 명령을 프로그램 운영 시스템(40)으로 제공한다.In the figure, the key input unit 10 may be composed of a keyboard, a mouse, or the like, and provides a command to the program operating system 40 to perform detection of the execution compression of the execution program based on a user's operation. do.

프로그램 운영 시스템(40)은 키 입력부(10)로부터 제공된 상기 실행 압축 유무 탐지 명령에 대응하는 검사 대상 파일을 저장부(20)에서 읽어온다. 프로그램 운영 시스템(40)은 저장부(20)에서 읽어온 검사 대상 파일에 대하여 실행 압축 유무 탐지를 수행한다. 프로그램 운영 시스템(40)은 자신의 각 동작 상태 및 그 동작 결과 등을 표시부(30)에 표시하여 사용자가 프로그램 운영 시스템(40)의 각 동작 상태 및 그 동작 결과 등을 볼 수 있도록 한다. 저장부(20)는 CD-ROM 드라이브, HDD 등으로 구성될 수 있다.The program operating system 40 reads a test target file corresponding to the execution compression detection command provided from the key input unit 10 from the storage unit 20. The program operating system 40 performs the execution compression detection on the inspection target file read from the storage unit 20. The program operating system 40 displays each operation state of the program and its operation result on the display unit 30 so that a user can view each operation state of the program operating system 40 and the operation result thereof. The storage unit 20 may be configured as a CD-ROM drive, an HDD, or the like.

이와 같은 프로그램 운영 시스템(40)이 해당 실행 프로그램의 실행 압축 유무 탐지를 수행하는 예를 상세히 보면 다음과 같다.An example in which the program operating system 40 performs detection of the presence or absence of execution compression of a corresponding execution program is as follows.

먼저 프로그램 운영 시스템(40) 내의 비정상적인 PE 파일 포맷 탐지 모 듈(42)은 저장부(20)로부터 사용자의 명령에 의거하여 제공되는 검사 대상 파일에 실행 파일 포맷인 MZ 헤더와 PE 헤더가 포함되어 실행 가능한지 여부, 해당 실행 파일의 PE 파일 섹션 이름 및 특성을 검사한다. 상기 프로그램 운영 시스템(40)은 키 입력부(10)를 통한 사용자의 명령에 의거하여 본 발명에 따른 실행 프로그램의 실행 압축 유무를 탐지하는 프로그램을 시작한다.First, the abnormal PE file format detection module 42 in the program operating system 40 is executed by including the executable file format MZ header and PE header in the file to be inspected provided based on a user's command from the storage unit 20. Check the PE file section name and attributes of the executable, if possible. The program operating system 40 starts a program for detecting the presence or absence of execution compression of an execution program according to the present invention based on a user's command through the key input unit 10.

비정상적인 인스트럭션 검사 모듈(44)은 비정상적인 PE 파일 포맷 탐지 모듈(42)의 검사 결과, 의심이 가는 실행 파일의 엔트리 포인트가 존재하는 섹션에 대해 역어셈블링을 통해 인스트럭션을 검사하여, 읽기/쓰기/실행 특성을 가지는 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는지를 판단한다. 상기 의심이 가는 실행 파일이란 비정상적인 PE 파일 포맷 탐지 모듈(42)의 검사 결과, 상기 검사 대상 파일에 실행 파일 포맷인 MZ 헤더와 PE 헤더가 포함되어 실행 가능한 경우나 해당 실행 파일의 PE 파일의 비정상적인 섹션 이름이 있거나 읽기/쓰기/실행이 가능한 섹션이 두 개 이상 존재할 경우의 해당 실행 파일을 의미한다.Abnormal instruction check module 44 reads / writes / executes an instruction by performing disassembly on a section where an entry point of a suspect executable file exists as a result of a check of abnormal PE file format detection module 42. It is determined whether there is an instruction to move to a memory range region of another section having a characteristic. The suspicious executable file is an abnormal PE file format detection module 42, and when the scan target file includes an executable file format, MZ header and PE header, or is executable or abnormal section of the PE file of the executable file. This is the executable file when there is more than one section with a name or read / write / executable.

실행 압축 유무 판단 모듈(46)은 비정상적인 인스트럭션 검사 모듈(44)의 판단 결과, 읽기/쓰기/실행 특성을 가지는 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는 경우 검사 대상 파일이 실행 압축되었다고 최종 판단한다.The execution compression determination module 46 determines that the file to be scanned is executable and compressed when there is an instruction to move to a memory range of another section having read / write / execution characteristics as a result of the abnormal instruction inspection module 44. To judge.

도 2는 본 발명에 따른 실행 프로그램의 실행 압축 유무 탐지 방법의 일 실시예를 단계별로 나타낸 순서도이다.2 is a flow chart showing step by step an embodiment of a method for detecting the presence or absence of execution compression of an execution program according to the present invention.

먼저 프로그램 운영 시스템(40) 내의 비정상적인 PE 파일 포맷 탐지 모듈(42)은 저장부(20)로부터 사용자의 명령에 의거하여 제공되는 검사 대상 파일에 실행 파일 포맷인 MZ 헤더와 PE 헤더가 포함되어 실행 가능한지 여부, 해당 실행 파일의 PE 파일 섹션 이름 및 특성을 검사한다(S10).First, the abnormal PE file format detection module 42 in the program operating system 40 includes the executable file format MZ header and PE header included in the inspection target file provided based on a user's command from the storage 20. Whether or not, the PE file section name and characteristics of the executable file are checked (S10).

비정상적인 인스트럭션 검사 모듈(44)은 비정상적인 PE 파일 포맷 탐지 모듈(42)의 검사 결과, 비정상적인 PE 파일 포맷이 존재하는 경우 의심이 가는 실행 파일의 엔트리 포인트가 존재하는 섹션에 대해 역어셈블링을 통해 인스트럭션을 검사하여, 읽기/쓰기/실행 특성을 가지는 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는지를 판단한다(S12, S14). 상기 의심이 가는 실행 파일이란 비정상적인 PE 파일 포맷 탐지 모듈(42)의 검사 결과, 상기 검사 대상 파일에 실행 파일 포맷인 MZ 헤더와 PE 헤더가 포함되어 실행 가능한 경우나 해당 실행 파일의 PE 파일의 비정상적인 섹션 이름이 있거나 읽기/쓰기/실행이 가능한 섹션이 두 개 이상 존재할 경우의 해당 실행 파일을 의미한다.Abnormal instruction checking module 44 detects an instruction by performing disassembly on a section in which an entry point of a suspect executable file exists when an abnormal PE file format detection module 42 detects an abnormal PE file format. In operation S12 and S14, it is determined whether there is an instruction for moving to a memory range region of another section having read / write / execute characteristics. The suspicious executable file is an abnormal PE file format detection module 42, and when the scan target file includes an executable file format, MZ header and PE header, or is executable or abnormal section of the PE file of the executable file. This is the executable file when there is more than one section with a name or read / write / executable.

실행 압축 유무 판단 모듈(46)은 비정상적인 인스트럭션 검사 모듈(44)의 판단 결과, 읽기/쓰기/실행 특성을 가지는 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는 경우 검사 대상 파일이 실행 압축되었다고 최종 판단한다(S16, S18).The execution compression determination module 46 determines that the file to be scanned is executable and compressed when there is an instruction to move to a memory range of another section having read / write / execution characteristics as a result of the abnormal instruction inspection module 44. It judges (S16, S18).

이와 같은 본 발명은 1차적으로, 실행 파일을 정적 분석하여 실행 가능한 파일 포맷을 찾아 일반 PE 파일 구조에 따른 PE 포맷 규정에 따르며 실행 가능한지 섹션 네임부분을 검사하여 비정상적인 섹션네임이나 구조를 가지면 의심스러운 파일로 탐지한다. 여기서, PE는 Portable Executable(이식가능한 실행 프로그램)를 뜻하며, Win32의 기본적인 파일형식이다. PE라는 형식은 유닉스의 Coff(common object file format)에서 갈라져 나왔으며, "Portable Executable"의 의미는 Win32 플랫폼 하에서 공통으로 사용할 수 있음을 뜻하며, 모든 Win32 실행파일(VxD와 16비트 DLL 제외)은 PE파일형식을 사용하며, NT의 커널도 PE파일 형식을 이용해 로드된다. 또한, 여기서 PE 섹션은 코드나 데이터를 의미하며 PE 포맷 규정에 따르면 각 섹션은 고유 구별 이름을 가지며, 정상적인 컴파일 과정을 거치면 TEXT, DATA, RDATA, EDATA, IDATA 등의 이름을 가지며, 사용자의 임의의 섹션 이름 지정이 가능하다. 이 1차 과정에서, 실행 가능한 코드 섹션이 2개 이상 존재하는지, 한 개의 실행 파일 안에 두 개 이상의 PE 파일을 가지는 실행파일이 존재하는지 검사하며,The present invention primarily analyzes an executable file to find an executable file format, follows the PE format specification according to the general PE file structure, and examines the section name to see if it is executable. To be detected. Here, PE stands for Portable Executable, which is the basic file format of Win32. The PE format is split off from the Unix common object file format (Coff), meaning "Portable Executable" means that it can be used commonly under the Win32 platform. All Win32 executables (except VxD and 16-bit DLLs) are PE The file format is used, and the NT kernel is also loaded using the PE file format. In addition, the PE section here means code or data, and according to the PE format specification, each section has a unique distinguished name, and after a normal compilation process, each section has a name of TEXT, DATA, RDATA, EDATA, IDATA, and so on. Section names can be specified. In this first step, it checks whether there are more than one section of executable code and whether there is an executable file with more than one PE file in one executable file.

2차적으로는 1차 검사에서 의심스러운 부분이 발견될 경우 해당 실행 파일 엔트리 포인트가 존재하는 섹션의 범위 안에서 역어셈블링을 통해 인스트럭션을 조사하여 엔트리 포인트가 존재하는 섹션의 범위의 주소공간을 벗어나 읽고 쓰기 및 실행 가능한 특성을 가지는 다른 섹션의 메모리범위 영역으로 이동이 있는지 검사하여 만약 있는 경우 최종적으로 실행 압축 되었다고 판단한다. 대부분의 실행압축은 원래 파일을 압축 및 암호화 과정을 통해 데이터로 만들어 다른 섹션에 저장하며 실제 실행 압축된 프로그램이 실행될 때 이 압축/암호화된 데이터 부분을 압축/암호화를 해제 한 후 프로그램의 실행 제어권 및 흐름이 원래 엔트리 포인트(Original Entry Point)로 이동하는 독특한 특성을 가진다.Secondly, if a suspicious portion is found in the primary scan, the instruction is examined by disassembly within the scope of the section where the executable entry point exists, reading out of the address space of the section where the entry point exists. It checks if there is a move to the memory range of another section with write and executable characteristics, and if so, determines that it is finally compressed. Most executable compression compresses and encrypts the original file into data and stores it in different sections. When the actual executable compressed program is run, the compressed / decrypted portion of the data is compressed / decrypted and then the program's execution control and The flow has a unique characteristic of moving to the original entry point.

본 발명에서 프로그램 운영 시스템(40)은 실행 프로그램의 실행 압축 유무 탐지 장치의 일 실시예로 볼 수 있다.In the present invention, the program operating system 40 may be regarded as an embodiment of an apparatus for detecting the presence or absence of execution compression of an execution program.

상술한 바와 같이 본 발명의 방법은 프로그램으로 구현되어 컴퓨터로 읽을 수 있는 형태로 기록매체(씨디롬, 램, 롬, 플로피 디스크, 하드 디스크, 광자기 디스크 등)에 저장될 수 있다.As described above, the method of the present invention may be implemented as a program and stored in a recording medium (CD-ROM, RAM, ROM, floppy disk, hard disk, magneto-optical disk, etc.) in a computer-readable form.

이상에서 설명한 본 발명은 전술한 실시 예 및 첨부된 도면에 의해 한정되는 것이 아니고 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변경 및 변환이 가능하다는 것이 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 있어 명백할 것이다.The present invention described above is not limited to the above-described embodiment and the accompanying drawings, and various substitutions, changes, and conversions can be made without departing from the spirit of the invention. It will be apparent to those who have knowledge.

본 발명은 1차적으로, 실행 파일을 정적 분석하여 실행 가능한 파일 포맷을 찾아 일반 PE 파일 구조에 따른 PE 포맷 규정에 따르며 실행 가능한지 섹션 네임부분을 검사하여 비정상적인 섹션네임이나 구조를 가지면 의심스러운 파일로 탐지한다.The present invention primarily detects an executable file format by statically analyzing an executable file, finds an executable file format, conforms to the PE format specification according to the general PE file structure, and examines the section name to see if it is executable and detects it as a suspicious file with an abnormal section name or structure. do.

2차적으로는 1차 검사에서 의심스러운 부분이 발견될 경우 해당 실행 파일 엔트리 포인트가 존재하는 섹션의 범위 안에서 역어셈블링을 통해 인스트럭션을 조사하여 엔트리 포인트가 존재하는 섹션의 범위의 주소공간을 벗어나 읽고 쓰기 및 실행 가능한 특성을 가지는 다른 섹션의 메모리범위 영역으로 이동이 있는지 검사하여 만약 있는 경우 최종적으로 실행 압축 되었다고 판단한다.Secondly, if a suspicious portion is found in the primary scan, the instruction is examined by disassembly within the scope of the section where the executable entry point exists, reading out of the address space of the section where the entry point exists. It checks if there is a move to the memory range of another section with write and executable characteristics, and if so, determines that it is finally compressed.

따라서 실행압축 프로그램의 변종이나 파일 헤드의 변형 또는 수정이 가해지거나, 알려지지 않은 실행압축 형태의 파일에 대해서도 실행 압축 유무를 탐지할 수 있다.Therefore, it is possible to detect the presence or absence of execution compression even for a variant of an execution compression program, a modification or modification of a file head, or an unknown execution compression type file.

Claims (17)

키 입력부로부터 제공되는 명령에 따라 실행 프로그램의 실행 압축 유무를 탐지하는 장치로서,A device for detecting the presence or absence of execution compression of an executable program according to a command provided from a key input unit, 검사 대상 파일에 실행 파일 포맷이 포함되어 실행 가능한지 여부, 해당 실행 파일의 PE(Portable Executable) 파일 섹션 이름 및 특성을 검사하는 비정상적인 PE 파일 포맷 탐지 모듈;An abnormal PE file format detection module that checks whether an executable file format is executable and included in the scan target file, and a portable executable file section name and characteristics of the executable file; 상기 검사 결과, 의심이 가는 실행 파일의 엔트리 포인트가 존재하는 섹션에 대해 인스트럭션을 검사하여, 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는지를 판단하는 비정상적인 인스트럭션 검사 모듈;An abnormal instruction checking module that checks an instruction for a section in which an entry point of a suspect executable file exists and determines whether there is an instruction to move to a memory range region of another section; 상기 판단 결과, 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는 경우 상기 검사 대상 파일이 실행 압축되었다고 판단하는 실행 압축 유무 판단 모듈을 포함하여 이루어지는 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 장치.And an execution compression determining module for determining whether the inspection target file is executable or compressed if an instruction to move to a memory range region of another section exists as a result of the determination. 청구항 1에 있어서,The method according to claim 1, 상기 검사 대상 파일은 외부의 저장부로부터 상기 키 입력부의 명령에 따라 제공되는 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 장치.And the inspection target file is provided according to a command of the key input unit from an external storage unit. 청구항 1에 있어서,The method according to claim 1, 상기 실행 파일 포맷은 MZ 헤더와 PE 헤더를 포함하는 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 장치.And the executable file format includes an MZ header and a PE header. 청구항 1에 있어서,The method according to claim 1, 상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 실행 파일 포맷이 포함된 실행 파일인 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 장치.And the executable file in question is an executable file of the executable program, wherein the executable file includes an executable file format in the scan target file. 청구항 4에 있어서,The method according to claim 4, 상기 실행 파일 포맷은 MZ 헤더와 PE 헤더를 포함하는 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 장치.And the executable file format includes an MZ header and a PE header. 청구항 1에 있어서,The method according to claim 1, 상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 실행 파일의 PE 파일의 비정상적인 섹션 이름이 있는 실행 파일인 것을 특징으로 하는 실행 프로그램 의 실행 압축 유무 탐지 장치.The suspicious executable file is an executable compression detection device of an executable program, characterized in that the executable file having an abnormal section name of the PE file of the executable file in the scan target file. 청구항 1에 있어서,The method according to claim 1, 상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 읽기/쓰기/실행이 가능한 섹션이 두 개 이상 존재하는 실행 파일인 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 장치.The suspicious executable file is an executable compression detection device of an executable program, characterized in that the executable file includes two or more sections that can be read / write / executed from the scan target file. 청구항 1에 있어서,The method according to claim 1, 상기 인스트럭션 검사는 상기 엔트리 포인트가 존재하는 섹션에 대해 역어셈블링을 통해 수행되는 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 장치.And detecting the execution compression of the execution program, wherein the instruction check is performed by disassembling the section in which the entry point exists. 청구항 1에 있어서,The method according to claim 1, 상기 다른 섹션의 메모리범위 영역은 읽기/쓰기/실행 특성을 가지는 다른 섹션의 메모리범위 영역인 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 장치.And a memory range region of the other section is a memory range region of another section having read / write / execute characteristics. 키 입력부로부터 제공되는 명령에 따라 실행 프로그램의 실행 압축 유무를 탐지하는 장치에서 실행 압축 유무를 탐지하는 방법으로서,A method for detecting the presence or absence of execution compression in a device that detects the execution compression of an execution program according to a command provided from a key input unit, (a) 검사 대상 파일에 실행 파일 포맷이 포함되어 실행 가능한지 여부, 해당 실행 파일의 PE 파일 섹션 이름 및 특성을 검사하는 단계;(a) checking whether the file to be scanned includes an executable file format and is executable, the PE file section name and characteristics of the executable file; (b) 상기 검사 결과, 비정상적인 PE 파일 포맷이 존재하는 경우 의심이 가는 실행 파일의 엔트리 포인트가 존재하는 섹션에 대해 인스트럭션을 검사하여, 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는지를 판단하는 단계;(b) if the abnormal result of the PE file format exists, inspecting an instruction for a section in which an entry point of a suspect executable file exists, and determining whether there is an instruction to move to a memory range region of another section. ; (c) 상기 판단 결과, 다른 섹션의 메모리범위 영역으로 이동하는 인스트럭션이 존재하는 경우 상기 검사 대상 파일이 실행 압축되었다고 판단하는 단계를 포함하여 이루어지는 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 방법.and (c) determining that the inspection target file is executable and compressed if there is an instruction to move to a memory range region of another section as a result of the determination. 청구항 10에 있어서,The method according to claim 10, 상기 실행 파일 포맷은 MZ 헤더와 PE 헤더를 포함하는 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 방법.The executable file format detecting method according to the execution compression of the executable program, characterized in that it comprises a MZ header and a PE header. 청구항 10에 있어서,The method according to claim 10, 상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 실행 파일 포맷이 포함된 실행 파일인 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 방법.And the executable file in question is an executable file including an executable file format in the scan target file. 청구항 12에 있어서,The method according to claim 12, 상기 실행 파일 포맷은 MZ 헤더와 PE 헤더를 포함하는 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 방법.The executable file format detecting method according to the execution compression of the executable program, characterized in that it comprises a MZ header and a PE header. 청구항 10에 있어서,The method according to claim 10, 상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 실행 파일의 PE 파일의 비정상적인 섹션 이름이 있는 실행 파일인 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 방법.The suspicious executable file is an executable file detection method of an executable program, characterized in that the executable file having an abnormal section name of the PE file of the executable file. 청구항 10에 있어서,The method according to claim 10, 상기 의심이 가는 실행 파일은 상기 검사 대상 파일에서 읽기/쓰기/실행이 가능한 섹션이 두 개 이상 존재하는 실행 파일인 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 방법.The suspicious executable file is an executable compression detection method of an executable program, characterized in that the executable file includes two or more sections that can be read / write / executed from the scan target file. 청구항 10에 있어서,The method according to claim 10, 상기 인스트럭션 검사는 상기 엔트리 포인트가 존재하는 섹션에 대해 역어셈블링을 통해 수행되는 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 방법.And detecting the execution compression of the execution program, wherein the instruction check is performed by disassembling the section in which the entry point exists. 청구항 10에 있어서,The method according to claim 10, 상기 다른 섹션의 메모리범위 영역은 읽기/쓰기/실행 특성을 가지는 다른 섹션의 메모리범위 영역인 것을 특징으로 하는 실행 프로그램의 실행 압축 유무 탐지 방법.And a memory range region of the other section is a memory range region of another section having read / write / execute characteristics.
KR1020070072912A 2006-11-23 2007-07-20 Apparatus and method for detecting packed file KR100896319B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US11/860,599 US20080127038A1 (en) 2006-11-23 2007-09-25 Apparatus and method for detecting self-executable compressed file

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020060116573 2006-11-23
KR20060116573 2006-11-23

Publications (2)

Publication Number Publication Date
KR20080047251A true KR20080047251A (en) 2008-05-28
KR100896319B1 KR100896319B1 (en) 2009-05-07

Family

ID=39663906

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070072912A KR100896319B1 (en) 2006-11-23 2007-07-20 Apparatus and method for detecting packed file

Country Status (1)

Country Link
KR (1) KR100896319B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100968120B1 (en) * 2008-03-10 2010-07-06 주식회사 안철수연구소 Detection system for malicious program considering code modification and method thereof
KR101029112B1 (en) * 2008-12-15 2011-04-13 한국전자통신연구원 Storage medium and method for packed PE file detection
KR101033258B1 (en) * 2008-08-29 2011-05-23 주식회사 안철수연구소 Apparatus and method for detecting if virus program is compressed

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100496770B1 (en) 2002-08-03 2005-06-23 (주)이월리서치 Virus email blocking algorithm and system
KR100475311B1 (en) * 2002-12-24 2005-03-10 한국전자통신연구원 Method and Apparatus for Detecting Malicious Executable Code using Behavior Risk Point
KR100628869B1 (en) * 2004-12-14 2006-09-27 한국전자통신연구원 Detection apparatus of embedded malicious code in office document and method thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100968120B1 (en) * 2008-03-10 2010-07-06 주식회사 안철수연구소 Detection system for malicious program considering code modification and method thereof
KR101033258B1 (en) * 2008-08-29 2011-05-23 주식회사 안철수연구소 Apparatus and method for detecting if virus program is compressed
KR101029112B1 (en) * 2008-12-15 2011-04-13 한국전자통신연구원 Storage medium and method for packed PE file detection

Also Published As

Publication number Publication date
KR100896319B1 (en) 2009-05-07

Similar Documents

Publication Publication Date Title
US8549635B2 (en) Malware detection using external call characteristics
US7581209B2 (en) Method for determining code coverage
TWI401582B (en) Monitor device, monitor method and computer program product thereof for hardware
US6968461B1 (en) Providing break points in a malware scanning operation
Alazab et al. Towards understanding malware behaviour by the extraction of API calls
JP4732484B2 (en) Exploit code analysis method and apparatus in non-executable file using virtual environment
US20100011441A1 (en) System for malware normalization and detection
US8312546B2 (en) Systems, apparatus, and methods for detecting malware
US7861300B2 (en) Method and apparatus for determination of the non-replicative behavior of a malicious program
US7257842B2 (en) Pre-approval of computer files during a malware detection
US20140082729A1 (en) System and method for analyzing repackaged application through risk calculation
US8763128B2 (en) Apparatus and method for detecting malicious files
US20070152854A1 (en) Forgery detection using entropy modeling
US7702159B2 (en) System and method for detecting similar differences in images
US6681329B1 (en) Integrity checking of a relocated executable module loaded within memory
JP2009129451A (en) Apparatus and method for detecting dynamic link library inserted by malicious code
KR100628869B1 (en) Detection apparatus of embedded malicious code in office document and method thereof
JP6866645B2 (en) Similarity determination program, similarity determination method and information processing device
KR20080043201A (en) Detection apparatus and method of embedded malicious code in file
KR100896319B1 (en) Apparatus and method for detecting packed file
US20180189116A1 (en) Non-transitory computer-readable storage medium, information processing apparatus and method
KR101161008B1 (en) system and method for detecting malicious code
US8151117B2 (en) Detection of items stored in a computer system
US20080127038A1 (en) Apparatus and method for detecting self-executable compressed file
JP2009129204A (en) Code inspection system, code inspection method, and program

Legal Events

Date Code Title Description
A201 Request for examination
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: 20130410

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20140326

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20160328

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20170406

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20180406

Year of fee payment: 10