KR102449500B1 - Apparatus for executing application using configuration management to avoid exeption error and method thereof - Google Patents
Apparatus for executing application using configuration management to avoid exeption error and method thereof Download PDFInfo
- Publication number
- KR102449500B1 KR102449500B1 KR1020170151648A KR20170151648A KR102449500B1 KR 102449500 B1 KR102449500 B1 KR 102449500B1 KR 1020170151648 A KR1020170151648 A KR 1020170151648A KR 20170151648 A KR20170151648 A KR 20170151648A KR 102449500 B1 KR102449500 B1 KR 102449500B1
- Authority
- KR
- South Korea
- Prior art keywords
- exception error
- exception
- information
- unit
- original
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 130
- 238000001514 detection method Methods 0.000 claims abstract description 22
- 238000013507 mapping Methods 0.000 claims description 11
- 230000006870 function Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
Images
Classifications
-
- 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/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
- G06F21/14—Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2125—Just-in-time application of countermeasures, e.g., on-the-fly decryption, just-in-time obfuscation or de-obfuscation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Technology Law (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Retry When Errors Occur (AREA)
- Hardware Redundancy (AREA)
Abstract
난독화된 덱스와 난독화되지 않은 오리지널 덱스를 형상 관리하여 난독화된 덱스의 실행시 예외 오류가 발생하면, 형상 관리된 오리지널 덱스로 회피 실행하여 어플리케이션의 안정정 실행을 제공하는 장치 및 방법이 개시된다. 어플리케이션을 실행하는 장치는, 어플리케이션의 실행에 의해 난독화된 메소드가 실행되는 멀티덱스부; 난독화된 메소드에 대응되어 형상 관리되고, 난독화되지 않은 오리지널 메소드가 실행되는 오리지널 덱스부; 멀티덱스부에서 실행되는 메소드의 예외 오류의 발생을 감지하는 예외 감지부; 및 예외 감지부가 감지한 예외 오류 정보를 수신하고, 감지된 예외 오류를 회피하기 위해, 예외 오류가 발생된 멀티덱스부의 메소드에 대응되는 오리지널 메소드의 실행을 호출하는 형상 관리부를 포함한다.Disclosed are an apparatus and method for providing stable execution of an application by avoiding execution with configuration-managed original dex when an exception error occurs during execution of obfuscated dex by configuration management of obfuscated dex and non-obfuscated original dex . An apparatus for executing an application includes: a multi-dex unit in which a method obfuscated by execution of the application is executed; an original dex unit in which the shape is managed corresponding to the obfuscated method and the non-obfuscated original method is executed; an exception detection unit for detecting the occurrence of an exception error in a method executed in the multidex unit; and a configuration management unit that receives the exception error information detected by the exception detection unit and calls execution of the original method corresponding to the method of the multidex unit in which the exception error occurs in order to avoid the detected exception error.
Description
본 발명은 형상 관리(configuration management)의 기술로서, 보다 구체적으로, 어플리케이션에서 난독화가 적용된 멀티덱스(multidex)에 난독화가 적용되지 않은 오리지널 덱스(dex)를 추가하여 형상 관리하고, 멀티덱스의 실행시 예외 오류가 발생하면, 추가된 오리지널 덱스를 실행하여 예외 오류를 회피하는 장치 및 방법에 관한 것이다.The present invention is a technology of configuration management, and more specifically, by adding an original dex to which obfuscation is not applied to a multidex to which obfuscation is applied in an application, configuration management is performed, and when the multidex is executed When an exception error occurs, an apparatus and method for avoiding the exception error by executing the added original dex.
안드로이드는 하나의 앱이 가지거나 참조할 수 있는 총 메소드의 갯수가 65536(4K)개로 제한되어 있다. 이는 하나의 Dalvik Executable(dex) 파일이 참조하여 호출할 수 있는 최대 갯수이다. 쉽게 설명하면, 안드로이드의 실행 파일인 덱스 파일에서, 덱스 파일의 실행 단위인 메소드(예 : 단위 실행 코드)의 총 갯수는 4K로 실행 사이즈가 제한된 것을 말한다.Android has a limit of 65536 (4K) total methods that an app can have or reference. This is the maximum number that one Dalvik Executable (dex) file can reference and call. To put it simply, in the dex file, which is an Android executable, the total number of methods (eg, unit execution code) that is the execution unit of the dex file is 4K, which means that the execution size is limited.
여기서, 안드로이드 지원 라이브러리(android support library)나 여러 오픈소스 라이브러리가 어플리케이션에 추가되어 빌드될 경우, 프로그래머가 프로그래밍한 메소드가 4K 이하라도 추가된 라이브러리의 메소드가 더 추가되므로, 4K가 넘을 수 있다. 4K가 넘는 어플리케이션이 빌드될 경우, 도 1과 같은 에러 메시지가 발생할 수 있다. 도 1의 에러 메시지(100)는 메소드의 갯수가 4K가 넘어서 발생되는 오버플로우의 예외 오류 메시지(100)이다.Here, when the android support library or several open source libraries are added to the application and built, even if the method programmed by the programmer is 4K or less, the method of the added library is added, so it may exceed 4K. When an application exceeding 4K is built, an error message as shown in FIG. 1 may occur. The
상기 예외 오류 메시지를 해결하기 위해, 구글에서는 세가지 방안을 제시하고 있다.In order to solve the above exception error message, Google proposes three methods.
1. 경량의 라이브러리를 사용하거나 리팩토링을 잘해서 메소드의 수를 줄일 것1. Reduce the number of methods by using a lightweight library or refactoring well.
2. 프로가드(Proguard) 기능을 사용하여 사용하지 않는 코드를 없앨 것2. Use the Proguard feature to get rid of unused code
3. 멀티덱스 기능을 사용할 것3. Use the multidex function
앱의 기능은 덱스가 설계되던 시점에 비해 점점 복잡해지고 고도화되고 있다. 때문에, 3번의 멀티덱스 기능을 사용해서 문제를 회피한다. 멀티덱스는 여러개의 덱스 파일을 지원하여, 65535개 이상의 메쏘드를 참조할 수 있도록 해준다. 도 2에서와 같이 그래들(gradle) 파일에 멀티덱스의 코드(200)가 추가되면, 4K가 넘는 메소드가 허용된다.The functions of the app are getting more complex and advanced compared to when DEX was designed. Therefore, the problem is avoided by using the multi-dex function of 3 times. Multidex supports multiple dex files, allowing more than 65535 methods to be referenced. When the
ART(Android Runtime, Android 5.0 API 레벨 21 이상이 실행되는 기기의 기본 런타임으로서 Multidex 기본 제공)가 반영된 안드로이드 5.0 버전 이상에서는 도 2에서와 같이 멀티덱스를 사용하면 된다. 하지만, 그 이전 버전이라면, 예를 들어 minSdkVersion이 21보다 작다면 구글에서 제공하는 멀티덱스 지원 라이브러리(multidex support library)를 사용해야 한다.In Android 5.0 or higher, in which ART (Android Runtime, Multidex is provided as the default runtime for devices running Android 5.0 API level 21 or higher) is reflected, Multidex can be used as shown in FIG. 2 . However, if it is an earlier version, for example, if minSdkVersion is less than 21, you must use the multidex support library provided by Google.
상기 Multidex를 기반으로 생성된 어플리케이션은 리버스 엔지니어링(reverse engineering)을 방지하기 위해 난독화가 적용되는데, 난독화가 적용된 어플리케이션은 실행 중에 예외 오류가 발생될 수 있다. 예를 들면, Class Not Found Exception, ArrayIndexOutOfBoundsException, NullPointException와 같은 예외 오류가 발생된다.An application generated based on the Multidex is subjected to obfuscation to prevent reverse engineering, and an exception error may occur during execution of the application to which the obfuscation is applied. For example, exception errors such as Class Not Found Exception, ArrayIndexOutOfBoundsException, and NullPointException are generated.
상기 난독화는 메소드 이름 및 심볼을 강제로 변경하여 가독성을 떨어뜨리는 방식으로 리버스 엔지니어링이 불편하도록 하는 방식이다. 난독화를 실행하는 이유는 보안을 강화하기 위함이다. 금융 앱, 월릿(wallet)과 같이 보안성이 요구되는 어플리케이션은 기본적인 보안 요소를 적용하도록 하고 있어 난독화, 위변조 방지 등의 처리가 어플리케이션에 적용된다.The obfuscation is a method that makes reverse engineering inconvenient by forcibly changing method names and symbols to reduce readability. The reason for implementing obfuscation is to enhance security. Applications requiring security, such as financial apps and wallets, apply basic security elements, so processing such as obfuscation and forgery prevention is applied to the application.
특히, 난독화가 적용된 어플리케이션을 안드로이드 5.0 이하 버전에서 실행할 경우, 상기 예외 오류가 발생하여 비정상 종료가 발생되는 문제점이 있다. 원인은 다양하지만 주로 5.0 미만 버전(API레벨 21 이하)에서 만들어진 오픈 소스가 발생시키는 경우가 많다. 이와 같이 API레벨 21이하에서 만들어진 라이브러리들은 실행 호환성을 유지하기 위해 난독화에서 Exception 처리하기도 하지만 보안 강화를 위해서 난독화를 유지하는 것이 바람직하다.In particular, when an obfuscated application is executed in Android 5.0 or lower version, the above exception error occurs and abnormal termination occurs. The causes are various, but mainly open source made in version 5.0 or lower (API level 21 or lower) is often caused. As such, libraries created under API level 21 or lower sometimes handle exceptions in obfuscation to maintain execution compatibility, but it is desirable to maintain obfuscation for security enhancement.
참고로, 안드로이드 5.0 미만 버전은 전체 안드로이드 버전에 대해 28.5%를 점유하고 있다. 어플리케이션을 제공하는 사업자 입장에서 무시할 수 없는 수준의 점유율이다. 28.5% 수준의 사용자들에게 보안이 강화된 앱을 제공하면서도 기능 실행의 호환성을 보장하는 기술이 요구된다.For reference, versions below Android 5.0 occupy 28.5% of the total Android version. It is a level of market share that cannot be ignored from the perspective of the service provider that provides the application. A technology that ensures compatibility of function execution while providing security-enhanced apps to 28.5% of users is required.
본 발명은 상기 문제점을 해결하고자 하는 것으로서, 안드로이드 OS 환경에서 난독화된 멀티덱스 및 난독화되지 않은 오리지널 덱스가 형상 관리되는 어플리케이션을 제공하고, 저사양 OS에서 어플리케이션이 실행될 때, 멀티덱스에서 발생된 예외 오류를 회피하여 대응되는 오리지널 덱스를 실행하는 장치 및 방법을 제공하는 것을 목적으로 한다.The present invention is to solve the above problem, and provides an application in which an obfuscated multi-dex and non-obfuscated original dex are configuration-managed in an Android OS environment, and an exception generated in the multi-dex when the application is executed in a low-spec OS An object of the present invention is to provide an apparatus and method for executing a corresponding original dex by avoiding errors.
일 측면에 따른, 형상 관리를 기반으로 어플리케이션을 실행하는 장치는, 상기 어플리케이션의 실행에 의해 난독화된 메소드가 실행되는 멀티덱스부; 상기 메소드에 대응되어 형상 관리되고, 난독화되지 않은 오리지널 메소드가 실행되는 오리지널 덱스부; 상기 멀티덱스부에서 실행되는 메소드의 예외 오류의 발생을 감지하는 예외 감지부; 및 상기 예외 감지부가 감지한 예외 오류 정보를 수신하고, 감지된 예외 오류를 회피하기 위해, 상기 예외 오류가 발생된 멀티덱스부의 메소드에 대응되는 상기 오리지널 메소드의 실행을 호출하는 형상 관리부를 포함한다.According to one aspect, an apparatus for executing an application based on shape management includes: a multi-dex unit in which a method obfuscated by execution of the application is executed; an original dex unit in which the shape is managed in correspondence with the method and the original method that is not obfuscated is executed; an exception detection unit detecting occurrence of an exception error in the method executed in the multi-dex unit; and a configuration management unit that receives the exception error information detected by the exception detection unit and calls execution of the original method corresponding to the method of the multidex unit in which the exception error occurred in order to avoid the detected exception error.
상기 어플리케이션은 멀티덱스 기능이 정의된 이후로, 멀티덱스에 포함된 각 덱스가 어레이(array) 구조에 할당되는 멀티덱스 파일로 생성되고, 상기 어레이에 상기 오리지널 메소드가 추가(append)된다.After the multidex function is defined, the application is created as a multidex file in which each dex included in the multidex is allocated to an array structure, and the original method is appended to the array.
상기 예외 감지부는, 난독화에 의해 발생되는 예외 오류 정보를 저장한 이후로, 상기 멀티덱스부로부터 예외 오류 정보를 수신하여 예외 오류의 발생을 감지하고, 수신된 예외 오류 정보가 상기 저장된 예외 오류 정보에 일치할 경우, 일치된 예외 오류 정보를 상기 형상 관리부로 출력한다.The exception detection unit, after storing the exception error information generated by obfuscation, receives the exception error information from the multidex unit to detect the occurrence of an exception error, and the received exception error information is stored in the exception error information If match, the matched exception error information is output to the configuration management unit.
상기 형상 관리부는, 상기 멀티덱스부의 메소드와 상기 오리지널 덱스부의 오리지널 메소드의 매핑 정보를 저장하여 형상 관리한다.The shape management unit manages the shape by storing mapping information between the method of the multi-dex unit and the original method of the original dex unit.
상기 형상 관리부는, 상기 예외 감지부로부터 예외 오류가 발생된 메소드의 실행 주소를 포함하는 예외 오류 정보를 수신하고, 상기 실행 주소로 상기 멀티덱스부로부터 메소드 정보를 조회하고, 조회된 메소드 정보에 대응되는 오리지널 메소드 정보를 상기 매핑 정보를 이용하여 조회하고, 조회된 오리지널 메소드 정보를 상기 오리지널 덱스부로 전송하여 상기 오리지널 메소드의 실행을 호출한다.The configuration management unit receives, from the exception detection unit, exception error information including an execution address of a method in which an exception error occurs, inquires the method information from the multidex unit with the execution address, and corresponds to the inquired method information The original method information is searched using the mapping information, and the searched original method information is transmitted to the original dex unit to call execution of the original method.
상기 형상 관리부는, 상기 예외 감지부로부터 수신된 예외 오류 정보가 신규 정보일 경우, 예외 오류의 수집을 위해, 서버로 예외 오류 정보를 전송한다.When the exception error information received from the exception detection unit is new information, the shape management unit transmits the exception error information to the server in order to collect the exception error.
상기 서버가 상기 예외 오류 정보를 수신하고, 수신된 예외 오류 정보를 해결하는 메소드를 업데이트하여 런타임 상속을 요청하고, 상속이 요청된 메소드를 상기 서버로부터 전송받아 업데이트하는 런타임 상속부를 더 포함한다.The server further includes a runtime inheritance unit that receives the exception error information, updates a method for resolving the received exception error information to request runtime inheritance, and receives and updates the inherited method from the server.
다른 측면에 따른, 형상 관리를 기반으로 어플리케이션을 실행하는 방법은, 상기 어플리케이션의 실행에 의해 멀티덱스의 난독화된 메소드가 실행되는 단계; 상기 메소드의 실행 중에 발생된 예외 오류 정보를 감지하는 단계; 상기 감지된 예외 오류를 회피하기 위해, 예외 오류가 발생된 상기 메소드에 대응되는 오리지널 메소드의 실행을 형상 관리하는 단계; 및 상기 예외 오류가 발생된 메소드의 실행을 대체하여 난독화되지 않은 오리지널 메소드가 실행되는 단계를 포함한다.According to another aspect, there is provided a method of executing an application based on shape management, the method comprising: executing an obfuscated method of multidex by the execution of the application; detecting exception error information generated during execution of the method; managing the execution of the original method corresponding to the method in which the exception error occurred in order to avoid the detected exception error; and executing the non-obfuscated original method by replacing the execution of the method in which the exception error occurred.
본 발명의 일 측면에 따르면, 난독화되지 않은 오리지널 덱스를 형상 관리하여 어플리케이션의 실행 중에 난독화에 의한 예외 오류가 발생하면, 예외 오류에 의해 프로그램의 실행 중단없이, 형상 관리되는 오리지널 덱스로 대체 실행하여 프로그램의 안정적 실행을 제공한다.According to one aspect of the present invention, when an exception error due to obfuscation occurs during the execution of an application by configuration management of the non-obfuscated original dex, the original dex is replaced with the configuration-managed original dex without interruption of the execution of the program due to the exception error. This provides stable execution of the program.
본 명세서에 첨부되는 다음의 도면들은 본 발명의 바람직한 실시예를 예시하는 것이며, 후술한 발명의 상세한 설명과 함께 본 발명의 기술사상을 더욱 이해시키는 역할을 하는 것이므로, 본 발명은 그러한 도면에 기재된 사항에만 한정되어 해석되지 않아야 한다.
도 1은 메소드의 갯수가 4K를 넘어 발생되는 종래 예외 오류 메시지의 예시도이다.
도 2는 4K가 넘는 메소드가 허용되는 종래 멀티덱스를 정의하는 코드의 예시도이다.
도 3은 본 발명의 제 1실시예에 따른 어플리케이션 실행 장치의 개략적 예시도이다.
도 4는 도 3의 어플리케이션 실행 장치의 개략적 신호 처리의 흐름도이다.
도 5는 본 발명의 제 2실시예에 따른 어플리케이션 실행 장치의 개략적 예시도이다.
도 6은 도 5의 어플리케이션 실행 장치의 개략적 신호 처리의 흐름도이다.The following drawings attached to the present specification illustrate preferred embodiments of the present invention, and together with the detailed description of the present invention serve to further understand the technical spirit of the present invention, the present invention is a matter described in such drawings should not be construed as being limited to
1 is an exemplary diagram of a conventional exception error message generated when the number of methods exceeds 4K.
2 is an exemplary diagram of code defining a conventional multidex in which more than 4K methods are allowed.
3 is a schematic illustration of an application execution apparatus according to the first embodiment of the present invention.
FIG. 4 is a schematic flowchart of signal processing of the application execution apparatus of FIG. 3 .
5 is a schematic illustration of an application execution apparatus according to a second embodiment of the present invention.
6 is a schematic flowchart of signal processing of the application execution apparatus of FIG. 5 .
이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하기로 한다. 이에 앞서, 본 명세서 및 청구 범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다. 따라서, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시예에 불과할 뿐이고 본 발명의 기술적 사상에 모두 대변하는 것은 아니므로, 본 출원 시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형예들이 있을 수 있음을 이해하여야 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Prior to this, the terms or words used in the present specification and claims should not be construed as being limited to their ordinary or dictionary meanings, and the inventor should properly understand the concept of the term in order to best describe his invention. Based on the principle that it can be defined, it should be interpreted as meaning and concept consistent with the technical idea of the present invention. Accordingly, the configuration shown in the embodiments and drawings described in the present specification is only one of the most preferred embodiments of the present invention and does not represent all of the technical spirit of the present invention, so at the time of the present application, various It should be understood that there may be equivalents and variations.
도 3은 본 발명의 제 1실시예에 따른 어플리케이션 실행 장치(300)의 개략적 예시도이다.3 is a schematic illustration of an
어플리케이션 실행 장치(300)는 멀티덱스부(301), 오리지널 덱스부(303), 예외 감지부(305) 및 형상 관리부(307)를 포함하여 구성된다. 어플리케이션 실행 장치(300)가 기록 매체, 메모리 및 프로세서로 구성된 컴퓨팅 단말(스마트 단말)이라고 가정하면, 각 구성부(301~307)들은 어플리케이션의 형태로 기록 매체에 저장되고, 실행에 의해 메모리에 로딩되어 프로세서를 통해 처리된다. 예를 들어, 안드로이드 기반의 스마트 폰은 어플리케이션 실행 장치(300)로서 각 구성부(301~307)로 구성된 어플리케이션을 실행한다.The
참고로, 어플리케이션에 해당되는 덱스 파일의 필드 구조는 헤더, 어레이, 클래스 데이터 및 링크 데이터를 갖는다. 헤더 필드에서 파일 헤더가 보관된다. 어레이 필드에서 멀티덱스에 포함된 각 덱스의 종류별 인덱스가 보관된다. 클래스 데이터 필드에서 상기 보관된 인덱스의 클래스 데이터에 해당되는 메소드가 실행 코드(명령어)로서 보관된다. 링크 데이터 필드에서 각 덱스 파일을 가리키는 링크 데이터가 보관된다. 그러면, 어레이 필드의 어레이 인덱스는 각 덱스의 인덱스에 대응되므로, 각 덱스마다 어레이 필드, 클래스 데이터 필드 및 링크 데이터 필드가 존재한다. 예를 들어, 덱스 3개로 구성된 멀티덱스라 가정하면, 헤더 + 어레이[0~2] + 클래스 데이터_0/링크 데이터_0 + 클래스 데이터_1/링크 데이터_1 + 클래스 데이터_2/링크 데이터_2의 구조로 표현 가능하다.For reference, the field structure of the dex file corresponding to the application has header, array, class data, and link data. The file header is kept in the header field. In the array field, indexes for each type of index included in the multidex are stored. In the class data field, a method corresponding to the class data of the stored index is stored as an executable code (command). Link data pointing to each dex file in the link data field is stored. Then, since the array index of the array field corresponds to the index of each dex, an array field, a class data field, and a link data field exist for each dex. For example, assuming a multi-dex consisting of 3 dexes, header + array[0~2] + class data_0/link data_0 + class data_1/link data_1 + class data_2/link data It can be expressed in the structure of _2.
상기 멀티덱스부(301)는 멀티덱스에 포함된 각 덱스별로 난독화된 메소드를 보관하고, 어플리케이션의 실행에 의해 난독화된 메소드가 실행된다. 멀티덱스부(301)에서 실행된 난독화된 메소드는 메소드 이름 및 심볼 등이 난독화되었기 때문에, 그 메소드의 실행 주소가 참조되는데 실패되어 난독화 오류가 발생될 수 있다. 난독화 오류의 발생에 의해, 대응되는 예외 오류 메시지가 어플리케이션에서 출력되면, 어플리케이션은 실행 중에 실행 오류에 의해 멈추게 된다(예 : ANR : Application Not Responding).The
상기 오리지널 덱스부(303)는 멀티덱스의 마지막 덱스로 추가(append)되고, 난독화되지 않은 메소드를 보관한다.The
상기 예외 감지부(305)는 멀티덱스부(301)에서 실행 중에 발생된 예외 오류 정보를 수신하는 것으로 예외 오류의 발생을 감지한다. 수신된 예외 오류 정보는 예외 오류가 발생된 메소드의 실행 주소이다. 예외 감지부(305)는 수신된 예외 오류 정보를 키로 하여 난독화 오류 정보를 조회하고, 조회가 성공되면 오리지널 덱스를 실행하는 회피 실행을 통해 해결 가능한 것으로 판단한다. 예를 들어, 수신된 예외 오류 정보가 Class Not Found Exception, ArrayIndexOutOfBoundsException, NullPointException 중에 어느 하나와 일치하면 조회가 성공된다. 상기 조회가 성공됨에 따라, 예외 감지부(305)는 예외 오류 정보를 형상 관리부(307)로 출력한다.The
상기 형상 관리부(307)는 난독화된 메소드의 이름 및 매핑되는 오리지널 메소드의 이름을 저장하고 있다. 난독화로 인해, 멀티덱스부(301)의 메소드 명은 해독이 불가능할 수 있기 때문에 대응되는 오리지널 덱스부(303)의 메소드 명과 매핑하여 정보를 저장할 것이 요구된다. The
형상 관리에 의해, 형상 관리부(307)가 예외 감지부(305)로부터 예외 오류 정보를 수신하여 회피 요청을 받으면, 수신된 예외 오류 정보에 대응되는 멀티덱스부(301)의 메소드 이름을 확인한다. 형상 관리부(307)는 확인된 메소드 이름을 키로 하여 매핑 정보로부터 대응되는 오리지널 메소드 이름을 조회한다. 그러면, 형상 관리부(307)는 조회된 오리지널 메소드를 호출하는 것으로 예외 오류가 발생된 멀티덱스부(301)의 메소드를 대신하여 어플리케이션을 우회 실행할 수 있다.When the
도 4는 도 3의 어플리케이션 실행 장치(300)의 개략적 신호 처리의 흐름도이다.4 is a schematic flowchart of signal processing of the
어플리케이션 실행 장치(300)는 어플리케이션을 실행하고, 상기 실행에 의해 멀티덱스부(301)에 저장된 난독화된 메소드가 실행된다(S401). 난독화된 메소드의 실행 중에 예외 오류가 발생하면, 멀티덱스부(301)는 예외 오류가 발생된 난독화된 메소드의 실행 주소를 예외 감지부(305)로 출력한다(S403).The
예외 감지부(305)는 멀티덱스부(301)로부터 상기 예외 오류 정보를 수신하는 것으로 예외 오류의 발생을 감지한다(S411). 예외 감지부(305)는 수신된 예외 오류 정보를 키로 하여 기 저장된 예외 오류 정보를 조회하고, 상기 조회가 성공되면, 회피 실행이 가능한 것으로 확인하여 예외 감지부(305)로 예외 오류 정보를 출력하여 회피 요청을 한다(S413).The
형상 관리부(307)는 예외 감지부(305)로부터 예외 오류 정보를 수신하는 것으로 회피 실행의 요청을 수신한다(S421). 형상 관리부(307)는 수신된 예외 오류 정보를 멀티덱스부(301)로 출력하여 예외 오류가 발생된 메소드 명을 요청하고, 요청된 메소드 명을 수신하는 것으로 예외 오류가 발생된 멀티덱스부(301)의 메소드 명을 확인한다(S423). 형상 관리부(307)는 확인된 메소드 명에 대응되는 오리지널 덱스부(303)의 메소드 명을 매핑 정보로부터 조회한 후, 조회된 오리지널 메소드 명을 오리지널 덱스부(303)로 전송하여 우회 실행을 호출한다(S425).The
그러면, 오리지널 덱스부(303)에서 호출된 오리지널 덱스가 실행된다(S431). 이것은 형상 관리를 통해 난독화 오류로 인해 어플리케이션의 실행이 중단되는 예외 오류를 동적으로 회피하여 그 실행이 유지되도록 하는 것이다.Then, the original dex called by the
도 5는 본 발명의 제 2실시예에 따른 어플리케이션 실행 장치(500)의 개략적 예시도이다.5 is a schematic illustration of an
본 발명의 제 2실시예에 따른 어플리케이션 실행 장치(500)는 신규 오류를 형상 관리 서버(590)로 전송하고, 형상 관리 서버(500)로부터 신규 오류를 해결하기 위해 업데이트된 메소드를 런타임 상속받아서 예외 오류로 인한 어플리케이션의 실행 중단을 해결한다.The
여기서, 어플리케이션 실행 장치(500)는 도 3의 제 1실시예에 따른 어플리케이션 실행 장치(300)의 구성에서 형상 관리부(507) 및 런타임 상속부(509)의 차이점을 갖는다.Here, the
상기 형상 관리부(507)는 발생된 예외 오류가 신규 발생된 것인지 판단하고, 신규 발생된 예외 오류이면, 형상 관리 서버(590)로 신규 발생된 예외 오류 정보를 업로드한다. 형상 관리 서버(590)는 형상 관리부(507)로부터 예외 오류를 수집하고, 수집된 예외 오류를 해결하기 위해 업데이트된 클래스 정보를 등록받는다. 클래스의 업데이트 정보가 등록되면, 형상 관리 서버(590)는 어플리케이션 실행 장치(500)로 런타임 상속을 요청한다. 런타임 상속은 어플리케이션의 실행 중에 업데이트 버전을 받아 어플리케이션이 업데이트되는 것이다.The
상기 런타임 상속부(509)는 형상 관리 서버(590)의 런타임 상속 요청에 의해 업데이트된 클래스 정보를 수신하여 업데이트한다.The
도 6은 도 5의 어플리케이션 실행 장치(500)의 개략적 신호 처리의 흐름도이다.6 is a schematic flowchart of signal processing of the
형상 관리부(507)는 예외 감지부(305)로부터 예외 오류 정보를 수신하여 회요 요청을 받는다(S601). 형상 관리부(507)는 수신된 예외 오류 정보가 신규 발생된 정보인지 판단하고, 신규 발생 정보이면 형상 관리 서버(590)로 신규 발생된 예외 오류 정보를 업로드한다(S603).The
형상 관리 서버(590)는 형상 관리부(507)로부터 신규 발생된 예외 오류 정보를 수집한다(S611). 형상 관리 서버(590)는 수집된 예외 오류 정보를 해결하는 클래스의 업데이트 정보를 등록받고, 업데이트된 클래스의 런타임 상속을 어플리케이션 실행 장치(500)로 요청한다(S613).The
런타임 상속부(509)는 형상 관리 서버(507)로부터 런타임 상속이 요청된 업데이트 정보를 수신하고, 수신된 정보로 업데이트 한다(S621). 어플리케이션 실행 장치(500)가 업데이트 처리를 완료한 이후로, 상기 단계(S601)에서 수신된 신규 예외 오류가 발생될 경우, 업데이트된 클래스 정보에 의해 어플리케이션의 중단없이 실행이 계속된다.The
본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명은 이것에 의해 한정되지 않으며 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 본 발명의 기술사상과 아래에 기재될 특허청구범위의 균등범위 내에서 다양한 수정 및 변형이 가능함은 물론이다.Although the present invention has been described with reference to limited embodiments and drawings, the present invention is not limited thereto, and the technical idea of the present invention and claims to be described below by those skilled in the art to which the present invention pertains Of course, various modifications and variations are possible within the equivalent range of the range.
300 : 어플리케이션 실행 장치 301 : 멀티덱스부
303 : 오리지널 덱스부 305 : 예외 감지부
307 : 형상 관리부300: application execution device 301: multi-dex unit
303: original dex unit 305: exception detection unit
307: configuration management unit
Claims (14)
상기 어플리케이션의 실행에 의해 난독화된 메소드가 실행되는 멀티덱스부;
상기 메소드에 대응되어 형상 관리되고, 난독화되지 않은 오리지널 메소드가 실행되는 오리지널 덱스부;
상기 멀티덱스부에서 실행되는 메소드의 예외 오류의 발생을 감지하는 예외 감지부; 및
상기 예외 감지부가 감지한 예외 오류 정보를 수신하고, 감지된 예외 오류를 회피하기 위해, 상기 난독화된 메소드와 상기 오리지널 메소드의 매핑 정보를 이용하여 상기 예외 오류가 발생된 멀티덱스부의 메소드에 대응되는 상기 오리지널 메소드의 실행을 호출하는 형상 관리부
를 포함하는 장치.In a device for executing an application based on configuration management,
a multi-dex unit in which the obfuscated method is executed by the execution of the application;
an original dex unit in which the shape is managed in correspondence with the method and the original method that is not obfuscated is executed;
an exception detection unit detecting occurrence of an exception error in the method executed in the multi-dex unit; and
In order to receive the exception error information detected by the exception detection unit, and to avoid the detected exception error, the method corresponding to the method of the multidex unit in which the exception error occurred by using the mapping information between the obfuscated method and the original method The configuration management unit that calls the execution of the original method
A device comprising a.
상기 어플리케이션은 멀티덱스 기능이 정의된 이후로, 멀티덱스에 포함된 각 덱스가 어레이(array) 구조에 할당되는 멀티덱스 파일로 생성되고, 상기 어레이에 상기 오리지널 메소드가 추가(append)되는 것을 특징으로 하는 장치.The method of claim 1,
After the multidex function is defined, the application is created as a multidex file in which each dex included in the multidex is allocated to an array structure, and the original method is appended to the array device to do.
상기 예외 감지부는,
난독화에 의해 발생되는 예외 오류 정보를 저장한 이후로,
상기 멀티덱스부로부터 예외 오류 정보를 수신하여 예외 오류의 발생을 감지하고, 수신된 예외 오류 정보가 상기 저장된 예외 오류 정보에 일치할 경우, 일치된 예외 오류 정보를 상기 형상 관리부로 출력하는 것을 특징으로 하는 장치.The method of claim 1,
The exception detection unit,
After storing the exception error information caused by obfuscation,
Receive exception error information from the multidex unit to detect the occurrence of an exception error, and output the matched exception error information to the configuration management unit when the received exception error information matches the stored exception error information device to do.
상기 형상 관리부는,
상기 멀티덱스부의 메소드와 상기 오리지널 덱스부의 오리지널 메소드의 매핑 정보를 저장하여 형상 관리하는 것을 특징으로 하는 장치.The method of claim 1,
The shape management unit,
Apparatus, characterized in that by storing mapping information between the method of the multi-dex unit and the original method of the original dex unit, shape management.
상기 형상 관리부는,
상기 예외 감지부로부터 예외 오류가 발생된 메소드의 실행 주소를 포함하는 예외 오류 정보를 수신하고,
상기 실행 주소로 상기 멀티덱스부로부터 메소드 정보를 조회하고, 조회된 메소드 정보에 대응되는 오리지널 메소드 정보를 상기 매핑 정보를 이용하여 조회하고, 조회된 오리지널 메소드 정보를 상기 오리지널 덱스부로 전송하여 상기 오리지널 메소드의 실행을 호출하는 것을 특징으로 하는 장치.5. The method of claim 4,
The shape management unit,
Receive exception error information including the execution address of the method in which the exception error occurred from the exception detection unit,
Method information is inquired from the multi-dex unit with the execution address, original method information corresponding to the inquired method information is retrieved using the mapping information, and the inquired original method information is transmitted to the original dex unit to the original method Device characterized in that invoking the execution of.
상기 형상 관리부는,
상기 예외 감지부로부터 수신된 예외 오류 정보가 신규 정보일 경우, 예외 오류의 수집을 위해, 서버로 예외 오류 정보를 전송하는 것을 특징으로 하는 장치.The method of claim 1,
The shape management unit,
When the exception error information received from the exception detection unit is new information, the apparatus for transmitting the exception error information to the server to collect the exception error.
상기 서버가 상기 예외 오류 정보를 수신하고, 수신된 예외 오류 정보를 해결하는 메소드를 업데이트하여 런타임 상속을 요청하고,
상속이 요청된 메소드를 상기 서버로부터 전송받아 업데이트하는 런타임 상속부를 더 포함하는 것을 특징으로 하는 장치.7. The method of claim 6,
The server receives the exception error information, and updates a method for resolving the received exception error information to request runtime inheritance,
The apparatus of claim 1, further comprising a runtime inheritance unit for receiving and updating the method for which inheritance is requested from the server.
상기 어플리케이션의 실행에 의해 멀티덱스의 난독화된 메소드를 실행하는 단계;
상기 난독화된 메소드의 실행 중에 예외 오류가 발생하고, 발생된 예외 오류 정보를 감지하는 단계;
상기 감지된 예외 오류를 회피하기 위해, 상기 난독화된 메소드와 난독화되지 않은 오리지널 메소드의 매핑 정보를 이용하여 예외 오류가 발생된 상기 난독화된 메소드에 대응되는 오리지널 메소드의 실행을 호출하여 형상 관리하는 단계; 및
상기 예외 오류가 발생된 메소드의 실행을 대체하여 상기 오리지널 메소드를 실행하는 단계
를 포함하는 방법.In the execution method of a device that executes an application based on configuration management,
executing the obfuscated method of the multidex by the execution of the application;
an exception error occurs during execution of the obfuscated method, and detecting the generated exception error information;
In order to avoid the detected exception error, by using the mapping information between the obfuscated method and the non-obfuscated original method, the execution of the original method corresponding to the obfuscated method in which the exception error occurred is called to manage the configuration to do; and
executing the original method by replacing the execution of the method in which the exception error occurred
How to include.
상기 어플리케이션은 멀티덱스 기능이 정의된 이후로, 멀티덱스에 포함된 각 덱스가 어레이(array) 구조에 할당되는 멀티덱스 파일로 생성되고, 상기 어레이에 상기 오리지널 메소드가 추가(append)되는 것을 특징으로 하는 방법.9. The method of claim 8,
After the multidex function is defined, the application is created as a multidex file in which each dex included in the multidex is allocated to an array structure, and the original method is appended to the array How to.
상기 감지하는 단계는,
난독화에 의해 발생되는 예외 오류 정보를 저장한 이후로,
상기 발생된 예외 오류 정보를 수신하여 예외 오류의 발생을 감지하고, 수신된 예외 오류 정보가 상기 저장된 예외 오류 정보에 일치할 경우, 일치된 예외 오류의 회피 실행을 요청하는 단계인 것을 특징으로 하는 방법.9. The method of claim 8,
The detecting step is
After storing the exception error information caused by obfuscation,
receiving the generated exception error information, detecting the occurrence of an exception error, and requesting execution of avoidance of the matched exception error when the received exception error information matches the stored exception error information .
상기 형상 관리하는 단계 이전에,
상기 난독화된 메소드와 상기 난독화되지 않은 오리지널 메소드의 매핑 정보를 저장하는 단계를 더 포함하는 것을 특징으로 하는 방법9. The method of claim 8,
Before the step of managing the shape,
The method further comprising the step of storing mapping information between the obfuscated method and the non-obfuscated original method
상기 형상 관리하는 단계는,
상기 예외 오류가 발생된 메소드의 실행 주소를 포함하는 예외 오류 정보를 수신하고, 상기 실행 주소로 상기 난독화된 메소드 정보를 조회하고, 조회된 메소드 정보에 대응되는 오리지널 메소드 정보를 상기 매핑 정보를 이용하여 조회하고, 조회된 오리지널 메소드 정보를 전송하여 상기 실행을 호출하는 단계인 것을 특징으로 하는 방법.12. The method of claim 11,
The shape management step is,
Receive exception error information including the execution address of the method in which the exception error occurred, inquire the obfuscated method information with the execution address, and use the mapping information for original method information corresponding to the inquired method information and invoking the execution by transmitting the inquired original method information.
상기 형상 관리하는 단계는,
상기 감지된 예외 오류 정보가 신규 정보일 경우, 예외 오류의 수집을 위해, 서버로 예외 오류 정보를 전송하는 단계를 더 포함하는 것을 특징으로 하는 방법.9. The method of claim 8,
The shape management step is,
When the detected exception error information is new information, the method further comprising the step of transmitting the exception error information to a server to collect the exception error.
상기 서버가 상기 예외 오류 정보를 수신하고, 수신된 예외 오류 정보를 해결하는 메소드를 업데이트하여 런타임 상속을 요청하고,
상기 형상 관리하는 단계는,
런타임 상속이 요청된 메소드를 상기 서버로부터 전송받아 업데이트하는 단계를 더 포함하는 것을 특징으로 하는 방법.14. The method of claim 13,
The server receives the exception error information, and updates a method for resolving the received exception error information to request runtime inheritance,
The shape management step is,
Method characterized in that it further comprises the step of updating the method for which runtime inheritance is requested, received from the server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170151648A KR102449500B1 (en) | 2017-11-14 | 2017-11-14 | Apparatus for executing application using configuration management to avoid exeption error and method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170151648A KR102449500B1 (en) | 2017-11-14 | 2017-11-14 | Apparatus for executing application using configuration management to avoid exeption error and method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20190054732A KR20190054732A (en) | 2019-05-22 |
KR102449500B1 true KR102449500B1 (en) | 2022-09-30 |
Family
ID=66679880
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020170151648A KR102449500B1 (en) | 2017-11-14 | 2017-11-14 | Apparatus for executing application using configuration management to avoid exeption error and method thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102449500B1 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951280A (en) * | 2017-02-28 | 2017-07-14 | 努比亚技术有限公司 | Mobile terminal and apply restorative procedure |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101139871B1 (en) | 2009-05-22 | 2012-05-02 | 삼성에스디에스 주식회사 | Integration system and method of perforce server and clearquest server |
KR101749209B1 (en) * | 2015-05-22 | 2017-06-20 | 한양대학교 산학협력단 | Method and apparatus for hiding information of application, and method and apparatus for executing application |
-
2017
- 2017-11-14 KR KR1020170151648A patent/KR102449500B1/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106951280A (en) * | 2017-02-28 | 2017-07-14 | 努比亚技术有限公司 | Mobile terminal and apply restorative procedure |
Also Published As
Publication number | Publication date |
---|---|
KR20190054732A (en) | 2019-05-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107025559B (en) | Service processing method and device | |
US9262237B2 (en) | Automating software availability management based on API versioning | |
US11573776B1 (en) | Extensible data transformation authoring and validation system | |
CN107038045B (en) | Method and device for loading library file | |
US9098627B2 (en) | Providing a core dump-level stack trace | |
US9563446B2 (en) | Binary file generation | |
KR20170059451A (en) | System and method for determination of partition identifiers in a multitenant application server environment | |
US9460306B1 (en) | System and method for controlling access of machine code to operating system resources | |
US10466985B2 (en) | Hybrid deoptimization mechanism for class hierarchy analysis | |
US20180082078A1 (en) | Confidential Data Processing System | |
US11537367B1 (en) | Source code conversion from application program interface to policy document | |
CN108846129B (en) | Storage data access method, device and storage medium | |
US10579520B2 (en) | Multi-ring shared, traversable, and dynamic advanced database | |
JP2016503214A (en) | Dynamic firmware update | |
US8191041B2 (en) | Javascript pre-processing framework | |
US10394551B2 (en) | Managing kernel application binary interface/application programming interface-based discrepancies relating to kernel packages | |
US9367686B1 (en) | System and method for antivirus checking of native images of software assemblies | |
US11496304B2 (en) | Information processing device, information processing method, and storage medium | |
KR102449500B1 (en) | Apparatus for executing application using configuration management to avoid exeption error and method thereof | |
US20210240484A1 (en) | Selectively updating a bios image | |
US20230126377A1 (en) | System and method for secure recovery of application group in container deployment environments | |
US12019737B2 (en) | Protecting sensitive data in a software program | |
US10664342B2 (en) | Leak protection of executables with debug information | |
US20230401047A1 (en) | Graphical user interface for reducing vulnerabilities associated with legacy software | |
CN117592045A (en) | Method and device for processing data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |