KR20160071060A - Method for protecting source code of application and apparatus for performing the method - Google Patents

Method for protecting source code of application and apparatus for performing the method Download PDF

Info

Publication number
KR20160071060A
KR20160071060A KR1020140178311A KR20140178311A KR20160071060A KR 20160071060 A KR20160071060 A KR 20160071060A KR 1020140178311 A KR1020140178311 A KR 1020140178311A KR 20140178311 A KR20140178311 A KR 20140178311A KR 20160071060 A KR20160071060 A KR 20160071060A
Authority
KR
South Korea
Prior art keywords
application
stub
file
original application
original
Prior art date
Application number
KR1020140178311A
Other languages
Korean (ko)
Other versions
KR101638257B1 (en
Inventor
조성제
심형준
이찬희
정윤식
조상욱
Original Assignee
단국대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 단국대학교 산학협력단 filed Critical 단국대학교 산학협력단
Priority to KR1020140178311A priority Critical patent/KR101638257B1/en
Publication of KR20160071060A publication Critical patent/KR20160071060A/en
Application granted granted Critical
Publication of KR101638257B1 publication Critical patent/KR101638257B1/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/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/121Restricting unauthorised execution of programs
    • G06F21/123Restricting unauthorised execution of programs by using dedicated hardware, e.g. dongles, smart cards, cryptographic processors, global positioning systems [GPS] devices

Abstract

Disclosed are a method and an apparatus for protecting a source code of an application. The method for protecting a source code of an application includes the steps of decoding an encoded original application as a stub file of a stub application is executed and extracting an execution file of the original application; executing the execution file of the original application after covering the stub file of the stub application with the execution file of the decoded original application; and protecting a source code of the original application by covering the execution file of the original application with the stub file of the stub application as completion of the executed original application is requested. Accordingly, an intellectual property right of an application developer can be protected by preventing illegal copy and counterfeit of an application.

Description

애플리케이션의 소스 코드 보호 방법 및 이를 수행하는 장치{METHOD FOR PROTECTING SOURCE CODE OF APPLICATION AND APPARATUS FOR PERFORMING THE METHOD}[0001] METHOD FOR PROTECTING SOURCE CODE OF APPLICATION AND APPARATUS FOR PERFORMING THE METHOD [0002]

본 발명은 애플리케이션 보호 기술에 관한 것으로, 더욱 상세하게는, 사용자 단말에 설치되는 애플리케이션의 불법 복제 및 위변조 방지를 위해 실행 파일의 덮어쓰기 기법을 이용하여 애플리케이션의 소스 코드를 보호하는 방법 및 이를 수행하는 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an application protection technology, and more particularly, to a method of protecting source code of an application by using an overwriting technique of an executable file to prevent illegal copying and forgery of an application installed in a user terminal, ≪ / RTI >

최근 정보 통신 기술의 발달로 스마트폰(Smart Phone), 태블릿 PC, 스마트 가전과 같은 사용자 단말의 보급이 대중화됨에 따라 사용자는 적어도 하나 이상의 애플리케이션(Application)을 사용자 단말에 설치하여 이용한다.BACKGROUND ART [0002] With the recent development of information communication technologies, popularization of user terminals such as smart phones, tablet PCs, and smart home appliances has become popular, so that a user installs at least one application in a user terminal.

일반적으로, 사용자는 사용자 단말에 탑재된 운영 체제의 종류에 따라 애플의 앱스토어(App Store) 또는 구글의 플레이 스토어(Play Store)와 같은 온라인 상의 소프트웨어 오픈 마켓에 접속하여 원하는 애플리케이션을 사용자 단말에 설치한다.Generally, a user accesses a software open market on the Internet, such as Apple's App Store or Google's Play Store, depending on the type of operating system installed in the user terminal, do.

이 중에서, 구글의 플레이 스토어로부터 설치 가능한 안드로이드(Android) 애플리케이션은 오픈소스 코드를 지원한다는 점에서 비교적 쉽게 애플리케이션의 소스 코드가 추출되어 역분석될 수 있다. 그리하여, 애플리케이션을 불법으로 복제하거나 위변조하여 악성 코드를 삽입하는 등 사이버 공격의 주요 대상이 되고 있다.Of these, Android applications that can be installed from Google's playstore support open source code, so that the source code of the application can be extracted and analyzed relatively easily. Thus, it is the main object of cyber attack such as illegal copying or forgery of application and insertion of malicious code.

이에 따라 안드로이드 애플리케이션의 소스 코드를 보호하기 위한 연구가 활발하게 진행되는 추세이다.As a result, research has been actively conducted to protect the source code of Android applications.

종래에는 애플리케이션의 소스 코드를 보호하기 위해 코드 난독화 기술이 이용되었다. 코드 난독화 기술은 악의적인 소프트웨어 역공학으로부터 애플리케이션의 소스 코드를 보호하기 위해 식별자 변환(renaming), 제어 흐름(control flow), 문자열 암호화(string encryption), API 은닉(Application Program Interface hiding) 및 클래스 암호화(class encryption) 등의 방법을 이용하여 애플리케이션의 소스 코드 분석을 어렵게 하는 기술이다.Traditionally, code obfuscation techniques have been used to protect the source code of an application. Code obfuscation techniques include renaming, control flow, string encryption, application program interface hiding, and class encryption to protect the source code of an application from malicious software reverse engineering. it is difficult to analyze the source code of the application using methods such as class encryption.

다만, 코드 난독화 기술을 이용하는 종래의 애플리케이션 소스 코드 보호 방법은 애플리케이션의 소스 코드를 역분석하는 시간만을 지체시킬뿐 역분석이 불가능하도록 접근 자체를 차단할 수 없다는 점에서 애플리케이션의 불법 복제 및 위변조를 방지하는 것에는 한계가 있다.However, conventional application source code protection methods using code obfuscation technology can not prevent the illegal copying and forgery of the application in that only the time for reverse analysis of the source code of the application is delayed and the access itself can not be blocked so that reverse analysis can not be performed There is a limit to doing.

코드 난독화 기술 외에 구글에서 제공하는 LVL(License Validation Library)을 이용하여 애플리케이션의 소스 코드를 보호할 수 있다. 그러나, LVL을 우회하는 블랙마켓을 통해 애플리케이션이 유출될 수 있으며, 이는 애플리케이션의 설치 파일을 추출하여 재배포가 가능하다는 것을 의미한다는 점에서 애플리케이션의 불법 복제 및 위변조를 방지하는 것에 한계가 있다.In addition to the code obfuscation technology, you can protect the source code of your application using Google's License Validation Library (LVL). However, there is a limit to preventing illegal copying and forgery of the application in that the application can be leaked through the black market bypassing the LVL, which means that the installation file of the application can be extracted and redistributed.

상기와 같은 문제점을 해결하기 위한 본 발명의 목적은, 애플리케이션의 실행 파일을 덮어씌우는(overwrite) 기법을 이용함으로써 애플리케이션의 불법 복제 및 위변조를 방지할 수 있는 애플리케이션의 소스 코드 보호 방법을 제공하는데 있다.An object of the present invention is to provide a method of protecting an application's source code that can prevent illegal copying and forgery of an application by using a technique of overwriting an executable file of the application.

또한, 본 발명의 다른 목적은, 애플리케이션의 실행 파일을 덮어씌우는 기법을 이용하여 애플리케이션의 핵심 로직이 공격자에 의해 유출되어 무단 배포되는 것을 방지함으로써 애플리케이션 개발자의 지적 재산권을 보호할 수 있는 애플리케이션의 소스 코드 보호 장치를 제공하는데 있다.It is another object of the present invention to provide a method and a system for protecting the intellectual property rights of an application developer by preventing the core logic of an application from being leaked and unauthorized distribution by using an application executable overwriting technique, And to provide a protection device.

상기 목적을 달성하기 위한 본 발명의 일 측면에 따른 애플리케이션의 소스 코드 보호 방법은, 사용자 단말에서 수행되며 스텁 애플리케이션의 스텁 파일이 실행됨에 따라 암호화된 원본 애플리케이션을 복호화하여 원본 애플리케이션의 실행 파일을 추출하는 단계, 스텁 애플리케이션의 스텁 파일을 복호화된 원본 애플리케이션의 실행 파일로 덮어씌운 후 원본 애플리케이션의 실행 파일을 실행하는 단계 및 실행된 원본 애플리케이션에 대한 종료가 요청됨에 따라 원본 애플리케이션의 실행 파일을 스텁 애플리케이션의 스텁 파일로 덮어씌움으로써 원본 애플리케이션의 소스 코드를 보호하는 단계를 포함한다.According to an aspect of the present invention, there is provided a method for protecting an application's source code, the method comprising the steps of: decrypting an encrypted original application by executing a stub file of a stub application, A step of overwriting the stub file of the stub application with an executable file of the decrypted original application, executing the executable file of the original application, and executing the stub application stub And protecting the source code of the original application by overwriting it with a file.

여기에서, 암호화된 원본 애플리케이션은 개발자에 의해 작성된 원본 애플리케이션을 DES(Data Encryption Standard) 또는 AES(Advanced Encryption Stardard)을 포함하는 암호화 알고리즘으로 암호화한 것으로 미리 정해진 공간에 저장될 수 있다.Here, the encrypted original application can be stored in a predetermined space in which the original application created by the developer is encrypted with an encryption algorithm including DES (Data Encryption Standard) or AES (Advanced Encryption Standard).

여기에서, 스텁(stub) 애플리케이션은 개발자에 의해 작성된 원본 애플리케이션을 복사하여 생성한 사본 애플리케이션의 실행 파일을 원본 애플리케이션의 실행을 명령하는 스텁 코드(stub code)가 포함된 스텁 파일(stub file)로 교체함으로써 생성될 수 있다.Here, the stub application replaces the executable file of the copy application created by copying the original application created by the developer with a stub file containing the stub code that commands execution of the original application ≪ / RTI >

여기에서, 원본 애플리케이션의 실행 파일을 추출하는 단계는 암호화된 원본 애플리케이션을 복호화하기 이전에, 스텁 애플리케이션을 생성하는데 이용된 스텁 파일과 실행된 스텁 파일이 동일한지 확인함으로써 스텁 애플리케이션의 스텁 파일에 대한 무결성을 검증할 수 있다.Here, the step of extracting the executable file of the original application verifies the integrity of the stub file of the stub application by verifying that the stub file used to generate the stub application is identical to the executed stub file before decrypting the encrypted original application Can be verified.

여기에서, 원본 애플리케이션의 실행 파일을 추출하는 단계는 스텁 애플리케이션의 스텁 파일에 대한 무결성 검증에 실패함에 따라 스텁 애플리케이션의 스텁 파일이 위조 또는 변조된 것으로 판단하여 암호화된 원본 애플리케이션이 복호화되는 것을 방지할 수 있다.Here, extracting the executable file of the original application can prevent the stub application's stub file from being falsified or tampered with due to failure in integrity verification of the stub file, thereby preventing the encrypted original application from being decrypted have.

여기에서, 원본 애플리케이션의 실행 파일을 추출하는 단계는 스텁 애플리케이션의 스텁 파일에 대한 무결성이 검증됨에 따라 스텁 애플리케이션의 스텁 파일을 미리 정해진 공간에 백업한 후 암호화된 원본 애플리케이션을 복호화하여 원본 애플리케이션의 실행 파일을 추출할 수 있다.In this case, the step of extracting the executable file of the original application is to verify the integrity of the stub file of the stub application, so that the stub file of the stub application is backed up in a predetermined space, and then the encrypted original application is decrypted, Can be extracted.

여기에서, 원본 애플리케이션의 실행 파일을 실행하는 단계는 원본 애플리케이션의 실행 중에 원본 애플리케이션의 실행 파일에 대한 접근이 차단되도록 사용 권한을 변경함으로써 원본 애플리케이션의 소스 코드 유출을 방지할 수 있다.Here, the step of executing the executable file of the original application can prevent the source code of the original application from being leaked by changing the usage right so that access to the executable file of the original application is blocked while the original application is running.

여기에서, 원본 애플리케이션의 소스 코드를 보호하는 단계는 원본 애플리케이션의 실행 파일을 미리 정해진 공간에 백업된 스텁 애플리케이션의 스텁 파일로 덮어씌운 후, 복호화된 원본 애플리케이션의 실행 파일을 삭제함으로써 원본 애플리케이션의 소스 코드 유출을 방지할 수 있다.Here, in the step of protecting the source code of the original application, the executable file of the original application is overwritten with a stub file of the backed-up stub application in a predetermined space, and then the executable file of the decrypted original application is deleted, Leakage can be prevented.

또한, 상기 목적을 달성하기 위한 본 발명의 다른 측면에 따른 애플리케이션의 소스 코드 보호 장치는, 사용자 단말에서 구현되며 스텁 애플리케이션의 스텁 파일이 실행됨에 따라 암호화된 원본 애플리케이션을 복호화하여 원본 애플리케이션의 실행 파일을 추출하는 실행 파일 추출부 및 스텁 애플리케이션의 스텁 파일을 복호화된 원본 애플리케이션의 실행 파일로 덮어씌운 후 원본 애플리케이션의 실행 파일을 실행하고, 실행된 원본 애플리케이션에 대한 종료가 요청됨에 따라 원본 애플리케이션의 실행 파일을 스텁 애플리케이션의 스텁 파일로 덮어씌움으로써 원본 애플리케이션의 소스 코드를 보호하는 애플리케이션 보호부를 포함한다.According to another aspect of the present invention, there is provided an apparatus for protecting a source code of an application, the apparatus being implemented in a user terminal, decrypting an encrypted original application by executing a stub file of the stub application, The executable file to be extracted and the stub file of the stub application are overwritten with the executable file of the decrypted original application, and the executable file of the original application is executed. When the execution of the original application is requested to be terminated, And an application protector that protects the source code of the original application by overwriting it with the stub file of the stub application.

상술한 바와 같은 본 발명의 실시예에 따른 애플리케이션의 소스 코드 보호 방법 및 이를 수행하는 장치에 따르면, 애플리케이션의 실행 파일을 덮어씌우는(overwrite) 기법을 이용함으로써 애플리케이션의 불법 복제 및 위변조를 방지할 수 있다.According to the method of protecting source code of an application according to an embodiment of the present invention and the device performing it, it is possible to prevent illegal copying and forgery of an application by using a technique of overwriting an executable file of an application .

또한, 애플리케이션의 실행 파일을 덮어씌우는 기법을 이용하여 애플리케이션의 핵심 로직이 공격자에 의해 유출되어 무단 배포되는 것을 방지함으로써 애플리케이션 개발자의 지적 재산권을 보호할 수 있다.It also protects the intellectual property rights of application developers by preventing the application's core logic from being leaked and unauthorized by an attacker, using techniques that overwrite the application's executable files.

도 1은 본 발명의 실시예에 따른 애플리케이션 소스 코드 보호 방법을 설명하는 흐름도이다.
도 2는 본 발명의 실시예에 따른 스텁 애플리케이션을 설명하는 예시도이다.
도 3은 본 발명의 실시예에 따른 실행 파일 덮어쓰기 기법을 이용하여 원본 애플리케이션의 실행 파일을 실행하는 것을 설명하는 예시도이다.
도 4는 본 발명의 실시예에 따른 실행 파일 덮어쓰기 기법을 이용하여 실행 중인 원본 애플리케이션이 종료되는 것을 설명하는 예시도이다.
도 5는 본 발명의 실시예에 따른 애플리케이션 소스 코드 보호 장치를 나타내는 블록도이다.
1 is a flowchart illustrating an application source code protection method according to an embodiment of the present invention.
2 is an exemplary diagram illustrating a stub application according to an embodiment of the present invention.
3 is an exemplary diagram illustrating execution of an executable file of an original application using an executable file overwriting technique according to an embodiment of the present invention.
FIG. 4 is an exemplary diagram illustrating the termination of a running original application using an executable file overwriting technique according to an embodiment of the present invention. FIG.
5 is a block diagram illustrating an application source code protection apparatus in accordance with an embodiment of the present invention.

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

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

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

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

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

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

도 1은 본 발명의 실시예에 따른 애플리케이션 소스 코드 보호 방법을 설명하는 흐름도이고, 도 2는 본 발명의 실시예에 따른 스텁 애플리케이션을 설명하는 예시도이다.FIG. 1 is a flowchart illustrating an application source code protection method according to an embodiment of the present invention, and FIG. 2 is an exemplary view illustrating a stub application according to an embodiment of the present invention.

또한, 도 3은 본 발명의 실시예에 따른 실행 파일 덮어쓰기 기법을 이용하여 원본 애플리케이션의 실행 파일을 실행하는 것을 설명하는 예시도이고, 본 발명의 실시예에 따른 실행 파일 덮어쓰기 기법을 이용하여 실행 중인 원본 애플리케이션이 종료되는 것을 설명하는 예시도이다.3 is an exemplary diagram illustrating execution of an executable file of an original application using an executable file overwriting technique according to an exemplary embodiment of the present invention. The executable file overwriting method according to an embodiment of the present invention And terminating the original application that is being executed.

도 1을 참조하면, 애플리케이션 소스 코드 보호 방법은 사용자 단말에서 수행될 수 있다.Referring to FIG. 1, an application source code protection method may be performed in a user terminal.

여기에서, 사용자 단말(10)은 스마트폰, 태블릿 PC, PDA(Personal Digital Assistant), 노트북, 컴퓨터, 스마트 가전 기기 및 시스템 로봇과 같이 특정 업무 및 기능을 수행하는 적어도 하나의 애플리케이션의 설치, 실행 및 삭제 등이 가능한 정보 처리 장치를 의미할 수 있으나 이에 한정되는 것은 아니다.Herein, the user terminal 10 may be any device capable of installing, executing, or executing at least one application that performs certain tasks and functions, such as a smart phone, a tablet PC, a PDA (Personal Digital Assistant), a notebook computer, a smart home appliance, Deletion, etc., of the information processing apparatus, but is not limited thereto.

다만, 최근 들어 사용자 단말에 설치되는 애플리케이션을 불법으로 복제하거나 위변조하여 악성 코드를 삽입하는 등의 사이버 공격으로 인한 피해가 확산됨에 따라 사용자 단말에 설치되는 애플리케이션의 소스 코드를 보호하기 위한 연구가 활발하게 진행되는 추세이다.However, recently, damage due to a cyber attack such as illegally copying or forgery an application installed in a user terminal and inserting a malicious code has spread, and thus research for protecting the source code of the application installed in the user terminal is actively conducted It is an ongoing trend.

종래에는 애플리케이션의 소스 코드를 보호하기 위해 코드 난독화 또는 구글에서 제공하는 LVL(License Validation Library) 등의 기법들이 이용되었다. 다만, 이와 같은 종래의 기술은 애플리케이션의 소스 코드를 역분석하는 시간만을 지체시킬 뿐 애플리케이션의 소스 코드에 대한 역분석이 불가능하도록 접근 자체를 차단할 수 없음에 따라 애플리케이션의 소스 코드를 보호하는 것에 한계가 있다.Traditionally, techniques such as code obfuscation or the LVL (License Validation Library) provided by Google have been used to protect the source code of an application. However, such a conventional technology has a limitation in protecting the source code of the application because it can not prevent the access itself from being inadvertently analyzed against the source code of the application, have.

이에 따라 본 발명에서는 사용자 단말에 설치된 애플리케이션의 소스 코드를 보호하기 위해 애플리케이션의 실행 파일을 덮어쓰는(overwrite) 기법을 제안한다.Accordingly, the present invention proposes a technique of overwriting an application executable file to protect the source code of the application installed in the user terminal.

본 발명에 따른 애플리케이션의 소스 코드 보호 방법은 암호화된 원본 애플리케이션을 복호화하여 원본 애플리케이션의 실행 파일을 추출하는 단계(S100), 스텁 파일을 실행 파일로 덮어씌움으로써 원본 애플리케이션의 실행 파일을 실행하는 단계(S200) 및 원본 애플리케이션에 대한 종료 요청에 따라 실행 파일을 스텁 파일로 덮어씌움으로써 소스 코드를 보호하는 단계(S300)를 포함할 수 있다.A method of protecting a source code of an application according to the present invention comprises the steps of extracting an encrypted original application and extracting an executable file of the original application (S100), executing an executable file of the original application by overwriting the stub file with the executable file S200) and protecting the source code by overwriting the executable file with the stub file according to the termination request for the original application (S300).

