[go: up one dir, main page]

KR101734663B1 - Method for preventing reverse engineering of android application and apparatus for performing the method - Google Patents

Method for preventing reverse engineering of android application and apparatus for performing the method Download PDF

Info

Publication number
KR101734663B1
KR101734663B1 KR1020150102380A KR20150102380A KR101734663B1 KR 101734663 B1 KR101734663 B1 KR 101734663B1 KR 1020150102380 A KR1020150102380 A KR 1020150102380A KR 20150102380 A KR20150102380 A KR 20150102380A KR 101734663 B1 KR101734663 B1 KR 101734663B1
Authority
KR
South Korea
Prior art keywords
file
android
executable file
reverse engineering
stub
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
KR1020150102380A
Other languages
Korean (ko)
Other versions
KR20160112904A (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 단국대학교 산학협력단
Publication of KR20160112904A publication Critical patent/KR20160112904A/en
Application granted granted Critical
Publication of KR101734663B1 publication Critical patent/KR101734663B1/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

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

Abstract

안드로이드 어플리케이션의 실행에 있어 진입점 변환 기법을 적용함으로써 실행 파일에 대한 암호화 및 복호화를 지원하여 역공학을 방지하는 방법 및 장치이 개시된다. 안드로이드 어플리케이션의 역공학 방지 방법은, 안드로이드 어플리케이션의 실행 파일을 추출하여 암호화하는 단계와; 암호화된 실행 파일과 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 안드로이드 어플리케이션을 패키징하는 단계를 포함하되, 스텁 파일은, 진입점(entry point) 변환 기법에 기반하여 암호화된 실행 파일이 복호화되어 실행되도록 제어한다. 따라서, 진입점 변환 기법을 스텁 파일에 적용함으로써 안드로이드 패키지의 정적 역공학 공격을 효율적으로 방지할 수 있다.A method and apparatus for preventing reverse engineering by supporting encryption and decryption of an executable file by applying an entry point conversion technique in the execution of an Android application is disclosed. A method for preventing reverse engineering of an Android application includes extracting and encrypting an executable file of the Android application; And packaging the Android application so that it includes a stub file that decrypts the encrypted executable file and the encrypted executable file, wherein the stub file is an executable file encrypted based on an entry point conversion technique Decrypted and executed. Therefore, it is possible to effectively prevent the static reverse engineering attack of the Android package by applying the entry point conversion technique to the stub file.

Description

안드로이드 어플리케이션의 역공학 방지 방법 및 이를 수행하는 장치{METHOD FOR PREVENTING REVERSE ENGINEERING OF ANDROID APPLICATION AND APPARATUS FOR PERFORMING THE METHOD}TECHNICAL FIELD [0001] The present invention relates to a method for preventing reverse engineering of an Android application, and a device for performing the reverse application.

본 발명은 안드로이드 어플리케이션의 보호에 관한 것으로, 더욱 상세하게는 안드로이드 어플리케이션의 실행에 있어 변환 기법을 적용함으로써 실행 파일에 대한 암호화 및 복호화를 지원하여 역공학을 방지하는 방법 및 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to protection of an Android application, and more particularly, to a method and apparatus for preventing reverse engineering by supporting encryption and decryption of an executable file by applying a conversion technique in execution of an Android application.

종래에는 안드로이드 어플리케이션에 대한 정적 역공학 방지하기 위해 어플리케이션 패키지 중 소스 코드가 있는 DEX 파일을 암호화한 후 실행 시 복호화하는 기법이 이용되었다. Conventionally, in order to prevent static reverse engineering of the Android application, a technique of encrypting a DEX file having source code in an application package and decrypting it after execution is used.

보다 구체적으로, 소스 코드에 디컴파일 방지 코드를 추가하여 DEX 파일을 생성하거나 어플리케이션 패키지 파일(zip file)의 형태를 생성하여 어플리케이션을 암호화하였다. 이 후, 어플리케이션 소스 코드를 수정하여 생성한 DEX 파일과 실행 파일 형태의 복호화 모듈을 합친 어플리케이션 패키지를 생성하고 어플리케이션의 실행 시 복호화 모듈이 우선 실행되게 하거나, 암호화된 어플리케이션을 실행하기 위해 별도의 런처(Launcher) 또는 서비스(Service)를 설치하여 어플리케이션 실행 전에 복호화하거나, 안드로이드 프레임워크 또는 커널을 수정하여 암호화된 어플리케이션을 복호화하여 이용하였다.More specifically, a decompression prevention code is added to the source code to generate a DEX file or a form of an application package file (zip file) to encrypt the application. Thereafter, an application package combining the DEX file generated by modifying the application source code and the decryption module of the executable file type is generated, and the decryption module is executed first when the application is executed, or a separate launcher Launcher) or service to decrypt the application before execution, or modify the Android framework or kernel to decrypt and use the encrypted application.

이러한 경우, 암호화 또는 복호화 키 관리를 위해, DEX 파일에 포함된 복수 개의 클래스 및 메소드의 인덱스 정보를 통해 비밀키를 이용하거나, 암호화 키를 어플리케이션 패키지 내에 삽입하거나, 어플리케이션 인증 서버와의 통신을 통해 암호화 키를 획득하거나, XOR과 같이 별도의 키가 필요하지 않은 암호화 알고리즘을 사용하였다.In this case, for encryption or decryption key management, a private key is used through index information of a plurality of classes and methods included in the DEX file, an encryption key is inserted into the application package, or encryption Key, or using a cryptographic algorithm that does not require a separate key, such as XOR.

상술한 종래 기술은 난독화, 더미 코드(dummy code) 삽입과 같은 기존의 정적 역공학 공격을 효율적으로 방어할 수 있으나, 안드로이드 어플리케이션의 암호화를 위해 XOR과 같이 공격에 취약한 암호화 알고리즘을 사용하거나, 암호화 또는 복호화 키를 안전하지 않은 방법으로 관리함에 따라 암호화를 통한 정적 역공학 방지 효과를 효율적으로 사용하지 못하는 문제점이 있다. The above-described conventional techniques can efficiently protect conventional static reverse engineering attacks such as obfuscation and insertion of dummy codes. However, in order to encrypt an Android application, an encryption algorithm that is vulnerable to attack such as XOR is used, Or the decryption key is managed in an unsecured manner, there is a problem that the effect of preventing the static reverse engineering through the encryption can not be efficiently used.

또한, 종래 기술은 암호화된 안드로이드 어플리케이션의 실행을 위해, 안드로이드 프레임워크 혹은 서비스 단에서 암호화된 안드로이드 어플리케이션을 실행하는 별도의 시스템 서비스(Service)나 어플리케이션을 실행하는 런처(Launcher)를 사전에 설치하거나, 안드로이드 프레임워크 내의 어플리케이션 실행 코드를 수정해야 하며, 안드로이드 어플리케이션의 DEX 파일 혹은 소스 코드를 임의 변경해야 한다는 점에서, 급속도로 다양하게 발전하고 있는 안드로이드 스마트폰을 대상으로 범용성 및 이식성이 부족하다는 한계가 있다.Also, in order to execute an encrypted Android application, the prior art has previously installed a Launcher that executes a separate system service or an application that executes an encrypted Android application in the Android framework or service terminal, There is a limit to the versatility and portability of Android smartphones, which are rapidly developing in various ways, because the application execution code in the Android framework needs to be modified, and the DEX file or source code of the Android application must be arbitrarily changed .

상기와 같은 문제점을 해결하기 위한 본 발명의 목적은, 진입점 변환 기법에 기반하여 안드로이드 어플리케이션의 역공학을 방지하는 방법을 제공하는데 있다.It is an object of the present invention to provide a method for preventing reverse engineering of an Android application based on an entry point conversion technique.

