WO2016048070A1 - 실행파일 복원 장치 및 방법 - Google Patents

실행파일 복원 장치 및 방법 Download PDF

Info

Publication number
WO2016048070A1
WO2016048070A1 PCT/KR2015/010123 KR2015010123W WO2016048070A1 WO 2016048070 A1 WO2016048070 A1 WO 2016048070A1 KR 2015010123 W KR2015010123 W KR 2015010123W WO 2016048070 A1 WO2016048070 A1 WO 2016048070A1
Authority
WO
WIPO (PCT)
Prior art keywords
class
string
field
extracting
index
Prior art date
Application number
PCT/KR2015/010123
Other languages
English (en)
French (fr)
Inventor
박준용
Original Assignee
주식회사 안랩
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 안랩 filed Critical 주식회사 안랩
Publication of WO2016048070A1 publication Critical patent/WO2016048070A1/ko

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software

Definitions

  • the present invention relates to restoring an obfuscated executable file.
  • an executable file corresponding to an obfuscated executable file of an Android platform
  • the obfuscated executable file such as a DEX file
  • the obfuscated execution file is executed.
  • Parent-child relationships for each class defined by class definition items in the executable by recursively setting parent-child relationships between classes by referring to class-related information in the file header
  • the present invention relates to an executable file restoration apparatus and a method for restoring the original class hierarchy by analyzing the information about.
  • portable terminals such as smartphones and tablet PCs having various functions such as wireless Internet functions as well as telephone calls are widely used. It can be installed and deleted so that users can install or delete the application they want as needed.
  • Such smart phones and portable terminals such as tablet PCs have their own operating systems such as IOS and Android, for example, and development of applications executable by the operating systems is being actively performed.
  • the Android platform is an open source platform opened by Google's OHA (Open Handset Alliance). It is a Linux kernel, a virtual machine (VM) and a frame. Framework refers to a software package that includes both the application and the application.
  • the obfuscation technique of the conventional Windows platform has a long history and its restoration method has been publicly disclosed.
  • the restoration method for obfuscation on the Android platform has not been developed yet, the obfuscated executable file on the Android platform has not been developed. If it fails to restore, there is a problem that it is difficult to diagnose the malicious code inserted in the obfuscated executable file.
  • the present invention described above is an executable file restoring apparatus comprising: an analyzer for analyzing information on a parent-child relationship of each class definition item included in the executable file with reference to an obfuscated executable file header; An analysis result repository storing information on the parent-child relationship of each class definition item, and class hierarchy of the executable file using information on the parent-self relationship for each class definition item stored in the analysis result repository It includes a restorer to restore the structure.
  • the analyzer checks a first string ID in a class field declared as final static in each class definition item, and the class declared as a constructor in the corresponding class definition item. After checking the second string ID in a class method, the information on the parent-child relationship is analyzed using the first string ID and the second string ID.
  • the analyzer checks the first string ID including information on the type of the class field, and the second information including information on the first argument of the class method.
  • the class defined by the class definition item is analyzed as being a child class of a parent class corresponding to the first string ID and the second string ID.
  • the analyzer extracts a class field list of each class definition item of the executable file from the header of the executable file, and declares final static in the class field list. Characterized in that the searched class field.
  • the analyzer may extract a field ID index of the searched class field, extract a descriptor ID of the class field using the field ID index, and extract the first string ID using the descriptor ID. It features.
  • the analyzer may search for a field item on a header indicated by the field ID index, extract a type ID index indicated by the searched field item, and search for a type ID on the header indicated by the type ID index.
  • the descriptor ID of the class field is extracted from the searched type ID.
  • the analyzer extracts a class method declared as a constructor from a class method list of the class definition item, extracts a proto index corresponding to the first argument of the class method, and uses the proto index. It is characterized by extracting 2 string IDs.
  • the analyzer extracts a list of proto IDs of the header indicated by the proto index, extracts a shorty index of the corresponding proto ID item from the list of proto IDs, extracts a list of string IDs indicated by the shorty index, and then extracts the strings. And extracting a first string ID from among a plurality of string IDs included in the ID list as the second string ID.
  • the descriptor ID may be set to indicate the first string ID corresponding to a specific string in a string table that records a plurality of strings on the header.
  • the class field may be a field having an access flag of 0x10 bits and 0x1000 bits in the class field list.
  • the class method may be a method having an access flag of 0x10000 bits in the class method list of the class definition item.
  • the restorer may be configured to restore the class hierarchy of the executable file by arranging a class analyzed as a child class of the parent class below a class analyzed as a parent class using information about the parent-child relationship. It features.
  • the present invention also provides a method for restoring an executable file, the method comprising: extracting a class field list of each class definition item of the executable file from the header of the executable file when the executable file is obfuscated, and from the class field list Retrieving a class field declared in ticks, extracting a first string ID including information on the type of the class field among a plurality of variables of the retrieved class field, and declaring it as a constructor in the class definition item Extracting a second string ID including information on the first argument of the class method; and if the two string IDs are the same, the class defined by the class definition item is a child of a parent class corresponding to the string ID. Analyzing to be a class and the analyzed parent Using the relationship between the class and a child class includes the step of restoring the class hierarchy of the executable file.
  • the extracting of the first string ID may include extracting a field ID index of the searched class field, extracting a descriptor ID of the class field using the field ID index, and extracting the descriptor ID. And extracting the first string ID by using the first character string ID.
  • the extracting of the descriptor ID may include: searching a field item on a header indicated by the field ID index; extracting a type ID index indicated by the searched field item; and extracting the header indicated by the type ID index. Searching for a phase type ID, and extracting a descriptor ID of the class field from the searched type ID.
  • the extracting of the second string ID may include extracting a class method declared as a constructor from a class method list of the class definition item, and a protocol corresponding to the first argument of the class method declared as the constructor. Extracting an index and extracting the second string ID using the prototype index.
  • the extracting of the second string ID may include extracting a proto ID list of the header indicated by the proto index, extracting a shorty index of the corresponding proto ID item from the proto ID list, and the shorty index. Extracting a list of string IDs indicated by and extracting a first string ID from among a plurality of string IDs included in the string ID list as the second string ID.
  • the descriptor ID may be set to indicate the first string ID corresponding to a specific string in a string table that records a plurality of strings on the header.
  • the class field may be a field having an access flag of 0x10 bits and 0x1000 bits in the class field list.
  • the class method may be a method having an access flag of 0x10000 bits in the class method list of the class definition item.
  • FIG. 1 is a detailed block diagram of an executable file restoration apparatus according to an embodiment of the present invention.
  • FIG. 2 is an operation control flowchart for restoring a class hierarchy in an executable file restoration apparatus according to an embodiment of the present invention
  • 3 is a screen example of a result of performing a restoration for an obfuscated executable file by a conventional commercial decompiler
  • FIG. 4 is an exemplary view showing a result of restoring an obfuscated executable file in an executable file restoration apparatus according to an embodiment of the present invention.
  • Combinations of each block of the accompanying block diagram and each step of the flowchart may be performed by computer program instructions.
  • These computer program instructions may be mounted on a processor of a general purpose computer, special purpose computer, or other programmable data processing equipment such that instructions executed through the processor of the computer or other programmable data processing equipment may not be included in each block or flowchart of the block diagram. It will create means for performing the functions described in each step.
  • These computer program instructions may be stored in a computer usable or computer readable memory that can be directed to a computer or other programmable data processing equipment to implement functionality in a particular manner, and thus the computer usable or computer readable memory.
  • instructions stored in may produce an article of manufacture containing instruction means for performing the functions described in each block or flowchart of each step of the block diagram.
  • Computer program instructions may also be mounted on a computer or other programmable data processing equipment, such that a series of operating steps may be performed on the computer or other programmable data processing equipment to create a computer-implemented process to create a computer or other programmable data. Instructions that perform processing equipment may also provide steps for performing the functions described in each block of the block diagram and in each step of the flowchart.
  • each block or step may represent a portion of a module, segment or code that includes one or more executable instructions for executing a specified logical function (s).
  • a specified logical function s.
  • the functions noted in the blocks or steps may occur out of order.
  • the two blocks or steps shown in succession may in fact be executed substantially concurrently or the blocks or steps may sometimes be performed in the reverse order, depending on the functionality involved.
  • FIG. 1 illustrates a detailed block configuration of an executable file restoration apparatus 130 according to an embodiment of the present invention, and may include an analyzer 150, an analysis result storage unit 160, a restorer 170, and the like.
  • an operation of each component of the executable file restoration apparatus 130 of the present invention will be described in detail with reference to FIG. 1.
  • the analyzer 150 analyzes a parent-child relationship for each class definition item included in an executable file by referring to a header of an obfuscated executable file, for example, a DEX file.
  • the analyzer 150 provides information on the type of a class field declared as final static in each class definition item.
  • Check the first string ID to include may mean various variables that the class definition item has, and this field may include information such as an access flag, a type, a name, and the like.
  • the analyzer 150 checks the second string ID including the information on the first argument of the class method declared as the constructor among the methods of the corresponding class definition item, and checks the first string ID and the first string ID. 2 Compare the string ID. In this case, when the first string ID and the second string ID are the same, the analyzer 150 analyzes that the corresponding class defined by the class definition item is a child class of the parent class corresponding to the string ID. do.
  • the analyzer 150 searches for class fields declared as final static, and when the DEX file, which is an executable file, is obfuscated, extracts the class field list of each class definition item on the header of the executable file.
  • the class field list you can search for class fields that are declared final static.
  • the class field list may include a static field list and an instance field list, and a class field declared as final static may be included in the static field list.
  • the analyzer 150 may retrieve, for example, a class field declared as final static in the static field list of the class field list.
  • a class field declared as final static as above may have an access flag of 0x00 bits and 0x1000 bits in the class field list, and the analyzer 150 searches for the final access flag of the corresponding bit in the class field list to determine final status. You can search for class fields declared with.
  • the analyzer 150 after searching the class field as described above, extracts the field ID index using the searched class field, extracts the descriptor ID of the class field using the field ID index, and again
  • the first string ID which is a field string ID, may be extracted using the descriptor ID.
  • the analyzer 150 retrieves the field item on the header indicated by the field ID index, extracts the type ID index indicated by the searched field item, and extracts the type ID on the header indicated by the type ID index. After searching, the descriptor ID of the class field may be extracted from the searched type ID.
  • the descriptor ID may be set to indicate a first string ID corresponding to a specific string in a string table that records a plurality of strings on the header. Accordingly, the analyzer 150 may read a specific string stored in a string table on a header by using the descriptor ID.
  • the analyzer 150 extracts a class method declared as a constructor from the class method list of the corresponding class definition item, and corresponds to the first argument of the method declared as the constructor.
  • a prototype index may be extracted, and a second string ID, which is a prototype string ID, may be extracted using the prototype index.
  • the class method declared as such a constructor may refer to a method having an access flag of 0x10000 bits in the class method list of the class definition item.
  • the analysis result storage unit 160 stores information on the parent-child relationship of each class definition item analyzed by the analyzer 150.
  • the restorer 170 is connected to the analyzer 150 and the analysis result storage 160 of the executable file restoration device 130, and the information on the parent-child relationship of each class of the executable file analyzed by the analyzer 150. Is stored in the analysis result repository 160, the class hierarchy of the obfuscated executable file is restored using information on the parent-child relationship for each class definition item stored in the analysis result repository 160. That is, the restorer 170 restores the class hierarchy of the executable file by, for example, arranging the class analyzed as a child class of the parent class below the class analyzed as the parent class.
  • FIGS. 1 and 2 illustrates an operation control flow for restoring a class hierarchy in an executable file restoration apparatus according to an embodiment of the present invention.
  • FIGS. 1 and 2 illustrate an operation control flow for restoring a class hierarchy in an executable file restoration apparatus according to an embodiment of the present invention.
  • the analyzer 150 extracts a list of class definition items on a header of the obfuscated executable file 100 (S200). Next, the analyzer 150 extracts the static field list and the instance field list of each class definition item from the class definition item list as the class field list (S202).
  • the analyzer 150 searches for a class field declared as final static in the extracted class field list as described above (S204).
  • the class field list may include the static field list and the instance field list as described above, and the class field declared as final static may be included in the static field list.
  • the analyzer 150 may retrieve, for example, a class field declared as final static in the static field list of the class field list.
  • a class field declared as final static as described above may have an access flag of 0x00 bits and 0x1000 bits in the class field list, and the analyzer 150 searches for the final access flag of the corresponding bit in the class field list. You can search for class fields declared in ticks.
  • the analyzer 150 extracts the field ID index using the searched class field (S206).
  • the analyzer 150 searches for a field item on the header indicated by the field ID index by using the field ID index, and extracts the type ID index indicated by the searched field item again (S208).
  • the analyzer 150 again searches for the type ID on the header indicated by the type ID index, and then extracts the descriptor ID of the class field from the searched type ID (S210).
  • the analyzer 150 may extract the first string ID that is the field string ID using the descriptor ID of the corresponding class field extracted as described above (S212).
  • the descriptor ID as described above may be set to indicate a first string ID corresponding to a specific string in the string table that records a plurality of strings on the header, and the analyzer 150 may use the first string ID. You can read a specific string recorded in the string table. That is, the analyzer 150 may check information about the type of the class field declared as final static in each class definition item through the string read using the first string ID.
  • the analyzer 150 extracts a direct method list and a virtual method list of the corresponding class definition item as a class method list, and extracts a class method declared as a constructor from the class method list (S214).
  • the analyzer 150 extracts a proto index corresponding to the first argument of the class method using the extracted class method (S216).
  • the analyzer 150 again extracts the list of proto IDs of the header pointed to by the proto index, extracts the shorty index of the corresponding proto ID item from the list of proto IDs, and extracts the list of string IDs indicated by the shorty index. (S218).
  • the analyzer 150 extracts the first string ID among the plurality of string IDs included in the string ID list as the second string ID which is the prototype string ID (S220).
  • a prototype index may refer to index information of a class method having an access flag of 0x10000 bits among class methods of a class definition item.
  • the analyzer 150 compares the first string ID and the second string ID and checks whether they are the same (S222).
  • the analyzer 150 analyzes that the corresponding class defined by the class definition item is a child class of the parent class corresponding to the first string ID and the second string ID. (S224).
  • identification information such as a name of a parent class may be recorded in the first string ID and the second string ID.
  • the analyzer 150 stores information on the parent-child relationship of each class definition item analyzed through the above process in the analysis result storage 160 (S226).
  • the restorer 170 restores the class hierarchy of the obfuscated executable file using information on the parent-child relationship for each class definition item stored in the analysis result storage 160 (S228). At this time, the restorer aligns the class analyzed as a child class of the parent class below the class analyzed as the parent class to restore the class hierarchy of the executable file.
  • FIG. 3 illustrates a result screen of a conventional commercial decompiler performing restoration of an obfuscated executable file.
  • the child class and the like are changed to one letter due to obfuscation.
  • FIG. 4 illustrates a result screen of restoring an obfuscated executable file in an executable file restoration apparatus according to an exemplary embodiment of the present invention.
  • the c, d, and e classes are analyzed as child classes of the GoogleSyncServiceA class through reverse analysis of the obfuscated executable file through the restoration method according to the embodiment of the present invention.
  • the obfuscation of the executable file such as the DEX file is performed, refer to the class related information on the header of the obfuscated executable file.
  • the original class hierarchy can be restored by analyzing information about parent-child relationships for each class defined by class definition items in the executable.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Stored Programmes (AREA)