먼저, 스텁(stub) 애플리케이션의 스텁 파일이 실행됨에 따라 암호화된 원본 애플리케이션을 복호화하여 원본 애플리케이션의 실행 파일을 추출할 수 있다(S100).First, as the stub file of the stub application is executed, the encrypted original application can be decrypted to extract the executable file of the original application (S100).

개발자에 의해 작성된 원본 애플리케이션은 DES(Data Encryption Standard) 또는 AES(Advanced Encryption Stardard)을 포함하는 암호화 알고리즘으로 암호화한 것으로 미리 정해진 공간에 저장될 수 있다.The original application created by the developer can be stored in a predetermined space encrypted with an encryption algorithm including DES (Data Encryption Standard) or AES (Advanced Encryption Standard).

또한, 개발자에 의해 작성된 원본 애플리케이션을 복사하여 생성한 사본 애플리케이션의 실행 파일을 애플리케이션의 실행을 명령하는 스텁 코드(stub code)가 포함된 스텁 파일(stub file)로 교체하여 스텁 애플리케이션을 생성할 수 있다.In addition, a stub application can be created by replacing an executable file of a copy application created by copying a original application created by a developer with a stub file containing a stub code for commanding execution of the application .

스텁 애플리케이션이 생성되는 것을 보다 구체적으로 예를 들면, 도 2 (a)와 같이 사본 애플리케이션으로부터 실행 파일을 추출할 수 있다. 이는 사본 애플리케이션에 대한 패키지를 해체한 후에 수행되거나 패키지가 유지되고 있는 상태에서 수행될 수 있으나 이에 한정되는 것은 아니다.More specifically, for example, the execution file can be extracted from the copy application as shown in FIG. 2 (a). This may be done after disassembling the package for the copy application, or it may be performed while the package is being held, but is not limited thereto.

사본 애플리케이션으로부터 실행 파일이 추출되면 도 2 (b)와 같이 추출된 사본 애플리케이션의 실행 파일에 대한 크기만큼 실행 코드를 ‘0’으로 치환한 후, ‘0’으로 치환된 실행 코드 임의의 영역(A)을 스텁 코드(B)로 교체함으로써 도 2 (c)와 같은 스텁 파일이 포함된 스텁 애플리케이션이 생성될 수 있다.When an executable file is extracted from the copy application, the execution code is replaced with '0' as much as the size of the executable file of the extracted copy application as shown in FIG. 2 (b) ) Is replaced with the stub code (B), a stub application including the stub file as shown in Fig. 2 (c) can be generated.

여기에서, 스텁 코드(stub code)는 원본 애플리케이션의 실행을 명령하는 소스 코드로써, 원본 애플리케이션이 암호화 또는 복호화되어 저장되는 위치 또는 원본 애플리케이션의 복호화에 사용되는 키에 대한 정보 등이 포함될 수 있다.Here, the stub code is a source code for instructing execution of the original application. The stub code may include a location where the original application is encrypted or decrypted and stored, or information about a key used for decrypting the original application.

상술한 바와 같이 개발자에 의해 작성된 원본 애플리케이션은 암호화되어 미리 저장된 위치에 저장되어 있으므로 원본 애플리케이션을 실행함에 있어 원본 애플리케이션의 실행 파일을 바로 실행시킬 수 없다.As described above, since the original application created by the developer is encrypted and stored in a pre-stored location, the execution file of the original application can not be immediately executed in executing the original application.

이에 따라 스텁 애플리케이션의 스텁 파일을 실행시켜 사용자 단말에 미리 설치된 런처 애플리케이션(Launcher Application)을 구동시킨 후 암호화된 원본 애플리케이션을 복호화할 수 있다. 여기에서, 런처 애플리케이션은 스텁 애플리케이션을 제어하여 원본 애플리케이션을 관리할 수 있도록 시스템 권한을 가질 수 있다.Accordingly, the stub file of the stub application can be executed to run the launcher application installed in the user terminal, and then the encrypted original application can be decrypted. Here, the launcher application may have system privileges to control the stub application to manage the original application.

이 때, 스텁 애플리케이션의 스텁 파일에 포함된 스텁 코드에 원본 애플리케이션이 암호화 또는 복호화되어 저장되는 위치 또는 원본 애플리케이션의 복호화에 사용되는 키에 대한 정보 등이 포함됨에 따라 스텁 코드에 악성 코드가 심어져있거나 위변조되면 복호화되는 원본 애플리케이션에 접근하여 원본 애플리케이션의 실행 파일을 유출시킬 가능성이 있다.At this time, the stub code included in the stub file of the stub application contains information about the location where the original application is encrypted or decrypted or stored, or the key used to decrypt the original application, so that the stub code is embedded with malicious code If forged, it is possible to access the original decrypted application and leak the original application's executable file.

그리하여, 암호화된 원본 애플리케이션을 복호화하기 이전에 스텁 애플리케이션을 생성하는데 이용된 스텁 파일과 실행된 스텁 파일이 동일한지 확인함으로써 스텁 애플리케이션의 스텁 파일에 대한 무결성을 검증할 수 있다.Thus, the integrity of the stub file of the stub application can be verified by verifying that the stub file used to create the stub application is identical to the stub file executed prior to decrypting the encrypted original application.

만약, 스텁 애플리케이션을 생성하는데 이용된 스텁 파일과 실행된 스텁 파일이 동일하지 않은 경우, 스텁 애플리케이션의 스텁 파일이 위조 또는 변조된 것으로 판단되므로 암호화된 원본 애플리케이션이 복호화되지 않도록 차단할 수 있다.If the stub file used to create the stub application is not the same as the stub file used, the stub file of the stub application is judged to have been falsified or altered so that the original encrypted application can be prevented from being decrypted.

반면, 스텁 애플리케이션을 생성하는데 이용된 스텁 파일과 실행된 스텁 파일이 동일하여 무결성이 검증되면 스텁 애플리케이션의 스텁 파일을 미리 정해진 공간에 백업한 후 암호화된 원본 애플리케이션을 복호화할 수 있다.On the other hand, if the integrity of the stub file is identical to the stub file used to create the stub application, the stub file of the stub application can be backed up in a predetermined space, and then the encrypted original application can be decrypted.

이와 같이 암호화된 원본 애플리케이션을 복호화하여 원본 애플리케이션의 실행 파일이 추출됨에 따라 스텁 애플리케이션의 스텁 파일을 원본 애플리케이션의 실행 파일로 덮어씌운 후 원본 애플리케이션의 실행 파일을 실행할 수 있다(S200).As the encrypted original application is decrypted and the executable file of the original application is extracted, the stub file of the stub application can be overwritten with the executable file of the original application, and then the executable file of the original application can be executed (S200).

구체적으로 예를 들어, 도 3에 도시된 바와 같이 스텁 애플리케이션의 스텁 파일(31)을 ‘/data/app’와 같은 경로의 미리 정해진 공간에 백업한 후(S210), 스텁 파일(31)을 추출된 원본 애플리케이션 실행 파일(33)로 덮어씌워 원본 애플리케이션의 실행 파일(33)을 실행시킴으로써 원본 애플리케이션이 실행될 수 있다.Specifically, for example, as shown in FIG. 3, the stub file 31 of the stub application is backed up in a predetermined space of a path such as '/ data / app' (S210) The original application can be executed by overwriting the original application executable file 33 with the executable file 33 of the original application.

다만, 원본 애플리케이션의 실행 파일(33)은 개발자에 의해 작성된 원본 애플리케이션의 핵심 로직이 포함된 실행 파일임에 따라 원본 애플리케이션의 실행 중에 사용자 단말을 감시하는 공격자에 의해 유출될 수 있다.However, since the executable file 33 of the original application is an executable file containing the core logic of the original application created by the developer, it can be leaked by an attacker monitoring the user terminal during execution of the original application.