상기와 같은 문제점을 해결하기 위한 본 발명의 다른 목적은, 진입점 변환 기법에 기반하여 안드로이드 어플리케이션의 역공학을 방지하는 장치를 제공하는데 있다.Another object of the present invention is to provide an apparatus for preventing reverse engineering of an Android application based on an entry point conversion technique.

상기 목적을 달성하기 위한 본 발명의 일 측면에 따른 안드로이드 어플리케이션의 역공학 방지 방법은, 안드로이드 어플리케이션의 실행 파일을 추출하여 암호화하는 단계와; 암호화된 실행 파일과 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 안드로이드 어플리케이션을 패키징하는 단계를 포함하되, 스텁 파일은, 진입점(entry point) 변환 기법에 기반하여 암호화된 실행 파일이 복호화되어 실행되도록 제어한다.According to an aspect of the present invention, there is provided a method of preventing reverse engineering of an Android application, the method comprising: extracting and encrypting an executable file of an Android application; And packaging the Android application so that it includes a stub file that decrypts the encrypted executable file and the encrypted executable file, wherein the stub file is an executable file encrypted based on an entry point conversion technique Decrypted and executed.

여기에서, 상기 안드로이드 어플리케이션의 역공학 방지 방법은, 안드로이드 어플리케이션을 개발하는 개발자 단말 또는 안드로이드 어플리케이션을 배포하는 배포 서버에서 수행될 수 있다. Here, the method for preventing reverse engineering of the Android application may be performed in a developer terminal for developing an Android application or a distribution server for distributing an Android application.

여기에서, 상기 스텁 파일은, 안드로이드 어플리케이션에 대한 실행 시에 가장 먼저 실행되도록 설정될 수 있다. Here, the stub file may be set to be executed first when executing the Android application.

여기에서, 상기 스텁 파일은, 액티비티(Activity), 서비스(Service), 컨텐츠 프로바이더(Content Provider) 및 브로드캐스트 리시버(Broadcast Receiver) 중 어떤 컴포넌트가 실행되더라도 가장 먼저 실행될 수 있다. Here, the stub file may be executed first regardless of whether an activity, a service, a content provider, and a broadcast receiver are executed.

여기에서, 상기 스텁 파일은, 안드로이드 매니페스트(Android Manifest) 파일의 설정에 따라 가장 먼저 실행될 수 있다. Here, the stub file can be executed first according to the setting of the Android manifest file.

여기에서, 상기 스텁 파일은, 암호화된 실행 파일이 복호화되어 생성된 원본 실행 파일을 위한 진입점 변환에 따른 실행 흐름 변경이 수행되도록 설정할 수 있다. Here, the stub file can be set such that the execution flow change according to the entry point conversion for the original executable file generated by decoding the encrypted executable file is performed.

여기에서, 상기 실행 흐름 변경은, 스텁 파일의 설정에 따라 안드로이드 런타임(Android Runtime)에서 수행될 수 있다. Here, the execution flow change can be performed in the Android runtime according to the setting of the stub file.

여기에서, 상기 실행 흐름 변경은, 안드로이드 런타임에서 사용할 원본 실행 파일의 진입점 컴포넌트를 초기화함으로써 수행될 수 있다. Here, the execution flow change can be performed by initializing the entry point component of the original executable file to be used in the Android runtime.

여기에서, 상기 실행 파일은, Classes.dex 파일일 수 있다. Here, the executable file may be a Classes.dex file.

상기 목적을 달성하기 위한 본 발명의 다른 측면에 따른 안드로이드 어플리케이션의 역공학 방지 방법은, 암호화된 실행 파일과 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 패키징된 안드로이드 어플리케이션을 수신하는 단계와; 패키징된 안드로이드 어플리케이션에 포함된 스텁 파일을 이용하여 상기 암호화된 실행 파일을 복호화하는 단계를 포함하되, 스텁 파일은, 진입점(entry point) 변환 기법에 기반하여 암호화된 실행 파일이 복호화되어 실행되도록 제어한다. According to another aspect of the present invention, there is provided a method for preventing reverse engineering of an Android application, the method comprising: receiving an Android application packaged to include an encrypted executable file and a stub file for decrypting the encrypted executable file; Wow; And decrypting the encrypted executable file using a stub file included in the packaged Android application, wherein the stub file is a program for decrypting the encrypted executable file based on an entry point conversion technique do.

여기에서, 상기 안드로이드 어플리케이션의 역공학 방지 방법은, 안드로이드 어플리케이션을 실행하는 사용자 단말에서 수행될 수 있다. Here, the method for preventing reverse engineering of the Android application may be performed in a user terminal executing the Android application.

상기 목적을 달성하기 위한 본 발명의 또 다른 측면에 따른 안드로이드 어플리케이션의 역공학 방지를 수행하는 장치는, 안드로이드 어플리케이션의 실행 파일을 추출하여 암호화하고, 암호화된 실행 파일과 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 안드로이드 어플리케이션을 패키징하되, 스텁 파일은, 진입점(entry point) 변환 기법에 기반하여 암호화된 실행 파일이 복호화되어 실행되도록 제어한다. According to another aspect of the present invention, there is provided an apparatus for preventing reverse engineering of an Android application, the apparatus including: an extraction unit for extracting and encrypting an executable file of an Android application, the stub file is used to decrypt and execute the encrypted executable file based on the entry point conversion technique.

상기 목적을 달성하기 위한 본 발명의 또 다른 측면에 따른 안드로이드 어플리케이션의 역공학 방지를 수행하는 장치는, 암호화된 실행 파일과 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 패키징된 안드로이드 어플리케이션을 수신하고, 패키징된 안드로이드 어플리케이션에 포함된 스텁 파일을 이용하여 암호화된 실행 파일을 복호화하되, 스텁 파일은, 진입점(entry point) 변환 기법에 기반하여 암호화된 실행 파일이 복호화되어 실행되도록 제어한다. According to another aspect of the present invention, there is provided an apparatus for preventing reverse engineering of an Android application, the apparatus comprising: an Android application that is packaged to include an encrypted executable file and a stub file for decrypting the encrypted executable file; And decrypts the encrypted executable file using the stub file included in the packaged Android application. The stub file controls the encrypted executable file to be decrypted and executed based on the entry point conversion technique .

상기 목적을 달성하기 위한 본 발명의 또 다른 측면에 따른 컴퓨터로 판독 가능한 기록 매체는, 안드로이드 어플리케이션의 역공학 방지 방법을 수행하는 컴퓨터 프로그램을 저장한다. According to another aspect of the present invention, there is provided a computer readable recording medium storing a computer program for performing a method of preventing reverse engineering of an Android application.

상기와 같은 본 발명에 따른 안드로이드 어플리케이션의 역공학 방지 방법 및 장치는, 진입점 변환 기법을 스텁 파일에 적용함으로써 안드로이드 패키지의 정적 역공학 공격을 효율적으로 방지할 수 있다.The method and apparatus for preventing reverse engineering of the Android application according to the present invention can effectively prevent the static reverse engineering attack of the Android package by applying the entry point conversion technique to the stub file.

또한, 본 발명의 실시예는 스텁 DEX를 통한 복호화 및 동적 로딩을 위해, 관리자 권한의 Starter 앱이 별도로 필요로 하지 않는 장점이 있다. In addition, the embodiment of the present invention has an advantage that a starter app of an administrator authority is not separately needed for decoding and dynamic loading through the stub DEX.

또한, 본 발명의 실시예는 어플리케이션에 대한 진입점이 액티비티(Activity)부터 시작하지 않는 경우에도 적용할 수 있으며, 시스템 레벨에서의 별도의 설정 및 설치 등이 필요하지 않다. In addition, the embodiment of the present invention can be applied even when an entry point to an application does not start from an activity, and there is no need to set and install the system level separately.

