KR101907847B1 - Apparatus, method for encryption using dependency integrity check of androids and other similar systems - Google Patents

Apparatus, method for encryption using dependency integrity check of androids and other similar systems Download PDF

Info

Publication number
KR101907847B1
KR101907847B1 KR1020180086274A KR20180086274A KR101907847B1 KR 101907847 B1 KR101907847 B1 KR 101907847B1 KR 1020180086274 A KR1020180086274 A KR 1020180086274A KR 20180086274 A KR20180086274 A KR 20180086274A KR 101907847 B1 KR101907847 B1 KR 101907847B1
Authority
KR
South Korea
Prior art keywords
code
module
security module
encrypted
encryption
Prior art date
Application number
KR1020180086274A
Other languages
Korean (ko)
Inventor
박지환
Original Assignee
주식회사 스틸리언
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 스틸리언 filed Critical 주식회사 스틸리언
Priority to KR1020180086274A priority Critical patent/KR101907847B1/en
Application granted granted Critical
Publication of KR101907847B1 publication Critical patent/KR101907847B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The present invention relates to an apparatus and a method for encryption using dependency relationship type forgery integrity check in androids and other similar systems, and an application encrypted by the same. To this end, the apparatus comprises: a main code extracting module extracting a main executable code or a main character string to be encrypted in an executable code part of an input specific application; an encryption module encrypting the extracted main execution code or main character string to generate an encryption code, and storing the generated encryption code in a security module of the specific application; a reference code insertion module deleting the extracted main execution code or the main character string, and generating and inserting a reference code for referencing the deleted main execution code or the encryption code stored in the security module at the position of the key string; and a security module encryption module encrypting the security module based on data of the executable code part of the specific application modified by the reference code insertion module. According to the present invention, security can be maintained.

Description

의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치 및 방법{APPARATUS, METHOD FOR ENCRYPTION USING DEPENDENCY INTEGRITY CHECK OF ANDROIDS AND OTHER SIMILAR SYSTEMS}[0001] APPARATUS, METHOD FOR ENCRYPTION USING DEPENDENCY INTEGRITY CHECK OF ANDROIDS AND OTHER SIMILAR SYSTEMS [0002]

본 발명은 애플리케이션 무결성과 관련하여, 안드로이드 및 기타 유사 시스템의 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치, 방법 및 이에 의해 암호화된 애플리케이션에 관한 것이다. The present invention relates to an apparatus and method for cryptographic processing using dependency-based forgery integrity check of Android and other similar systems, in connection with application integrity, and an application encrypted thereby.

최근 모바일 디바이스 수의 급격한 증가에 따라 보안 경계가 기존 네트워크나 디바이스에서 애플리케이션으로 이동되고 있다. 기존에 데스크탑이나 모바일 디바이스의 수가 많지 않았던 때에는 메인 프레임 중심의 컴퓨팅은 네트워크를 통한 상호 연결로 이동하였다. 따라서, 당시에는 라우터, 방화벽 관련 보안 정책 등으로 쉽게 보안 경계를 정의할 수 있었다. 하지만, 퍼스널 클라이언트인 데스크탑의 수가 폭발적으로 증가하게 되면서 보안 경계는 사용자 엑세스 및 인증 정책 또는 하드웨어를 통해 장치에 상주하도록 확장되었다. 그 이후, 최근까지 이어지는 모바일 디바이스 수의 급격한 증가에 따라 글로벌 앱 경제는 응용 프로그램 계층에서 혁신에 박차를 가하고 있고, 각각의 애플리케이션이 사용자의 삶에 깊게 침투하면서 중요 정보가 모바일 애플리케이션에 많이 저장되게 되면서, 해킹과 크래킹의 무결성을 유지하기 위한 보안 경계가 애플리케이션으로 이동되게 되었다. With the recent rapid increase in the number of mobile devices, security boundaries are shifting from existing networks or devices to applications. In the past, when there were not many desktops or mobile devices, mainframe-centric computing moved to interconnections over the network. Therefore, at that time, it was easy to define the security boundary by router, firewall related security policy, and so on. However, as the number of desktop personal clients has increased explosively, security boundaries have been extended to reside on devices through user access and authentication policies or hardware. Since then, with the rapid increase in the number of mobile devices in recent years, the global app economy is spurring innovation at the application layer, and as each application deeply penetrates the user's life, important information is stored in mobile applications , Security boundaries have been moved to applications to maintain the integrity of hacking and cracking.

특히, 2011년 이후에는 Droid-Dream, DroidKungFu, Ginermaster 등의 악성 코드들이 유포된 사례가 있었는데, 정상 안드로이드 앱을 역공학(Reverse engineering) 후에 위의 악성 코드가 포함된 형태로 재패키지 되어 유포되었다. 이와 같이, 안드로이드 애플리케이션이 악성코드 작성자들의 주요 표적이 되는 이유는 다음과 같다. Especially after 2011, malicious codes such as Droid-Dream, DroidKungFu, and Ginermaster were circulated. After reverse engineering, the normal Android app was repackaged and distributed with malicious codes. Thus, Android applications are the main target of malware authors for the following reasons.

안드로이드 애플리케이션은 DEX 코드가 Javabyte 코드와 1:1 매핑이 가능하여 역공학이 쉽기 때문에 앱 위변조를 이용한 악성코드 삽입과 리패키징(Repackaging)이 용이하다. 또한, 구글의 공식 마켓인 Play Store 외에도 3rd party 마켓이 활성화되어 있고, 사용자가 직접 모바일 디바이스에 안드로이드 애플리케이션 패키지 파일(APK 파일)을 설치하는 것도 가능하기 때문에 악성 애플리케이션의 배포가 쉬운 문제가 있다. Android applications are easy to reverse-engineer because DEX code can be mapped 1: 1 with Javabyte code, so malicious code insertion and repackaging using app forgery is easy. In addition, it is easy to distribute malicious applications because it is possible to install the Android application package file (APK file) on the mobile device since the third party market is activated in addition to Google's official market Play Store.

도 1은 APK 파일이 만들어지는 과정을 도시한 것이다. 도 1에 도시된 바와 같이, *.dex 파일은 안드로이드 가상 머신(VM)인 달빅(dalvik)이 인식할 수 있도록 *.class 파일을 바이트 코드로 변환된 파일이다. 역으로 *.dex 파일을 달빅 바이트 코드로 디컴파일 하여 *.class 파일을 추출을 하게 되면, 안드로이드 애플리케이션의 java 코드로도 디컴파일이 가능하다. 개발된 APK 파일을 실행하여 애플리케이션의 설치를 시작하게 되면 APK 파일의 압축이 풀리고 APK는, 예를 들어, /data/app 에 Package 명으로 저장된다. *.dex 달빅 바이트 코드는, 예를 들어, /data/dalvik-cache 에 저장된다. lib 등 기타 파일은, 예를 들어, /data/data/Package명 에 저장된다. 실제적인 실행 파일인 *.dex 파일이 달빅(Dalvik) 가상 머신에서 작동된다.FIG. 1 shows a process of creating an APK file. As shown in Fig. 1, the * .dex file is a file converted into a bytecode * .class file so that it can be recognized by dalvik, which is an Android virtual machine (VM). Conversely, if you extract * .class files by decompiling * .dex files into dabby bytecode, you can also decompile them with the java code of the Android application. When you run the developed APK file to start the installation of the application, the APK file is unzipped and the APK is saved as the Package name in / data / app, for example. * .dex The dumbic byte code is stored in, for example, / data / dalvik-cache. Other files such as lib are stored in, for example, / data / data / Package names. The actual executable file * .dex works in the Dalvik virtual machine.