따라서, 원본 애플리케이션의 실행 중에 원본 애플리케이션의 실행 파일(33)에 대한 접근이 차단되도록 원본 애플리케이션에 대한 사용 권한을 시스템 권한으로 변경할 수 있다. 이로 인해 악의적인 목적을 가진 공격자는 원본 애플리케이션의 실행 파일에 접근 수 없어 원본 애플리케이션의 소스 코드 유출을 방지할 수 있다.Therefore, the usage right for the original application can be changed to the system right so that access to the executable file 33 of the original application is blocked while the original application is running. This could allow an attacker with malicious intent to gain access to the executable file of the original application, thereby preventing the source code of the original application from being leaked.

실행 중인 원본 애플리케이션에 대한 종료가 요청됨에 따라 원본 애플리케이션의 실행 파일을 스텁 애플리케이션의 스텁 파일로 덮어씌움으로써 애플리케이션의 소스 코드를 보호할 수 있다(S300).The application's source code can be protected (S300) by overwriting the stub file of the stub application with the executable file of the original application as the termination of the running source application is requested.

보다 구체적으로, 도 4를 참조하면, 실행 중인 애플리케이션에 대한 종료가 요청됨에 따라 애플리케이션의 실행 파일(33)을 미리 정해진 공간에 백업된 스텁 파일(35)로 덮어씌워(S310) 스텁 파일(31)로 복귀할 수 있다(S320). 이 때, 애플리케이션의 실행에 이용된 원본 애플리케이션의 실행 파일(33)은 삭제함으로써 원본 애플리케이션의 소스 코드 유출을 방지할 수 있다.
4, the execution file 33 of the application is overwritten with the stub file 35 backed up in the predetermined space (S310), and the stub file 31 is overwritten with the stub file 35, (S320). At this time, by deleting the executable file 33 of the original application used to execute the application, the source code of the original application can be prevented from flowing out.

도 5는 본 발명의 실시예에 따른 애플리케이션 소스 코드 보호 장치를 나타내는 블록도이다.5 is a block diagram illustrating an application source code protection apparatus in accordance with an embodiment of the present invention.

도 5를 참조하면, 애플리케이션 소스 코드 보호 장치(100)는 사용자 단말에서 구현될 수 있다.Referring to FIG. 5, the application source code protection apparatus 100 may be implemented in a user terminal.

여기에서, 사용자 단말은 스마트폰, 태블릿 PC, PDA(Personal Digital Assistant), 노트북, 컴퓨터, 스마트 가전 기기 및 시스템 로봇과 같이 특정 업무 및 기능을 수행하는 적어도 하나의 애플리케이션의 설치, 실행 및 삭제 등이 가능한 정보 처리 장치를 의미할 수 있으나 이에 한정되는 것은 아니다.Herein, the user terminal may include at least one application for performing certain tasks and functions, such as a smart phone, a tablet PC, a PDA (Personal Digital Assistant), a notebook computer, a smart home appliance, But it is not limited thereto.

이 때, 사용자 단말은 스텁 애플리케이션을 제어하여 애플리케이션을 관리할 수 있도록 시스템 권한을 가지는 런처 애플리케이션(Launcher Application)이 미리 설치될 수 있다.At this time, the user terminal may be provided with a launcher application having a system privilege so that the user can manage the application by controlling the stub application.

애플리케이션 소스 코드 보호 장치(100)는 실행 파일 추출부(110) 및 애플리케이션 보호부(120)를 포함할 수 있다.The application source code protection apparatus 100 may include an executable file extraction unit 110 and an application protection unit 120.

실행 파일 추출부(110)는 스텁 애플리케이션의 스텁 파일이 실행됨에 따라 암호화된 원본 애플리케이션을 복호화하여 원본 애플리케이션의 실행 파일을 추출할 수 있다.The executable file extracting unit 110 may extract an executable file of the original application by decoding the encrypted original application as the stub file of the stub application is executed.

스텁 애플리케이션은 개발자에 의해 작성된 원본 애플리케이션을 복사하여 생성한 사본 애플리케이션의 실행 파일을 원본 애플리케이션의 실행을 명령하는 스텁 코드(stub code)가 포함된 스텁 파일(stub file)로 교체하여 생성될 수 있다.The stub application can be created by replacing the executable file of the copy application created by copying the original application created by the developer with a stub file containing the stub code that commands execution of the original application.

여기에서, 스텁 코드(stub code)는 원본 애플리케이션의 실행을 명령하는 소스 코드로써, 원본 애플리케이션이 암호화 또는 복호화되어 저장되는 위치 또는 원본 애플리케이션의 복호화에 사용되는 키에 대한 정보 등이 포함될 수 있다.Here, the stub code is a source code for instructing execution of the original application. The stub code may include a location where the original application is encrypted or decrypted and stored, or information about a key used for decrypting the original application.

이 때, 암호화된 원본 애플리케이션은 개발자에 의해 작성된 원본 애플리케이션이 DES(Data Encryption Standard) 또는 AES(Advanced Encryption Stardard)을 포함하는 암호화 알고리즘을 통해 암호화되어 미리 정해진 공간에 저장될 수 있다.At this time, the encrypted original application can be stored in a predetermined space by encrypting the original application created by the developer through an encryption algorithm including DES (Data Encryption Standard) or AES (Advanced Encryption Standard).

즉, 개발자에 의해 작성된 원본 애플리케이션은 암호화되어 미리 저장된 위치에 저장되어 있으므로 원본 애플리케이션을 실행함에 있어 원본 애플리케이션의 실행 파일을 바로 실행시킬 수 없다.In other words, since the original application created by the developer is encrypted and stored in a previously stored location, the original application execution file can not be immediately executed in executing the original application.

이에 따라 스텁 애플리케이션의 스텁 파일을 실행시켜 사용자 단말에 미리 설치된 런처 애플리케이션(Launcher Application)을 구동시킴으로써 암호화된 원본 애플리케이션을 복호화할 수 있다.Accordingly, the stub application of the stub application can be executed to run the launcher application pre-installed in the user terminal, thereby decrypting the encrypted original application.

다만, 스텁 애플리케이션의 스텁 파일에 포함된 스텁 코드에 원본 애플리케이션이 암호화 또는 복호화되어 저장되는 위치 또는 원본 애플리케이션의 복호화에 사용되는 키에 대한 정보 등이 포함됨에 따라 스텁 코드에 악성 코드가 심어져있거나 위변조되면 복호화되는 원본 애플리케이션에 접근하여 원본 애플리케이션의 실행 파일을 유출시킬 가능성이 있다.However, since the stub code included in the stub file of the stub application contains information about the location where the original application is encrypted or decrypted or stored, or the key used to decrypt the original application, the stub code may contain malicious code, It is possible to access the original application to be decrypted and leak the original application's executable file.