도 1은 본 발명의 실시예에 따른 안드로이드 어플리케이션의 역공학 방지 방법을 설명하기 위한 개념도이다.
도 2는 본 발명의 실시예에 따라 역공학 방지를 위해 진입점 변환 기법에 기반하여 안드로이드 어플리케이션을 패키징하는 방법을 설명하기 위한 흐름도이다.
도 3은 본 발명의 실시예에 따라 역공학 방지를 위해 진입점 변환 기법에 기반하여 안드로이드 어플리케이션을 실행시키는 방법을 설명하기 위한 흐름도이다.
도 4는 본 발명의 실시예에 따라 역공학 방지를 위해 진입점 변환 기법에 기반하여 안드로이드 어플리케이션을 실행시키는 방법을 설명하기 위한 예시도이다.
1 is a conceptual diagram for explaining a method of preventing reverse engineering of an Android application according to an embodiment of the present invention.
2 is a flowchart illustrating a method of packaging an Android application based on an entry point conversion technique to prevent reverse engineering according to an embodiment of the present invention.
3 is a flowchart illustrating a method of executing an Android application based on an entry point conversion technique to prevent reverse engineering according to an embodiment of the present invention.
4 is an exemplary diagram illustrating a method for executing an Android application based on an entry point conversion technique to prevent reverse engineering according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다. While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for like elements in describing each drawing.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다. The terms first, second, A, B, etc. may be used to describe various elements, but the elements should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprises" or "having" and the like are used to specify that there is a feature, a number, a step, an operation, an element, a component or a combination thereof described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.
Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the contextual meaning of the related art and are to be interpreted as either ideal or overly formal in the sense of the present application Do not.

먼저, 본 발명을 설명하기 위한 기본적인 용어를 설명하면 다음과 같다. First, basic terms for explaining the present invention will be described as follows.

하나의 안드로이드 어플리케이션(Android Application)은 여러 컴포넌트들의 집합으로 구성이 된다. 컴포넌트는 액티비티(Activity), 서비스 (Service), 컨텐츠 프로바이더(Content Provider), 브로드캐스트 리시버(Broadcast Receiver)와 같이 구분될 수 있다. One Android application consists of a set of several components. A component can be classified as an activity, a service, a content provider, and a broadcast receiver.

액티비티(Activity)는 안드로이드 어플리케이션 상에서 UI의 기능을 담당하는 컴포넌트이다. 일반적으로 하나의 액티비티는 하나의 화면을 정의한다.Activity is a component that handles UI functions in Android application. In general, an activity defines a single screen.

서비스 (Service)는 백그라운드에서 동작하는 컴포넌트이다. 서비스는 다른 컴포넌트와 bind를 통하여 연결이 되며, 다른 컴포넌트들은 binder라는 객체를 통하여 연결된 서비스가 제공하는 기능을 이용할 수 있다. 서비스는 같은 어플리케이션에서만 접근이 가능한 로컬 서비스(Local Service)와 다른 어플리케이션(다른 프로세스)에서 접근이 가능한 원격 서비스(Remote Service)가 있다. Service is a component operating in the background. The service is connected to another component through bind, and other components can use the function provided by the connected service through the object named binder. A service has a local service that can be accessed only by the same application and a remote service that can be accessed by another application (another process).

컨텐츠 프로바이더(Content Provider)는 어플리케이션에서 사용되는 데이터를 여러 어플리케이션에서 공유하기 위한 기능을 하는 컴포넌트이다. 일반적으로 한 어플리케이션은 다른 어플리케이션이 가지는 데이터 저장소에 직접적으로 접근을 할 수 없다. 하지만 한 어플리케이션이 컨텐츠 프로바이더를 이용하여 데이터를 제공 한다면, 다른 어플리케이션은 컨텐츠 리졸버(Content Resolver)를 통하여 데이터에 접근이 가능하다.A content provider is a component that functions to share data used by an application in various applications. In general, one application can not directly access the data store of another application. However, if an application provides data using a content provider, other applications can access the data through a content resolver.

브로드캐스트 리시버(Broadcast Receiver)는 여러 어플리케이션을 대상으로 보낸 인텐트를 받는 컴포넌트이다. 액티비티나 서비스와는 다르게 이 컴포넌트는 짧은 시간 동안 존재한다. 일반적으로 브로드캐스트된 인텐트를 받아 그에 대한 처리를 수행한 후 소멸될 수 있다. A broadcast receiver is a component that receives intents sent to multiple applications. Unlike an activity or service, this component exists for a short period of time. Generally, a broadcast intent can be received and processed before it can be destroyed.

어플리케이션 컴포넌트는 실제 구현 상에서 안드로이드 API에서 정의한 컴포넌트들의 클래스(Activity, Service, Content Provider, Broadcast Receiver)를 상속하여, 해당 컴포넌트의 라이프사이클에 따라 실행되는 메소드와 이벤트 발생에 따라 처리하는 메서드들을 오버라이드(Override)함으로 구현될 수 있다. The application component inherits the classes of the components (Activity, Service, Content Provider, and Broadcast Receiver) defined by the Android API on the actual implementation and overrides the methods that are executed according to the life cycle of the component and the methods ). ≪ / RTI >

안드로이드 어플리케이션은 다른 어플리케이션 자체를 실행하거나 다른 어플리케이션에 정의된 원격 서비스를 바인드 하거나, 컨텐츠 리졸버를 통하여 명령을 전달하거나, 다른 어플리케이션이 전달하는 브로드캐스트를 받음으로 다른 어플리케이션의 자원에 접근한다. 이를 컴포넌트간의 통신으로 정의한다. 컨텐츠 프로바이더를 제외한 컴포넌트간의 정보를 교환하기 위해서는 인텐트와 인텐트 필터를 이용한다.
An Android application accesses another application's resources by executing another application itself, binding a remote service defined in another application, passing a command through a content resolver, or receiving a broadcast delivered by another application. This is defined as communication between components. Intent and intent filters are used to exchange information between components except content providers.

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

도 1은 본 발명의 실시예에 따른 안드로이드 어플리케이션의 역공학 방지 방법을 설명하기 위한 개념도이다.1 is a conceptual diagram for explaining a method of preventing reverse engineering of an Android application according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 실시예에 따른 안드로이드 어플리케이션의 역공방 방지는 개발자 단말(10), 마켓 서버(20) 및 사용자 단말(30) 간의 연동으로 설명될 수 있다. Referring to FIG. 1, the prevention of reverse application of the Android application according to the embodiment of the present invention can be explained by interlocking between the developer terminal 10, the market server 20, and the user terminal 30.

개발자 단말(10)을 통하여 생성된 안드로이드 어플리케이션(또는 앱)은 마켓 서버(20)를 통하여 사용자 단말(30)로 제공될 수 있다. 즉, 개발자 단말(10)에서 생성된 안드로이드 어플리케이션은 마켓 서버(20)에 등록되고, 마켓 서버(20)에 등록된 안드로이드 어플리케이션은 사용자 단말(30)로 다운로드될 수 있다. 이 때, 안드로이드 어플리케이션은 역공학 공격으로부터 보호하기 위하여 실행 코드를 암호화하여 배포될 수 있다. The Android application (or app) generated through the developer terminal 10 may be provided to the user terminal 30 through the market server 20. That is, the Android application created in the developer terminal 10 is registered in the market server 20, and the Android application registered in the market server 20 can be downloaded to the user terminal 30. At this time, Android applications can be distributed by encrypting executable code to protect against reverse engineering attacks.

예를 들어, 개발자 단말(10) 또는 마켓 서버(20)는 안드로이드 어플리케이션의 실행 파일을 추출하여 암호화할 수 있다. 또한, 개발자 단말(10) 또는 마켓 서버(20)는 암호화된 실행 파일과 암호화된 실행 파일을 복호화하는 스텁(Stub) 파일이 포함되도록 안드로이드 어플리케이션을 패키징할 수 있다. 여기서, 실행 파일은 DEX 파일을 의미하고, 스텁 파일은 스텁 DEX 파일을 의미할 수 있다. For example, the developer terminal 10 or the market server 20 can extract and encrypt an executable file of the Android application. In addition, the developer terminal 10 or the market server 20 can package the Android application so as to include a stub file for decrypting the encrypted executable file and the encrypted executable file. Here, the executable file means a DEX file, and the stub file can mean a stub DEX file.