도 2는 APK 파일의 구조를 도시한 것이다. 도 2에 도시된 바와 같이, APK 파일은 실행가능한 프로그램 코드와 리소스들(resources)을 포함하는 자바 표준 jar 파일과 유사하다. 일반적으로 APK 파일에 포함되는 AndroidManifest.xml 파일은 애플리케이션 정보, 접근 권한 정보 등의 메타 정보를 포함하고 있는 XML 파일이고, classes.dex 파일은 달빅 가상머신에 의해서 로드되어 실행될 자바 바이트코드(bytecode) 정보이며, res 디렉토리는 레이아웃, 문자열 등을 정의한 파일들로 구성되어 있다. 그리고 lib 디렉토리에는 .so와 같은 컴파일된 네이티브 라이브러리들이 포함되고, assets 디렉토리에는 애플리케이션이 추가로 필요한 파일들을 포함시킬 수 있으며, 해당 파일들은 android.content.res.AssetManager 클래스로 처리할 수 있다. 2 shows the structure of the APK file. As shown in FIG. 2, the APK file is similar to a Java standard jar file that contains executable program code and resources. Generally, the AndroidManifest.xml file included in the APK file is an XML file containing meta information such as application information and access authority information. The classes.dex file is a Java bytecode information to be loaded and executed by the Dalvik virtual machine , And the res directory consists of files that define layout, strings, and so on. The lib directory contains compiled native libraries such as .so, and the assets directory can contain additional files that the application needs, and these files can be processed by the android.content.res.AssetManager class.

대한민국 공개특허 10-2017-0089859, 애플리케이션 무결성의 검증을 제공하기 위한 방법 및 디바이스, 톰슨 라이센싱Korean Patent Publication No. 10-2017-0089859, Methods and Devices for Providing Verification of Application Integrity, Thomson Licensing 대한민국 공개특허 10-2017-0088858, 애플리케이션 무결성 검증을 제공하기 위한 방법 및 디바이스, 톰슨 라이센싱Korean Patent Publication No. 10-2017-0088858, Methods and Devices for Providing Application Integrity Verification, Thomson Licensing

종전에는 문제점을 해결하고자 안드로이드 애플리케이션의 실행을 위한 덱스(dex)파일을 암호화한 후 실행과정에서 암호화된 덱스 파일이 복호화되록 함으로써 암호화 방법을 제공하였다. 그러나 이는 실행되는 안드로이드 애플리케이션의 경우 애플리케이션의 시장 규모의 확대와 동시에 크게 성행하고 있는 애플리케이션의 위변조에 활용되는 디컴파일을 방지하기가 용이하지 못한 문제점이 있었으며, 안드로이드 애플리케이션의 디컴파일 방지를 위해 단순히 덱스 파일에 포함된 실행 코드를 전부 암호화하는 경우에는 덱스 파일이 제대로 실행되지 못하는 문제점이 있었다. Previously, in order to solve the problem, after encrypting the dex file for running the Android application, the encryption method was provided by decrypting the encrypted dex file during execution. However, this has not been easy to prevent the decompilation of the running Android application in order to increase the size of the application market and at the same time, to exploit the forgery of the application which is greatly performed. In order to prevent decompilation of the Android application, There is a problem that the dex file can not be executed properly.

즉, 기존의 데이터 무결성 검증은 Hash Algorithm을 이용하여 계산한 Hash 값 기반의 무결성 검증 방식을 사용하였다. 하지만, 만약 공격자가 기존의 hash 값 계산과 검증 절차를 별도의 프로세스를 통해 기존의 Hash 값을 알아낼 수 있다면 비교적 쉽게 우회하여 공격할 수 있는 가능성이 있다. 또한, 위변조를 탐지하는 Hash 값만 수정하게 되면 위변조 탐지 우회가 가능하다. 그래서 이를 해결하기 위한 다양한 방법에 대한 연구과제 개발이 요구되어 왔다. 동일한 보안 문제로 기존에 사용하던 Java(Dex)는 분석이 매우 쉽다는 문제가 있어 모바일 보안 시장에서는 무결성 검증을 위한 바이너리 모듈 제작이 지속적으로 증가하고 있다.That is, the existing data integrity verification uses the hash value based integrity verification method calculated using the hash algorithm. However, if the attacker can find out the existing hash value through a separate process of calculating and verifying the existing hash value, there is a possibility that the attacker can easily bypass it. In addition, if only the hash value for detecting forgery and falsification is modified, forgery detection can be bypassed. Therefore, it has been required to develop a research project on various methods to solve this problem. Java (Dex), which has been used for the same security problem, has a problem that it is very easy to analyze. Therefore, the production of binary modules for integrity verification is continuously increasing in the mobile security market.

기존에는 무결성 검증 기능을 포함하는 모듈을 단순히 LoadLibrary와 같은 메서드를 이용한 바이너리 로드를 통해 해당 코드를 패치 또는 삭제함으로써 우회가 가능하였다. Previously, a module containing an integrity verification function could be bypassed by simply patching or deleting the code through a binary load using a method such as LoadLibrary.

안드로이드 환경 특성상 디컴파일(decompile)을 통한 Java 코드 분석이 가능하여 디컴파일을 방지하는 것이 불가능하다. Dex 파일은 디컴파일 도구를 통해 Dex파일을 jar 파일로 변환하여 APK파일의 소스코드 확인이 가능하며, 소스코드 분석 및 변조를 통해 모바일 앱에 대한 악의적인 행위가 가능하다. 따라서, 기존의 방식으로 Dex 파일을 암호화해서 보호하는 경우, 해당 복호화 코드 패치 및 삭제를 통해 Dex 파일을 디컴파일을 통해 쉽게 모바일 앱의 소스 코드를 확인할 수 있다. 따라서, Dex파일을 보호하기 위해서는 Java(DEX)분석 난이도를 향상 시켜야 하며 보안 시스템 우회를 방지할 수 있는 무결성 검증 기술이 기존 방법과는 확연한 차이점이 있어야 한다. 현재 시장에서 Dex 암호화 및 무결성 검증 기술을 연구개발 및 제품화하였지만, 분석 및 우회가 가능하여 보안 기술 본연의 역할을 하지 못하고 있다.Due to the nature of Android environment, it is impossible to prevent decompilation by enabling Java code analysis through decompile. Dex files can be decompiled to convert Dex files into jar files to check the source code of APK files, and malicious behavior on mobile apps is possible through source code analysis and tampering. Therefore, if you protect your Dex files by encrypting them in an existing way, you can easily check the source code of your mobile app by decompiling the Dex file by patching and deleting the decryption code. Therefore, in order to protect Dex files, it is necessary to improve the difficulty of Java (DEX) analysis and the integrity verification technology that can prevent the bypass of the security system should have a clear difference from the existing methods. Although Dex encryption and integrity verification technology has been researched and commercialized in the current market, it is not able to play the role of security technology because it can be analyzed and bypassed.

따라서, 본 발명의 목적은 Hash 값 계산 및 검증을 통해 무결성을 해제할 수 없도록 하며, Dex파일을 보호하는 방식을 기존 방식보다 어렵게 하여 공격자 입장에서 모바일 앱을 해킹하기 어렵도록 보호하는 안드로이드 및 기타 유사 시스템의 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치, 방법 및 이에 의해 암호화된 애플리케이션를 제공하는 데에 있다. Therefore, it is an object of the present invention to prevent the integrity from being released through the calculation and verification of hash value, and to protect the Dex file from the hacking of an attacker by making it harder than the existing method, And a cryptographic processing apparatus using the dependency forgery integrity check of the system, a method and an application encrypted by the method.

이하 본 발명의 목적을 달성하기 위한 구체적 수단에 대하여 설명한다.Hereinafter, specific means for achieving the object of the present invention will be described.

