KR20170044850A - Android application dynamic loading method - Google Patents
Android application dynamic loading method Download PDFInfo
- Publication number
- KR20170044850A KR20170044850A KR1020150144468A KR20150144468A KR20170044850A KR 20170044850 A KR20170044850 A KR 20170044850A KR 1020150144468 A KR1020150144468 A KR 1020150144468A KR 20150144468 A KR20150144468 A KR 20150144468A KR 20170044850 A KR20170044850 A KR 20170044850A
- Authority
- KR
- South Korea
- Prior art keywords
- dex
- file
- encrypted
- program
- android
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6209—Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Stored Programmes (AREA)
Abstract
본 발명은 안드로이드 어플리케이션 동적 로딩 방법에 관한 것이다. 보다 상세하게는 안드로이드 어플리케이션의 덱스(DEX) 파일을 전자서명 및 암호화한 후 인터넷에 게시한 후, 최초 어플리케이션 실행 시점에는, 파일가져오기, 복호화, 검증 및 동적 로딩 프로그램 로직 등을 가진 어플리케이션이 게시 서버로부터 버전 정보를 확인한 후, 가장 마지막 버전에 해당하는 상기 전자서명 및 암호화된 덱스(DEX) 파일을 게시 서버로부터 획득한 다음, 복호화 및 전자서명 검증을 수행한 후 정상일 경우 안전한 방법으로 저장하고, 동적으로 프로그램을 로딩시키는 과정을 수행하도록 하며, 이후의 시작 시에는 안전하게 저장된 덱스(DEX) 파일을 로딩하는 방법으로 수행하는 것을 특징으로 한다. 본 발명에 의하면 안드로이드 어플리케이션에 대해 일부 프로그램의 버그 수정 및 업그레이드가 수시로 가능하며 프로그램의 주 내용인 덱스(DEX) 파일이 암호화되어 있으므로 안드로이드 어플리케이션에 대한 디컴파일 또한 방지할 수 있는 효과를 가진다.The present invention relates to a dynamic loading method for an Android application. More specifically, a DEX file of an Android application is digitally signed and encrypted and then posted on the Internet. At the time of initial application execution, an application having file import, decryption, verification, and dynamic loading program logic, And obtains the digital signature and the encrypted DEX file corresponding to the latest version from the publishing server, decrypts and verifies the digital signature, and if it is normal, stores it in a secure manner, And loading the DEX file safely stored at the start of the process. According to the present invention, it is possible to fix and upgrade bugs of some programs to the Android application from time to time, and it is also possible to prevent decompilation of the Android application because the DEX file, which is the main content of the program, is encrypted.
Description
본 발명은 안드로이드 어플리케이션 동적 로딩 방법에 관한 것이다. 보다 상세하게는 안드로이드 어플리케이션의 덱스(DEX) 파일을 전자서명 및 암호화한 후 인터넷에 게시하며, 어플리케이션은 이 파일을 획득한 후, 복호화 및 전자서명을 검증한 후 동적으로 로딩하도록 함으로써, 버전 관리를 통한 일부의 프로그램 수정 및 버그 수정 등이 용이하게 할 수 있는 방법에 관한 것이다.The present invention relates to a dynamic loading method for an Android application. More specifically, a DEX file of the Android application is digitally signed and encrypted and then posted on the Internet. The application obtains the file, verifies the decryption and digital signature, and then dynamically loads the file. And a method for facilitating partial program modification and bug correction through the program.
안드로이드(Android)란 구글(Google)이 2007년 11월 모바일(스마트 폰) 시장 진입을 위해 공개한 리눅스기반의 개방형 운영체제(플랫폼)를 말한다. 안드로이드는 원래 인간의 모습을 한 로봇을 일컫는 말로 모바일을 위한 운영체제와 미들웨어, 애플리케이션을 포함하고 있다. PC로 치면 Windows에 해당된다. 단말기 제조사나 외부 SW업체, 이통사가 무료로 사용할 수 있으며 이 플랫폼을 채용한 단말기를 ‘안드로이드폰’이라 부른다. 또한 애플의 아이폰과 앱스토어를 본따 안드로이드폰용 소프트웨어의 거래장터인 안드로이드 마켓도 개설했다.Android is a Linux-based open operating system (platform) released by Google in November 2007 to enter the mobile (smartphone) market. Android is a robot that originally looked like a human, and it includes an operating system, middleware and applications for mobile. If you hit PC, it corresponds to Windows. A handset maker, an external SW vendor, and a mobile operator can use it free of charge. The handset adopting this platform is called an 'Android phone'. We also launched the Android Market, a trading market for software for Android phones based on Apple's iPhone and App Store.
도 1은 기본적인 안드로이드 어플리케이션의 구성에 관한 참고도이다. 도 1과 같이 안드로이드 어플리케이션은 Dalvik VM 이라는 환경하에서 작동하며 Java 형식으로 구성된 코드를 Dalvic VM에서 작동하도록 컴파일한 덱스(DEX) 파일과 각종 리소스를 포함하는 WbXML 로 구성되며, 환경 등을 정의한 Manifest 로 구성되어 있다.1 is a reference diagram related to the configuration of a basic Android application. As shown in FIG. 1, the Android application operates under an environment called Dalvik VM, and is composed of a dex (DEX) file compiled to operate in Dalvic VM and WbXML including various resources, and configured with a manifest .
이렇게 실행 코드를 포함하여 배포됨에 따라 프로그램의 버그에 대한 대처 방법이 재설치 외엔 불가능하며, 일부 로직 변경에 대해서도 재설치만이 가능하다. 이러한 문제를 해결하기 위해 웹 서비스를 기본으로 하는 하이브리드(Hybrid) 방식도 많이 개발되는 추세이나 여전히 Java 로 구현되는 네이티브(Native) 코드에 대한 문제는 여전히 존재한다. 또한 덱스(DEX)파일은 디컴파일이 가능한 구성을 가지고 있어 해커들의 표적이 될 수 있는 문제점이 있다.As a result of the distribution of executable code, it is not possible to re-address the bug of the program except for the reinstallation of some logic changes. In order to solve this problem, a hybrid method based on a web service has been developed in many cases, but there still exists a problem with a native code implemented in Java. Also, DEX files have a configuration that can be decompiled, which can be a target of hackers.
본 발명은 상기와 같은 문제점을 해결하고자 안출된 것으로 안드로이드 어플리케이션의 실행 코드를 포함하는 덱스(DEX) 파일을 전자서명 및 암호화한 후 인터넷을 통한 게시 서버에 버전 정보와 함께 게시하고, 안드로이드 프로그램은 실행 시점에 버전 확인 후 최신 버전의 게시 파일을 다운로드 한 후, 복호화 및 전자서명 검증을 수행한 다음, 동적로딩을 통해 실행하도록 함으로써 언제나 최신 버전을 유지할 수 있도록 함과 동시에 해커들의 디컴파일 및 코드 수정 배포 방지를 위한 방법을 제공하는 것을 목적으로 한다.DISCLOSURE OF THE INVENTION An object of the present invention is to solve the above-mentioned problems, and it is an object of the present invention to electronically sign and encrypt a DEX file including an execution code of an Android application, After downloading the latest version of the publishing file after checking the version at the point of time, decrypting and verifying the digital signature are performed, and then the dynamic loading is performed so that the latest version can be maintained at all times. At the same time, And to provide a method for preventing such a problem.
상기 목적을 달성하기 위한 본 발명의 바람직한 실시예에 따른 안드로이드 어플리케이션 동적 로딩 방법은, According to another aspect of the present invention, there is provided a dynamic application loading method for an Android application,
안드로이드 어플리케이션 동적 로딩 방법에 있어서,In an Android application dynamic loading method,
덱스(DEX) 파일 배포 방법은,DEX (DEX) file distribution method,
안드로이드 소스 컴파일 단계(S01);Compiling the Android source (S01);
덱스(DEX) 파일 생성 단계(S02);A DEX file creation step S02;
덱스(DEX) 파일 전자서명(DEX-S 생성) 단계(S03);A DEX file digital signature (DEX-S generation) step S03;
전자서명된 덱스(DEX) 파일(DEX-S)을 암호화(DEX-E 생성)하는 단계(S04);Encrypting (DEX-E generation) the digitally signed DEX file (DEX-S) (S04);
상기 암호화된 파일(DEX-E)를 버전정보와 함께 게시하는 단계(S05);(S05) of publishing the encrypted file (DEX-E) together with the version information;
를 포함하며,/ RTI >
덱스(DEX) 설치 방법은,To install DEX,
버전 정보를 확인하는 단계(S11);Confirming version information (S11);
암호화된 파일(DEX-E)을 다운로드 하는 단계(S12);Downloading the encrypted file DEX-E (S12);
암호화된 덱스(DEX) 파일(DEX-E)을 복호화(DEX-S 생성)하는 단계(S13);Decrypting (DEX-S generation) the encrypted DEX file (DEX-E) (S13);
복호화된 덱스(DEX) 파일(DEX-S)을 전자서명 검증하는 단계(S14);A digital signature verification step (S14) of a decrypted DEX file (DEX-S);
저장을 위해 덱스(DEX) 파일(DEX-S)을 암호화(DEX-X 생성)하는 단계(S15);Encrypting (DEX-X creation) the DEX file (DEX-S) for storage (S15);
암호화된 덱스(DEX) 파일(DEX-X)을 버전정보와 함께 저장하는 단계(S16);Storing the encrypted DEX file (DEX-X) together with the version information (S16);
를 포함하며,/ RTI >
프로그램을 실행하는 방법은,To run the program,
암호화된 덱스(DEX) 파일(DEX-X)을 복호화(DEX-S 생성)하는 단계(S21);Decrypting (DEX-S generation) the encrypted DEX file (DEX-X) (S21);
전자서명된 덱스(DEX) 파일(DEX-S)을 전자서명 검증하는 단계(S22);A step (S22) of verifying the digital signature of a dex (DEX) file (DEX-S);
덱스(DEX) 파일을 동적 로딩하는 단계(S23);Dynamically loading a DEX file (S23);
동적 로딩된 덱스(DEX) 파일을 통해 프로그램을 수행하는 단계(S24);Executing the program through the dynamically loaded DEX file (S24);
를 포함하여 구성하는 것을 특징으로 한다.And a control unit.
또한, 상기 게시되는 암호화된 덱스파일(DEX-E) 생성 시 사용되는 암호키는 안드로이드 어플리케이션에 포함되어 배포되거나, 암호 시 및 복호 시 동일한 암호키 유도 방법을 사용하여 계산한 값을 사용할 수 있으며,Also, the encryption key used in generating the encrypted DEX-E file to be published may be distributed in the Android application, or may be a value calculated using the same encryption key derivation method during encryption and decryption,
상기 저장되는 암호화된 덱스파일(DEX-X) 생성 시 사용되는 암호키는 안드로이드 폰의 고유정보, 맥어드레스, 전화번호, 기기모델명, 프로그램 패키지 이름 중 하나 이상의 정보로부터 유도된 암호키를 사용할 수 있다.The cryptographic key used when generating the encrypted DEX-X file to be stored may use a cryptographic key derived from at least one of information unique to the Android phone, MAC address, telephone number, device model name, and program package name .
또한, 상기 덱스(DEX) 파일이 복수 개일 경우 구분 정보를 포함하여 하나의 파일로 생성한 후 상기 덱스(DEX) 파일 배포 방법을 수행할 수 있으며,In addition, if there are a plurality of DEX files, the DEX file distribution method may be performed after generating one file including the division information,
안드로이드 폰에서 상기 프로그램을 실행하는 방법을 수행할 시에는 각각의 덱스(DEX) 파일로 분할한 후 개별로 동적 로딩과정을 수행하도록 할 수 있다.When performing the above-described method of executing the program on the Android phone, it is possible to divide the file into respective DEX files and perform a dynamic loading process individually.
또한, 상기 덱스(DEX) 설치 방법 중의,Further, in the DEX installation method,
버전 정보를 확인하는 단계(S11); 및 암호화된 파일(DEX-E)을 다운로드 하는 단계(S12); 에서의 접속 정보 및,Confirming version information (S11); And downloading the encrypted file DEX-E (S12); The connection information in < RTI ID =
상기 프로그램을 실행하는 방법 중의,Among the methods of executing the program,
동적 로딩된 덱스(DEX) 파일을 통해 프로그램을 수행하는 단계(S24); 에서 이용하는 프로그램 시작 정보는Executing the program through the dynamically loaded DEX file (S24); The program start information used in
전자서명 정보 추가, 해쉬를 이용한 무결성 정보 또는 암호키를 이용한 암호화 중 하나 이상의 방법으로 보호할 수 있다.Addition of electronic signature information, integrity information using a hash, or encryption using a cryptographic key.
본 발명에 의하면 안드로이드 어플리케이션을 재설치 없이 프로그램을 수정 적용할 수 있으며, 프로그램 로직 유출 또는 해킹에 대해서도 안전하게 프로그램을 이용할 수 있는 효과를 가진다.According to the present invention, a program can be modified and reapplied without reinstalling the Android application, and the program can be safely used for program logic leak or hacking.
도 1은 Dalvik VM 환경에서의 안드로이드 어플리케이션(APK 파일)의 구성
도 2는 본 발명의 바람직한 실시예에 따른 안드로이드 어플리케이션 동적 로딩 방법 중 덱스(DEX) 파일 배포 방법에 대한 순서도
도 3은 본 발명의 바람직한 실시예에 따른 안드로이드 어플리케이션 동적 로딩 방법 중 덱스(DEX) 설치 방법에 대한 순서도
도 4는 본 발명의 바람직한 실시예에 따른 안드로이드 어플리케이션 동적 로딩 방법 중 프로그램을 실행하는 방법에 대한 순서도
도 5는 전자서명된 덱스파일(DEX-S), 암호화된 게시용 덱스파일(DEX-E), 암호화된 보관용 덱스파일(DEX-X) 의 간략한 구성도Figure 1 shows the configuration of an Android application (APK file) in a Dalvik VM environment.
FIG. 2 is a flow chart of a DEX file distribution method among the Android application dynamic loading methods according to a preferred embodiment of the present invention.
FIG. 3 is a flow chart of a method of installing a DEX in an Android application dynamic loading method according to a preferred embodiment of the present invention.
4 is a flow chart of a method of executing a program among the Android application dynamic loading methods according to the preferred embodiment of the present invention
5 shows a simplified configuration of an electronically signed DEX-S, an encrypted post-use DEX-E, and an encrypted DEX-X file.
도면들 및 다음 설명은 본 발명의 특정 예시적인 실시예들을 도시한다. 따라서 이 기술분야의 숙련자들은 비록 여기에 명확하게 설명되거나 도시되지 않았을지라도, 본 발명의 원리들을 구체화하고 본 발명의 범위 내에 포함되는 다양한 장치들을 고안할 수 있을 것임을 이해할 것이다. 더욱이, 여기에 설명된 임의의 예들은 본 발명의 원리들을 이해하는데 도움을 주고 이러한 구체적으로 열거된 예들 및 조건들에 대한 제한이 없는 것으로서 해석되도록 의도된다. 그 결과, 본 발명은 이하에 설명된 특정 실시예들 또는 예들에 제한되지 않으며, 단지 청구항들 및 그 등가물들에 의해 제한된다.The drawings and the following description illustrate certain exemplary embodiments of the invention. Thus, those skilled in the art will appreciate that, although not explicitly described or shown herein, it is contemplated that the principles of the invention may be embodied and devised within the scope of the invention. Moreover, any examples described herein are intended to be interpreted as helping to understand the principles of the invention and without limiting the specific examples and conditions listed. As a result, the present invention is not limited to the specific embodiments or examples described below, but is only limited by the claims and their equivalents.
도 2는 본 발명의 바람직한 실시예에 따른 안드로이드 어플리케이션 동적 로딩 방법 중 덱스(DEX) 파일 배포 방법에 대한 순서도이다.FIG. 2 is a flowchart of a DEX file distribution method among dynamic application loading methods of an Android application according to a preferred embodiment of the present invention.
도 2에 도시된 바와 같이 덱스(DEX) 파일 배포 방법은, 안드로이드 소스 컴파일 단계(S01)를 거쳐 덱스(DEX) 파일 생성(S02)하도록 한다. 도 1의 Dalvik VM 환경에서의 안드로이드 어플리케이션(APK 파일)의 구성과 같이 Java 방식으로 구현된 코드가 안드로이드의 Dalvik VM 환경에서 수행되도록 구성된 파일이 덱스(DEX) 파일이다.As shown in FIG. 2, the DEX file distribution method causes a DEX file to be generated (S02) through an Android source compilation step S01. As shown in FIG. 1, a file configured to be executed in the Dalvik VM environment of the Android is a DEX file, such as a configuration of an Android application (APK file) in the Dalvik VM environment.
생성된 덱스(DEX) 파일에 대해서 전자서명 단계(S03)를 거쳐 도 5의 DEX-S(10) 파일을 생성한다. DEX-S 파일은 상기의 덱스(DEX) 파일에 전자서명 값을 추가하여 구성된다. 전자서명값의 용도는 게시자에 대한 인증 및 게시된 덱스(DEX) 파일에 대한 무결성 여부를 확인하기 위한 것이다.The DEX-S (10) file of FIG. 5 is generated through the digital signature step S03 for the generated DEX file. The DEX-S file is constructed by adding an electronic signature value to the DEX file. The purpose of the digital signature value is to verify the authenticity of the publisher and integrity of the published DEX file.
전자서명된 덱스(DEX) 파일(DEX-S)은 암호화하는 단계(S04)를 거쳐 도 5의 DEX-E(20) 파일을 생성한다. DEX-E 파일은 그림(21)과 같이 상기의 DEX-S 파일을 암호키(KEY1)로 암호화한 값이다. 암호에 사용되는 암호키는 복호시와 동일한 값을 사용해야 복호화가 가능하므로 배포용 안드로이드 프로그램 내에 암호키 정보를 넣어서 배포할 수 있다. 또는 키 정보 자체를 포함하지 않고, 특정 정보, 예를 들어 프로그램의 패키지명(Android Package Name), 또는 특정 SEED 값(암호키 생성시 기본이 되는 값)을 포함한 후, 이 값으로부터 동일한 수학적 계산 방법을 사용하여 값을 구해내는 키 유도 방법을 이용할 수도 있다. The digitally signed DEX file DEX-S generates the file DEX-
암호화된 파일(DEX-E)은 버전정보와 함께 게시하는 단계(S05)를 거쳐 인터넷에 게시된다. 게시 방법은 HTTP/HTTPS 를 사용하는 웹 서비스 방법 또는 TCP/IP 방식의 데몬 서비스 또는 FTP 서비스 등 다양한 방법으로 게시될 수 있을 것이다.The encrypted file DEX-E is posted on the Internet via the step S05 of posting together with the version information. The publishing method may be published in various ways such as a web service method using HTTP / HTTPS or a daemon service or FTP service using TCP / IP method.
도 3은 본 발명의 바람직한 실시예에 따른 안드로이드 어플리케이션 동적 로딩 방법 중 덱스(DEX) 설치 방법에 대한 순서도이다.3 is a flowchart illustrating a DEX installation method of the dynamic application loading method of an Android application according to a preferred embodiment of the present invention.
안드로이드 환경에서 프로그램을 시작하게 되면 먼저 버전 정보를 확인하는 단계(S11)를 거쳐 저장되어 있는 버전 보다 이후 배포된 버전이 있는 지 확인한다. 물론 최초에는 저장되어 있는 파일이 없으므로 최신 버전을 다운 받을 것이다.When the program is started in the Android environment, the step S11 of checking the version information first confirms whether there is a version distributed later than the stored version. Of course, there is no file saved at first, so you will get the latest version.
버전정보에 따라 다운로드할 파일이 있으면 암호화된 파일(DEX-E)을 다운로드 하는 단계(S12)를 거쳐 다운로드한다. 상기의 버전정보 확인 방법 및 다운로드 방법은 웹 서비스 방식, FTP 방식, TCP/IP 기반 데몬 서비스 방식 등 이미 알려진 다양한 방법을 통해 적용이 가능하므로 본 발명에서의 언급은 불필요할 것이다.If there is a file to be downloaded according to the version information, the encrypted file DEX-E is downloaded through a step S12. The version information checking method and the downloading method described above can be applied through various known methods such as a web service method, an FTP method, and a TCP / IP-based daemon service method.
암호화된 덱스(DEX) 파일(DEX-E)(20)은 복호화하는 단계(S13)를 거쳐 도 5의 DEX-S(10) 을 가져온다. 상기 설명한 바와 같이 도 5의 DEX-E(20)에서 암호화 시 사용되는 키(KEY1)는 암호 및 복호 시 동일한 고정된 값을 사용하거나, 키 유도 방식에 의해 유도된 값을 사용한다. The encrypted DEX file (DEX-E) 20 fetches the DEX-
복호화된 덱스(DEX) 파일(DEX-S)(10)을 전자서명 검증하는 단계(S14)를 거쳐 게시자가 정상인지와 함께 변조되지 않은 데이터인지를 확인한다.The digital signature verification (DEX-S) 10 of the decrypted DEX file (DEX-S) 10 is confirmed (S14), and it is confirmed whether or not the publisher is normal and the data is not modulated.
저장을 위해 덱스(DEX) 파일(DEX-S)(10)을 암호화하는 단계(S15)를 거쳐 도 5의 DEX-X(30)을 생성한다. 이 때 사용되는 키(KEY2)(31)는 안드로이드 폰의 고유정보, 맥어드레스, 전화번호, 기기모델명, 프로그램 패키지 이름 중 하나 이상의 정보로부터 키 유도에 의해 계산된 암호키 값을 이용하는 것이 적절할 것이다. 덱스(DEX) 파일은 상기에서 서술한 바와 같이 전자서명 및 암호화 과정을 거쳐 보관되기 때문에 해킹 등에 따른 변조의 가능성을 근본적으로 차단할 수 있게 된다.(DEX-S) 10 for storage (S15) to generate the DEX-
암호화된 덱스(DEX) 파일(DEX-X)(30)은 버전정보와 함께 스마트폰에 저장하는 단계(S16)를 거쳐 저장된다.The encrypted DEX file (DEX-X) 30 is stored in the smart phone together with the version information (S16).
도 4는 본 발명의 바람직한 실시예에 따른 안드로이드 어플리케이션 동적 로딩 방법 중 프로그램을 실행하는 방법에 대한 순서도이다.4 is a flowchart illustrating a method of executing a program in a dynamic loading method of an Android application according to a preferred embodiment of the present invention.
암호화된 덱스(DEX) 파일(DEX-X)(30)을 복호화하는 단계(S21)를 거쳐 DEX-S(10)을 가져온다. 복호화시 사용되는 암호키(KEY2)는 상기 DEX-X(30)를 생성할 때 사용한 동일한 방법을 통해 유도된 값이다.The DEX-
전자서명된 덱스(DEX) 파일(DEX-S)을 전자서명 검증하는 단계(S22)를 거쳐 무결성을 확인한 후, 덱스(DEX) 파일을 동적 로딩하는 단계(S23)를 거쳐, 동적 로딩된 덱스(DEX) 파일을 통해 프로그램을 수행하는 단계(S24)를 통해 프로그램이 수행되도록 한다. 프로그램을 수행하는 단계(S24)는 로딩된 덱스(DEX) 파일에 속한 특정 클래스와 함수를 호출함으로 실행되며, 이 부분은 안드로이드 개발 환경에서 이미 잘 알려진 부분이므로 상세한 설명은 하지 않는다.After verifying the integrity of the digitally signed DEX file (DEX-S) through a digital signature verification step (S22), the DEX file is dynamically loaded (S23), and the dynamic loaded DEX DEX) file to execute the program through step S24. The step of executing the program (S24) is executed by calling a specific class and a function belonging to the loaded DEX file. This part is well known in the Android development environment and is not described in detail.
또한, 상기에서 서술한 것은 한 개의 덱스(DEX) 파일에 대해서 설명했지만 여러개의 덱스(DEX) 파일도 동일한 과정을 반복적으로 수행하여 게시, 저장 및 실행하는 것이 가능할 것이다.In addition, although a single DEX file has been described above, it is also possible to repeatedly perform the same process for publishing, storing, and executing several DEX files.
또 다른 방법으로는, 덱스(DEX) 파일이 복수 개일 경우에 구분 정보를 포함하여 하나의 파일로 생성한 후 상기 덱스(DEX) 파일 배포 방법을 수행하며, 안드로이드 폰에서 상기 프로그램을 실행하는 방법을 수행할 시에는 각각의 덱스(DEX) 파일로 분할한 후 개별로 동적 로딩과정을 수행하도록 할 수도 있다. In another method, when there are a plurality of DEX files, a method of distributing the DEX file after generating the one file including the division information, and executing the program on the Android phone When performing the operation, it is possible to divide the file into each DEX file and perform the dynamic loading process individually.
또한, 상기 덱스(DEX) 설치 방법에 있어서 버전 정보를 확인하기 위한 접속 정보, 암호화된 파일(DEX-E)를 다운로드하기 위한 접속 정보, 그리고, 상기 동적 로딩된 덱스(DEX) 파일을 통해 프로그램을 수행하는 단계(S24)에서 입력정보로 피료한 프로그램 시작 클래스 및 함수 정보 등은 전자서명 정보 추가하거나, 해쉬함수를 이용한 무결성 정보를 추가하거나 또는 암호키를 이용한 암호화 중 하나 이상의 방법으로 보호하는 것이 해킹 등 다양한 공격에 대응하기 위한 좋은 방법이 될 것이다.In addition, in the DEX installation method, it is also possible to use the connection information for confirming the version information, the connection information for downloading the encrypted file (DEX-E), and the program through the dynamically loaded DEX file In step S24, it is preferable that the program start class and the function information fired as the input information are protected by one or more of adding digital signature information, adding integrity information using a hash function, or encrypting using a cryptographic key, It will be a good way to respond to various attacks.
10 : 전자서명된 덱스파일(DEX-S)
11 : 덱스(DEX) 파일
12 : 덱스(DEX) 파일(11)에 대한 전자서명 값
20 : 암호화된 게시용 덱스파일(DEX-E)
21 : 게시용 암호화 사용 방법
20 : 암호화된 보관용 덱스파일(DEX-X)
21 : 보관용 암호화 사용 방법 10: Digitally signed DEX file (DEX-S)
11: DEX file
12: Digital signature value for the DEX file (11)
20: DEX file for encrypted publication (DEX-E)
21: How to Enable Encryption for Publishing
20: Encrypted archive file (DEX-X)
21: How to use archive encryption
Claims (4)
덱스(DEX) 파일 배포 방법은,
안드로이드 소스 컴파일 단계(S01);
덱스(DEX) 파일 생성 단계(S02);
덱스(DEX) 파일 전자서명(DEX-S 생성) 단계(S03);
전자서명된 덱스(DEX) 파일(DEX-S)을 암호화(DEX-E 생성)하는 단계(S04);
상기 암호화된 파일(DEX-E)를 버전정보와 함께 게시하는 단계(S05);
를 포함하며,
덱스(DEX) 설치 방법은,
버전 정보를 확인하는 단계(S11);
암호화된 파일(DEX-E)을 다운로드 하는 단계(S12);
암호화된 덱스(DEX) 파일(DEX-E)을 복호화(DEX-S 생성)하는 단계(S13);
복호화된 덱스(DEX) 파일(DEX-S)을 전자서명 검증하는 단계(S14);
저장을 위해 덱스(DEX) 파일(DEX-S)을 암호화(DEX-X 생성)하는 단계(S15);
암호화된 덱스(DEX) 파일(DEX-X)을 버전정보와 함께 저장하는 단계(S16);
를 포함하며,
프로그램을 실행하는 방법은,
암호화된 덱스(DEX) 파일(DEX-X)을 복호화(DEX-S 생성)하는 단계(S21);
전자서명된 덱스(DEX) 파일(DEX-S)을 전자서명 검증하는 단계(S22);
덱스(DEX) 파일을 동적 로딩하는 단계(S23);
동적 로딩된 덱스(DEX) 파일을 통해 프로그램을 수행하는 단계(S24);
를 포함하여 구성하는 것을 특징으로 하는 안드로이드 어플리케이션 동적 로딩 방법In an Android application dynamic loading method,
DEX (DEX) file distribution method,
Compiling the Android source (S01);
A DEX file creation step S02;
A DEX file digital signature (DEX-S generation) step S03;
Encrypting (DEX-E generation) the digitally signed DEX file (DEX-S) (S04);
(S05) of publishing the encrypted file (DEX-E) together with the version information;
/ RTI >
To install DEX,
Confirming version information (S11);
Downloading the encrypted file DEX-E (S12);
Decrypting (DEX-S generation) the encrypted DEX file (DEX-E) (S13);
A digital signature verification step (S14) of a decrypted DEX file (DEX-S);
Encrypting (DEX-X creation) the DEX file (DEX-S) for storage (S15);
Storing the encrypted DEX file (DEX-X) together with the version information (S16);
/ RTI >
To run the program,
Decrypting (DEX-S generation) the encrypted DEX file (DEX-X) (S21);
(S22) verifying the digital signature of a dex (DEX) file (DEX-S);
Dynamically loading a DEX file (S23);
Executing the program through the dynamically loaded DEX file (S24);
And a dynamic loading method for the Android application
상기 게시되는 암호화된 덱스파일(DEX-E) 생성 시 사용되는 암호키는 안드로이드 어플리케이션에 포함되어 배포되거나, 암호 시 및 복호 시 동일한 암호키 유도 방법을 사용하여 계산한 값을 사용할 수 있으며,
상기 저장되는 암호화된 덱스파일(DEX-X) 생성 시 사용되는 암호키는 안드로이드 폰의 고유정보, 맥어드레스, 전화번호, 기기모델명, 프로그램 패키지 이름 중 하나 이상의 정보로부터 유도된 암호키를 사용할 수 있는 것을 특징으로 하는 안드로이드 어플리케이션 동적 로딩 방법The method according to claim 1,
The encryption key used when generating the encrypted DEX-E file to be published may be distributed in the Android application or may be a value calculated using the same encryption key derivation method when decrypting and decrypting,
The encryption key used when generating the encrypted DEX-X file to be stored may use a cryptographic key derived from at least one of information unique to the Android phone, MAC address, telephone number, device model name, and program package name ≪ RTI ID = 0.0 > Android < / RTI >
상기 덱스(DEX) 파일이 복수 개일 경우 구분 정보를 포함하여 하나의 파일로 생성한 후 상기 덱스(DEX) 파일 배포 방법을 수행할 수 있으며,
안드로이드 폰에서 상기 프로그램을 실행하는 방법을 수행할 시에는 각각의 덱스(DEX) 파일로 분할한 후 개별로 동적 로딩과정을 수행할 수 있는 것을 특징으로 하는 안드로이드 어플리케이션 동적 로딩 방법The method according to claim 1,
If the number of the DEX files is plural, it is possible to perform the DEX file distribution method after generating the one file including the division information,
When performing the method of executing the program in the Android phone, the dynamic loading process can be separately performed after dividing the file into respective DEX files.
상기 덱스(DEX) 설치 방법 과정 중의,
버전 정보를 확인하는 단계(S11); 및 암호화된 파일(DEX-E)을 다운로드 하는 단계(S12); 에서의 접속 정보 및,
상기 프로그램을 실행하는 방법 과정 중의,
동적 로딩된 덱스(DEX) 파일을 통해 프로그램을 수행하는 단계(S24); 에서 이용하는 프로그램 시작 정보는
전자서명 정보 추가, 해쉬를 이용한 무결성 정보 또는 암호키를 이용한 암호화 중 하나 이상의 방법으로 보호할 수 있는 것을 특징으로 하는 안드로이드 어플리케이션 동적 로딩 방법
The method according to claim 1,
During the DEX installation process,
Confirming version information (S11); And downloading the encrypted file DEX-E (S12); The connection information in < RTI ID =
During the method of executing the program,
Executing the program through the dynamically loaded DEX file (S24); The program start information used in
An encryption method using integrity information using a hash, or encryption using a cryptographic key.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150144468A KR20170044850A (en) | 2015-10-16 | 2015-10-16 | Android application dynamic loading method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150144468A KR20170044850A (en) | 2015-10-16 | 2015-10-16 | Android application dynamic loading method |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20170044850A true KR20170044850A (en) | 2017-04-26 |
Family
ID=58704923
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020150144468A Ceased KR20170044850A (en) | 2015-10-16 | 2015-10-16 | Android application dynamic loading method |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20170044850A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108664265A (en) * | 2018-05-15 | 2018-10-16 | 玩咖欢聚文化传媒(北京)有限公司 | The interpolation method and system of Android application program |
CN112527334A (en) * | 2020-12-18 | 2021-03-19 | 福建新大陆支付技术有限公司 | Android platform based variable-size customer pre-installation customized partition method and POS machine |
CN112861191A (en) * | 2021-04-23 | 2021-05-28 | 腾讯科技(深圳)有限公司 | Application program monitoring method and device |
WO2022154540A1 (en) * | 2021-01-13 | 2022-07-21 | 삼성전자 주식회사 | Electronic device for executing application package, and operation method of same |
CN114924809A (en) * | 2022-05-19 | 2022-08-19 | 西安理工大学 | A streaming microservice loading verification method based on DEX file class |
-
2015
- 2015-10-16 KR KR1020150144468A patent/KR20170044850A/en not_active Ceased
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108664265A (en) * | 2018-05-15 | 2018-10-16 | 玩咖欢聚文化传媒(北京)有限公司 | The interpolation method and system of Android application program |
CN112527334A (en) * | 2020-12-18 | 2021-03-19 | 福建新大陆支付技术有限公司 | Android platform based variable-size customer pre-installation customized partition method and POS machine |
CN112527334B (en) * | 2020-12-18 | 2023-03-14 | 福建新大陆支付技术有限公司 | Android platform based variable-size customer pre-installation customization partitioning method and POS machine |
WO2022154540A1 (en) * | 2021-01-13 | 2022-07-21 | 삼성전자 주식회사 | Electronic device for executing application package, and operation method of same |
CN112861191A (en) * | 2021-04-23 | 2021-05-28 | 腾讯科技(深圳)有限公司 | Application program monitoring method and device |
CN112861191B (en) * | 2021-04-23 | 2023-01-10 | 腾讯科技(深圳)有限公司 | Application program monitoring method and device |
CN114924809A (en) * | 2022-05-19 | 2022-08-19 | 西安理工大学 | A streaming microservice loading verification method based on DEX file class |
CN114924809B (en) * | 2022-05-19 | 2024-03-29 | 西安理工大学 | A streaming microservice loading verification method based on DEX file class |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI709056B (en) | Firmware upgrade method and device | |
JP6888011B2 (en) | Mobile device with a reliable execution environment | |
EP3026557A1 (en) | Method and device for providing verifying application integrity | |
KR101471589B1 (en) | Method for Providing Security for Common Intermediate Language Program | |
US20170262656A1 (en) | Method and device for providing verifying application integrity | |
CN103577206A (en) | Method and device for installing application software | |
EP3026560A1 (en) | Method and device for providing verifying application integrity | |
US20150095652A1 (en) | Encryption and decryption processing method, apparatus, and device | |
CN104462959A (en) | Reinforcement protection method, sever and system for android app | |
KR20170044850A (en) | Android application dynamic loading method | |
KR20150035249A (en) | Recording medium storing application package, method and apparatus of creating application package, method and apparatus of executing application package | |
US20170262658A1 (en) | Method and device for providing verifying application integrity | |
CN104932902A (en) | Method for generating APK file and terminal | |
CN104751049A (en) | Application program installing method and mobile terminal | |
US20160212104A1 (en) | Preventing Misuse of Code Signing Certificates | |
KR20160020294A (en) | Method and system for providing application security service based on cloud | |
CN112115430A (en) | Apk reinforcement method, electronic equipment and storage medium | |
KR20180028666A (en) | Method and apparatus for preventing reverse engineering | |
KR101324693B1 (en) | Security system and method for applications | |
Titze et al. | Preventing library spoofing on android | |
Curran et al. | TLS Session Key Extraction from Memory on iOS Devices | |
KR20240080524A (en) | Method for automatically updating application installed in a container environment and computing apparatus using the same | |
CN104123510A (en) | Method for verifying running mapping files |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20151016 |
|
PA0201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20160627 Patent event code: PE09021S01D |
|
E601 | Decision to refuse application | ||
PE0601 | Decision on rejection of patent |
Patent event date: 20170321 Comment text: Decision to Refuse Application Patent event code: PE06012S01D Patent event date: 20160627 Comment text: Notification of reason for refusal Patent event code: PE06011S01I |
|
PG1501 | Laying open of application |