그리하여, 암호화된 원본 애플리케이션을 복호화하기 이전에 스텁 애플리케이션을 생성하는데 이용된 스텁 파일과 실행된 스텁 파일이 동일한지 확인함으로써 스텁 애플리케이션의 스텁 파일에 대한 무결성을 검증할 수 있다.Thus, the integrity of the stub file of the stub application can be verified by verifying that the stub file used to create the stub application is identical to the stub file executed prior to decrypting the encrypted original application.

만약, 스텁 애플리케이션을 생성하는데 이용된 스텁 파일과 실행된 스텁 파일이 동일하지 않은 경우, 스텁 애플리케이션의 스텁 파일이 위조 또는 변조된 것으로 판단되므로 암호화된 애플리케이션이 복호화되지 않도록 차단할 수 있다.If the stub file used to create the stub application is not the same as the stub file used, the stub file of the stub application is judged to have been falsified or altered so that the encrypted application can be prevented from being decrypted.

반면, 스텁 애플리케이션을 생성하는데 이용된 스텁 파일과 실행된 스텁 파일이 동일하여 무결성이 검증되면 스텁 애플리케이션의 스텁 파일을 미리 정해진 공간에 백업한 후 암호화된 원본 애플리케이션을 복호화할 수 있다.On the other hand, if the integrity of the stub file is identical to the stub file used to create the stub application, the stub file of the stub application can be backed up in a predetermined space, and then the encrypted original application can be decrypted.

애플리케이션 보호부(120)는 애플리케이션 실행 모듈(121) 및 애플리케이션 종료 모듈(123)을 포함할 수 있다.The application protection unit 120 may include an application execution module 121 and an application termination module 123.

애플리케이션 실행 모듈(121)은 암호화된 원본 애플리케이션을 복호화하여 원본 애플리케이션의 실행 파일이 추출됨에 따라 스텁 애플리케이션의 스텁 파일을 애플리케이션의 실행 파일로 덮어씌운 후 원본 애플리케이션의 실행 파일을 실행함으로써 원본 애플리케이션을 실행할 수 있다. 다만, 원본 애플리케이션의 실행 파일(33)은 개발자에 의해 작성된 원본 애플리케이션의 핵심 로직이 포함된 실행 파일임에 따라 원본 애플리케이션의 실행 중에 사용자 단말을 감시하는 공격자에 의해 유출될 수 있다.The application execution module 121 decrypts the encrypted original application and overwrites the stub file of the stub application with the executable file of the application as the executable file of the original application is extracted and executes the original application by executing the executable file of the original application have. However, since the executable file 33 of the original application is an executable file containing the core logic of the original application created by the developer, it can be leaked by an attacker monitoring the user terminal during execution of the original application.

따라서, 원본 애플리케이션의 실행 중에 원본 애플리케이션의 실행 파일에 대한 접근이 차단되도록 원본 애플리케이션에 대한 사용 권한을 시스템 권한으로 변경할 수 있다. 이로 인해 악의적인 목적을 가진 공격자는 원본 애플리케이션의 실행 파일에 접근 수 없어 원본 애플리케이션의 소스 코드 유출을 방지할 수 있다.Therefore, you can change the permissions for the original application to the system privilege so that access to the executable file of the original application is blocked while the original application is running. This could allow an attacker with malicious intent to gain access to the executable file of the original application, thereby preventing the source code of the original application from being leaked.

애플리케이션 종료 모듈(123)은 실행 중인 원본 애플리케이션에 대한 종료가 요청됨에 따라 원본 애플리케이션의 실행 파일을 스텁 애플리케이션의 스텁 파일로 덮어씌운 후 원본 애플리케이션을 종료할 수 있다.The application termination module 123 may terminate the original application after overwriting the executable file of the original application with the stub file of the stub application as the termination of the original application being executed is requested.

이 때, 원본 애플리케이션의 실행에 이용된 원본 애플리케이션의 실행 파일은 삭제함으로써 원본 애플리케이션의 소스 코드 유출을 방지할 수 있다.
At this time, by deleting the executable file of the original application used for executing the original application, the source code of the original application can be prevented from flowing out.

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

31: 스텁 파일 33: 원본 애플리케이션의 실행 파일
35: 백업된 스텁 파일
100: 애플리케이션의 소스 코드 보호 장치
110: 실행 파일 추출부 120: 애플리케이션 보호부
121: 애플리케이션 실행 모듈 123: 애플리케이션 종료 모듈
31: stub file 33: executable file of the original application
35: Backed up stub file
100: Application source code protection device
110: executable file extraction unit 120: application protection unit
121: Application execution module 123: Application end module

Claims (17)

사용자 단말에서 수행되는 애플리케이션의 소스 코드 보호 방법에 있어서,
스텁(stub) 애플리케이션의 스텁 파일이 실행됨에 따라 암호화된 원본 애플리케이션을 복호화하여 상기 원본 애플리케이션의 실행 파일을 추출하는 단계;
상기 스텁 애플리케이션의 스텁 파일을 상기 복호화된 원본 애플리케이션의 실행 파일로 덮어씌운(overwrite) 후 상기 원본 애플리케이션의 실행 파일을 실행하는 단계; 및
상기 실행된 원본 애플리케이션에 대한 종료가 요청됨에 따라 상기 원본 애플리케이션의 실행 파일을 상기 스텁 애플리케이션의 스텁 파일로 덮어씌움으로써 상기 원본 애플리케이션의 소스 코드를 보호하는 단계를 포함하는 애플리케이션의 소스 코드 보호 방법.
A method of protecting a source code of an application executed in a user terminal,
Decrypting the encrypted original application as the stub file of the stub application is executed to extract an executable file of the original application;
Overwriting the stub file of the stub application with an executable file of the decrypted original application and executing the executable file of the original application; And
And protecting the source code of the original application by overwriting the executable file of the original application with the stub file of the stub application as the termination of the executed original application is requested.
청구항 1에 있어서,
상기 암호화된 원본 애플리케이션은,
개발자에 의해 작성된 원본 애플리케이션을 DES(Data Encryption Standard) 또는 AES(Advanced Encryption Stardard)을 포함하는 암호화 알고리즘으로 암호화한 것으로 미리 정해진 공간에 저장되는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 방법.
The method according to claim 1,
The encrypted original application,
Characterized in that the original application created by the developer is encrypted with a cryptographic algorithm including DES (Data Encryption Standard) or AES (Advanced Encryption Standard) and stored in a predetermined space.
청구항 2에 있어서,
상기 스텁(stub) 애플리케이션은,
상기 개발자에 의해 작성된 원본 애플리케이션을 복사하여 생성한 사본 애플리케이션의 실행 파일을 상기 원본 애플리케이션의 실행을 명령하는 스텁 코드(stub code)가 포함된 스텁 파일(stub file)로 교체함으로써 생성되는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 방법.
The method of claim 2,
The stub application may include:
The stub file is generated by replacing an executable file of the copy application created by copying the original application created by the developer with a stub file containing a stub code for instructing execution of the original application. How to protect your application's source code.
청구항 3에 있어서,
상기 원본 애플리케이션의 실행 파일을 추출하는 단계는,
상기 암호화된 원본 애플리케이션을 복호화하기 이전에,
상기 스텁 애플리케이션을 생성하는데 이용된 스텁 파일과 상기 실행된 스텁 파일이 동일한지 확인함으로써 상기 스텁 애플리케이션의 스텁 파일에 대한 무결성을 검증하는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 방법.
The method of claim 3,
The step of extracting the executable file of the original application comprises:
Before decrypting the encrypted original application,
Wherein the integrity of the stub file of the stub application is verified by checking whether the stub file used to generate the stub application and the executed stub file are the same.
청구항 4에 있어서,
상기 원본 애플리케이션의 실행 파일을 추출하는 단계는,
상기 스텁 애플리케이션의 스텁 파일에 대한 무결성 검증에 실패함에 따라 상기 스텁 애플리케이션의 스텁 파일이 위조 또는 변조된 것으로 판단하여 상기 암호화된 원본 애플리케이션이 복호화되는 것을 방지하는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 방법.
The method of claim 4,
The step of extracting the executable file of the original application comprises:
Wherein it is determined that the stub file of the stub application is falsified or altered due to failure in integrity verification of the stub file of the stub application, thereby preventing the encrypted original application from being decrypted.
청구항 4에 있어서,
상기 원본 애플리케이션의 실행 파일을 추출하는 단계는,
상기 스텁 애플리케이션의 스텁 파일에 대한 무결성이 검증됨에 따라 상기 스텁 애플리케이션의 스텁 파일을 미리 정해진 공간에 백업한 후 상기 암호화된 원본 애플리케이션을 복호화하여 상기 원본 애플리케이션의 실행 파일을 추출하는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 방법.
The method of claim 4,
The step of extracting the executable file of the original application comprises:
Wherein the stub application is configured to back up the stub file of the stub application in a predetermined space in accordance with the integrity of the stub file of the stub application being verified and then decrypt the encrypted original application to extract the executable file of the original application How to protect source code.
청구항 6에 있어서,
상기 원본 애플리케이션의 실행 파일을 실행하는 단계는,
상기 원본 애플리케이션의 실행 중에 상기 원본 애플리케이션의 실행 파일에 대한 접근이 차단되도록 사용 권한을 변경함으로써 상기 원본 애플리케이션의 소스 코드 유출을 방지하는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 방법.
The method of claim 6,
The execution of the executable file of the original application may include:
Wherein the source code is prevented from being leaked by changing the usage right so that access to the executable file of the source application is blocked during execution of the source application.
청구항 6에 있어서,
상기 원본 애플리케이션의 소스 코드를 보호하는 단계는,
상기 원본 애플리케이션의 실행 파일을 상기 미리 정해진 공간에 백업된 상기 스텁 애플리케이션의 스텁 파일로 덮어씌운 후, 상기 복호화된 원본 애플리케이션의 실행 파일을 삭제함으로써 상기 원본 애플리케이션의 소스 코드 유출을 방지하는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 방법.
The method of claim 6,
The step of protecting the source code of the original application comprises:
The execution source file of the original application is prevented from being leaked by overwriting the executable file of the original application with the stub file of the stub application backed up in the predetermined space and then deleting the executable file of the decrypted original application. How to protect your application's source code.
사용자 단말에서 구현되는 애플리케이션의 소스 코드 보호 장치에 있어서,
스텁(stub) 애플리케이션의 스텁 파일이 실행됨에 따라 암호화된 원본 애플리케이션을 복호화하여 상기 원본 애플리케이션의 실행 파일을 추출하는 실행 파일 추출부; 및
상기 스텁 애플리케이션의 스텁 파일을 상기 복호화된 원본 애플리케이션의 실행 파일로 덮어씌운(overwrite) 후 상기 원본 애플리케이션의 실행 파일을 실행하고, 상기 실행된 원본 애플리케이션에 대한 종료가 요청됨에 따라 상기 원본 애플리케이션의 실행 파일을 상기 스텁 애플리케이션의 스텁 파일로 덮어씌움으로써 상기 원본 애플리케이션의 소스 코드를 보호하는 애플리케이션 보호부를 포함하는 애플리케이션의 소스 코드 보호 장치.
An apparatus for protecting a source code of an application implemented in a user terminal,
An executable file extracting unit for extracting an executable file of the original application by decrypting the encrypted original application as the stub file of the stub application is executed; And
An execution file of the original application is overwritten by overwriting the stub file of the stub application with an executable file of the decrypted original application, and when the execution of the original application is requested to be terminated, For protecting the source code of the original application by overwriting the stub file with a stub file of the stub application.
청구항 9에 있어서,
상기 애플리케이션의 소스 코드 보호 장치는,
상기 스텁 애플리케이션의 스텁 파일이 실행됨에 따라 시스템 권한을 가지는 런처 애플리케이션(Launcher Application)과 연동되는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 장치.
The method of claim 9,
The source code protection device of the application comprises:
Wherein the stub file is associated with a launcher application having a system privilege upon execution of the stub file of the stub application.
청구항 9에 있어서,
상기 암호화된 원본 애플리케이션은,
개발자에 의해 작성된 원본 애플리케이션을 DES(Data Encryption Standard) 또는 AES(Advanced Encryption Stardard)을 포함하는 암호화 알고리즘으로 암호화한 것으로 미리 정해진 공간에 저장되는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 장치.
The method of claim 9,
The encrypted original application,
Characterized in that the original application written by the developer is encrypted in a predetermined encryption space by encrypting it with a encryption algorithm including DES (Data Encryption Standard) or AES (Advanced Encryption Standard).
청구항 11에 있어서,
상기 스텁(stub) 애플리케이션은,
상기 개발자에 의해 작성된 원본 애플리케이션을 복사하여 생성한 사본 애플리케이션의 실행 파일을 상기 원본 애플리케이션의 실행을 명령하는 스텁 코드(stub code)가 포함된 스텁 파일(stub file)로 교체함으로써 생성되는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 장치.
The method of claim 11,
The stub application may include:
The stub file is generated by replacing an executable file of the copy application created by copying the original application created by the developer with a stub file containing a stub code for instructing execution of the original application. The source code protection of the application.
청구항 12에 있어서,
상기 실행 파일 추출부는,
상기 스텁 애플리케이션을 생성하는데 이용된 스텁 파일과 상기 실행된 스텁 파일이 동일한지 확인함으로써 상기 스텁 애플리케이션의 스텁 파일에 대한 무결성을 검증하는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 장치.
The method of claim 12,
The execution file extracting unit extracts,
And verifies the integrity of the stub file of the stub application by verifying whether the stub file used to generate the stub application and the executed stub file are the same.
청구항 13에 있어서,
상기 실행 파일 추출부는,
상기 스텁 애플리케이션의 스텁 파일에 대한 무결성 검증이 실패함에 따라 상기 스텁 애플리케이션의 스텁 파일이 위조 또는 변조된 것으로 판단하여 상기 암호화된 원본 애플리케이션이 복호화되는 것을 방지하고,
상기 스텁 애플리케이션의 스텁 파일에 대한 무결성이 검증됨에 따라 상기 스텁 애플리케이션의 스텁 파일을 미리 정해진 공간에 백업한 후 상기 암호화된 원본 애플리케이션을 복호화하는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 장치.
14. The method of claim 13,
The execution file extracting unit extracts,
The encrypted original application is prevented from being decrypted by determining that the stub file of the stub application has been falsified or altered due to failure in integrity verification of the stub file of the stub application,
Wherein the stub application is configured to back up the stub file of the stub application in a predetermined space according to verification of the integrity of the stub file of the stub application, and to decrypt the encrypted original application.
청구항 14에 있어서,
상기 애플리케이션 보호부는,
상기 스텁 애플리케이션의 스텁 파일을 상기 복호화된 원본 애플리케이션의 실행 파일로 덮어씌운 후 상기 원본 애플리케이션을 실행하는 애플리케이션 실행 모듈; 및
상기 실행된 원본 애플리케이션에 대한 종료가 요청됨에 따라 상기 복호화된 원본 애플리케이션의 실행 파일을 상기 스텁 애플리케이션의 스텁 파일로 덮어씌우는 애플리케이션 종료 모듈을 포함하는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 장치.
15. The method of claim 14,
The application protection unit,
An application execution module that overwrites a stub file of the stub application with an executable file of the decrypted original application and executes the original application; And
And an application termination module for overwriting an execution file of the decrypted original application with a stub file of the stub application in response to an end request for the executed original application.
청구항 15에 있어서,
상기 애플리케이션 실행 모듈은,
상기 원본 애플리케이션의 실행 중에 상기 원본 애플리케이션의 실행 파일에 대한 접근이 차단되도록 사용 권한을 변경함으로써 상기 원본 애플리케이션의 소스 코드 유출을 방지하는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 장치.
16. The method of claim 15,
The application execution module,
Wherein the source code is prevented from being leaked by changing the usage right so that access to the executable file of the source application is blocked during execution of the source application.
청구항 15에 있어서,
상기 애플리케이션 종료 모듈은,
상기 원본 애플리케이션의 실행 파일을 상기 미리 정해진 공간에 백업된 상기 스텁 애플리케이션의 스텁 파일로 덮어씌운 후, 상기 복호화된 원본 애플리케이션의 실행 파일을 삭제함으로써 상기 원본 애플리케이션의 소스 코드 유출을 방지하는 것을 특징으로 하는 애플리케이션의 소스 코드 보호 장치.
16. The method of claim 15,
The application termination module comprising:
The execution source file of the original application is prevented from being leaked by overwriting the executable file of the original application with the stub file of the stub application backed up in the predetermined space and then deleting the executable file of the decrypted original application. The source code protection of the application.
KR1020140178311A 2014-12-11 2014-12-11 Method for protecting source code of application and apparatus for performing the method KR101638257B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140178311A KR101638257B1 (en) 2014-12-11 2014-12-11 Method for protecting source code of application and apparatus for performing the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140178311A KR101638257B1 (en) 2014-12-11 2014-12-11 Method for protecting source code of application and apparatus for performing the method