본 발명의 목적은, 입력된 특정 애플리케이션의 실행가능한 코드부에서 암호화 대상이 되는 주요 실행코드 또는 주요 문자열을 추출하기 위한 주요 코드 추출 모듈; 추출된 상기 주요 실행코드 또는 상기 주요 문자열를 암호화하여 암호화 코드를 생성하고, 생성된 상기 암호화 코드를 상기 특정 애플리케이션의 보안 모듈에 저장하는 암호화 모듈; 추출된 상기 주요 실행코드 또는 상기 주요 문자열을 삭제하고, 삭제된 상기 주요 실행코드 또는 상기 주요 문자열의 위치에 상기 보안 모듈에 저장된 상기 암호화 코드를 참조하도록 하는 참조 코드를 생성하여 삽입하는 참조 코드 삽입 모듈; 및 상기 참조 코드 삽입 모듈에 의해 수정된 상기 특정 애플리케이션의 상기 실행가능한 코드부의 데이터를 기반으로 상기 보안 모듈을 암호화하는 보안 모듈 암호화 모듈;을 포함하고, 상기 보안 모듈과 상기 실행가능한 코드부의 의존 관계에 의해 위변조 무결성 체크가 가능한 암호화된 상기 특정 애플리케이션을 출력하는, 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치를 제공하여 달성될 수 있다. An object of the present invention is to provide a key code extraction module for extracting a main execution code or a main character string to be encrypted in an executable code part of a specific application input; An encryption module for encrypting the extracted main execution code or the main string to generate an encryption code, and storing the generated encryption code in the security module of the specific application; A reference code insertion module which deletes the extracted main execution code or the main string and generates and inserts a reference code for referring to the deleted main execution code or the position of the main string, ; And a security module encryption module for encrypting the security module based on data of the executable code portion of the specific application modified by the reference code inserting module, wherein the dependency between the security module and the executable code portion And outputting the encrypted specific application which can be checked by forgery integrity check, by using the dependency-type forgery integrity check.

본 발명의 다른 목적은, 암호화 처리 방법이 수행되는 프로그램 코드를 저장하는 메모리 모듈; 및 상기 프로그램 코드를 수행하는 처리 모듈;을 포함하고, 상기 프로그램 코드는, 입력된 특정 애플리케이션의 실행가능한 코드부에서 암호화 대상이 되는 주요 실행코드 또는 주요 문자열을 추출하기 위한 주요 코드 추출 단계; 추출된 상기 주요 실행코드 또는 상기 주요 문자열를 암호화하여 암호화 코드를 생성하고, 생성된 상기 암호화 코드를 상기 특정 애플리케이션의 보안 모듈에 저장하는 암호화 단계; 추출된 상기 주요 실행코드 또는 상기 주요 문자열을 삭제하고, 삭제된 상기 주요 실행코드 또는 상기 주요 문자열의 위치에 상기 보안 모듈에 저장된 상기 암호화 코드를 참조하도록 하는 참조 코드를 생성하여 삽입하는 참조 코드 삽입 단계; 및 상기 참조 코드 삽입 단계에 의해 수정된 상기 특정 애플리케이션의 상기 실행가능한 코드부의 데이터를 기반으로 상기 보안 모듈을 암호화하는 보안 모듈 암호화 단계;를 포함하고, 상기 보안 모듈과 상기 실행가능한 코드부의 의존 관계에 의해 위변조 무결성 체크가 가능한 암호화된 상기 특정 애플리케이션을 출력하는, 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치를 제공하여 달성될 수 있다.Another object of the present invention is to provide a memory module for storing program codes in which an encryption processing method is performed; And a processing module for executing the program code, wherein the program code includes a main code extracting step for extracting a main execution code or a main character string to be encrypted in an executable code part of the input specific application; An encryption step of encrypting the extracted main execution code or the main string to generate an encryption code, and storing the generated encryption code in a security module of the specific application; A reference code inserting step of deleting the extracted main execution code or the main string and generating and inserting a reference code for referring to the deleted main execution code or the position of the main string to the encryption code stored in the security module ; And a security module encrypting step of encrypting the security module based on the data of the executable code part of the specific application modified by the reference code inserting step, wherein the dependency between the security module and the executable code part And outputting the encrypted specific application which can be checked by forgery integrity check, by using the dependency-type forgery integrity check.

본 발명의 다른 목적은, 주요 코드 추출 모듈이, 입력된 특정 애플리케이션의 실행가능한 코드부에서 암호화 대상이 되는 주요 실행코드 또는 주요 문자열을 추출하기 위한 주요 코드 추출 단계; 암호화 모듈이, 추출된 상기 주요 실행코드 또는 상기 주요 문자열를 암호화하여 암호화 코드를 생성하고, 생성된 상기 암호화 코드를 상기 특정 애플리케이션의 보안 모듈에 저장하는 암호화 단계; 참조 코드 삽입 모듈이, 추출된 상기 주요 실행코드 또는 상기 주요 문자열을 삭제하고, 삭제된 상기 주요 실행코드 또는 상기 주요 문자열의 위치에 상기 보안 모듈에 저장된 상기 암호화 코드를 참조하도록 하는 참조 코드를 생성하여 삽입하는 참조 코드 삽입 단계; 및 보안 모듈 암호화 모듈이, 상기 참조 코드 삽입 모듈에 의해 수정된 상기 특정 애플리케이션의 상기 실행가능한 코드부의 데이터를 기반으로 상기 보안 모듈을 암호화하는 보안 모듈 암호화 단계;을 포함하고, 상기 보안 모듈과 상기 실행가능한 코드부의 의존 관계에 의해 위변조 무결성 체크가 가능한 암호화된 상기 특정 애플리케이션을 출력하는, 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법을 제공하여 달성될 수 있다. Another object of the present invention is to provide a main code extraction module for extracting a main execution code or a main character string to be encrypted in an executable code part of a specific application inputted; An encrypting step of encrypting the main executable code or the extracted key string to generate an encrypted code, and storing the generated encrypted code in the security module of the specific application; The reference code inserting module deletes the extracted main execution code or the main string and generates a reference code for referencing the deleted main execution code or the position of the main string to the encryption code stored in the security module A reference code insertion step of inserting; And a security module encrypting step of encrypting the security module based on data of the executable code part of the specific application modified by the reference code inserting module, And outputting the encrypted specific application capable of forgery integrity check based on a dependency of a possible code part, by using a dependency-type forgery integrity check.

본 발명의 다른 목적은, 암호화 처리방법에 의해 암호화되고, 컴퓨터에 의해 수행될 수 있는 기록매체에 저장된 애플리케이션에 있어서, 주요 실행코드 또는 주요 문자열의 위치에 보안 모듈에 저장된 상기 암호화 코드를 참조하도록 하는 참조 코드가 대신 저장되는 애플리케이션 코드; 및 상기 주요실행코드 또는 상기 주요 문자열을 암호화한 암호화 코드를 포함하고, 상기 애플리케이션 코드의 데이터를 기반으로 암호화되는 보안 모듈;을 포함하고, 상기 보안 모듈과 상기 애플리케이션 코드의 의존 관계에 의해 위변조 무결성 체크가 가능해지는, 컴퓨터에 의해 수행될 수 있는 기록매체에 저장된 애플리케이션을 제공하여 달성될 수 있다. It is another object of the present invention to provide a method of encrypting and decrypting an encrypted application code in an application stored on a recording medium which can be encrypted by a cryptographic processing method and which can be executed by a computer, Application code in which a reference code is stored instead; And a security module that includes the main executable code or the encryption code that encrypts the main string, and is encrypted based on the data of the application code, wherein the security module and the application code depend on the forgery integrity check Which is stored in a recording medium that can be executed by a computer.

상기한 바와 같이, 본 발명에 의하면 이하와 같은 효과가 있다.As described above, the present invention has the following effects.

첫째, 본 발명의 일실시예에 따르면, Java(DEX)와 바이너리 형태의 보안 모듈간의 의존도 향상으로 두 영역을 모두 분석 수정하는 문제를 해결하여야 하므로 무결성을 해제하고 분석하는데 기존보다 많은 시간이 소요되며 이를 통해 보안성을 유지할 수 있다.First, according to an embodiment of the present invention, it is necessary to solve the problem of analyzing and modifying both areas by improving the dependency between Java (DEX) and a binary type security module. Therefore, This helps maintain security.