보다 상세하게는, 어플리케이션에 대한 위변조를 방지하기 위해, 실행 파일에 대한 암호화 기법을 제공할 수 있다. 어플리케이션의 실행 코드를 역공학 공격으로부터 보호하기 위하여 실행 파일인 classes.dex 파일만을 암호화하여 배포할 수 있고, 이후 정상 실행을 위해 암호화된 실행 파일을 복호화하여 동적 로딩(dynamic loading)하는 스텁(stub) 방식을 적용할 수 있다. More specifically, in order to prevent forgery and falsification of an application, an encryption technique for an executable file can be provided. In order to protect the executable code of the application from reverse engineering attack, it is possible to encrypt and distribute only the classes.dex file, which is an executable file, and then to stub, which decrypts the encrypted executable file for normal execution and dynamically loads, Method can be applied.

특히, 본 발명의 실시예에 따르면 AndroidManifest.xml에 Application element를 정의하고 있는 경우에도, 스텁 파일을 우선적으로 실행시켜 암호화된 실행 파일을 복호화하여 동적으로 로딩할 수 있는 진입점(entry point) 변환 기법을 적용할 수 있다. 즉, 본 발명의 실시예에 따른 스텁 파일은 진입점 변환 기법에 기반하여 암호화된 실행 파일을 복호화하여 실행시키도록 설정될 수 있다. 여기서, Application element는 Application class를 의미할 수 있다.Particularly, according to the embodiment of the present invention, even when an application element is defined in the AndroidManifest.xml, an entry point transformation technique capable of dynamically loading and decrypting an encrypted executable file by first executing a stub file Can be applied. That is, the stub file according to the embodiment of the present invention can be set to decrypt and execute the encrypted executable file based on the entry point conversion technique. Here, an Application element can mean an Application class.

사용자 단말(30)은 스텁 파일과 함께 패키징된 안드로이드 어플리케이션을 다운로드할 수 있다. 또한, 사용자 단말(30)은 암호화된 실행 파일을 스텁 파일에 기반하여 복호화하고, 복호화된 원본 실행 파일로 실행 흐름을 변경하는 동적 로딩을 수행할 수 있다. The user terminal 30 can download the packaged Android application with the stub file. Also, the user terminal 30 can perform dynamic loading in which the encrypted execution file is decrypted based on the stub file, and the execution flow is changed to the decrypted original executable file.

여기서, 사용자 단말(30)은 통신이 가능한 데스크탑 컴퓨터(desktop computer), 랩탑 컴퓨터(laptop computer), 태블릿(tablet) PC, 무선전화기(wireless phone), 모바일폰(mobile phone), 스마트 폰(smart phone), 스마트 워치(smart watch), 스마트 글래스(smart glass), e-book 리더기, PMP(portable multimedia player), 휴대용 게임기, 네비게이션(navigation) 장치, 디지털 카메라(digital camera), DMB (digital multimedia broadcasting) 재생기, 디지털 음성 녹음기(digital audio recorder), 디지털 음성 재생기(digital audio player), 디지털 영상 녹화기(digital picture recorder), 디지털 영상 재생기(digital picture player), 디지털 동영상 녹화기(digital video recorder), 디지털 동영상 재생기(digital video player) 등이 될 수 있다.
The user terminal 30 may be a desktop computer, a laptop computer, a tablet PC, a wireless phone, a mobile phone, a smart phone, A smart watch, a smart glass, an e-book reader, a portable multimedia player (PMP), a portable game machine, a navigation device, a digital camera, a digital multimedia broadcasting (DMB) A digital audio recorder, a digital audio player, a digital picture recorder, a digital picture player, a digital video recorder, a digital video player, a digital video player, or the like.

도 2는 본 발명의 실시예에 따라 역공학 방지를 위해 진입점 변환 기법에 기반하여 안드로이드 어플리케이션을 패키징하는 방법을 설명하기 위한 흐름도이다. 2 is a flowchart illustrating a method of packaging an Android application based on an entry point conversion technique to prevent reverse engineering according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 실시예에 따른 안드로이드 어플리케이션의 역공학 방지 방법은, 안드로이드 어플리케이션의 실행 파일을 추출하여 암호화하는 단계(S210)와; 암호화된 실행 파일과 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 안드로이드 어플리케이션을 패키징하는 단계(S220)와; 패키징된 안드로이드 어플리케이션을 전송하는 단계(S230)를 포함한다. Referring to FIG. 2, a method for preventing reverse engineering of an Android application according to an embodiment of the present invention includes: extracting and encrypting an executable file of an Android application (S210); (S220) packaging the Android application so as to include a stub file for decrypting the encrypted executable file and the encrypted executable file; And transmitting the packaged Android application (S230).

도 2는 패키징된 안드로이드 어플리케이션을 생성하여 전송하는 방법을 설명하기 위한 것으로 도 1에서 상술한 개발자 단말(10) 또는 배포 서버(예를 들어, 마켓 서버(20))에서 수행될 수 있다. 2 is a diagram for explaining a method for creating and transmitting a packaged Android application and may be performed in the developer terminal 10 or the distribution server (for example, the market server 20) described in FIG.

안드로이드 어플리케이션은 실행 파일뿐 아니라 여러 이미지, 멀티미디어 등의 부가적인 정보를 포함하고 있어, 전체 어플리케이션 패키지를 암호화할 경우 암호화 및 복호화 성능이 떨어지게 된다. 따라서, 본 발명의 실시예에 따르면 안드로이드 어플리케이션의 실행 파일을 추출하여 암호화할 수 있다. 또한, 효과적이고 안전한 암호화 및 복호화 키 관리를 위해 암 및 복호화 키는 앱을 고유 식별할 수 있도록 특징점을 기반으로 생성하여 사용될 수 있다. The Android application contains additional information such as executable files as well as various images and multimedia, so that when encrypting the entire application package, the encryption and decryption performance is degraded. Therefore, according to the embodiment of the present invention, the executable file of the Android application can be extracted and encrypted. Also, for efficient and safe encryption and decryption key management, the encryption key and the encryption key can be generated based on the feature point so as to uniquely identify the application.

보다 상세하게는, 안드로이드 어플리케이션의 실행 파일인 DEX 파일을 패키지에서 추출하여 암호화하고(S210), 암호화된 DEX 파일과 스텁 DEX가 포함하도록 안드로이드 어플리케이션을 패키징할 수 있다(S220). More specifically, the DEX file, which is an executable file of the Android application, is extracted from the package and encrypted (S210), and the Android application may be packaged so that the encrypted DEX file and the stub DEX are included in the package (S220).

여기서, 스텁 파일은, 진입점(entry point) 변환 기법에 기반하여 암호화된 실행 파일이 복호화되어 실행되도록 제어하도록 설정될 수 있다. 즉, 스텁 파일은, 실행 파일이 암호화된 어플리케이션의 실행 시 스텁 DEX가 암호화된 DEX 파일을 복호화한 후 진입전 변환 기법을 이용하여 원본 실행 파일로 실행 흐름을 변경할 수 있도록 한다. Here, the stub file can be set to control that the encrypted executable file is decrypted and executed based on the entry point conversion technique. That is, the stub file enables the stub DEX to decrypt the encrypted DEX file when the executable of the encrypted application is executed, and to change the execution flow to the original executable file using the pre-entry conversion method.