Publications (2)

Publication Number Publication Date
KR20160071060A true KR20160071060A (en) 2016-06-21
KR101638257B1 KR101638257B1 (en) 2016-07-20

Family

ID=56353702

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140178311A KR101638257B1 (en) 2014-12-11 2014-12-11 Method for protecting source code of application and apparatus for performing the method

Country Status (1)

Country Link
KR (1) KR101638257B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523128A (en) * 2020-04-03 2020-08-11 咪咕文化科技有限公司 Information protection method, system, electronic device and medium
KR20230033350A (en) * 2021-09-01 2023-03-08 숭실대학교산학협력단 Device for hiding application code, method for hiding application code and computer program stored in a recording medium to execute the method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102416501B1 (en) 2017-09-20 2022-07-05 삼성전자주식회사 Electronic device and control method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101436536B1 (en) * 2013-06-19 2014-09-01 숭실대학교산학협력단 File server, file transfer method thereof and file tamperproof system
US8892876B1 (en) * 2012-04-20 2014-11-18 Trend Micro Incorporated Secured application package files for mobile computing devices
KR20140134987A (en) * 2013-05-15 2014-11-25 소프트캠프(주) Device and method for securing computer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8892876B1 (en) * 2012-04-20 2014-11-18 Trend Micro Incorporated Secured application package files for mobile computing devices
KR20140134987A (en) * 2013-05-15 2014-11-25 소프트캠프(주) Device and method for securing computer
KR101436536B1 (en) * 2013-06-19 2014-09-01 숭실대학교산학협력단 File server, file transfer method thereof and file tamperproof system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
이찬희, ‘바이너리 암호화 및 클래스 동적 로딩을 사용한 안드로이드 애플리케이션 보호 방법’, 단국대학교 대학원 석사학위 논문, 2014.08* *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523128A (en) * 2020-04-03 2020-08-11 咪咕文化科技有限公司 Information protection method, system, electronic device and medium
CN111523128B (en) * 2020-04-03 2023-12-08 咪咕文化科技有限公司 Information protection method, system, electronic equipment and medium
KR20230033350A (en) * 2021-09-01 2023-03-08 숭실대학교산학협력단 Device for hiding application code, method for hiding application code and computer program stored in a recording medium to execute the method

Also Published As

Publication number Publication date
KR101638257B1 (en) 2016-07-20

Similar Documents

Publication Publication Date Title
JP4702957B2 (en) Tamper resistant virtual machine
US20210294879A1 (en) Securing executable code integrity using auto-derivative key
KR101397637B1 (en) Method and apparatus including architecture for protecting multi-user sensitive code and data
TWI489308B (en) Secure update of boot image without knowledge of secure key
KR101503785B1 (en) Method And Apparatus For Protecting Dynamic Library
WO2016078130A1 (en) Dynamic loading method for preventing reverse of apk file
US20120331303A1 (en) Method and system for preventing execution of malware
RU2631136C2 (en) Method of protected access and device for protected access of applied program
US8225290B2 (en) Systems and methods for regulating execution of computer software
US20110271350A1 (en) method for protecting software
EP2051181A1 (en) Information terminal, security device, data protection method, and data protection program
CN104866739A (en) Application program encryption method and application program encryption system in Android system
CN109992987B (en) Script file protection method and device based on Nginx and terminal equipment
Haupert et al. Honey, i shrunk your app security: The state of android app hardening
CN103971034A (en) Method and device for protecting Java software
WO2016206393A1 (en) Method and apparatus for managing application and method and apparatus for implementing read-write operation
KR101638257B1 (en) Method for protecting source code of application and apparatus for performing the method
KR20160117183A (en) Method of encrypting dll file, system of encrypting dll file performing the same, and storage medium storing the same
US8479014B1 (en) Symmetric key based secure microprocessor and its applications
KR101604892B1 (en) Method and devices for fraud prevention of android-based applications
CN111190614A (en) Software installation method and computer equipment
Bahaa-Eldin et al. A comprehensive software copy protection and digital rights management platform
KR102358101B1 (en) A method for applying security program
Msgna et al. Secure application execution in mobile devices
EP3009952A1 (en) System and method for protecting a device against attacks on procedure calls by encrypting arguments

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
FPAY Annual fee payment

Payment date: 20190702

Year of fee payment: 4