본 명세서에 첨부되는 다음의 도면들은 본 발명의 바람직한 실시예를 예시하는 것이며, 발명의 상세한 설명과 함께 본 발명의 기술사상을 더욱 이해시키는 역할을 하는 것이므로, 본 발명은 그러한 도면에 기재된 사항에만 한정되어 해석되어서는 아니 된다.
도 1은 APK 파일이 만들어지는 과정을 도시한 것,
도 2는 APK 파일의 구조를 도시한 것,
도 3은 본 발명의 일실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치(100)를 도시한 것,
도 4는 본 발명의 일실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법을 도시한 흐름도,
도 5는 본 발명의 일실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법에 의해 암호화된 애플리케이션이 구현되는 시스템의 예시도,
도 6은 본 발명의 일실시예에 따른 암호화된 애플리케이션 구조의 예시도이다.
BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate preferred embodiments of the invention and, together with the description, And shall not be interpreted.
1 shows a process of creating an APK file,
2 shows the structure of the APK file,
FIG. 3 illustrates an encryption processing apparatus 100 using a dependency forgery integrity check according to an embodiment of the present invention,
FIG. 4 is a flowchart illustrating a method of processing encryption using a dependency-based forgery integrity check according to an embodiment of the present invention; FIG.
5 is an illustration of a system in which an application encrypted by the method of processing an encryption using a dependency forgery integrity check according to an embodiment of the present invention is implemented,
Figure 6 is an illustration of an encrypted application structure in accordance with one embodiment of the present invention.

이하 첨부된 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 본 발명을 쉽게 실시할 수 있는 실시예를 상세히 설명한다. 다만, 본 발명의 바람직한 실시예에 대한 동작원리를 상세하게 설명함에 있어서 관련된 공지기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following detailed description of the operation principle of the preferred embodiment of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may unnecessarily obscure the subject matter of the present invention.

또한, 도면 전체에 걸쳐 유사한 기능 및 작용을 하는 부분에 대해서는 동일한 도면 부호를 사용한다. 명세서 전체에서, 특정 부분이 다른 부분과 연결되어 있다고 할 때, 이는 직접적으로 연결되어 있는 경우뿐만 아니라, 그 중간에 다른 소자를 사이에 두고, 간접적으로 연결되어 있는 경우도 포함한다. 또한, 특정 구성요소를 포함한다는 것은 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라, 다른 구성요소를 더 포함할 수 있는 것을 의미한다.The same reference numerals are used for portions having similar functions and functions throughout the drawings. In the specification, when a specific portion is connected to another portion, it includes not only a direct connection but also a case where the other portion is indirectly connected with another element in between. In addition, the inclusion of a specific constituent element does not exclude other constituent elements unless specifically stated otherwise, but may include other constituent elements.

안드로이드 및 기타 유사 시스템의 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치Cryptographic processing device using dependency forgery integrity check of Android and other similar systems

의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치와 관련하여, 도 3은 본 발명의 일실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치(100)를 도시한 것이다. 도 3에 도시된 바와 같이, 본 발명의 일 실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치(100)는, 주요 코드 추출 모듈(110), 암호화 모듈(120), 참조 코드 삽입 모듈(130), 보안 모듈 암호화 모듈(140)을 포함할 수 있다. 본 발명의 일실시예에 따른 주요 코드 추출 모듈(110), 암호화 모듈(120), 참조 코드 삽입 모듈(130), 보안 모듈 암호화 모듈(140)은 암호화 서비스를 수행하는 주체의 서버에 구성될 수 있다. With respect to an encryption processing apparatus using dependency forgery integrity check, FIG. 3 shows an encryption processing apparatus 100 using a dependency-based forgery integrity check according to an embodiment of the present invention. 3, the encryption processing apparatus 100 using the dependency forgery integrity check according to an embodiment of the present invention includes a main code extraction module 110, an encryption module 120, a reference code insertion module 130, and a security module encryption module 140. The main code extracting module 110, the encrypting module 120, the reference code inserting module 130, and the security module encrypting module 140 according to an embodiment of the present invention can be configured in a server of a principal performing encryption services have.

주요 코드 추출 모듈(110)은 특정 애플리케이션 APK 파일이 입력되면 애플리케이션의 실행가능한 코드부(예를 들면 DEX 파일)에서 암호화 대상이 되는 주요 실행코드 또는 주요 문자열을 추출하기 위한 구성이다. 주요 코드 추출 모듈(110)에서 암호화 대상이 되는 일부, 즉, 암호화 대상이 되는 실행코드와 비암호화 대상이 되는 실행코드는 본 발명을 수행하는 컴퓨터 프로그램의 관리자에 의해 임의로 설정되거나 기설정된 기준에 따라 선정될 수 있다. 본 발명의 일실시예에 따르면, 주요 코드 추출 모듈(110)에서 추출하기로 선정하는 주요 코드는 기저장된 중요도 판단 모델에 의해 중요도 판단되어 선정될 수 있다. The main code extracting module 110 is a structure for extracting a main executable code or a main character string to be encrypted from an executable code part (for example, a DEX file) of an application when a specific application APK file is input. The executable code to be encrypted in the main code extraction module 110, that is, the executable code to be encrypted and the executable code to be the non-encryption target are arbitrarily set by the administrator of the computer program for carrying out the present invention, Can be selected. According to an embodiment of the present invention, the main code selected to be extracted by the main code extraction module 110 can be selected based on the importance degree determined by the previously stored importance determination model.

암호화 모듈(120)은 주요 코드 추출 모듈(110)에 의해 애플리케이션의 실행가능한 코드부로부터 추출된 주요 실행코드 또는 주요 문자열를 암호화하여 암호화 코드를 생성하고 라이브러리의 보안 모듈에 저장하기 위한 구성이다. 주요 코드 추출 모듈(110)에서 암호화 대상이 되는 실행코드를 추출하면, 암호화 모듈(120)에서 추출된 실행코드를 암호화한다. 이때, 암호화는 다양한 암호화 알고리즘을 이용하여 이루어질 수 있으며, 예를 들어, 비밀키(Common key, Secret Key) 기반의 암호화 방식이 될 수 있다. 예를 들어, 암호화 코드는 라이브러리에 저장되는 보안 모듈인 .so 파일 등에 저장될 수 있다. The encryption module 120 is a configuration for encrypting the main executable code or the main string extracted from the executable code part of the application by the main code extraction module 110 to generate an encryption code and storing it in the security module of the library. When the main code extraction module 110 extracts the execution code to be encrypted, the execution code extracted by the encryption module 120 is encrypted. At this time, the encryption may be performed using various encryption algorithms, for example, an encryption scheme based on a common key (Secret Key). For example, the encryption code may be stored in a .so file, which is a security module stored in the library.

참조 코드 삽입 모듈(130)은 주요 코드 추출 모듈(110)에 의해 애플리케이션의 실행가능한 코드부로부터 추출된 주요 실행코드 또는 주요 문자열을 삭제하고, 해당 위치에 상기 보안 모듈에 저장된 해당 암호화 코드를 참조하도록 하는 참조 코드를 생성하여 삽입하는 모듈이다. 예를 들어, DEX 파일에 위치하던 주요 실행코드를 보안 모듈인 .so 파일에 저장한 경우, DEX 파일의 해당 주요 실행코드를 삭제하고, .so 파일의 해당 암호화 코드를 참조하도록 하는 참조 코드를 해당 주요 실행코드의 위치에 삽입하게 된다.The reference code inserting module 130 deletes the main execution code or the main character string extracted from the executable code part of the application by the main code extracting module 110 and refers to the corresponding encryption code stored in the security module at the corresponding position And generates a reference code. For example, if you store the main executable code in the DEX file in the .so file, which is a security module, you can delete the corresponding executable code in the DEX file and reference the corresponding code in the .so file It is inserted at the location of the main executable code.