또한, 스텁 파일은, 안드로이드 어플리케이션에 대한 실행 시에 가장 먼저 실행되도록 설정될 수 있다. 즉, 스텁 파일은, 안드로이드 매니페스트(Android Manifest) 파일의 설정에 따라 가장 먼저 실행될 수 있다. 예를 들어, 스텁 파일은, 액티비티(Activity), 서비스(Service), 컨텐츠 프로바이더(Content Provider) 및 브로드캐스트 리시버(Broadcast Receiver) 중 어떤 컴포넌트가 실행되더라도 가장 먼저 실행될 수 있다. In addition, the stub file can be set to be executed first when executed for an Android application. That is, the stub file can be executed first according to the settings of the Android manifest file. For example, a stub file may be executed first, whichever component is executed, such as an activity, a service, a content provider, and a broadcast receiver.

특히, 본 발명의 실시예에 따르면 AndroidManifest.xml에 Application element를 정의하고 있는 경우도, 진입점 변환 기법의 적용을 통하여 역공학을 효과적으로 방지할 수 있다. In particular, according to the embodiment of the present invention, even when an application element is defined in the AndroidManifest.xml, reverse engineering can be effectively prevented through application of the entry point conversion technique.

보다 상세하게는, 일반적인 어플리케이션 실행 순서는 “런타임(Runtime) -> (Optional) 어플리케이션 엘리멘트(Application element) -> 스타트 컴포넌트(Start component)”와 같다. 즉, AndroidManifest.xml에 Application element를 정의하는 것을 선택적인 문제이지만, AndroidManifest.xml에 Application element를 정의하고 있는 경우에는 암호화된 실행 파일을 포함하여 패키징된 안드로이드 어플리케이션을 스텁 파일을 이용하여 효과적으로 복호화하고 실행하는데 문제가 발생할 수 있다. 여기서, Application element는 Application class를 의미할 수 있다.More specifically, the general application execution sequence is the same as "Runtime -> (Optional) Application element -> Start component". In other words, defining application element in AndroidManifest.xml is an optional issue, but if you define Application element in AndroidManifest.xml, you can effectively decode the packaged Android application including encrypted executable file using stub file and execute There is a problem. Here, an Application element can mean an Application class.

따라서, 이에 본 발명의 실시예에 따른 어플리케이션 실행 순서는 “런타임(Runtime) -> 스텁 어플리케이션 엘리멘트(Stub Application element)(진입점 변환 기능 추가) -> (Optional) 원본 어플리케이션 엘리먼트 (Original Application element) -> 스타트 컴포넌트(Start component)”와 같이 될 수 있다.Accordingly, the application execution sequence according to the embodiment of the present invention is executed in the order of "Runtime -> stub application element (addition of entry point conversion function) -> (Optional) original application element - &Quot; Start component ".

이에 본 발명의 실시예에 따른 스텁 파일은, 암호화된 실행 파일이 복호화되어 생성된 원본 실행 파일을 위한 진입점 변환에 따른 실행 흐름 변경이 수행되도록 설정될 수 있다. 즉, 실행 흐름 변경은, 스텁 파일의 설정에 따라 안드로이드 런타임(Android Runtime)에서 수행될 수 있다. 예를 들어, 실행 흐름 변경은, 안드로이드 런타임에서 사용할 원본 실행 파일의 진입점 컴포넌트를 초기화함으로써 수행될 수 있다. Thus, the stub file according to the embodiment of the present invention can be set such that execution flow change according to entry point conversion for the original executable file generated by decoding the encrypted executable file is performed. That is, execution flow changes can be performed in the Android runtime, depending on the stub file's configuration. For example, changing the execution flow can be done by initializing the entry point component of the original executable to be used in the Android runtime.

예를 들어, 역공학 공격 방지 기법을 적용하지 않은 앱에 대해, 앱 패키지 내의 DEX 파일을 추출하여 버스마크를 기반으로 암호화하고, 스텁 DEX를 추가하여 패키징할 수 있다. 따라서, 역공학 공격을 수행하더라도 원본 앱의 DEX 파일은 암호화되어 있어, 원본 앱의 버스마크 정보가 없기 때문에 역공학 공격이 불가능하게 된다. 여기서, 버스마크는 어플리케이션 또는 실행 파일의 고유 식별정보를 의미할 수 있다. For example, for an application that does not apply the reverse engineering attack prevention technique, the DEX file in the app package can be extracted, encrypted based on the bus mark, and added with the stub DEX. Therefore, even if reverse engineering attack is performed, DEX file of original application is encrypted, and reverse engineering attack is impossible because there is no bus mark information of original application. Here, the bus mark may mean unique identification information of an application or an executable file.

또한, 본 발명의 실시예에 따르면, 안드로이드 어플리케이션의 실행 파일을 추출하여 암호화하고, 암호화된 실행 파일과 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 상기 안드로이드 어플리케이션을 패키징하되, 스텁 파일은, 진입점(entry point) 변환 기법에 기반하여 상기 암호화된 실행 파일이 복호화되어 실행되도록 제어하는 것을 특징으로 하는, 안드로이드 어플리케이션의 역공학 방지를 수행하는 장치를 제공할 수 있으며, 이러한 장치는 도 1에서 상술한 개발자 단말(10) 또는 마켓 서버(20)에 장착될 수 있다. According to an embodiment of the present invention, the Android application is packaged such that an executable file of the Android application is extracted and encrypted, and a stub file for decrypting the encrypted executable file and the encrypted executable file is included, May provide an apparatus for preventing reverse engineering of an Android application, which controls to decrypt and execute the encrypted executable file based on an entry point conversion technique, 1 to the developer terminal 10 or the market server 20 described above.

따라서, 본 발명의 실시예에 따르면, 안드로이드 플랫폼 버전에 관계없이 역공학 공격 방지 기법을 적용할 수 있다. 즉, 플랫폼을 수정하여 재빌드할 필요가 없이 안드로이드 패키지의 정적 역공학 공격을 효율적으로 방지할 수 있다.Therefore, according to the embodiment of the present invention, the reverse engineering attack prevention technique can be applied regardless of the version of the Android platform. That is, it is possible to effectively prevent the static reverse engineering attack of the Android package without having to modify and rebuild the platform.

더 나아가, 본 발명의 실시예에 따르면, 역공학이 좀 더 어려운 형태로 스텁 파일을 생성할 수 있다. 예를 들어, java로 작성된 Dex file이 아닌 C로 작성된 Native 언어로 스텁 파일을 생성할 수 있다.
Furthermore, according to embodiments of the present invention, reverse engineering can generate stub files in a more difficult form. For example, you can create a stub file in a native language written in C, rather than a Dex file written in java.

도 3은 본 발명의 실시예에 따라 역공학 방지를 위해 진입점 변환 기법에 기반하여 안드로이드 어플리케이션을 실행시키는 방법을 설명하기 위한 흐름도이고, 도 4는 본 발명의 실시예에 따라 역공학 방지를 위해 진입점 변환 기법에 기반하여 안드로이드 어플리케이션을 실행시키는 방법을 설명하기 위한 예시도이다.FIG. 3 is a flowchart illustrating a method of executing an Android application based on an entry point conversion technique to prevent reverse engineering according to an embodiment of the present invention. FIG. 4 is a flowchart illustrating a method for preventing reverse engineering according to an embodiment of the present invention. FIG. 5 is an exemplary diagram illustrating a method of executing an Android application based on an entry point conversion technique.

도 3을 참조하면, 본 발명의 실시예에 따른 안드로이드 어플리케이션의 역공학 방지 방법은, 암호화된 실행 파일과 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 패키징된 안드로이드 어플리케이션을 수신하는 단계(S310)와; 패키징된 안드로이드 어플리케이션에 포함된 스텁 파일을 이용하여 암호화된 실행 파일을 복호화하는 단계(S320)를 포함한다. Referring to FIG. 3, a method for preventing reverse engineering of an Android application according to an exemplary embodiment of the present invention includes receiving an Android application packaged to include an encrypted executable file and a stub file for decrypting the encrypted executable file (S310); And decrypting the encrypted executable file using the stub file included in the packaged android application (S320).