Abstract

본 발명에 따르면, 안드로이드 플랫폼의 실행파일에 대한 난독화에 대응하는 실행파일 복원에 있어서, DEX파일 등의 실행파일에 대한 난독화가 수행된 경우, 난독화된 실행파일의 헤더상 클래스 관련 정보를 참조하여 클래스간 부모-자식 관계를 재귀적으로 설정하는 것을 통해 실행파일내 클래스 정의 아이템에 의해 정의되는 각 클래스에 대한 부모-자식 관계에 대한 정보를 분석함으로써 원래의 클래스 계층구조를 복원시킬 수 있다.

Description

실행파일 복원 장치 및 방법
본 발명은 난독화된 실행파일 복원에 관한 것으로, 특히 안드로이드 플랫폼의 실행파일에 대한 난독화에 대응하는 실행파일 복원에 있어서, DEX파일 등의 실행파일에 대한 난독화가 수행된 경우, 난독화된 실행파일의 헤더상 클래스(class) 관련 정보를 참조하여 클래스간 부모-자식 관계를 재귀적으로 설정하는 것을 통해 실행파일내 클래스 정의 아이템(class definition item)에 의해 정의되는 각 클래스에 대한 부모-자식 관계에 대한 정보를 분석함으로써 원래의 클래스 계층구조를 복원시킬 수 있도록 하는 실행파일 복원 장치 및 방법에 관한 것이다.
근래에 들어, 유무선 인터넷뿐만 아니라 이동통신 기술의 발달로, 단순히 전화통화 기능뿐만이 아닌 무선 인터넷 기능 등 다양한 기능을 갖춘 스마트폰, 테블릿 PC 등의 휴대용 단말기가 보급되고 있으며, 이러한 휴대용 단말기는 응용프로그램의 설치 및 삭제가 가능하여 사용자가 필요에 따라 원하는 응용프로그램을 설치하거나 삭제할 수 있도록 하는 등 사용상 편리성이 크게 개선되었으며, 다양한 기능을 제공하고 있다.
이러한 스마트폰과, 테블릿 PC 등의 휴대용 단말기는 예를들어 IOS, 안드로이드 등 저마다의 운영체제가 존재하며, 해당 운영체제에 의해 실행 가능한 애플리케이션의 개발이 활발히 이루어지고 있다.
위와 같은 스마트폰의 운영체제 중 안드로이드(Android) 플랫폼은 구글(Google) 사가 주도하는 OHA(Open Handset Alliance)에서 공개한 오픈 소스 플랫폼으로, 리눅스(Linux) 커널, 가상머신(VM : Virtual Machine), 프레임워크(Framework), 응용프로그램을 모두 포함하는 소프트웨어 패키지를 의미한다.
현재 안드로이드 플랫폼에 대한 사용자들의 기대가 상승하고, 단말 제조사와 이동 통신 서비스 제공사의 높은 호응으로 안드로이드 플랫폼을 탑재하는 스마트폰 등의 휴대용 단말기가 점점 늘어남에 따라 안드로이드 응용프로그램 시장이 활성화되기 시작하였고, 양질의 안드로이드 응용프로그램 공급에 대한 요구가 높아지고 있다.
한편, 위와 같이 안드로이드 플랫폼을 탑재한 스마트폰 사용자가 늘어남에 따라 안드로이드 OS를 타겟으로 하는 악성코드 또한 급격히 증가하고 있으며, 안드로이드 악성코드 제작자들은 기존의 PC환경에서 익혔던 다양한 기술을 안드로이드 악성 애플리케이션의 제작에 반영하여 PC에서의 것보다 빠르게 발전시켜 나가고 있다.
또한, 최근 들어 이러한 악성코드들은 안티 바이러스 등의 진단장치에 의한 검출이 어렵도록 하기 위해 윈도우 플랫폼에서와 같이 난독화 등의 방법이 사용되고 있다.
종래 윈도우 플랫폼의 난독화 기법은 역사가 오래되어 그 복원 방법이 일부 공개된 바 있으나, 안드로이드 플랫폼에서의 난독화에 대한 복원 방법은 아직까지 개발되지 않은 상태이므로, 이러한 안드로이드 플랫폼에서 난독화된 실행파일을 복원하지 못하는 경우 난독화된 실행파일내에 삽입되어 있는 악성코드에 대해서는 진단이 어렵게 되는 문제점이 있다.
즉, 예를 들어 실행파일이 난독화된 이후에는 클래스 계층 구조에 대한 정보가 사라질 수 있으며, 이에 따라 난독화되지 않았을 때 클래스 계층구조의 분석을 통해 진단될 수 있는 악성코드가 난독화를 통해 변형이 대량으로 발생하는 경우 악성코드로 진단되지 않는 등 악성코드에 대한 정확한 진단이 어려운 문제점이 있었다.
따라서, 본 발명에서는 안드로이드 플랫폼의 실행파일에 대한 난독화에 대응하는 실행파일 복원에 있어서, DEX파일 등의 실행파일에 대한 난독화가 수행된 경우, 난독화된 실행파일의 헤더상 클래스 관련 정보를 참조하여 클래스간 부모-자식 관계를 재귀적으로 설정하는 것을 통해 실행파일내 클래스 정의 아이템에 의해 정의되는 각 클래스에 대한 부모-자식 관계에 대한 정보를 분석함으로써 원래의 클래스 계층구조를 복원시킬 수 있도록 하는 실행파일 복원 장치 및 방법을 제공하고자 한다.
상술한 본 발명은 실행파일 복원장치로서, 난독화된 실행파일의 헤더를 참조하여 상기 실행파일에 포함된 각 클래스 정의 아이템의 부모-자식 관계에 대한 정보를 분석하는 분석기와, 상기 분석기에서 분석된 각 클래스 정의 아이템의 상기 부모-자식 관계에 대한 정보를 저장하는 분석결과 저장소와, 상기 분석결과 저장소에 저장된 상기 각 클래스 정의 아이템에 대한 부모-자신 관계에 대한 정보를 이용하여 상기 실행파일의 클래스 계층 구조를 복원하는 복원기를 포함한다.
또한, 상기 분석기는, 상기 각 클래스 정의 아이템에서 파이널 스테이틱(final static)으로 선언된 클래스 필드(class field)에서 제1 문자열 아이디를 확인하고, 해당 클래스 정의 아이템에서 생성자(contructor)로 선언된 클래스 메소드(class method)에서 제2 문자열 아이디를 확인한 후, 상기 제1 문자열 아이디와 제2 문자열 아이디를 이용하여 상기 부모-자식 관계에 대한 정보를 분석하는 것을 특징으로 한다.
또한, 상기 분석기는, 상기 클래스 필드(class field)의 타입에 대한 정보를 포함하는 상기 제1 문자열 아이디를 확인하고, 상기 클래스 메소드(class method)의 첫 번째 인자에 대한 정보를 포함하는 상기 제2 문자열 아이디를 확인해서 상기 두 개의 문자열 아이디가 같은 경우 상기 클래스 정의 아이템이 정의하는 클래스가 상기 제1 문자열 아이디 및 제2 문자열 아이디에 해당하는 부모 클래스의 자식 클래스인 것으로 분석하는 것을 특징으로 한다.
또한, 상기 분석기는, 실행파일이 난독화된 경우 상기 실행파일의 헤더에서 상기 실행파일의 각 클래스 정의 아이템이 가지는 클래스 필드 목록을 추출하고, 상기 클래스 필드 목록에서 파이널 스테이틱(final static)으로 선언된 클래스 필드를 검색하는 것을 특징으로 한다.
또한, 상기 분석기는, 상기 검색된 클래스 필드의 필드 아이디 인덱스를 추출하고, 상기 필드 아이디 인덱스를 이용하여 상기 클래스 필드의 디스크립터 아이디를 추출하며, 상기 디스크립터 아이디를 이용하여 상기 제1 문자열 아이디를 추출하는 것을 특징으로 한다.
또한, 상기 분석기는, 상기 필드 아이디 인덱스가 가리키는 헤더상 필드 아이템을 검색하고, 상기 검색된 필드 아이템이 가리키는 타입 아이디 인덱스를 추출하며, 상기 타입 아이디 인덱스가 가리키는 상기 헤더상 타입 아이디를 검색한 후, 상기 검색된 타입 아이디에서 상기 클래스 필드의 디스크립터 아이디를 추출하는 것을 특징으로 한다.
또한, 상기 분석기는, 상기 클래스 정의 아이템의 클래스 메소드 목록에서 생성자로 선언된 클래스 메소드를 추출하고, 상기 클래스 메소드의 상기 첫 번째 인자에 해당하는 프로토 인덱스를 추출하며, 상기 프로토 인덱스를 이용하여 상기 제2 문자열 아이디를 추출하는 것을 특징으로 한다.
또한, 상기 분석기는, 상기 프로토 인덱스가 가리키는 헤더의 프로토 아이디 목록을 추출하고, 상기 프로토 아이디 목록에서 해당 프로토 아이디 아이템의 쇼티 인덱스를 추출하며, 상기 쇼티 인덱스가 가리키는 문자열 아이디 목록을 추출한 후, 상기 문자열 아이디 목록에 포함된 다수의 문자열 아이디 중 첫 번째 문자열 아이디를 상기 제2 문자열 아이디로 추출하는 것을 특징으로 한다.
또한, 상기 디스크립터 아이디는, 상기 헤더상 다수의 문자열을 기록하고 있는 스트링 테이블내 특정 문자열과 대응되는 상기 제1 문자열 아이디를 가리키도록 설정되는 것을 특징으로 한다.
또한, 상기 클래스 필드는, 상기 클래스 필드 목록에서 0x10 비트와 0x1000 비트의 액세스 플래그를 가지는 필드인 것을 특징으로 한다.
또한, 상기 클래스 메소드는, 상기 클래스 정의 아이템의 클래스 메소드 목록에서 0x10000비트의 액세스 플래그를 가지는 메소드인 것을 특징으로 한다.
또한, 상기 복원기는, 상기 부모-자식 관계에 대한 정보를 이용하여 부모 클래스로 분석된 클래스의 하위에 상기 부모 클래스의 자식 클래스로 분석된 클래스를 정렬시켜 상기 실행파일의 클래스 계층 구조를 복원시키는 것을 특징으로 한다.
또한, 본 발명은 실행파일 복원방법으로서, 실행파일이 난독화된 경우 상기 실행파일의 헤더에서 상기 실행파일의 각 클래스 정의 아이템이 가지는 클래스 필드 목록을 추출하는 단계와, 상기 클래스 필드 목록에서 파이널 스테이틱으로 선언된 클래스 필드를 검색하는 단계와, 상기 검색된 클래스 필드의 다수의 변수 중에서 상기 클래스 필드의 타입에 대한 정보를 포함하는 제1 문자열 아이디를 추출하는 단계와, 상기 클래스 정의 아이템에서 생성자로 선언된 클래스 메소드의 첫 번째 인자에 대한 정보를 포함하는 제2 문자열 아이디를 추출하는 단계와, 상기 두 개의 문자열 아이디가 같은 경우 상기 클래스 정의 아이템이 정의하는 클래스가 상기 문자열 아이디에 해당하는 부모 클래스의 자식 클래스인 것으로 분석하는 단계와, 상기 분석된 부모 클래스와 자식 클래스의 관계를 이용하여 상기 실행파일의 클래스 계층 구조를 복원하는 단계를 포함한다.
또한, 상기 제1 문자열 아이디를 추출하는 단계는, 상기 검색된 클래스 필드의 필드 아이디 인덱스를 추출하는 단계와, 상기 필드 아이디 인덱스를 이용하여 상기 클래스 필드의 디스크립터 아이디를 추출하는 단계와, 상기 디스크립터 아이디를 이용하여 상기 제1 문자열 아이디를 추출하는 단계를 포함하는 것을 특징으로 한다.
또한, 상기 디스크립터 아이디는 추출하는 단계는, 상기 필드 아이디 인덱스가 가리키는 헤더상 필드 아이템을 검색하는 단계와, 상기 검색된 필드 아이템이 가리키는 타입 아이디 인덱스를 추출하는 단계와, 상기 타입 아이디 인덱스가 가리키는 상기 헤더상 타입 아이디를 검색하는 단계와, 상기 검색된 타입 아이디에서 상기 클래스 필드의 디스크립터 아이디를 추출하는 단계를 포함하는 것을 특징으로 한다.
또한, 상기 제2 문자열 아이디를 추출하는 단계는, 상기 클래스 정의 아이템의 클래스 메소드 목록에서 생성자로 선언된 클래스 메소드를 추출하는 단계와, 상기 생성자로 선언된 클래스 메소드의 상기 첫 번째 인자에 해당하는 프로토 인덱스를 추출하는 단계와, 상기 프로토 인덱스를 이용하여 상기 제2 문자열 아이디를 추출하는 단계를 포함하는 것을 특징으로 한다.
또한, 상기 제2 문자열 아이디를 추출하는 단계는, 상기 프로토 인덱스가 가리키는 헤더의 프로토 아이디 목록을 추출하는 단계와, 상기 프로토 아이디 목록에서 해당 프로토 아이디 아이템의 쇼티 인덱스를 추출하는 단계와, 상기 쇼티 인덱스가 가리키는 문자열 아이디 목록을 추출하는 단계와, 상기 문자열 아이디 목록에 포함된 다수의 문자열 아이디 중 첫 번째 문자열 아이디를 상기 제2 문자열 아이디로 추출하는 단계를 포함하는 것을 특징으로 한다.
또한, 상기 디스크립터 아이디는, 상기 헤더상 다수의 문자열을 기록하고 있는 스트링 테이블내 특정 문자열과 대응되는 상기 제1 문자열 아이디를 가리키도록 설정되는 것을 특징으로 한다.
또한, 상기 클래스 필드는, 상기 클래스 필드 목록에서 0x10 비트와 0x1000 비트의 액세스 플래그를 가지는 필드인 것을 특징으로 한다.
또한, 상기 클래스 메소드는, 상기 클래스 정의 아이템의 클래스 메소드 목록에서 0x10000비트의 액세스 플래그를 가지는 메소드인 것을 특징으로 한다.
본 발명에 따르면, 안드로이드 플랫폼의 실행파일에 대한 난독화에 대응하는 실행파일 복원에 있어서, DEX파일 등의 실행파일에 대한 난독화가 수행된 경우, 난독화된 실행파일의 헤더상 클래스 관련 정보를 참조하여 클래스간 부모-자식 관계를 재귀적으로 설정하는 것을 통해 실행파일내 클래스 정의 아이템에 의해 정의되는 각 클래스에 대한 부모-자식 관계에 대한 정보를 분석함으로써 원래의 클래스 계층구조를 복원시킬 수 있는 이점이 있다.
또한, 위와 같은 복원방법을 적용하는 경우 난독화 되지 않았을 때 클래스 계층 구조로 진단되는 악성코드가 난독화를 통해 변형이 대량으로 발생하는 경우에도 난독화를 복원한 후 백신의 기존 진단 방법과 조합하여 악성코드로 모두 진단할 수 있는 이점이 있다. 또한, 난독화 악성코드의 복원방법을 자동화하여 침해사고의 사후 대응과 같은 대응 시간이 매우 중요한 경우 대응시간을 대폭 단축시킬 수 있어 서비스 품질을 높일 수 있는 이점이 있다.
도 1은 본 발명의 실시예에따른 실행파일 복원 장치의 상세 블록 구성도,
도 2는 본 발명의 실시예예 따른 실행파일 복원장치에서 클래스 계층구조를 복원하는 동작 제어 흐름도,
도 3은 종래 상용 디컴파일러가 난독화된 실행파일에 대한 복원을 수행한 결과 화면 예시도,
도 4는 본 발명의 실시예에 따른 실행파일 복원장치에서 난독화된 실행파일에 대한 복원을 수행한 결과 화면 예시도.
이하, 첨부된 도면을 참조하여 본 발명의 동작 원리를 상세히 설명한다. 하기에서 본 발명을 설명함에 있어서 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 그리고 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.
첨부된 블록도의 각 블록과 흐름도의 각 단계의 조합들은 컴퓨터 프로그램 인스트럭션들에 의해 수행될 수도 있다. 이들 컴퓨터 프로그램 인스트럭션들은 범용 컴퓨터, 특수용 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서에 탑재될 수 있으므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서를 통해 수행되는 그 인스트럭션들이 블록도의 각 블록 또는 흐름도의 각 단계에서 설명된 기능들을 수행하는 수단을 생성하게 된다. 이들 컴퓨터 프로그램 인스트럭션들은 특정 방식으로 기능을 구현하기 위해 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 지향할 수 있는 컴퓨터 이용 가능 또는 컴퓨터 판독 가능 메모리에 저장되는 것도 가능하므로, 그 컴퓨터 이용가능 또는 컴퓨터 판독 가능 메모리에 저장된 인스트럭션들은 블록도의 각 블록 또는 흐름도 각 단계에서 설명된 기능을 수행하는 인스트럭션 수단을 내포하는 제조 품목을 생산하는 것도 가능하다. 컴퓨터 프로그램 인스트럭션들은 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에 탑재되는 것도 가능하므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에서 일련의 동작 단계들이 수행되어 컴퓨터로 실행되는 프로세스를 생성해서 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 수행하는 인스트럭션들은 블록도의 각 블록 및 흐름도의 각 단계에서 설명된 기능들을 실행하기 위한 단계들을 제공하는 것도 가능하다.
또한, 각 블록 또는 각 단계는 특정된 논리적 기능(들)을 실행하기 위한 하나 이상의 실행 가능한 인스트럭션들을 포함하는 모듈, 세그먼트 또는 코드의 일부를 나타낼 수 있다. 또, 몇 가지 대체 실시 예들에서는 블록들 또는 단계들에서 언급된 기능들이 순서를 벗어나서 발생하는 것도 가능함을 주목해야 한다. 예컨대, 잇달아 도시되어 있는 두 개의 블록들 또는 단계들은 사실 실질적으로 동시에 수행되는 것도 가능하고 또는 그 블록들 또는 단계들이 때때로 해당하는 기능에 따라 역순으로 수행되는 것도 가능하다.
도 1은 본 발명의 실시 예에 따른 실행파일 복원 장치(130)의 상세 블록 구성을 도시한 것으로, 분석기(150), 분석결과 저장소(160), 복원기(170) 등을 포함할 수 있다. 이하, 도 1을 참조하여 본 발명의 실행파일 복원 장치(130)의 각 구성요소에서의 동작을 상세히 설명하기로 한다.
먼저, 분석기(150)는 난독화된 실행파일 예를 들어 DEX 파일의 헤더(header)를 참조하여 실행파일에 포함된 각 클래스 정의 아이템(class definition item)에 대한 부모-자식 관계를 분석한다.
이하, 분석기(150)에서의 동작을 보다 자세히 설명하면, 분석기(150)는 각 클래스 정의 아이템에서 파이널 스테이틱(final static)으로 선언된 클래스 필드(class field)의 타입(type)에 대한 정보를 포함하는 제1 문자열 아이디를 확인한다. 이때, 위와 같은 필드는 클래스 정의 아이템이 가지는 다양한 변수를 의미할 수 있으며, 이러한 필드에는 액세스 플래그(acess flag), 타입(type), 이름(name) 등의 정보가 포함될 수 있다.
이어, 분석기(150)는 해당 클래스 정의 아이템의 메소드(method) 중 생성자(constructor)로 선언된 클래스 메소드의 첫 번째 인자에 대한 정보를 포함하는 제2 문자열 아이디를 확인하고, 제1 문자열 아이디와 제2 문자열 아이디를 비교한다. 이때, 제1 문자열 아이디와 제2 문자열 아이디가 같은 경우 분석기(150)는 클래스 정의 아이템이 정의하는 해당 클래스가 문자열 아이디에 해당하는 부모 클래스(parent class)의 자식 클래스(child class)인 것으로 분석하게 된다.
또한, 이때 분석기(150)는 파이널 스테이틱으로 선언된 클래스 필드를 검색함에 있어서, 실행파일인 DEX파일 등이 난독화된 경우 실행파일의 헤더상 각 클래스 정의 아이템이 가지는 클래스 필드 목록을 추출하고, 클래스 필드 목록에서 파이널 스테이틱(final static)으로 선언된 클래스 필드를 검색할 수 있다. 이때, 이러한 클래스 필드 목록에는 정적 필드 목록과 인스턴스 필드 목록이 포함될 수 있으며, 파이널 스테이틱으로 선언된 클래스 필드는 정적 필드 목록에 포함될 수 있다. 따라서 분석기(150)는 예를 들어 클래스 필드 목록의 정적 필드 목록에서 파이널 스테이틱으로 선언된 클래스 필드를 검색할 수 있다.
이때, 위와 같이 파이널 스테이틱으로 선언된 클래스 필드는 클래스 필드 목록에서 0x00비트 및 0x1000비트의 액세스 플래그를 가질 수 있으며, 분석기(150)는 클래스 필드 목록에서 해당 비트의 액세스 플래그를 검색하여 파이널 스테이틱으로 선언된 클래스 필드를 검색할 수 있다.
또한, 분석기(150)는, 위와 같이 클래스 필드를 검색한 후, 검색된 클래스 필드를 이용하여 필드 아이디 인덱스를 추출하고, 필드 아이디 인덱스를 이용하여 해당 클래스 필드의 디스크립터(discriptor) 아이디를 추출하며, 다시 디스크립터 아이디를 이용하여 필드 문자열 아이디인 제1 문자열 아이디를 추출할 수 있다.
이때, 분석기(150)는 디스크립터 아이디를 추출함에 있어서, 필드 아이디 인덱스가 가리키는 헤더상 필드 아이템을 검색하고, 다시 검색된 필드 아이템이 가리키는 타입 아이디 인덱스를 추출하며, 타입 아이디 인덱스가 가리키는 헤더상 타입 아이디를 검색한 후, 검색된 타입 아이디에서 클래스 필드의 디스크립터 아이디를 추출할 수 있다.
이때, 이러한 디스크립터 아이디는 헤더상 다수의 문자열을 기록하고 있는 스트링 테이블(string table)내 특정 문자열과 대응되는 제1 문자열 아이디를 가리키도록 설정될 수 있다. 따라서, 분석기(150)는 디스크립터 아이디를 이용하여 헤더상 스트링 테이블(string table) 저장된특정 문자열을 읽어올 수 있는 것이다.
또한, 분석기(150)는 제2 문자열 아이디를 추출함에 있어서, 해당 클래스 정의 아이템의 클래스 메소드 목록에서 생성자(constructor)로 선언된 클래스 메소드를 추출하고, 생성자로 선언된 메소드의 첫 번째 인자에 해당하는 프로토(proto) 인덱스를 추출하며, 프로토 인덱스를 이용하여 프로토 문자열 아이디인 제2 문자열 아이디를 추출할 수 있다. 이때, 이러한 생성자로 선언된 클래스 메소드는 클래스 정의 아이템의 클래스 메소드 목록에서 0x10000비트의 액세스 플래그를 가지는 메소드를 말할 수 있다.
분석결과 저장소(160)는 분석기(150)에서 분석된 각 클래스 정의 아이템의 부모-자식 관계에 대한 정보를 저장한다.
복원기(170)는 실행파일 복원장치(130)의 분석기(150)와 분석결과 저장소(160)와 연결되며, 분석기(150)를 통해 분석된 실행파일의 각 클래스의 부모-자식 관계에 대한 정보가 분석결과 저장소(160)에 저장되는 경우, 분석결과 저장소(160)에 저장된 각 클래스 정의 아이템에 대한 부모-자식 관계에 대한 정보를 이용하여 난독화된 실행파일의 클래스 계층 구조를 복원한다. 즉, 복원기(170)는, 예를 들어 부모 클래스로 분석된 클래스의 하위에 부모 클래스의 자식 클래스로 분석된 클래스를 정렬시켜 실행파일의 클래스 계층 구조를 복원시키게 된다.
도 2는 본 발명의 실시예예 따른 실행파일 복원장치에서 클래스 계층구조를 복원하는 동작 제어 흐름을 도시한 것이다. 이하, 도 1 및 도 2를 참조하여 본 발명의 실시예를 상세히 설명하기로 한다.
먼저, 안드로이드 플랫폼에서 DEX 파일 등의 실행파일이 난독화되어 인가되는 경우 분석기(150)는 난독화된 실행파일(100)의 헤더(header)상 클래스 정의 아이템 목록을 추출한다(S200). 이어, 분석기(150)는 클래스 정의 아이템 목록에서 각 클래스 정의 아이템이 가지는 정적 필드 목록과 인스턴스 필드 목록을 클래스 필드 목록으로 추출한다(S202).
그런 후, 분석기(150)는 위와 같이 추출한 클래스 필드 목록에서 파이널 스테이틱(final static)으로 선언된 클래스 필드를 검색한다(S204). 이때, 이러한 클래스 필드 목록에는 위에서 설명한 바와 같이 정적 필드 목록과 인스턴스 필드 목록이 포함될 수 있으며, 파이널 스테이틱으로 선언된 클래스 필드는 정적 필드 목록에 포함될 수 있다. 따라서, 분석기(150)는 예를 들어 클래스 필드 목록의 정적 필드 목록에서 파이널 스테이틱으로 선언된 클래스 필드를 검색할 수 있다.
또한, 이때 위와 같이 파이널 스테이틱으로 선언된 클래스 필드는 클래스 필드 목록에서 0x00비트 및 0x1000비트의 액세스 플래그를 가질 수 있으며, 분석기(150)는 클래스 필드 목록에서 해당 비트의 액세스 플래그를 검색하여 파이널 스테이틱으로 선언된 클래스 필드를 검색할 수 있다.
위와 같이 파이널 스테이틱으로 선언된 클래스 필드를 검색한 경우, 분석기(150)는 검색된 클래스 필드를 이용하여 필드 아이디 인덱스를 추출한다(S206).
이어, 분석기(150)는 필드 아이디 인덱스를 이용하여 필드 아이디 인덱스가 가리키는 헤더상 필드 아이템을 검색하고, 다시 검색된 필드 아이템이 가리키는 타입 아이디 인덱스를 추출한다(S208).
위와 같이 타입 아이디 인덱스가 추출되는 경우, 분석기(150)는 다시 타입 아이디 인덱스가 가리키는 헤더상 타입 아이디를 검색한 후, 검색된 타입 아이디에서 클래스 필드의 디스크립터 아이디를 추출한다(S210).
이어, 분석기(150)는 위와 같이 추출한 해당 클래스 필드의 디스크립터 아이디를 이용하여 필드 문자열 아이디인 제1 문자열 아이디를 추출할 수 있다(S212).
이때, 위와 같은 디스크립터 아이디는 헤더상 다수의 문자열을 기록하고 있는 스트링 테이블내 특정 문자열과 대응되는 제1 문자열 아이디를 가리키도록 설정될 수 있으며, 분석기(150)는 이러한 제1 문자열 아이디를 이용하여 스트링 테이블내 기록된 특정 문자열을 읽어올 수 있게 된다. 즉, 분석기(150)는 제1 문자열 아이디를 이용하여 읽어온 문자열을 통해 각 클래스 정의 아이템에서 파이널 스테이틱(final static)으로 선언된 클래스 필드의 타입에 대한 정보 등을 확인할 수 있게 된다.
이어, 분석기(150)는 해당 클래스 정의 아이템이 가지는 직접 메소드 목록과 가상 메소드 목록을 클래스 메소드 목록으로 추출하고, 클래스 메소드 목록에서 생성자(constructor)로 선언된 클래스 메소드를 추출한다(S214).
이어, 분석기(150)는 위와 같이 추출된 클래스 메소드를 이용하여 클래스 메소드의 첫 번째 인자에 해당하는 프로토(proto) 인덱스를 추출한다(S216).
위와 같이 프로토 인덱스를 추출한 경우 분석기(150)는 다시 프로토 인덱스가 가리키는 헤더의 프로토 아이디 목록을 추출하고, 프로토 아이디 목록에서 해당 프로토 아이디 아이템의 쇼티 인덱스를 추출한 후, 쇼티 인덱스가 가리키는 문자열 아이디 목록을 추출한다(S218).
이어, 분석기(150)는 문자열 아이디 목록에 포함된 다수의 문자열 아이디 중 첫 번째 문자열 아이디를 프로토 문자열 아이디인 제2 문자열 아이디로 추출한다(S220). 이때, 이러한 프로토 인덱스는 클래스 정의 아이템의 클래스 메소드 중 0x10000비트의 액세스 플래그를 가지는 클래스 메소드의 인덱스 정보를 말할 수 있다.
위와 같이 제1 문자열 아이디와 제2 문자열 아이디를 추출한 경우, 분석기(150)는 제1 문자열 아이디와 제2 문자열 아이디를 비교하여 동일한 지 여부를 검사한다(S222).
이때, 제1 문자열 아이디와 제2 문자열 아이디가 같은 경우 분석기(150)는 클래스 정의 아이템이 정의하는 해당 클래스가 제1 문자열 아이디와 제2 문자열 아이디에 해당하는 부모 클래스의 자식 클래스인 것으로 분석하게 된다(S224). 이때, 제1 문자열 아이디와 제2 문자열 아이디에는 부모 클래스의 이름 등과 같은 식별정보가 기록되어 있을 수 있다.
이어, 분석기(150)는 위와 같은 과정을 통해 분석한 각 클래스 정의 아이템의 부모-자식 관계에 대한 정보를 분석결과 저장소(160)에 저장한다(S226).
그러면, 복원기(170)에서는 분석결과 저장소(160)에 저장된 각 클래스 정의 아이템에 대한 부모-자식 관계에 대한 정보를 이용하여 난독화된 실행파일의 클래스 계층 구조를 복원한다(S228). 이때, 복원기는, 예를 들어 부모 클래스로 분석된 클래스의 하위에 부모 클래스의 자식 클래스로 분석된 클래스를 정렬시켜 실행파일의 클래스 계층 구조를 복원시키게 된다.
도 3은 종래 상용 디컴파일러가 난독화된 실행파일에 대한 복원을 수행한 결과 화면을 예시한 것이다.
도 3에서와 보여지는 바와 같이 종래 디컴파일러(de-complier)에서 수행된 파일 복원 결과에서는 난독화로 인해 자식 클래스 등이 알파벳 한 글자로 바뀐 것을 확인할 수 있다. 또한, c, d, e 클래스가 GoogleSyncServiceA 클래스의 자식 클래스로 분석되지 않은 것을 볼 수 있으며, i, j, k, l, m, n 클래스가 NotifyActivity 클래스의 자식 클래스로 분석되지 않은 것을 볼 수 있는 등 계층 구조 복원에 실패한 모습을 확인할 수 있다.
도 4는 본 발명의 실시예에 따른 실행파일 복원장치에서 난독화된 실행파일에 대한 복원을 수행한 결과 화면을 예시한 것이다.
도 4에서 보여지는 바와 같이 본 발명의 실시예에 따른 복원방법을 통해서는 난독화된 실행파일의 역분석을 통해 c, d, e 클래스가 GoogleSyncServiceA 클래스의 자식 클래스로 분석된 것을 볼 수 있으며, i, j, k, l, m, n 클래스 또한 NotifyActivity 클래스의 자식 클래스로 분석된 것을 볼 수 있다.
따라서, 난독화에도 불구하고 자식 클래스가 모두 부모 클래스를 찾아 계층 구조로 표시됨으로써 실행파일의 원래의 계층 구조 복원에 성공한 모습을 확인할 수 있다.
상기한 바와 같이, 안드로이드 플랫폼의 실행파일에 대한 난독화에 대응하는 실행파일 복원에 있어서, DEX파일 등의 실행파일에 대한 난독화가 수행된 경우, 난독화된 실행파일의 헤더상 클래스 관련 정보를 참조하여 클래스간 부모-자식 관계를 재귀적으로 설정하는 것을 통해 실행파일내 클래스 정의 아이템에 의해 정의되는 각 클래스에 대한 부모-자식 관계에 대한 정보를 분석함으로써 원래의 클래스 계층구조를 복원시킬 수 있다.
한편 상술한 본 발명의 설명에서는 구체적인 실시예에 관해 설명하였으나, 여러 가지 변형이 본 발명의 범위에서 벗어나지 않고 실시될 수 있다. 따라서 발명의 범위는 설명된 실시 예에 의하여 정할 것이 아니고 특허청구범위에 의해 정하여져야 한다.