보안 모듈 암호화 모듈(140)은 주요 코드 추출 모듈(110)과 참조 코드 삽입 모듈(130)에 의해 생성된 애플리케이션의 실행 가능한 코드부의 데이터를 기반으로(적어도 일부의 실행 코드를 키(key)로 하여) 보안 모듈을 암호화하는 구성이다. 보안 모듈 암호화 모듈(140)은 예를 들어, 주요 실행코드가 삭제되고 참조 코드가 삽입된 DEX 파일을 Hash 값으로 변환하고 이를 토대로 보안 모듈을 암호화 할 수 있다. 보안 모듈 암호화 모듈(140)에 의해 암호화 처리된 애플리케이션(암호화된 애플리케이션의 APK 파일)이 출력될 수 있다. 본 발명의 일실시예에 따르면 보안 모듈이 실행 가능한 코드(예를 들어, DEX 파일)의 적어도 일부의 Hash 값을 키(Key)로하여 암호화되기 때문에, 보안모듈의 암호화에 동적으로 생성된 키(Key)가 이용된다고 할 수 있다. 기존에는 기저장된 Hash값 비교를 통해 무결성을 검사하여 Hash값이 노출되는 문제가 있었는데, 본 발명의 일실시예에 따르면 키 값이 동적으로 생성되게 되므로 공격자가 이를 침해하기 더 어려워지는 효과가 발생된다. 무결성이 깨어지는 결과로 인해 Hash값이 변경되면 정상적으로 암호화가 해제 되지 않기 때문에 침해사실 파악이 가능하게 되는 것이다. The security module encryption module 140 is based on the data of the executable code portion of the application generated by the main code extraction module 110 and the reference code insertion module 130 ) This is a configuration for encrypting the security module. For example, the security module encryption module 140 may convert the DEX file into which the main execution code is deleted and the reference code is inserted, and encrypt the security module based on the Hash value. The application encrypted by the security module encryption module 140 (APK file of the encrypted application) can be output. According to an embodiment of the present invention, since the security module is encrypted by using a Hash value of at least a part of executable code (e.g., a DEX file) as a key, Key) can be used. In the past, there has been a problem that the hash value is exposed by checking the integrity through comparing the hash value previously stored. However, according to the embodiment of the present invention, the key value is generated dynamically, . If the hash value is changed as a result of the integrity being broken, the encryption can not be normally released and the infringement can be grasped.

결국, 본 발명의 일실시예에 따르면, 상기 보안 모듈과 상기 실행가능한 코드부의 의존 관계에 의해 위변조 무결성 체크가 가능한 암호화된 애플리케이션이 출력되는 효과가 발생된다.As a result, according to one embodiment of the present invention, an effect that an encrypted application capable of forgery integrity check is output is generated by the dependency between the security module and the executable code unit.

본 발명의 일실시예에 따른 보안 모듈은 앱의 정상 실행을 위해 암호화 코드 및 리소스를 포함하여 정상 앱을 생성할 수 있으며 이렇게 만들어진 Java(Dex)의 데이터 기반으로 보안 모듈을 암호화하여, 보안 모듈과 앱과의 의존성을 증대시킬 수 있다. 본 발명의 일실시예에 따르면, 위와 같은 보안 모듈의 기술적 특징을 기반으로 보안성이 낮은 Java(DEX)와 보안 모듈과 앱과의 의존성을 증가시켜 시스템 성능 향상 및 무결성 검증과 같은 보안 기능의 우회를 어렵게 한다. 공격자가 본 발명의 일실시예에 따른 앱의 Dex 파일에 대한 위변조를 시도할 경우, Dex 파일은 보안 모듈이 동작하는데 필요한 하나의 값으로 사용되기 때문에, 보안 모듈 중 하나의 값이라도 변조가 되었을 경우 그 구조가 변경되어 정상적인 앱 실행이 불가능해지는 효과가 발생된다. 또한, 위변조 무결성 체크와 Dex 파일 암호화를 통해 Dex 파일을 위변조할 경우 보안 모듈의 앱 의존성으로 인해 변조가 되는 순간 앱 실행을 중단하게 되는 효과가 발생된다.A security module according to an embodiment of the present invention can generate a normal app including an encryption code and a resource for normal execution of an application, encrypts the security module with a data base of Java (Dex) You can increase your dependency on the app. According to an embodiment of the present invention, it is possible to increase the dependency of Java (DEX) with low security and security modules and apps based on the technical features of the security module as described above, thereby bypassing security functions such as system performance improvement and integrity verification . When an attacker attempts to forge or modify a Dex file of an app according to an embodiment of the present invention, the Dex file is used as a value necessary for the security module to operate. Therefore, when one of the security modules is modulated The structure is changed and the normal application can not be executed. Also, if forex modification of the Dex file is performed through forgery integrity check and Dex file encryption, the application execution is stopped as soon as the security module is tampered with due to the app dependency.

또한, 본 발명의 일실시예에 따른 보안 모듈 포함 앱을 생성하는 동안, 보안 모듈 로드 및 Java(DEX)의 난독화 및 분석 난이도 향상을 위해 Gradle Plugin으로 빌드하는 과정에 참조 코드를 삽입 수정하는 기술(기존 데이터 제거기능 포함)을 이용하여 높은 수준의 코드 난독화가 가능하다. Java(DEX)와 높은 의존성을 가지는 보안 모듈(바이너리)을 만들기 위해 매번 새롭게 코드를 생성할 수 있다.Also, during the creation of the security module-containing app according to an embodiment of the present invention, a technique of inserting and modifying a reference code in a process of building a security module and obfuscating Java (DEX) and analyzing difficulty in a Gradle Plugin (Including the ability to remove existing data) to enable high code obfuscation. New code can be generated each time to create Java (DEX) and a highly dependable security module (binary).

기존에는 애플리케이션의 DEX 파일과 같은 실행 코드의 Hash 값과 보안 모듈이 보유한 원본값을 보안 모듈이 비교하여 위변조를 체크하였다. 기존의 방식으로는 원본값을 변조하는 경우 DEX 파일을 변조하여도 위변조 체크가 불가능하여 정상 실행이 가능하게 되는 문제가 있었다. 하지만, 본 발명의 일실시예에 따르면, DEX 파일과 보안 모듈이 상호 의존관계를 갖도록 구성되므로 위와 같은 문제가 해소되는 효과가 발생된다. Previously, the security module compares the hash value of the executable code such as the DEX file of the application with the original value held by the security module, and checks the forgery and falsification. In the conventional method, when the original value is modulated, even if the DEX file is modulated, it is impossible to check the forgery or falsification and the normal execution becomes possible. However, according to the embodiment of the present invention, since the DEX file and the security module are configured to have an interdependency relationship, the above problem is solved.

본 발명의 일실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치에 의해 암호화된 애플리케이션을 실행하게 되면, 아래와 같은 단계로 애플리케이션이 실행되게 된다. When the encrypted application is executed by the encryption processing apparatus using the dependency forgery integrity check according to an embodiment of the present invention, the application is executed in the following steps.

(1) 라이브러리에서 암호화된 보안 모듈을 로드(Load)(1) Load encrypted security module from library

(2) 애플리케이션 실행 코드(예를 들어, DEX 파일) 중 적어도 일부의 Hash 값을 이용하여 보안 모듈 복호화(2) decrypting the security module using at least a part of the Hash value of the application executable code (for example, DEX file)

(3) 복호화된 보안 모듈이 암호화된 실행 코드(예를 들어, DEX 파일)를 복호화(3) The decrypted security module decrypts the encrypted executable code (for example, a DEX file)

(4) 애플리케이션의 실행 코드를 실행하고, 참조코드를 통해 보안 모듈 내에 저장된 주요 코드를 포함하여 애플리케이션 정상 실행(4) execute the execution code of the application, and execute the application normal execution including the main code stored in the security module through the reference code