또한, 본 발명의 실시예에 따른 안드로이드 어플리케이션의 역공학 방지 방법은, 암호화된 실행 파일이 복호화되어 생성된 원본 실행 파일을 위한 진입점 변환을 통하여 실행 흐름 변경을 수행하는 단계(S330)와; 변경된 실행 흐름에 따라 원본 실행 파일을 실행하는 단계(S340)를 포함한다.Also, a method of preventing reverse engineering of an Android application according to an embodiment of the present invention includes: performing an execution flow change through an entry point conversion for an original executable file generated by decoding an encrypted executable file (S330); And executing the original executable file according to the changed execution flow (S340).

도 3은 역공학 방지를 위해 진입점 변환 기법에 기반하여 안드로이드 어플리케이션을 실행시키는 방법을 설명하기 위한 것으로, 도 1에서 상술한 사용자 단말(30)에서 수행될 수 있다. FIG. 3 illustrates a method of executing an Android application based on an entry point conversion technique to prevent reverse engineering, and may be performed in the user terminal 30 described above with reference to FIG.

도 3에 따르면, 암호화된 실행 파일에 대한 복호화 시에 진입점 변환 기법을 통해 다양한 안드로이드 환경에서 원본 앱의 DEX 파일을 임의 수정하지 않고도 안전한 암호화 기법을 적용할 수 있다.3, a secure encryption technique can be applied without arbitrarily modifying the DEX file of the original application in various Android environments through the entry point conversion technique when decrypting the encrypted executable file.

이를 위해 우선, 패키징한 앱 실행 시 스텁 파일이 가장 먼저 실행되도록 한다. 즉, 스텁 파일은, 안드로이드 어플리케이션에 대한 실행 시에 가장 먼저 실행되도록 설정될 수 있다. 예를 들어, 스텁 파일은, 액티비티(Activity), 서비스(Service), 컨텐츠 프로바이더(Content Provider) 및 브로드캐스트 리시버(Broadcast Receiver) 중 어떤 컴포넌트가 실행되더라도 가장 먼저 실행될 수 있고, 이를 통하여 원본 실행 파일을 복호화하고 메모리에 원본 실행 파일을 로드할 수 있다. To do this, the stub file is executed first when the packaged app is executed. That is, the stub file can be set to be executed first when it is executed for an Android application. For example, a stub file may be executed first, whichever component, such as Activity, Service, Content Provider, and Broadcast Receiver, is executed, And load the original executable into memory.

도 3 및 도 4를 참조하면, 스텁 파일은 안드로이드 매니페스트(Android Manifest) 파일의 설정에 따라 안드로이드 런타임에 의해 가장 먼저 실행될 수 있다(S410). Referring to FIGS. 3 and 4, the stub file may be executed first by the Android runtime according to the setting of the Android manifest file (S410).

이 후, 안드로이드 런타임에서 사용할 원본 실행 파일의 진입점 컨포넌트를 식별하고 사용할 진입점 컨포넌트를 새로 생성하여 초기화한 후(S420), 진입점 변환 기법을 적용하여 안드로이드 런타임에서 원본 실행 파일을 통해 안드로이드 어플리케이션이 실행되도록 할 수 있다(S430). After that, the entry point component of the original executable file to be used in the Android runtime is identified, and a new entry point component to be used is created and initialized (S420). Then, an entry point conversion technique is applied to the Android runtime, (S430).

따라서, 암호화된 실행 파일이 복호화되어 생성된 원본 실행 파일을 위한 진입점 변환에 따른 실행 흐름 변경이 수행되도록 설정된 스텁 파일은, 안드로이드 런타임(Android Runtime)에서 실행 흐름 변경을 수행하도록 한다. 예를 들어, 실행 흐름 변경은, 안드로이드 런타임에서 사용할 원본 실행 파일의 진입점 컴포넌트를 초기화함으로써 수행될 수 있다. Therefore, the stub file in which the execution flow change according to the entry point conversion for the original executable file generated by decrypting the encrypted executable file is set to perform the execution flow change at the Android runtime. For example, changing the execution flow can be done by initializing the entry point component of the original executable to be used in the Android runtime.

예를 들어, 스텁 파일에 “This -> parent -> application = OrigApplication()”와 같은 코드를 추가하여 메모리에 원본 실행 파일을 로드하여 실행시킬 수 있다.For example, you could add code like "This -> parent -> application = OrigApplication ()" to your stub file to load and run the original executable in memory.

또한, 본 발명의 실시예에 따르면, 암호화된 실행 파일과 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 패키징된 안드로이드 어플리케이션을 수신하고, 패키징된 상기 안드로이드 어플리케이션에 포함된 스텁 파일을 이용하여 암호화된 실행 파일을 복호화하되, 스텁 파일은, 진입점(entry point) 변환 기법에 기반하여 암호화된 실행 파일이 복호화되어 실행되도록 제어하는 것을 특징으로 하는, 안드로이드 어플리케이션의 역공학 방지를 수행하는 장치를 제공할 수 있으며, 이러한 장치는 도 1에서 상술한 사용자 단말(30)에 장착될 수 있다. According to another aspect of the present invention, there is provided a method for receiving an Android application packaged to include an encrypted executable file and a stub file for decrypting the encrypted executable file, using a stub file included in the packaged Android application And the stub file decrypts the encrypted executable file based on an entry point conversion technique so that the encrypted executable file is decrypted and executed. And such a device may be mounted to the user terminal 30 described above in Fig.

더 나아가, 본 발명의 실시예에 따른 안드로이드 어플리케이션의 역공학 방지 방법의 동작은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 프로그램 또는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의해 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터로 읽을 수 있는 프로그램 또는 코드가 저장되고 실행될 수 있다. Furthermore, the operation of the anti-reverse engineering method of the Android application according to the embodiment of the present invention can be implemented as a computer-readable program or code on a computer-readable recording medium. A computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored. The computer-readable recording medium may also be distributed and distributed in a networked computer system so that a computer-readable program or code can be stored and executed in a distributed manner.

컴퓨터 판독 가능 매체는 롬(rom), 램(ram), 플래시 메모리(flash memory) 등과 같이 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치를 포함할 수 있다. 프로그램 명령은 컴파일러(compiler)에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터(interpreter) 등을 사용해서 컴퓨터에 의해 실행될 수 있는 고급 언어 코드를 포함할 수 있다. 하드웨어 장치는 본 실시예의 이항 혼합 모델 기반 비임의결측 데이터 분석 방법을 수행하기 위하여 적어도 하나의 소프트웨어 모듈로 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
Computer readable media can include hardware devices that are specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Program instructions may include machine language code such as those produced by a compiler, as well as high-level language code that may be executed by a computer using an interpreter or the like. The hardware device may be configured to operate with at least one software module to perform the binary mixed model based beam demarcation data analysis method of the present embodiment, and vice versa.

상술한 바와 같은 본 발명의 실시예에 따른 안드로이드 어플리케이션의 역공학 방지 방법 및 장치는, 진입점 변환 기법을 스텁 파일에 적용함으로써 안드로이드 패키지의 정적 역공학 공격을 효율적으로 방지할 수 있다.The method and apparatus for preventing reverse engineering of the Android application according to the embodiment of the present invention can effectively prevent the static reverse engineering attack of the Android package by applying the entry point conversion technique to the stub file.

또한, 본 발명의 실시예는 스텁 DEX를 통한 복호화 및 동적 로딩을 위해, 관리자 권한의 Starter 앱이 별도로 필요로 하지 않는 장점이 있다. In addition, the embodiment of the present invention has an advantage that a starter app of an administrator authority is not separately needed for decoding and dynamic loading through the stub DEX.