Claims (20)

  1. 난독화된 실행파일의 헤더를 참조하여 상기 실행파일에 포함된 각 클래스 정의 아이템의 부모-자식 관계에 대한 정보를 분석하는 분석기와,
    상기 분석기에서 분석된 각 클래스 정의 아이템의 상기 부모-자식 관계에 대한 정보를 저장하는 분석결과 저장소와,
    상기 분석결과 저장소에 저장된 상기 각 클래스 정의 아이템에 대한 부모-자신 관계에 대한 정보를 이용하여 상기 실행파일의 클래스 계층 구조를 복원하는 복원기
    를 포함하는 실행파일 복원장치.
  2. 제 1 항에 있어서,
    상기 분석기는,
    상기 각 클래스 정의 아이템에서 파이널 스테이틱(final static)으로 선언된 클래스 필드(class field)에서 제1 문자열 아이디를 확인하고, 해당 클래스 정의 아이템에서 생성자(contructor)로 선언된 클래스 메소드(class method)에서 제2 문자열 아이디를 확인한 후, 상기 제1 문자열 아이디와 제2 문자열 아이디를 이용하여 상기 부모-자식 관계에 대한 정보를 분석하는 것을 특징으로 하는 실행파일 복원장치.
  3. 제 1 항에 있어서,
    상기 분석기는,
    상기 클래스 필드(class field)의 타입에 대한 정보를 포함하는 상기 제1 문자열 아이디를 확인하고, 상기 클래스 메소드(class method)의 첫 번째 인자에 대한 정보를 포함하는 상기 제2 문자열 아이디를 확인해서 상기 두 개의 문자열 아이디가 같은 경우 상기 클래스 정의 아이템이 정의하는 클래스가 상기 제1 문자열 아이디 및 제2 문자열 아이디에 해당하는 부모 클래스의 자식 클래스인 것으로 분석하는 것을 특징으로 하는 실행파일 복원장치.
  4. 제 2 항에 있어서,
    상기 분석기는,
    상기 실행파일의 헤더에서 상기 실행파일의 각 클래스 정의 아이템이 가지는 클래스 필드 목록을 추출하고, 상기 클래스 필드 목록에서 파이널 스테이틱(final static)으로 선언된 클래스 필드를 검색하는 것을 특징으로 하는 실행파일 복원장치.
  5. 제 4 항에 있어서,
    상기 분석기는,
    상기 검색된 클래스 필드의 필드 아이디 인덱스를 추출하고, 상기 필드 아이디 인덱스를 이용하여 상기 클래스 필드의 디스크립터 아이디를 추출하며, 상기 디스크립터 아이디를 이용하여 상기 제1 문자열 아이디를 추출하는 것을 특징으로 하는 실행파일 복원장치.
  6. 제 5 항에 있어서,
    상기 분석기는,
    상기 필드 아이디 인덱스가 가리키는 헤더상 필드 아이템을 검색하고, 상기 검색된 필드 아이템이 가리키는 타입 아이디 인덱스를 추출하며, 상기 타입 아이디 인덱스가 가리키는 상기 헤더상 타입 아이디를 검색한 후, 상기 검색된 타입 아이디에서 상기 클래스 필드의 디스크립터 아이디를 추출하는 것을 특징으로 하는 실행파일 복원장치.
  7. 제 2 항에 있어서,
    상기 분석기는,
    상기 클래스 정의 아이템의 클래스 메소드 목록에서 생성자로 선언된 클래스 메소드를 추출하고, 상기 클래스 메소드의 상기 첫 번째 인자에 해당하는 프로토 인덱스를 추출하며, 상기 프로토 인덱스를 이용하여 상기 제2 문자열 아이디를 추출하는 것을 특징으로 하는 실행파일 복원장치.
  8. 제 7 항에 있어서,
    상기 분석기는,
    상기 프로토 인덱스가 가리키는 헤더의 프로토 아이디 목록을 추출하고, 상기 프로토 아이디 목록에서 해당 프로토 아이디 아이템의 쇼티 인덱스를 추출하며, 상기 쇼티 인덱스가 가리키는 문자열 아이디 목록을 추출한 후, 상기 문자열 아이디 목록에 포함된 다수의 문자열 아이디 중 첫 번째 문자열 아이디를 상기 제2 문자열 아이디로 추출하는 것을 특징으로 하는 실행파일 복원장치.
  9. 제 5 항에 있어서,
    상기 디스크립터 아이디는,
    상기 헤더상 다수의 문자열을 기록하고 있는 스트링 테이블내 특정 문자열과 대응되는 상기 제1 문자열 아이디를 가리키도록 설정되는 것을 특징으로 하는 실행파일 복원장치.
  10. 제 4 항에 있어서,
    상기 클래스 필드는,
    상기 클래스 필드 목록에서 0x10 비트와 0x1000 비트의 액세스 플래그를 가지는 필드인 것을 특징으로 하는 실행파일 복원장치.
  11. 제 2 항에 있어서,
    상기 클래스 메소드는,
    상기 클래스 정의 아이템의 클래스 메소드 목록에서 0x10000비트의 액세스 플래그를 가지는 메소드인 것을 특징으로 하는 실행파일 복원장치.
  12. 제 1 항에 있어서,
    상기 복원기는,
    상기 부모-자식 관계에 대한 정보를 이용하여 부모 클래스로 분석된 클래스의 하위에 상기 부모 클래스의 자식 클래스로 분석된 클래스를 정렬시켜 상기 실행파일의 클래스 계층 구조를 복원시키는 것을 특징으로 하는 실행파일 복원장치.
  13. 실행파일이 난독화된 경우 상기 실행파일의 헤더에서 상기 실행파일의 각 클래스 정의 아이템이 가지는 클래스 필드 목록을 추출하는 단계와,
    상기 클래스 필드 목록에서 파이널 스테이틱으로 선언된 클래스 필드를 검색하는 단계와,
    상기 검색된 클래스 필드의 다수의 변수 중에서 상기 클래스 필드의 타입에 대한 정보를 포함하는 제1 문자열 아이디를 추출하는 단계와,
    상기 클래스 정의 아이템에서 생성자로 선언된 클래스 메소드의 첫 번째 인자에 대한 정보를 포함하는 제2 문자열 아이디를 추출하는 단계와,
    상기 두 개의 문자열 아이디가 같은 경우 상기 클래스 정의 아이템이 정의하는 클래스가 상기 문자열 아이디에 해당하는 부모 클래스의 자식 클래스인 것으로 분석하는 단계와,
    상기 분석된 부모 클래스와 자식 클래스의 관계를 이용하여 상기 실행파일의 클래스 계층 구조를 복원하는 단계
    를 포함하는 실행파일 복원방법.
  14. 제 13 항에 있어서,
    상기 제1 문자열 아이디를 추출하는 단계는,
    상기 검색된 클래스 필드의 필드 아이디 인덱스를 추출하는 단계와,
    상기 필드 아이디 인덱스를 이용하여 상기 클래스 필드의 디스크립터 아이디를 추출하는 단계와,
    상기 디스크립터 아이디를 이용하여 상기 제1 문자열 아이디를 추출하는 단계
    를 포함하는 것을 특징으로 하는 실행파일 복원방법.
  15. 제 14 항에 있어서,
    상기 디스크립터 아이디는 추출하는 단계는,
    상기 필드 아이디 인덱스가 가리키는 헤더상 필드 아이템을 검색하는 단계와,
    상기 검색된 필드 아이템이 가리키는 타입 아이디 인덱스를 추출하는 단계와,
    상기 타입 아이디 인덱스가 가리키는 상기 헤더상 타입 아이디를 검색하는 단계와,
    상기 검색된 타입 아이디에서 상기 클래스 필드의 디스크립터 아이디를 추출하는 단계
    를 포함하는 것을 특징으로 하는 실행파일 복원방법.
  16. 제 13 항에 있어서,
    상기 제2 문자열 아이디를 추출하는 단계는,
    상기 클래스 정의 아이템의 클래스 메소드 목록에서 생성자로 선언된 클래스 메소드를 추출하는 단계와,
    상기 생성자로 선언된 클래스 메소드의 상기 첫 번째 인자에 해당하는 프로토 인덱스를 추출하는 단계와,
    상기 프로토 인덱스를 이용하여 상기 제2 문자열 아이디를 추출하는 단계
    를 포함하는 것을 특징으로 하는 실행파일 복원방법.
  17. 제 16 항에 있어서,
    상기 제2 문자열 아이디를 추출하는 단계는,
    상기 프로토 인덱스가 가리키는 헤더의 프로토 아이디 목록을 추출하는 단계와,
    상기 프로토 아이디 목록에서 해당 프로토 아이디 아이템의 쇼티 인덱스를 추출하는 단계와,
    상기 쇼티 인덱스가 가리키는 문자열 아이디 목록을 추출하는 단계와,
    상기 문자열 아이디 목록에 포함된 다수의 문자열 아이디 중 첫 번째 문자열 아이디를 상기 제2 문자열 아이디로 추출하는 단계
    를 포함하는 것을 특징으로 하는 실행파일 복원방법.
  18. 제 14 항에 있어서,
    상기 디스크립터 아이디는,
    상기 헤더상 다수의 문자열을 기록하고 있는 스트링 테이블내 특정 문자열과 대응되는 상기 제1 문자열 아이디를 가리키도록 설정되는 것을 특징으로 하는 실행파일 복원방법.
  19. 제 13 항에 있어서,
    상기 클래스 필드는,
    상기 클래스 필드 목록에서 0x10 비트와 0x1000 비트의 액세스 플래그를 가지는 필드인 것을 특징으로 하는 실행파일 복원방법.
  20. 제 13 항에 있어서,
    상기 클래스 메소드는,
    상기 클래스 정의 아이템의 클래스 메소드 목록에서 0x10000비트의 액세스 플래그를 가지는 메소드인 것을 특징으로 하는 실행파일 복원방법.