따라서, 만일 DEX 파일이 변조된 경우에는 보안 모듈의 복호화에 문제가 발생되고, 라이브러리의 보안 모듈이 변조된 경우에는 애플리케이션의 실행에 문제가 발생되어 위변조를 방지할 수 있게 된다. Therefore, if the DEX file is modulated, there is a problem in decrypting the security module, and if the security module of the library is modulated, there is a problem in execution of the application, and forgery and falsification can be prevented.

또한, 본 발명의 일실시예에 따르면, 보안 모듈 암호화 모듈이 암호화된 보안 모듈을 기초로 안드로이드 런타임을 수정하고, 상기 특정 애플리케이션이 실행되는 경우에 DEX 파일과 같은 암호화된 코드의 복호화는 안드로이드 런타임 상에서 수행되는 것을 특징으로 할 수 있다. 본 발명의 일실시예에 따라, 암호화된 보안 모듈을 기초로 안드로이드 런타임을 수정하여 안드로이드 런타임 상에서 암호화된 실행 코드의 복호화가 진행되도록 구성되는 경우에는, 보안 모듈을 변조하려는 경우에 안드로이드 런타임 자체를 변조해야 해서 보안 모듈의 변조가 더 어려워지는 효과가 발생된다. According to an embodiment of the present invention, the security module encryption module modifies the Android runtime based on the encrypted security module, and when the specific application is executed, the decryption of the encrypted code such as the DEX file is executed on the Android runtime Is performed. According to an embodiment of the present invention, when the Android runtime is modified based on the encrypted security module to decrypt the encrypted execution code on the Android runtime, when the security module is to be tampered, The effect of the modulation of the security module becomes more difficult.

안드로이드 및 기타 유사 시스템의 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법How to handle encryption using dependency forgery integrity check of Android and other similar systems

의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법과 관련하여, 도 4는 본 발명의 일실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법을 도시한 흐름도이다. 도 4에 도시된 바와 같이, 본 발명의 일 실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법은, 주요 코드 추출 단계(S10), 암호화 단계(S20), 참조 코드 삽입 단계(S30), 보안 모듈 암호화 단계(S40)을 포함할 수 있다. FIG. 4 is a flowchart illustrating an encryption processing method using a dependency forgery integrity check according to an embodiment of the present invention, in connection with a cryptographic processing method using dependency forgery integrity check. 4, the encryption processing method using the dependency forgery integrity check according to an exemplary embodiment of the present invention includes a main code extraction step S10, an encryption step S20, a reference code insertion step S30, And a security module encryption step (S40).

주요 코드 추출 단계(S10)는 특정 애플리케이션 APK 파일이 입력되면 애플리케이션의 실행가능한 코드부(예를 들면 DEX 파일)에서 암호화 대상이 되는 주요 실행코드 또는 주요 문자열을 추출하기 위한 단계이다. The main code extracting step S10 is a step for extracting a main execution code or a main character string to be encrypted from an executable code part (for example, a DEX file) of the application when a specific application APK file is inputted.

암호화 단계(S20)는 주요 코드 추출 단계(S10)에 의해 애플리케이션의 실행가능한 코드부로부터 추출된 주요 실행코드 또는 주요 문자열를 암호화하여 암호화 코드를 생성하고 라이브러리의 보안 모듈에 저장하기 위한 단계이다. The encrypting step S20 is a step for encrypting the main executable code or the main string extracted from the executable code part of the application by the main code extracting step S10 to generate an encrypted code and storing it in the security module of the library.

참조 코드 삽입 단계(S30)는 주요 코드 추출 단계(S10)에 의해 애플리케이션의 실행가능한 코드부로부터 추출된 주요 실행코드 또는 주요 문자열을 삭제하고, 해당 위치에 상기 보안 모듈에 저장된 해당 암호화 코드를 참조하도록 하는 참조 코드를 생성하여 삽입하는 단계이다. In the reference code inserting step (S30), the main execution code or main character string extracted from the executable code part of the application is deleted by the main code extracting step (S10), and the corresponding code stored in the security module is referred to A reference code is generated and inserted.

보안 모듈 암호화 단계(S40)는 주요 코드 추출 단계(S10)과 참조 코드 삽입 단계(S30)에 의해 생성된 애플리케이션의 실행 가능한 코드부의 데이터를 기반으로 보안 모듈을 암호화하는 단계이다. The security module encryption step S40 is a step of encrypting the security module based on the data of the executable code part of the application generated by the main code extraction step S10 and the reference code insertion step S30.

결국, 본 발명의 일실시예에 따르면, 상기 보안 모듈과 상기 실행가능한 코드부의 의존 관계에 의해 위변조 무결성 체크가 가능한 암호화된 애플리케이션이 출력되는 효과가 발생된다.As a result, according to one embodiment of the present invention, an effect that an encrypted application capable of forgery integrity check is output is generated by the dependency between the security module and the executable code unit.

본 발명의 일실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법에 의해 암호화된 애플리케이션을 실행하게 되면, 아래와 같은 단계로 애플리케이션이 실행되게 된다. When the encrypted application is executed by the encryption processing method using the dependency-based forgery-and-integrity check according to an embodiment of the present invention, the application is executed in the following steps.

(1) 라이브러리에서 암호화된 보안 모듈을 로드(Load)(1) Load encrypted security module from library

(2) 애플리케이션 실행 코드(예를 들어, DEX 파일) 중 적어도 일부의 Hash 값을 이용하여 보안 모듈 복호화(2) decrypting the security module using at least a part of the Hash value of the application executable code (for example, DEX file)

(3) 복호화된 보안 모듈이 암호화된 실행 코드(예를 들어, DEX 파일)를 복호화(3) The decrypted security module decrypts the encrypted executable code (for example, a DEX file)

(4) 애플리케이션의 실행 코드를 실행하고, 참조코드를 통해 보안 모듈 내에 저장된 주요 코드를 포함하여 애플리케이션 정상 실행(4) execute the execution code of the application, and execute the application normal execution including the main code stored in the security module through the reference code

따라서, 만일 DEX 파일이 변조된 경우에는 보안 모듈의 복호화에 문제가 발생되고, 라이브러리의 보안 모듈이 변조된 경우에는 애플리케이션의 실행에 문제가 발생되어 위변조를 방지할 수 있게 된다. Therefore, if the DEX file is modulated, there is a problem in decrypting the security module, and if the security module of the library is modulated, there is a problem in execution of the application, and forgery and falsification can be prevented.

또한, 본 발명의 일실시예에 따르면, 보안 모듈 암호화 모듈이 암호화된 보안 모듈을 기초로 안드로이드 런타임을 수정하고, 상기 특정 애플리케이션이 실행되는 경우에 DEX 파일과 같은 암호화된 코드의 복호화는 안드로이드 런타임 상에서 수행되는 것을 특징으로 할 수 있다. 본 발명의 일실시예에 따라, 암호화된 보안 모듈을 기초로 안드로이드 런타임을 수정하여 안드로이드 런타임 상에서 암호화된 실행 코드의 복호화가 진행되도록 구성되는 경우에는, 보안 모듈을 변조하려는 경우에 안드로이드 런타임 자체를 변조해야 해서 보안 모듈의 변조가 더 어려워지는 효과가 발생된다. According to an embodiment of the present invention, the security module encryption module modifies the Android runtime based on the encrypted security module, and when the specific application is executed, the decryption of the encrypted code such as the DEX file is executed on the Android runtime Is performed. According to an embodiment of the present invention, when the Android runtime is modified based on the encrypted security module to decrypt the encrypted execution code on the Android runtime, when the security module is to be tampered, The effect of the modulation of the security module becomes more difficult.

안드로이드 및 기타 유사 시스템의 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법에 의해 암호화된 애플리케이션Applications encrypted by the encryption processing method using dependency forgery integrity check of Android and other similar systems