또한, 본 발명의 실시예는 어플리케이션에 대한 진입점이 액티비티(Activity)부터 시작하지 않는 경우에도 적용할 수 있으며, 시스템 레벨에서의 별도의 설정 및 설치 등을 최소화할 수 있다.
In addition, the embodiment of the present invention can be applied even when an entry point to an application does not start from an activity, and it is possible to minimize separate setting and installation at the system level.

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the present invention as defined by the following claims It can be understood that

10: 개발자 단말 20: 마켓 서버
30: 사용자 단말
10: Developer terminal 20: Market server
30: User terminal

Claims (20)

개발자 단말 또는 배포서버에서 수행되는 안드로이드 어플리케이션의 역공학 방지 방법에 있어서,
안드로이드 어플리케이션의 실행 파일을 추출하여 암호화하는 단계; 및
상기 암호화된 실행 파일과 상기 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 상기 안드로이드 어플리케이션을 패키징하는 단계를 포함하되,
상기 스텁 파일은,
진입점(entry point) 변환 기법에 기반하여 상기 암호화된 실행 파일이 복호화되어 실행되도록 제어하는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
A method for preventing reverse engineering of an Android application executed on a developer terminal or a distribution server,
Extracting and encrypting an executable file of the Android application; And
And packaging the Android application so that the encrypted executable file and the stub file for decrypting the encrypted executable file are included,
In the stub file,
And controlling the decrypted executable file to be decrypted and executed based on an entry point conversion technique.
How to prevent reverse engineering of Android applications.
삭제delete 청구항 1에 있어서,
상기 스텁 파일은,
상기 안드로이드 어플리케이션에 대한 실행 시에 가장 먼저 실행되도록 설정된 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method according to claim 1,
In the stub file,
And is set to be executed first in execution for the Android application.
How to prevent reverse engineering of Android applications.
청구항 3에 있어서,
상기 스텁 파일은,
액티비티(Activity), 서비스(Service), 컨텐츠 프로바이더(Content Provider) 및 브로드캐스트 리시버(Broadcast Receiver) 중 어떤 컴포넌트가 실행되더라도 가장 먼저 실행되는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method of claim 3,
In the stub file,
Is executed first, whichever component is executed, such as an activity, a service, a content provider, and a broadcast receiver.
How to prevent reverse engineering of Android applications.
청구항 3에 있어서,
상기 스텁 파일은,
안드로이드 매니페스트(Android Manifest) 파일의 설정에 따라 가장 먼저 실행되는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method of claim 3,
In the stub file,
Characterized in that it is executed first according to the setting of the Android manifest file,
How to prevent reverse engineering of Android applications.
청구항 1에 있어서,
상기 스텁 파일은,
상기 암호화된 실행 파일이 복호화되어 생성된 원본 실행 파일을 위한 진입점 변환에 따른 실행 흐름 변경이 수행되도록 설정하는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method according to claim 1,
In the stub file,
And an execution flow change according to an entry point conversion for an original executable file generated by decoding the encrypted executable file is performed.
How to prevent reverse engineering of Android applications.
청구항 6에 있어서,
상기 실행 흐름 변경은,
상기 스텁 파일의 설정에 따라 안드로이드 런타임(Android Runtime)에서 수행되는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method of claim 6,
The execution flow change includes:
And is executed in the Android runtime according to the setting of the stub file.
How to prevent reverse engineering of Android applications.
청구항 7에 있어서,
상기 실행 흐름 변경은,
상기 안드로이드 런타임에서 사용할 상기 원본 실행 파일의 진입점 컴포넌트를 초기화함으로써 수행되는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method of claim 7,
The execution flow change includes:
And initializing an entry point component of the original executable file for use in the Android runtime.
How to prevent reverse engineering of Android applications.
청구항 1에 있어서,
상기 실행 파일은,
Classes.dex 파일인 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method according to claim 1,
The executable file includes:
Classes.dex file,
How to prevent reverse engineering of Android applications.
사용자 단말에서 수행되는 안드로이드 어플리케이션의 역공한 방지 방법에 있어서,
암호화된 실행 파일과 상기 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 패키징된 안드로이드 어플리케이션을 수신하는 단계; 및
패키징된 상기 안드로이드 어플리케이션에 포함된 상기 스텁 파일을 이용하여 상기 암호화된 실행 파일을 복호화하는 단계를 포함하되,
상기 스텁 파일은,
진입점(entry point) 변환 기법에 기반하여 상기 암호화된 실행 파일이 복호화되어 실행되도록 제어하는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
A method for preventing backtracking of an Android application executed in a user terminal,
Receiving an packaged Android application including an encrypted executable file and a stub file for decrypting the encrypted executable file; And
Decrypting the encrypted executable file using the stub file included in the packaged Android application,
In the stub file,
And controlling the decrypted executable file to be decrypted and executed based on an entry point conversion technique.
How to prevent reverse engineering of Android applications.
삭제delete 청구항 10에 있어서,
상기 스텁 파일은,
상기 안드로이드 어플리케이션에 대한 실행 시에 가장 먼저 실행되도록 설정된 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method of claim 10,
In the stub file,
And is set to be executed first in execution for the Android application.
How to prevent reverse engineering of Android applications.
청구항 12에 있어서,
상기 스텁 파일은,
액티비티(Activity), 서비스(Service), 컨텐츠 프로바이더(Content Provider) 및 브로드캐스트 리시버(Broadcast Receiver) 중 어떤 컴포넌트가 실행되더라도 가장 먼저 실행되는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method of claim 12,
In the stub file,
Is executed first, whichever component is executed, such as an activity, a service, a content provider, and a broadcast receiver.
How to prevent reverse engineering of Android applications.
청구항 12에 있어서,
상기 스텁 파일은,
안드로이드 매니페스트(Android Manifest) 파일의 설정에 따라 가장 먼저 실행되는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method of claim 12,
In the stub file,
Characterized in that it is executed first according to the setting of the Android manifest file,
How to prevent reverse engineering of Android applications.
청구항 10에 있어서,
상기 스텁 파일은,
상기 암호화된 실행 파일이 복호화되어 생성된 원본 실행 파일을 위한 진입점 변환에 따른 실행 흐름 변경이 수행되도록 설정하는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
The method of claim 10,
In the stub file,
And an execution flow change according to an entry point conversion for an original executable file generated by decoding the encrypted executable file is performed.
How to prevent reverse engineering of Android applications.
청구항 15에 있어서,
상기 실행 흐름 변경은,
상기 스텁 파일의 설정에 따라 안드로이드 런타임(Android Runtime)에서 수행되는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
16. The method of claim 15,
The execution flow change includes:
And is executed in the Android runtime according to the setting of the stub file.
How to prevent reverse engineering of Android applications.
청구항 16에 있어서,
상기 실행 흐름 변경은,
상기 안드로이드 런타임에서 사용할 상기 원본 실행 파일의 진입점 컴포넌트를 초기화함으로써 수행되는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지 방법.
18. The method of claim 16,
The execution flow change includes:
And initializing an entry point component of the original executable file for use in the Android runtime.
How to prevent reverse engineering of Android applications.
안드로이드 어플리케이션의 실행 파일을 추출하여 암호화하고, 상기 암호화된 실행 파일과 상기 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 상기 안드로이드 어플리케이션을 패키징하되,
상기 스텁 파일은,
진입점(entry point) 변환 기법에 기반하여 상기 암호화된 실행 파일이 복호화되어 실행되도록 제어하는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지를 수행하는 장치.
The method comprising the steps of: extracting and encrypting an executable file of the Android application, and packaging the Android application so that the encrypted executable file and the stub file for decrypting the encrypted executable file are included,
In the stub file,
And controlling the decrypted executable file to be decrypted and executed based on an entry point conversion technique.
A device to prevent reverse engineering of Android applications.
암호화된 실행 파일과 상기 암호화된 실행 파일을 복호화하는 스텁(stub) 파일이 포함되도록 패키징된 안드로이드 어플리케이션을 수신하고, 패키징된 상기 안드로이드 어플리케이션에 포함된 상기 스텁 파일을 이용하여 상기 암호화된 실행 파일을 복호화하되,
상기 스텁 파일은,
진입점(entry point) 변환 기법에 기반하여 상기 암호화된 실행 파일이 복호화되어 실행되도록 제어하는 것을 특징으로 하는,
안드로이드 어플리케이션의 역공학 방지를 수행하는 장치.
Receiving the packaged Android application so as to include an encrypted executable file and a stub file for decrypting the encrypted executable file and decrypting the encrypted executable file using the stub file included in the packaged Android application However,
In the stub file,
And controlling the decrypted executable file to be decrypted and executed based on an entry point conversion technique.
A device to prevent reverse engineering of Android applications.
컴퓨터에서 수행될 때, 청구항 1 및 3내지 9에 따른 방법 중 어느 하나를 수행하는 컴퓨터 프로그램을 기록한 컴퓨터로 판독 가능한 기록 매체.
A computer program for performing any one of the methods according to claims 1 and 3 to 9 when being executed on a computer.
KR1020150102380A 2015-03-19 2015-07-20 Method for preventing reverse engineering of android application and apparatus for performing the method Expired - Fee Related KR101734663B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20150038409 2015-03-19
KR1020150038409 2015-03-19