PCT/KR2015/010123 2014-09-25 2015-09-24 실행파일 복원 장치 및 방법 WO2016048070A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2014-0128573 2014-09-25
KR1020140128573A KR101711092B1 (ko) 2014-09-25 2014-09-25 실행파일 복원 장치 및 방법

Publications (1)

Publication Number Publication Date
WO2016048070A1 true WO2016048070A1 (ko) 2016-03-31

Family

ID=55581493

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2015/010123 WO2016048070A1 (ko) 2014-09-25 2015-09-24 실행파일 복원 장치 및 방법

Country Status (2)

Country Link
KR (1) KR101711092B1 (ko)
WO (1) WO2016048070A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110781462A (zh) * 2019-10-10 2020-02-11 郑州阿帕斯科技有限公司 一种资源的混淆方法和装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020032889A (ko) * 2000-10-27 2002-05-04 오길록 자바 클래스 파일 분석을 이용한 클래스 호출관계 표시 방법
US20080209557A1 (en) * 2007-02-28 2008-08-28 Microsoft Corporation Spyware detection mechanism
KR20100010749A (ko) * 2008-07-23 2010-02-02 한국전자통신연구원 난독화된 악성 웹페이지 탐지 방법 및 장치
US20100031353A1 (en) * 2008-02-04 2010-02-04 Microsoft Corporation Malware Detection Using Code Analysis and Behavior Monitoring
US20100259178A1 (en) * 2009-04-12 2010-10-14 Kalapodas Dramos I Stereoscopic View Light Source, with multiple modes of operation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020032889A (ko) * 2000-10-27 2002-05-04 오길록 자바 클래스 파일 분석을 이용한 클래스 호출관계 표시 방법
US20080209557A1 (en) * 2007-02-28 2008-08-28 Microsoft Corporation Spyware detection mechanism
US20100031353A1 (en) * 2008-02-04 2010-02-04 Microsoft Corporation Malware Detection Using Code Analysis and Behavior Monitoring
KR20100010749A (ko) * 2008-07-23 2010-02-02 한국전자통신연구원 난독화된 악성 웹페이지 탐지 방법 및 장치
US20100259178A1 (en) * 2009-04-12 2010-10-14 Kalapodas Dramos I Stereoscopic View Light Source, with multiple modes of operation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110781462A (zh) * 2019-10-10 2020-02-11 郑州阿帕斯科技有限公司 一种资源的混淆方法和装置