본 발명의 일실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법에 의해 암호화된 애플리케이션과 관련하여, 도 5는 본 발명의 일실시예에 따른 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법에 의해 암호화된 애플리케이션이 구현되는 시스템의 예시도이다. 도 5에 도시된 바와 같이, 암호화된 애플리케이션이 구현되는 시스템(1)은 클라이언트(10) 및 애플리케이션 제공자(애플리케이션 스토어)(20) 를 포함한다. 클라이언트(10)는 Android OS 상에서 구동하는 임의의 종류의 적절한 디바이스, 이를 테면, 스마트폰 또는 테블릿일 수 있고, 이는 적어도 하나의 하드웨어 프로세싱 유닛("프로세서")(11), 메모리 (12), 사용자와 상호작용하기 위한 사용자 인터페이스(13), 및 네트워크(30), 이를테면, 인터넷을 통하여 애플리케이션 제공자(20)와 통신하기 위한 통신 인터페이스(14)를 포함한다. 당해 기술 분야의 통상의 기술자는 예시된 디바이스가 명료화의 이유로 매우 간략화되어 있으며, 추가로 실제 디바이스들은 전력 공급 장치들, 및 영구 저장 장치와 같은 특징들을 포함하고 있음을 알고 있을 것이다. 애플리케이션 제공자(20)는 프로세서(21)를 포함하고, 클라이언트(10)에 의해 다운로드 될 수 있는 적어도 하나의 암호화된 애플리케이션 APK 파일(22)을 저장하며, APK 파일은 서명인 엔티티에 의해 서명된 APK 인증서를 포함한다.With respect to the application encrypted by the encryption processing method using the dependency forgery integrity check according to an embodiment of the present invention, FIG. 5 is a flowchart illustrating an encryption processing method using the dependency forgery integrity check according to an embodiment of the present invention Figure 5 is an illustration of a system in which an encrypted application is implemented. As shown in FIG. 5, a system 1 in which an encrypted application is implemented includes a client 10 and an application provider (application store) The client 10 may be any suitable type of device running on the Android OS, such as a smartphone or tablet, which includes at least one hardware processing unit ("processor") 11, memory 12, A user interface 13 for interacting with the user, and a communication interface 14 for communicating with the network 30, such as the application provider 20 via the Internet. Those of ordinary skill in the art will appreciate that the illustrated device is highly simplified for clarity reasons and further that the actual devices include features such as power supplies, and persistent storage. The application provider 20 includes a processor 21 and stores at least one encrypted application APK file 22 that can be downloaded by the client 10. The APK file includes an APK Certificate.