Publications (2)

Publication Number Publication Date
KR20160112904A KR20160112904A (en) 2016-09-28
KR101734663B1 true KR101734663B1 (en) 2017-05-24

Family

ID=57101910

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150102380A Expired - Fee Related KR101734663B1 (en) 2015-03-19 2015-07-20 Method for preventing reverse engineering of android application and apparatus for performing the method

Country Status (1)

Country Link
KR (1) KR101734663B1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190043750A (en) 2017-10-19 2019-04-29 한국전자통신연구원 Apparatus and method for loading up dex file into memory
KR20210083780A (en) 2019-12-27 2021-07-07 주식회사 린아레나 Method and system for improving android app security by DEX file segmentation and obfuscation
KR20210088793A (en) 2020-01-06 2021-07-15 한국전자통신연구원 System and method for creating secure Android apps and installing/running apps on the Android platform
KR102482880B1 (en) * 2022-09-05 2022-12-29 한화시스템(주) Reverse engineering prevention system and method for defense weapon system embedded SW protection

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102358101B1 (en) * 2020-04-28 2022-02-08 주식회사 락인컴퍼니 A method for applying security program

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101415786B1 (en) 2013-01-18 2014-08-06 건국대학교 산학협력단 A Hybrid Design system and method of Online Execution Class and Encryption-based Copyright Protection for Android Apps

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101415786B1 (en) 2013-01-18 2014-08-06 건국대학교 산학협력단 A Hybrid Design system and method of Online Execution Class and Encryption-based Copyright Protection for Android Apps

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190043750A (en) 2017-10-19 2019-04-29 한국전자통신연구원 Apparatus and method for loading up dex file into memory
KR20210083780A (en) 2019-12-27 2021-07-07 주식회사 린아레나 Method and system for improving android app security by DEX file segmentation and obfuscation
KR20210088793A (en) 2020-01-06 2021-07-15 한국전자통신연구원 System and method for creating secure Android apps and installing/running apps on the Android platform
KR102326100B1 (en) * 2020-01-06 2021-11-17 한국전자통신연구원 System and method for creating secure Android apps and installing/running apps on the Android platform
KR102482880B1 (en) * 2022-09-05 2022-12-29 한화시스템(주) Reverse engineering prevention system and method for defense weapon system embedded SW protection

Also Published As

Publication number Publication date
KR20160112904A (en) 2016-09-28

Similar Documents

Publication Publication Date Title
CN104680039B (en) A kind of data guard method and device of application program installation kit
EP2803009B1 (en) Virtual machine device having key driven obfuscation and method
CN105683990B (en) Method and apparatus for protecting dynamic base
KR101734663B1 (en) Method for preventing reverse engineering of android application and apparatus for performing the method
KR102433011B1 (en) Method of apk file protection, apk file protection system performing the same, and storage medium storing the same
US10296728B2 (en) Method and system for providing cloud-based application security service
CN103530535A (en) Shell adding and removing method for Android platform application program protection
JP6815386B2 (en) Systems, methods and programs to protect application code
US10867017B2 (en) Apparatus and method of providing security and apparatus and method of executing security for common intermediate language
CN104318155A (en) Dynamic loading method capable of guarding against reverse APK file
CN111143869A (en) Application package processing method, device, electronic device and storage medium
CN104408337A (en) Reinforcement method for preventing reverse of APK (Android package) file
US20180067777A1 (en) Application protection method, server, and terminal
CN108399319B (en) Source code protection method, application server and computer readable storage medium
US11061998B2 (en) Apparatus and method for providing security and apparatus and method for executing security to protect code of shared object
CN114547558B (en) Authorization method, authorization control device, equipment and medium
CN103282913A (en) Method for loading the code of at least one software module
CN104506504A (en) Security mechanism and security device for confidential information of card-free terminal
JP2007233426A (en) Application execution device
KR102459774B1 (en) Method of encrypting dll file, system of encrypting dll file performing the same, and storage medium storing the same
KR101749209B1 (en) Method and apparatus for hiding information of application, and method and apparatus for executing application
KR20140139392A (en) Method for generating application execution file for mobile device, application execution method of mobile device, device for generating application execution file and mobile device
CN108875321A (en) A kind of generation method of instruction set, device and electronic equipment
KR101667774B1 (en) Apparatus and Method of Providing Security for Script Program
JP2008040853A (en) Application execution method and application execution apparatus

Legal Events

Date Code Title Description
A201 Request for examination
PA0109 Patent application

St.27 status event code: A-0-1-A10-A12-nap-PA0109

PA0201 Request for examination

St.27 status event code: A-1-2-D10-D11-exm-PA0201

D13-X000 Search requested

St.27 status event code: A-1-2-D10-D13-srh-X000

D14-X000 Search report completed

St.27 status event code: A-1-2-D10-D14-srh-X000

E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

St.27 status event code: A-1-2-D10-D21-exm-PE0902

PG1501 Laying open of application

St.27 status event code: A-1-1-Q10-Q12-nap-PG1501

E13-X000 Pre-grant limitation requested

St.27 status event code: A-2-3-E10-E13-lim-X000

P11-X000 Amendment of application requested

St.27 status event code: A-2-2-P10-P11-nap-X000

P13-X000 Application amended

St.27 status event code: A-2-2-P10-P13-nap-X000

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

St.27 status event code: A-1-2-D10-D22-exm-PE0701

GRNT Written decision to grant
PR0701 Registration of establishment

St.27 status event code: A-2-4-F10-F11-exm-PR0701

PR1002 Payment of registration fee

St.27 status event code: A-2-2-U10-U11-oth-PR1002

Fee payment year number: 1

PG1601 Publication of registration

St.27 status event code: A-4-4-Q10-Q13-nap-PG1601

P22-X000 Classification modified

St.27 status event code: A-4-4-P10-P22-nap-X000

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 4

R18-X000 Changes to party contact information recorded

St.27 status event code: A-5-5-R10-R18-oth-X000

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 5

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 6

PR1001 Payment of annual fee

St.27 status event code: A-4-4-U10-U11-oth-PR1001

Fee payment year number: 7

R18-X000 Changes to party contact information recorded

St.27 status event code: A-5-5-R10-R18-oth-X000

PC1903 Unpaid annual fee

St.27 status event code: A-4-4-U10-U13-oth-PC1903

Not in force date: 20240503

Payment event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE

PC1903 Unpaid annual fee

St.27 status event code: N-4-6-H10-H13-oth-PC1903

Ip right cessation event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE

Not in force date: 20240503