Also Published As

Publication number Publication date
KR20160036752A (ko) 2016-04-05
KR101711092B1 (ko) 2017-03-02

Similar Documents

Publication Publication Date Title
WO2014035043A1 (ko) 악성 애플리케이션 진단 장치 및 방법
EP4062288A1 (en) Software diagnosis using transparent decompilation
WO2017213400A1 (en) Malware detection by exploiting malware re-composition variations
US7849509B2 (en) Detection of security vulnerabilities in computer programs
WO2013089340A1 (ko) 어플리케이션의 유사성 검출 장치 및 방법
WO2013077538A1 (ko) Api 기반 어플리케이션 분석 장치 및 방법
WO2013191458A1 (en) License verification method and apparatus, and computer readable storage medium storing program therefor
WO2016024838A1 (ko) 클라우드 기반의 애플리케이션 보안 서비스 제공 방법 및 시스템
WO2019054613A1 (ko) 바이너리 파일에 기초하여 오픈소스 소프트웨어 패키지를 식별하는 방법 및 시스템
CN107408176A (zh) 恶意对象的执行剖析检测
WO2014088262A1 (ko) 애플리케이션 위/변조 탐지장치 및 방법
WO2019066222A1 (ko) 바이너리 파일에 기초하여 오픈소스 소프트웨어 패키지를 식별하는 방법 및 시스템
CN109857520B (zh) 一种虚拟机自省中的语义重构改进方法及系统
WO2013100320A1 (ko) 시스템 파일 보호 및 복구를 위한 장치, 방법, 사용자 단말기 및 시스템
US20180316696A1 (en) Analysis apparatus, analysis method, and analysis program
WO2019135425A1 (ko) 오픈소스 소프트웨어의 라이선스를 검증하는 방법 및 시스템
WO2014168408A1 (ko) 클라우드 기반 악성코드 진단 장치, 시스템 및 방법
US10685298B2 (en) Mobile application compatibility testing
CN110633073B (zh) 基于Il2cpp编译的Unity代码混淆的方法
WO2018194196A1 (ko) Elf 파일의 난독화 적용 여부의 탐지 및 보안성 평가를 위한 방법 및 시스템
WO2022107964A1 (ko) 인접 행렬 기반의 악성 코드 탐지 및 분류 장치와 악성 코드 탐지 및 분류 방법
Wi et al. Diffcsp: Finding browser bugs in content security policy enforcement through differential testing
WO2018199366A1 (ko) 덱스 파일의 난독화 적용 여부의 탐지 및 보안성 평가를 위한 방법 및 시스템
WO2018080009A1 (en) Electronic apparatus for recording debugging information and control method thereof
WO2016048070A1 (ko) 실행파일 복원 장치 및 방법

Legal Events

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

Ref document number: 15844331

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15844331

Country of ref document: EP

Kind code of ref document: A1