도 6은 본 발명의 일실시예에 따른 암호화된 애플리케이션 구조의 예시도이다. 암호화된 애플리케이션 APK 파일(22)은 서명인 엔티티에 의해 서명된 APK 인증서(201), 애플리케이션 코드(202)(설치 전 DEX 및 설치 후 ODEX 또는 ELF 파일들), 적어도 APK 인증서를 서명하는데 이용된 키와 상이한 키를 이용하여 서명한 경우 서명 검증 키(203)를 포함하는 서명 인증서, 보안 모듈(210)을 포함한 라이브러리(204)를 포함한다.Figure 6 is an illustration of an encrypted application structure in accordance with one embodiment of the present invention. The encrypted application APK file 22 includes an APK certificate 201 signed by the signing entity, application code 202 (pre-installation DEX and post-installation ODEX or ELF files), at least a key used to sign the APK certificate And a signing certificate including a signature verification key 203 when signed with a different key than the security module 210. [

보안 모듈(210)은 애플리케이션 코드(202)의 Hash 값으로 암호화되어 상호 의존 관계로 구성될 수 있다. 따라서, 공격자가 본 발명의 일실시예에 따른 앱의 Dex 파일에 대한 위변조를 시도할 경우, Dex 파일은 보안 모듈이 동작하는데 필요한 하나의 Hash 값으로 사용되기 때문에, 보안 모듈 중 하나의 값이라도 변조가 되었을 경우 그 구조가 변경되어 정상적인 앱 실행이 불가능해지는 효과가 발생된다. 또한, 위변조 무결성 체크와 Dex 파일 암호화를 통해 Dex 파일을 위변조할 경우 보안 모듈의 앱 의존성으로 인해 변조가 되는 순간 앱 실행을 중단하게 되는 효과가 발생된다.The security module 210 may be encrypted with the Hash value of the application code 202 and configured in an interdependent relationship. Therefore, when an attacker attempts to forge or modify a Dex file of an app according to an embodiment of the present invention, the Dex file is used as a single Hash value required for the security module to operate, The structure is changed, and the effect that the normal application can not be executed occurs. Also, if forex modification of the Dex file is performed through forgery integrity check and Dex file encryption, the application execution is stopped as soon as the security module is tampered with due to the app dependency.

이상에서 설명한 바와 같이, 본 발명이 속하는 기술 분야의 통상의 기술자는 본 발명이 그 기술적 사상이나 필수적 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 상술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아닌 것으로서 이해해야만 한다. 본 발명의 범위는 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 등가 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함하는 것으로 해석되어야 한다.As described above, those skilled in the art will appreciate that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. It is therefore to be understood that the above-described embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the present invention is defined by the appended claims rather than the detailed description, and all changes or modifications derived from the meaning and scope of the claims and their equivalents should be construed as being included in the scope of the present invention.

본 명세서 내에 기술된 특징들 및 장점들은 모두를 포함하지 않으며, 특히 많은 추가적인 특징들 및 장점들이 도면들, 명세서, 및 청구항들을 고려하여 당업자에게 명백해질 것이다. 더욱이, 본 명세서에 사용된 언어는 주로 읽기 쉽도록 그리고 교시의 목적으로 선택되었고, 본 발명의 주제를 묘사하거나 제한하기 위해 선택되지 않을 수도 있다는 것을 주의해야 한다.The features and advantages described herein are not all inclusive, and in particular, many additional features and advantages will be apparent to those skilled in the art in view of the drawings, specification, and claims. Moreover, it should be noted that the language used herein is primarily chosen for readability and for purposes of teaching, and may not be selected to delineate or limit the subject matter of the invention.

본 발명의 실시예들의 상기한 설명은 예시의 목적으로 제시되었다. 이는 개시된 정확한 형태로 본 발명을 제한하거나, 빠뜨리는 것 없이 만들려고 의도한 것이 아니다. 당업자는 상기한 개시에 비추어 많은 수정 및 변형이 가능하다는 것을 이해할 수 있다.The foregoing description of embodiments of the invention has been presented for purposes of illustration. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Those skilled in the art will appreciate that many modifications and variations are possible in light of the above teachings.

그러므로 본 발명의 범위는 상세한 설명에 의해 한정되지 않고, 이를 기반으로 하는 출원의 임의의 청구항들에 의해 한정된다. 따라서, 본 발명의 실시예들의 개시는 예시적인 것이며, 이하의 청구항에 기재된 본 발명의 범위를 제한하는 것은 아니다.The scope of the invention is, therefore, not to be limited by the Detailed Description, but is to be defined by the claims of any application based thereon. Accordingly, the disclosure of embodiments of the invention is illustrative and not restrictive of the scope of the invention, which is set forth in the following claims.

1: 시스템
10: 클라이언트
11: 프로세서
12: 메모리
13: UI
14: I/O
21: 프로세서
22: 암호화된 애플리케이션 APK 파일
20: 애플리케이션 제공자
30: 네트워크
100: 의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치
110: 주요 코드 추출 모듈
120: 암호화 모듈
130: 참조 코드 삽입 모듈
140: 보안 모듈 암호화 모듈
22: 암호화된 애플리케이션 APK 파일
201: APK 인증서
202: 애플리케이션 코드
203: 서명 검증키
204: 라이브러리
210: 보안 모듈
1: System
10: Client
11: Processor
12: Memory
13: UI
14: I / O
21: Processor
22: Encrypted application APK file
20: Application provider
30: Network
100: encryption processing device using dependency relational forgery integrity check
110: Major code extraction module
120: Encryption module
130: Reference code insertion module
140: Security module encryption module
22: Encrypted application APK file
201: APK certificate
202: Application code
203: Signature verification key
204: Library
210: Security module

Claims (2)

입력된 특정 애플리케이션의 실행가능한 코드부에서 암호화 대상이 되는 코드인 주요 코드를 추출하기 위한 주요 코드 추출 모듈;
추출된 상기 주요 코드를 암호화하여 암호화 코드를 생성하고, 생성된 상기 암호화 코드를 상기 특정 애플리케이션의 보안 모듈에 저장하는 암호화 모듈;
추출된 상기 주요 코드를 삭제하고, 삭제된 상기 주요 코드의 위치에 상기 보안 모듈에 저장된 상기 암호화 코드를 참조하도록 하는 참조 코드를 생성하여 삽입하는 참조 코드 삽입 모듈; 및
상기 참조 코드 삽입 모듈에 의해 수정된 상기 특정 애플리케이션의 상기 실행가능한 코드부의 전체 코드 중 적어도 일부를 키(Key)로 하여 상기 보안 모듈을 암호화하는 보안 모듈 암호화 모듈;
을 포함하고,
상기 보안 모듈과 상기 실행가능한 코드부의 의존 관계에 의해 위변조 무결성 체크가 가능한 암호화된 상기 특정 애플리케이션을 출력하며,
상기 보안 모듈 암호화 모듈은, 암호화된 상기 보안 모듈을 기초로 안드로이드 런타임을 수정하고,
상기 특정 애플리케이션이 실행되는 경우, 상기 암호화 코드의 복호화는 상기 안드로이드 런타임 상에서 수행되는 것을 특징으로 하는,
의존 관계형 위변조 무결성 체크를 이용한 암호화 처리장치.
A main code extracting module for extracting a main code which is a code to be encrypted in an executable code part of an input specific application;
An encryption module for encrypting the extracted main code to generate an encryption code, and storing the generated encryption code in a security module of the specific application;
A reference code inserting module for deleting the extracted main code and generating and inserting a reference code for referring to the encrypted code stored in the security module at a position of the deleted main code; And
A security module encrypting module encrypting the security module with at least a part of the entire code of the executable code part of the specific application modified by the reference code inserting module as a key;
/ RTI >
Outputting the encrypted specific application capable of forgery integrity check according to a dependency between the security module and the executable code unit,
Wherein the security module encryption module modifies the Android runtime based on the encrypted security module,
The decryption of the encrypted code is performed on the Android runtime when the specific application is executed.
An encryption processing device using dependency forgery integrity check.
주요 코드 추출 모듈이, 입력된 특정 애플리케이션의 실행가능한 코드부에서 암호화 대상이 되는 주요 코드를 추출하기 위한 주요 코드 추출 단계;
암호화 모듈이, 추출된 상기 주요 코드를 암호화하여 암호화 코드를 생성하고, 생성된 상기 암호화 코드를 상기 특정 애플리케이션의 보안 모듈에 저장하는 암호화 단계;
참조 코드 삽입 모듈이, 추출된 상기 주요 코드를 삭제하고, 삭제된 상기 주요 코드의 위치에 상기 보안 모듈에 저장된 상기 암호화 코드를 참조하도록 하는 참조 코드를 생성하여 삽입하는 참조 코드 삽입 단계; 및
보안 모듈 암호화 모듈이, 상기 참조 코드 삽입 모듈에 의해 수정된 상기 특정 애플리케이션의 상기 실행가능한 코드부의 전체 코드 중 적어도 일부를 키(Key)로 하여 상기 보안 모듈을 암호화하는 보안 모듈 암호화 단계;
을 포함하고,
상기 보안 모듈과 상기 실행가능한 코드부의 의존 관계에 의해 위변조 무결성 체크가 가능한 암호화된 상기 특정 애플리케이션을 출력하며,
상기 보안 모듈 암호화 모듈은, 암호화된 상기 보안 모듈을 기초로 안드로이드 런타임을 수정하고,
상기 특정 애플리케이션이 실행되는 경우, 상기 암호화 코드의 복호화는 상기 안드로이드 런타임 상에서 수행되는 것을 특징으로 하는,
의존 관계형 위변조 무결성 체크를 이용한 암호화 처리방법.
A main code extracting module for extracting a main code to be encrypted in an executable code part of the input specific application;
An encrypting step of encrypting the extracted main code to generate an encrypted code, and storing the generated encrypted code in a security module of the specific application;
A reference code insertion module deletes the extracted main code and generates and inserts a reference code for referring to the encrypted code stored in the security module at a position of the deleted main code; And
The security module encrypting module encrypts the security module with at least a part of the entire code of the executable code portion of the specific application modified by the reference code inserting module as a key;
/ RTI >
Outputting the encrypted specific application capable of forgery integrity check according to a dependency between the security module and the executable code unit,
Wherein the security module encryption module modifies the Android runtime based on the encrypted security module,
The decryption of the encrypted code is performed on the Android runtime when the specific application is executed.
An encryption processing method using dependency - based forgery integrity check.
KR1020180086274A 2018-07-24 2018-07-24 Apparatus, method for encryption using dependency integrity check of androids and other similar systems KR101907847B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180086274A KR101907847B1 (en) 2018-07-24 2018-07-24 Apparatus, method for encryption using dependency integrity check of androids and other similar systems

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180086274A KR101907847B1 (en) 2018-07-24 2018-07-24 Apparatus, method for encryption using dependency integrity check of androids and other similar systems

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020180031175A Division KR101883997B1 (en) 2017-11-29 2018-03-16 Apparatus, method for encryption using dependency integrity check of androids and other similar systems

Publications (1)

Publication Number Publication Date
KR101907847B1 true KR101907847B1 (en) 2018-10-12

Family

ID=63876417

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180086274A KR101907847B1 (en) 2018-07-24 2018-07-24 Apparatus, method for encryption using dependency integrity check of androids and other similar systems

Country Status (1)

Country Link
KR (1) KR101907847B1 (en)

Similar Documents

Publication Publication Date Title
CN107977553B (en) Method and device for security reinforcement of mobile application program
KR101471589B1 (en) Method for Providing Security for Common Intermediate Language Program
US20210294879A1 (en) Securing executable code integrity using auto-derivative key
Dunn et al. Cloaking malware with the trusted platform module
KR101265099B1 (en) A Method For Software Security Treatment And A Storage Medium
KR101503785B1 (en) Method And Apparatus For Protecting Dynamic Library
Piao et al. Server‐based code obfuscation scheme for APK tamper detection
US8175269B2 (en) System and method for enterprise security including symmetric key protection
KR101695639B1 (en) Method and system for providing application security service based on cloud
Demsky Cross-application data provenance and policy enforcement
Merlo et al. You shall not repackage! demystifying anti-repackaging on android
Suciu et al. Horizontal privilege escalation in trusted applications
CN114547558A (en) Authorization method, authorization control method and device, equipment and medium
Black et al. Anti-analysis trends in banking malware
KR20100054940A (en) Apparatus and method for preventing malware using signature verification for embedded linux
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
Prünster et al. Fides: Unleashing the Full Potential of Remote Attestation.
KR101907846B1 (en) Apparatus, method for encryption using dependency integrity check of androids and other similar systems
CN112115430A (en) Apk reinforcement method, electronic equipment and storage medium
KR101907847B1 (en) Apparatus, method for encryption using dependency integrity check of androids and other similar systems
KR101883997B1 (en) Apparatus, method for encryption using dependency integrity check of androids and other similar systems
US20190199694A1 (en) Individual encryption of control commands
KR100734600B1 (en) Method of system authentication and security enforcement using self-integrity checking based on the tamper-proof H/W
Cabiddu et al. The trusted platform agent
Uppin et al. Analysis of Android Malware Using Data Replication Features Extracted by Machine Learning Tools

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant