KR102332588B1 - Cache Tamper-Proof Method and System on Android - Google Patents

Cache Tamper-Proof Method and System on Android Download PDF

Info

Publication number
KR102332588B1
KR102332588B1 KR1020190150498A KR20190150498A KR102332588B1 KR 102332588 B1 KR102332588 B1 KR 102332588B1 KR 1020190150498 A KR1020190150498 A KR 1020190150498A KR 20190150498 A KR20190150498 A KR 20190150498A KR 102332588 B1 KR102332588 B1 KR 102332588B1
Authority
KR
South Korea
Prior art keywords
cache
android
application
hash value
hash
Prior art date
Application number
KR1020190150498A
Other languages
Korean (ko)
Other versions
KR20210062360A (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 KR1020190150498A priority Critical patent/KR102332588B1/en
Publication of KR20210062360A publication Critical patent/KR20210062360A/en
Application granted granted Critical
Publication of KR102332588B1 publication Critical patent/KR102332588B1/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/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

본 발명의 실시 예에 따른 안드로이드 기반에서의 캐시 변조 방지 시스템은 애플리케이션을 APK 파일 형태로 안드로이드 운영체제 내에 위치한 앱 저장부에 저장하는 dex2oat, 앱 저장부에 저장된 APK 파일에 기초하여 애플리케이션을 실행하는 zygote 및 APK 파일을 앱 저장부에 저장하는 제1 이벤트에 기초하여 애플리케이션 캐시파일의 제1 해시값을 안드로이드 운영체제의 외부 환경에 위치한 해시 저장부에 저장하고, 애플리케이션을 실행하는 제2 이벤트에 기초하여 제1 해시값을 앱 저장부에 저장된 캐시파일로부터 생성된 제2 해시값과 비교하여 무결성을 확인하는 캐시 변조 방지 모듈을 포함한다.An Android-based cache tampering prevention system according to an embodiment of the present invention is dex2oat that stores the application in the form of an APK file in the app storage located in the Android operating system, zygote that executes the application based on the APK file stored in the app storage, and Based on the first event of storing the APK file in the app storage unit, the first hash value of the application cache file is stored in the hash storage unit located in the external environment of the Android operating system, and based on the second event of executing the application, the first It includes a cache tamper prevention module that checks the integrity by comparing the hash value with the second hash value generated from the cache file stored in the app storage unit.

Description

안드로이드 기반에서 캐시 변조 방지 방법 및 시스템{Cache Tamper-Proof Method and System on Android}Cache Tamper-Proof Method and System on Android}

본 발명은 안드로이드 기반에서 캐시 변조 방지 방법 및 시스템에 관한 것이다.The present invention relates to a method and system for preventing cache tampering in Android.

안드로이드(Android) 운영체제를 실행하기 위한 런타임으로 달빅 가상 머신(Dalvik Virtual Machine)이 이용되었다. The Dalvik Virtual Machine was used as a runtime for running the Android operating system.

근래에는 달빅 가상 머신 대신 ART(Android Run Time)로 지칭되는 런타임이 이용되고 있다. ART 기반에서는 애플리케이션을 설치할 때, 애플리케이션 실행에 필요한 정보들을 캐시파일에 저장한다. Recently, a runtime called ART (Android Run Time) is used instead of the Dalvik virtual machine. In the ART-based system, when an application is installed, information necessary to run the application is stored in a cache file.

그리고 ART 기반에서는 어플리케이션 실행 시 체크섬을 통한 검증방식을 통하여 캐시파일을 실행한다. 따라서, 악의의 공격자가 애플리케이션을 공격할 때에는 캐시파일을 변조하게 된다. ART 런타임을 이용하는 안드로이드 운영체제에서, 캐시파일들에 대한 무결성을 검증할 수 있는 방안이 미비한 상태이다.And in ART-based, the cache file is executed through the verification method through checksum when the application is executed. Therefore, when a malicious attacker attacks an application, the cache file is tampered with. In the Android operating system using the ART runtime, a method for verifying the integrity of cache files is insufficient.

본 발명은 ART 기반의 안드로이드 운영체제에서 캐시 변조 방지 방법 및 시스템을 제공하기 위한 것이다.The present invention is to provide a method and system for preventing cache tampering in an ART-based Android operating system.

특히, 본 발명은 보다 보안 수준이 높은 캐시 변조 방지 방법 및 시스템을 제공하기 위한 것이다.In particular, the present invention is to provide a method and system for preventing cache tampering with a higher security level.

또한, 본 발명은 오버헤드를 줄일 수 있는 캐시 변조 방지 방법 및 시스템을 제공하기 위한 것이다.Another object of the present invention is to provide a method and system for preventing cache tampering that can reduce overhead.

본 발명의 실시 예에 따른 안드로이드 기반에서의 캐시 변조 방지 시스템은 애플리케이션을 APK 파일 형태로 안드로이드 운영체제 내에 위치한 앱 저장부에 저장하는 dex2oat, 앱 저장부에 저장된 APK 파일에 기초하여 애플리케이션을 실행하는 zygote 및 APK 파일을 앱 저장부에 저장하는 제1 이벤트에 기초하여 애플리케이션 캐시파일의 제1 해시값을 안드로이드 운영체제의 외부 환경에 위치한 해시 저장부에 저장하고, 애플리케이션을 실행하는 제2 이벤트에 기초하여 제1 해시값을 앱 저장부에 저장된 캐시파일로부터 생성된 제2 해시값과 비교하여 무결성을 확인하는 캐시 변조 방지 모듈을 포함한다.An Android-based cache tampering prevention system according to an embodiment of the present invention is dex2oat that stores the application in the form of an APK file in the app storage located in the Android operating system, zygote that executes the application based on the APK file stored in the app storage, and Based on the first event of storing the APK file in the app storage unit, the first hash value of the application cache file is stored in the hash storage unit located in the external environment of the Android operating system, and based on the second event of executing the application, the first It includes a cache tamper prevention module that checks the integrity by comparing the hash value with the second hash value generated from the cache file stored in the app storage unit.

상기 캐시 변조 방지 모듈은 상기 애플리케이션을 설치하는 명령어를 검출한 것에 기초하여, 상기 제1 이벤트를 확인할 수 있다.The cache tamper prevention module may identify the first event based on detecting the command to install the application.

상기 해시 저장부는 트러스트존 하드웨어를 사용하여 상기 안드로이드 운영체제와는 물리적으로 격리된 실행 환경에 위치한다.The hash storage unit is located in an execution environment physically isolated from the Android operating system using trustzone hardware.

상기 캐시 변조 방지 모듈은 상기 애플리케이션을 실행시키는 명령어를 검출한 것에 기초하여, 상기 제1 이벤트를 확인할 수 있다.The cache tamper prevention module may identify the first event based on detecting an instruction for executing the application.

상기 캐시 변조 방지 모듈은 동일한 방식을 이용하여 상기 제1 해시값 및 상기 제2 해시값을 생성할 수 있다.The cache tamper prevention module may generate the first hash value and the second hash value using the same method.

상기 캐시 변조 방지 모듈은 상기 제1 해시값 및 상기 제2 해시값이 서로 동일한 것에 기초하여, 상기 애플리케이션을 실행할 수 있다.The cache tamper prevention module may execute the application based on the fact that the first hash value and the second hash value are the same.

상기 캐시 변조 방지 모듈은 상기 애플리케이션을 업데이트하는 제3 이벤트에 기초하여, 상기 제1 및 제2 해시값과 동일한 변환 방식을 이용하여, 업데이트 된 상기 애플리케이션의 캐시파일로부터 제3 해시값을 더 생성할 수 있다.The cache tamper prevention module may further generate a third hash value from the updated cache file of the application by using the same conversion method as the first and second hash values, based on a third event of updating the application. can

본 발명의 실시 예에 다른 안드로이드 운영 체제 내에 위치한 캐시 변조 방지 모듈을 이용하여 애플리케이션의 캐시 변조를 방지하는 방법은 애플리케이션을 APK 파일 형태로 안드로이드 운영체제 내에 위치한 앱 저장부에 저장하는 제1 이벤트에 기초하여 애플리케이션 캐시파일로부터 생성된 제1 해시값을 안드로이드 운영체제의 외부 환경에 위치한 해시 저장부에 저장하는 단계, 및 애플리케이션을 실행하는 제2 이벤트에 기초하여, 앱 저장부에 저장된 캐시파일로부터 제2 해시값을 생성하는 단계 및 제1 해시값과 제2 해시값이 동일한 것에 기초하여, 애플리케이션을 실행하는 단계를 포함한다.According to an embodiment of the present invention, a method of preventing cache tampering of an application by using a cache tampering prevention module located in the Android operating system according to an embodiment of the present invention is based on a first event of storing the application in the form of an APK file in the app storage unit located in the Android operating system. Storing the first hash value generated from the application cache file in a hash storage unit located in the external environment of the Android operating system, and based on a second event of executing the application, a second hash value from the cache file stored in the application storage unit and executing the application based on the first hash value and the second hash value being the same.

상기 제1 해시값을 생성하는 단계 및 상기 제2 해시값을 생성하는 단계는 동일한 변환 방식을 이용할 수 있다.The step of generating the first hash value and the step of generating the second hash value may use the same conversion method.

상기 제1 해시값을 상기 해시 저장부에 저장하는 단계는, 상기 안드로이드 운영체제와는 물리적으로 격리된 실행 환경에 위치한 상기 해시 저장부에 저장할 수 있다.The storing of the first hash value in the hash storage unit may include storing the first hash value in the hash storage unit located in an execution environment physically isolated from the Android operating system.

상기 애플리케이션을 업데이트하는 제3 이벤트에 기초하여, 상기 제1 및 제2 해시값과 동일한 변환 방식을 이용하여, 업데이트 된 상기 애플리케이션의 캐시파일로부터 제3 해시값을 더 생성하는 단계를 더 포함할 수 있다.Based on a third event of updating the application, using the same conversion method as the first and second hash values, the method may further include generating a third hash value from the updated cache file of the application. have.

본 발명은 캐시파일의 무결성을 검증하기 위한 제1 해시값을 보안 수준이 높고 안드로이드 운영체제와 물리적으로 분리된 환경에 저장하기 때문에, 악의의 공격자로부터 보다 안전하게 무결성을 검증할 수 있다. In the present invention, since the first hash value for verifying the integrity of the cache file is stored in an environment that has a high security level and is physically separated from the Android operating system, the integrity can be more safely verified from a malicious attacker.

또한, 본 발명은 해시 저장부에 저장된 해시값만을 비교함으로써, 캐시파일의 무결성을 검증할 수 있기 때문에 오버헤드를 줄일 수 있다.In addition, the present invention can reduce the overhead because the integrity of the cache file can be verified by comparing only the hash values stored in the hash storage unit.

도 1은 본 발명의 실시 예에 따른 캐시 변조 방지 시스템을 나타내는 도면이다.
도 2는 본 발명의 실시 예에 따른 캐시 변조 방지 방법을 나타내는 순서도이다.
도 3은 본 발명의 실시 예에 따라 제1 해시값을 저장하는 방법을 설명하는 순서도이다.
도 4는 본 발명의 실시 예에 따라 해시값을 검증하는 방법을 설명하는 순서도이다.
도 5는 본 발명의 실시 예에 따라 해시값을 업데이트하는 과정을 설명하는 순서도이다.
1 is a diagram illustrating a cache tamper prevention system according to an embodiment of the present invention.
2 is a flowchart illustrating a method for preventing cache tampering according to an embodiment of the present invention.
3 is a flowchart illustrating a method of storing a first hash value according to an embodiment of the present invention.
4 is a flowchart illustrating a method of verifying a hash value according to an embodiment of the present invention.
5 is a flowchart illustrating a process of updating a hash value according to an embodiment of the present invention.

본 명세서의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 명세서는 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 것이며, 단지 본 실시예들은 본 명세서의 개시가 완전하도록 하며, 본 명세서가 속하는 기술 분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 명세서는 청구항의 범주에 의해 정의될 뿐이다. Advantages and features of the present specification and methods of achieving them will become apparent with reference to the embodiments described below in detail in conjunction with the accompanying drawings. However, the present specification is not limited to the embodiments disclosed below, but will be implemented in various different forms, and only these embodiments allow the disclosure of the present specification to be complete, and common knowledge in the technical field to which this specification belongs It is provided to fully inform the possessor of the scope of the invention, and this specification is only defined by the scope of the claims.

본 명세서의 여러 실시예들의 각각 특징들이 부분적으로 또는 전체적으로 서로 결합 또는 조합 가능하고, 기술적으로 다양한 연동 및 구동이 가능하며, 각 실시예들이 서로에 대하여 독립적으로 실시 가능할 수도 있고 연관 관계로 함께 실시할 수도 있다.Each feature of the various embodiments of the present specification may be partially or wholly combined or combined with each other, technically various interlocking and driving are possible, and each of the embodiments may be independently implemented with respect to each other or may be implemented together in a related relationship. may be

도 1은 본 발명의 실시 예에 따른 애플리케이션의 캐시 변조 방지 시스템을 나타내는 도면이다.1 is a diagram illustrating a system for preventing cache tampering of an application according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 실시 예에 따른 애플리케이션의 캐시 변조 방지 시스템은 dex2oat(111), zygote(112), 캐시 변조 방지 모듈(ACIDroid)(120) 및 해시 저장부(210)를 포함한다. 캐시 변조 방지 모듈(120)은 안드로이드(REE; Rich Execution Environment)(100)에 위치하고, 해시 저장부(210)는 안드로이드와 물리적으로 격리된 TEE(Trusted Execution Environment)(200)에 위치한다. 이하, 본 명세서에서 안드로이드(100)는 안드로이드 운영체제(110) 및 앱 저장부(130)를 포함한 구성을 지칭한다.1, the cache tamper prevention system of the application according to an embodiment of the present invention includes a dex2oat (111), zygote (112), a cache tamper prevention module (ACIDroid) 120 and a hash storage unit 210 . The cache tamper prevention module 120 is located in a Rich Execution Environment (REE) 100 , and the hash storage unit 210 is located in a Trusted Execution Environment (TEE) 200 physically isolated from the Android. Hereinafter, in the present specification, the Android 100 refers to a configuration including the Android operating system 110 and the app storage unit 130 .

dex2oat(111)는 애플리케이션을 APK 파일 형태로 앱 저장부(130)에 저장한다. dex2oat(111)는 ART로 지칭되는 런타임에서 애플리케이션이 최초 설치될 때, dex 파일을 다시 컴파일(comfile)하여 OAT 파일을 생성하고 실행한다. dex2oat(111)는 안드로이드 내에 설치되고, 최초 APK 파일이 설치될 때 실행된다. 앱 저장부(130)는 REE 내에 배치된다.dex2oat (111) stores the application in the form of an APK file in the app storage unit (130). dex2oat(111) generates and executes an OAT file by recompiling the dex file when an application is initially installed in the runtime referred to as ART. dex2oat(111) is installed in Android and is executed when the first APK file is installed. App storage unit 130 is disposed in the REE.

zygote(112)는 앱 저장부(130)에 저장된 애플리케이션을 실행하는 프로세서에 해당한다. zygote(112)는 애플리케이션이 실행되기 이전에 실행된 가상 머신의 코드 및 메모리 정보를 공유하여 애플리케이션이 실행되는 시간을 단축하는 프로세서이다.The zygote 112 corresponds to a processor executing an application stored in the app storage unit 130 . The zygote 112 is a processor that reduces the execution time of the application by sharing the code and memory information of the virtual machine executed before the application is executed.

캐시 변조 방지 모듈(120)는 애플리케이션 캐시파일의 해시값을 TEE(200) 내에 위치한 해시 저장부(210)에 저장한다. TEE(200)는 트러스트존(Trustzone) 하드웨어를 사용하여 물리적으로 격리된 실행 환경을 제공한다. TEE(200)에 접근하기 위해서는 TEE(200)에서 별도로 제공하는 API를 사용하여야 하며, 보다 높은 수준의 보안 환경을 제공한다. The cache tamper prevention module 120 stores the hash value of the application cache file in the hash storage unit 210 located in the TEE 200 . The TEE 200 provides a physically isolated execution environment using Trustzone hardware. In order to access the TEE 200, an API separately provided by the TEE 200 must be used, and a higher level of security environment is provided.

또한, 캐시 변조 방지 모듈(120)는 애플리케이션을 실행할 때에 TEE의 해시 저장부(210)에 저장된 해시값과 실행할 애플리케이션의 캐시파일의 해시값을 비교한다. 이를 위해서, 캐시 변조 방지 모듈(120)는 이벤트 확인부(121), 해시 등록부(122), 해시 검증부(123), 및 업데이트부(124)를 포함한다. In addition, the cache tamper prevention module 120 compares the hash value stored in the hash storage unit 210 of the TEE to the hash value of the cache file of the application to be executed when the application is executed. To this end, the cache tamper prevention module 120 includes an event checker 121 , a hash register 122 , a hash verifier 123 , and an updater 124 .

이벤트 확인부(121)는 이벤트를 확인하고, 이벤트에 기초하여 해시 등록부(122), 해시 검증부(123), 업데이트부(124) 중에서 적어도 어느 하나를 동작시킨다. 이벤트는 제1 내지 제3 이벤트를 포함한다. 제1 이벤트는 애플리케이션의 설치를 요청하는 이벤트에 해당한다. 제2 이벤트는 애플리케이션의 실행을 요청하는 이벤트에 해당한다. 제3 이벤트는 애플리케이션의 업데이트를 요청하는 이벤트에 해당한다.The event check unit 121 checks an event, and operates at least one of the hash register unit 122 , the hash verification unit 123 , and the update unit 124 based on the event. The event includes first to third events. The first event corresponds to an event requesting installation of an application. The second event corresponds to an event requesting execution of the application. The third event corresponds to an event requesting an update of the application.

해시 등록부(122)는 이벤트 확인부(121)의 제어에 기초하여, 애플리케이션을 앱 저장부(130)에 최초 저장한다. The hash registration unit 122 initially stores the application in the app storage unit 130 based on the control of the event confirmation unit 121 .

해시 검증부(123)는 애플리케이션을 실행할 경우, 이벤트 확인부(121)의 제어에 기초하여, 해시 저장부(210)에 저장된 해시값과 실행 예정인 애플리케이션의 캐시파일의 해시값을 비교함으로써 캐시파일의 변조 여부를 확인한다. When executing the application, the hash verification unit 123 compares the hash value stored in the hash storage unit 210 with the hash value of the cache file of the application to be executed, based on the control of the event verification unit 121, of the cache file. Check for tampering.

업데이트부(124)는 이벤트 확인부(121)의 제어에 기초하여, 애플리케이션의 업데이트를 수행한다. The update unit 124 updates the application based on the control of the event check unit 121 .

이하, 캐시 변조 방지 모듈(120)을 바탕으로 캐시 변조 방지 방법을 살펴보면 다음과 같다. Hereinafter, a method of preventing cache tampering based on the cache tampering prevention module 120 will be described.

도 2는 본 발명의 실시 예에 따른 캐시 변조 방지 방법을 나타내는 순서도이다.2 is a flowchart illustrating a method for preventing cache tampering according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 실시 예에 따른 캐시 변조 방지 방법은 제1 단계(S210)에서, 해시 등록부(122)는 제1 해시값을 생성하고, 생성된 제1 해시값을 해시 저장부(210)에 저장한다. 해시 등록부(122)는 애플리케이션을 설치하는 제1 이벤트에 기초하여 제1 해시값을 생성할 수 있다.Referring to FIG. 2 , in the method for preventing cache tampering according to an embodiment of the present invention, in a first step ( S210 ), the hash register 122 generates a first hash value, and stores the generated first hash value in the hash storage unit. It is stored in (210). The hash register 122 may generate a first hash value based on a first event of installing an application.

제2 단계(S220)에서, 해시 검증부(123)는 제2 해시값을 생성한다. 해시 검증부(123)는 애플리케이션을 실행하는 제2 이벤트에 기초하여, 제2 해시값을 생성할 수 있다.In the second step (S220), the hash verification unit 123 generates a second hash value. The hash verifier 123 may generate a second hash value based on a second event of executing the application.

제3 단계(S230)에서, 해시 검증부(123)는 제1 해시값과 제2 해시값을 비교한다. In the third step ( S230 ), the hash verification unit 123 compares the first hash value and the second hash value.

제4 단계(S240)에서, 해시 검증부(123)는 제1 해시값과 제2 해시값이 동일한 것에 기초하여, 애플리케이션을 실행한다. In the fourth step ( S240 ), the hash verification unit 123 executes the application based on the fact that the first hash value and the second hash value are the same.

제5 단계(S250)에서, 해시 검증부(123)는 제1 해시값과 제2 해시값이 동일하지 않은 것에 기초하여, 애플리케이션을 종료할 수 있다.In the fifth step ( S250 ), the hash verification unit 123 may terminate the application based on the fact that the first hash value and the second hash value are not the same.

이하, 각 절차에 대해서 보다 구체적으로 설명하면 다음과 같다.Hereinafter, each procedure will be described in more detail as follows.

도 3은 본 발명의 실시 예에 따라 제1 해시값을 저장하는 방법을 설명하는 순서도이다.3 is a flowchart illustrating a method of storing a first hash value according to an embodiment of the present invention.

도 3을 참조하면, 애플리케이션 설치를 위한 제1 단계(S310)에서, 이벤트 확인부(121)는 제1 이벤트를 확인한다. 이벤트 확인부(121)는 안드로이드 프로그래밍 언어에서 애플리케이션 설치를 지시하는 명령어를 검출한 것에 기초하여 제1 이벤트를 확인할 수 있다. 이벤트 확인부(121)는 제1 이벤트에 기초하여, 해시 등록부(122)를 동작시킨다.Referring to FIG. 3 , in a first step ( S310 ) for installing an application, the event check unit 121 checks a first event. The event check unit 121 may check the first event based on detecting a command instructing installation of an application in the Android programming language. The event check unit 121 operates the hash registration unit 122 based on the first event.

제2 단계(S320)에서, 이벤트 확인부(121)의 제어에 의해서, 해시 등록부(122)는 설치되는 애플리케이션 캐시파일의 제1 해시값을 생성한다. 해시 등록부(122)는 미리 설정된 변환 방식을 바탕으로 제1 해시값을 생성할 수 있다 In the second step (S320), under the control of the event check unit 121, the hash registration unit 122 generates a first hash value of the application cache file to be installed. The hash register 122 may generate a first hash value based on a preset conversion method.

제3 단계(S330)에서, 해시 등록부(122)는 제1 해시값을 해시 저장부(210)에 저장한다. In the third step S330 , the hash register 122 stores the first hash value in the hash storage 210 .

본 발명의 실시 예는, 제1 해시값을 저장하기 위해서 제1 해시값의 사이즈(m)만큼의 저장용량을 요구한다. 따라서, 프로파일 방식으로 해시값을 생성하고 저장할 경우, 해시값의 저장 용량은 "모바일 개수(p)×프로파일 개수(n)×해시 사이즈(m)"만큼 필요한 것에 대비하여 저장용량을 줄일 수 있다. An embodiment of the present invention requires a storage capacity equal to the size (m) of the first hash value in order to store the first hash value. Therefore, when a hash value is generated and stored in a profile method, the storage capacity of the hash value can be reduced in comparison with what is needed by “the number of mobiles (p) × the number of profiles (n) × the hash size (m)”.

도 4는 본 발명의 실시 예에 따라 해시값을 검증하는 방법을 설명하는 순서도이다.4 is a flowchart illustrating a method of verifying a hash value according to an embodiment of the present invention.

도 4를 참조하면, 애플리케이션의 실행을 위한 제1 단계(S410)에서, 이벤트 확인부는 제2 이벤트를 확인한다. 이벤트 확인부(121)는 안드로이드 프로그래밍 언어에서 애플리케이션 실행을 지시하는 명령어를 검출한 것에 기초하여 제2 이벤트를 확인할 수 있다. 이벤트 확인부(121)는 제2 이벤트에 기초하여, 해시 검증부(123)를 동작시킨다.Referring to FIG. 4 , in the first step ( S410 ) for executing the application, the event checking unit checks the second event. The event check unit 121 may check the second event based on detecting a command instructing execution of an application in the Android programming language. The event verification unit 121 operates the hash verification unit 123 based on the second event.

제2 단계(S420)에서, 해시 검증부(123)는 실행 예정인 애플리케이션의 캐시파일에 접근한다.In the second step (S420), the hash verification unit 123 accesses the cache file of the application to be executed.

제3 단계(S430)에서, 해시 검증부(123)는 접근한 캐시파일로부터 제2 해시값을 생성한다. 해시 검증부(123)는 제1 해시값을 생성하는 과정에서 이용된 것과 동일한 변환 방식을 이용하여 제2 해시값을 생성한다.In the third step (S430), the hash verification unit 123 generates a second hash value from the accessed cache file. The hash verification unit 123 generates a second hash value by using the same conversion method as used in the process of generating the first hash value.

제4 단계(S440) 및 제5 단계(S450)에서, 해시 검증부(123)는 제1 해시값과 제2 해시값을 비교한다. 해시 검증부(123)는 제1 해시값과 제2 해시값을 비교하는 방식은 빠른 모드 또는 전체 모드로 구분될 수 있다. 해시 검증부(123)는 애플리케이션의 빠른 실행속도를 위해서 미리 설정한 주요 기능들에 대응하는 해시값들만을 비교할 수 있다. 또는 해시 검증부(123)는 보다 강화된 검증을 위해서 모든 해시값들을 비교할 수 있다. 본 발명의 실시 예에서, 해시 저장부(210)에 저장되는 제1 해시값은 프로파일 방식에 대비하여 적은 용량이기 때문에, 해시 검증부(123)가 해시값을 비교하는 절차도 간소화될 수 있다.In the fourth step ( S440 ) and the fifth step ( S450 ), the hash verification unit 123 compares the first hash value with the second hash value. The hash verification unit 123 compares the first hash value with the second hash value may be divided into a fast mode or a full mode. The hash verification unit 123 may compare only hash values corresponding to main functions set in advance for a fast execution speed of the application. Alternatively, the hash verification unit 123 may compare all hash values for more enhanced verification. In an embodiment of the present invention, since the first hash value stored in the hash storage unit 210 has a small capacity compared to the profile method, the procedure for the hash verification unit 123 to compare the hash values can also be simplified.

그리고, 해시 검증부(123)는 제1 해시값과 제2 해시값이 동일한 것에 기초하여, 제2 이벤트를 발생시킨 애플리케이션을 실행시킨다.Then, the hash verification unit 123 executes the application that generated the second event based on the fact that the first hash value and the second hash value are the same.

제6 단계(S460)에서, 해시 검증부(123)는 제1 해시값과 제2 해시값이 동일하지 않은 것에 기초하여, 애플리케이션을 종료할 수 있다.In a sixth step (S460), the hash verifier 123 may terminate the application based on the fact that the first hash value and the second hash value are not the same.

도 5는 본 발명의 실시 예에 따라 해시값을 업데이트하는 과정을 설명하는 순서도이다.5 is a flowchart illustrating a process of updating a hash value according to an embodiment of the present invention.

도 5를 참조하면, 애플리케이션의 업데이트를 위한 제1 단계(S510)에서, 이벤트 확인부(121)는 제3 이벤트를 확인한다. 이벤트 확인부(121)는 안드로이드 프로그래밍 언어에서 애플리케이션 업데이트를 지시하는 명령어를 검출한 것에 기초하여 제3 이벤트를 확인할 수 있다.Referring to FIG. 5 , in a first step ( S510 ) for updating an application, the event check unit 121 checks a third event. The event check unit 121 may identify a third event based on detecting a command instructing an application update in the Android programming language.

제2 단계(S520)에서, 업데이트부(124)는 업데이트 된 애플리케이션의 캐시파일에 접근한다.In the second step (S520), the update unit 124 accesses the cache file of the updated application.

제3 단계(S530)에서, 업데이트부(124)는 업데이트 된 애플리케이션 캐시파일로부터 제3 해시값을 생성한다. 업데이트부(124)는 제1 및 제2 해시값을 생성할 때 이용된 변환 방식을 바탕으로 제3 해시값을 생성할 수 있다. In the third step (S530), the update unit 124 generates a third hash value from the updated application cache file. The updater 124 may generate a third hash value based on a conversion method used when generating the first and second hash values.

제4 단계(S540)에서, 업데이트부(124)는 제3 해시값을 해시 저장부(210)에 저장함으로써, 해시값을 업데이트한다.In a fourth step ( S540 ), the update unit 124 updates the hash value by storing the third hash value in the hash storage unit 210 .

전술한 본 발명은, 프로그램이 기록된 매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 매체는, 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 매체의 예로는, HDD(Hard Disk Drive), SSD(Solid State Disk), SDD(Silicon Disk Drive), ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장 장치 등을 포함한다. 따라서, 상기의 상세한 설명은 모든 면에서 제한적으로 해석되어서는 아니되고 예시적인 것으로 고려되어야 한다. 본 발명의 범위는 첨부된 청구항의 합리적 해석에 의해 결정되어야 하고, 본 발명의 등가적 범위 내에서의 모든 변경은 본 발명의 범위에 포함된다.The present invention described above can be implemented as computer-readable code on a medium in which a program is recorded. The computer-readable medium includes all kinds of recording devices in which data readable by a computer system is stored. Examples of computer-readable media include Hard Disk Drive (HDD), Solid State Disk (SSD), Silicon Disk Drive (SDD), ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc. includes Accordingly, the above detailed description should not be construed as restrictive in all respects but as exemplary. The scope of the present invention should be determined by a reasonable interpretation of the appended claims, and all modifications within the equivalent scope of the present invention are included in the scope of the present invention.

이상 설명한 내용을 통해 당업자라면 본 명세서의 기술사상을 일탈하지 아니하는 범위에서 다양한 변경 및 수정이 가능함을 알 수 있을 것이다. 따라서, 본 명세서의 기술적 범위는 명세서의 상세한 설명에 기재된 내용으로 한정되는 것이 아니라 특허 청구의 범위에 의해 정하여져야만 할 것이다.Those skilled in the art through the above description will be able to see that various changes and modifications are possible without departing from the technical spirit of the present specification. Accordingly, the technical scope of the present specification should not be limited to the contents described in the detailed description of the specification, but should be defined by the claims.

Claims (12)

안드로이드 운영체제를 포함하는 실행 환경인 안드로이드(Rich Execution Environment, REE) 및 상기 안드로이드와 격리된 실행 환경인 TEE(Trusted Execution Environment)로 구성되고,
애플리케이션을 APK 파일 형태로 상기 안드로이드 내에 위치한 앱 저장부에 저장하는 dex2oat;
상기 앱 저장부에 저장된 상기 APK 파일에 기초하여, 상기 애플리케이션을 실행하는 zygote; 및
상기 안드로이드에 위치하여 애플리케이션의 캐시파일의 무결성을 검증하는 캐시 변조 방지 모듈;을 포함하고,
상기 캐시 변조 방지 모듈은,
상기 APK 파일을 상기 안드로이드 내에 위치한 상기 앱 저장부에 저장하는 제1 이벤트에 기초하여 상기 애플리케이션의 캐시파일로부터 제1 해시값을 생성하고 생성된 상기 제1 해시값을 상기 안드로이드의 외부 환경인 TEE에 위치한 해시 저장부에 저장하고, 상기 애플리케이션을 실행하는 제2 이벤트에 기초하여 상기 앱 저장부에 저장된 캐시파일로부터 실행 예정인 상기 애플리케이션에 대한 제2 해시값을 생성하고, 상기 제1 해시값과 상기 제2 해시값을 비교하여 무결성을 확인하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 시스템.
It consists of Android (Rich Execution Environment, REE), an execution environment including the Android operating system, and TEE (Trusted Execution Environment), an execution environment isolated from the Android,
dex2oat to store the application in the form of an APK file in the app storage unit located in the Android;
zygote for executing the application based on the APK file stored in the app storage unit; and
Cache tamper prevention module located in the Android to verify the integrity of the cache file of the application; includes;
The cache tamper prevention module,
Based on a first event of storing the APK file in the app storage unit located in the Android, a first hash value is generated from the cache file of the application, and the generated first hash value is stored in the TEE, an external environment of the Android. Stored in a hash storage located in a location, and based on a second event of executing the application, generating a second hash value for the application scheduled to be executed from the cache file stored in the app storage unit, the first hash value and the second 2 Cache tamper prevention system based on Android, characterized in that the integrity is verified by comparing the hash values.
제 1 항에 있어서,
상기 캐시 변조 방지 모듈은
상기 애플리케이션을 설치하는 명령어를 검출한 것에 기초하여, 상기 제1 이벤트를 확인하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 시스템.
The method of claim 1,
The cache tamper prevention module
Based on the detection of the command to install the application, Android-based cache tamper prevention system, characterized in that to check the first event.
제 1 항에 있어서,
상기 해시 저장부는
트러스트존 하드웨어를 사용하여 상기 안드로이드와는 물리적으로 격리된 실행 환경에 위치하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 시스템
The method of claim 1,
The hash storage unit
An Android-based cache tamper prevention system, characterized in that it is located in an execution environment physically isolated from the Android using trustzone hardware
제 1 항에 있어서,
상기 캐시 변조 방지 모듈은
상기 애플리케이션을 실행시키는 명령어를 검출한 것에 기초하여, 상기 제2 이벤트를 확인하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 시스템.
The method of claim 1,
The cache tamper prevention module
Based on the detection of the command to execute the application, Android-based cache tamper prevention system, characterized in that the confirmation of the second event.
제 1 항에 있어서,
상기 캐시 변조 방지 모듈은,
동일한 방식을 이용하여 상기 제1 해시값 및 상기 제2 해시값을 생성하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 시스템.
The method of claim 1,
The cache tamper prevention module,
An Android-based cache tamper prevention system, characterized in that generating the first hash value and the second hash value using the same method.
제 1 항에 있어서,
상기 캐시 변조 방지 모듈은
애플리케이션의 빠른 실행속도를 위해서 미리 설정한 주요 기능들에 대응하는 해시값들만을 비교하는 빠른 모드 또는 모든 해시값들을 비교하는 전체 모드 중 어느 하나에 따라 상기 제1 해시값 및 상기 제2 해시값을 비교하고,
상기 제1 해시값 및 상기 제2 해시값이 서로 동일한 것에 기초하여, 상기 애플리케이션을 실행하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 시스템.
The method of claim 1,
The cache tamper prevention module
For a fast execution speed of the application, the first hash value and the second hash value according to either a fast mode comparing only hash values corresponding to preset main functions or a full mode comparing all hash values compare,
Based on the first hash value and the second hash value being identical to each other, the Android-based cache tamper prevention system, characterized in that the execution of the application.
제 1 항에 있어서,
상기 캐시 변조 방지 모듈은
상기 애플리케이션을 업데이트하는 제3 이벤트에 기초하여, 상기 제1 및 제2 해시값과 동일한 변환 방식을 이용하여, 업데이트 된 상기 애플리케이션의 캐시파일로부터 제3 해시값을 더 생성하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 시스템.
The method of claim 1,
The cache tamper prevention module
Based on a third event of updating the application, using the same conversion method as the first and second hash values, further generating a third hash value from the updated cache file of the application In the cache tamper protection system.
안드로이드 운영체제를 포함하는 실행 환경인 안드로이드(Rich Execution Environment, REE) 및 상기 안드로이드와 격리된 실행 환경인 TEE(Trusted Execution Environment)로 구성되고, 안드로이드에 위치하여 애플리케이션의 캐시파일의 무결성을 검증하는 캐시 변조 방지 모듈을 이용한 안드로이드 기반에서의 캐시 변조 방지 방법에 있어서,
상기 애플리케이션을 APK 파일 형태로 상기 안드로이드 내에 위치한 앱 저장부에 저장하는 제1 이벤트에 기초하여, 상기 애플리케이션의 캐시파일로부터 생성된 제1 해시값을 상기 안드로이드의 외부 환경인 TEE에 위치한 해시 저장부에 저장하는 단계;
상기 애플리케이션을 실행하는 제2 이벤트에 기초하여, 상기 앱 저장부에 저장된 캐시파일로부터 실행 예정인 상기 애플리케이션에 대한 제2 해시값을 생성하는 단계; 및
상기 제1 해시값과 상기 제2 해시값이 동일한 것에 기초하여, 상기 애플리케이션을 실행하는 단계;를 포함하는 안드로이드 기반에서의 캐시 변조 방지 방법.
It is composed of Android (Rich Execution Environment, REE), which is an execution environment including the Android operating system, and TEE (Trusted Execution Environment), which is an execution environment isolated from the Android, and is located in Android to verify the integrity of the cache file of the application. In the method of preventing cache tampering in Android-based using the prevention module,
Based on a first event of storing the application in the form of an APK file in the app storage located in the Android, the first hash value generated from the cache file of the application is stored in the hash storage located in the TEE, which is the external environment of the Android. saving;
generating a second hash value for the application to be executed from a cache file stored in the app storage unit based on a second event of executing the application; and
Based on that the first hash value and the second hash value are the same, executing the application; Android-based cache tamper prevention method comprising a.
제 8 항에 있어서,
상기 제1 해시값을 생성하는 단계 및 상기 제2 해시값을 생성하는 단계는 동일한 변환 방식을 이용하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 방법.
9. The method of claim 8,
The method for preventing cache tampering in Android, characterized in that the generating of the first hash value and the generating of the second hash value use the same conversion method.
제 8 항에 있어서,
상기 제1 해시값을 상기 해시 저장부에 저장하는 단계는,
상기 안드로이드와는 물리적으로 격리된 실행 환경에 위치한 상기 해시 저장부에 저장하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 방법.
9. The method of claim 8,
Storing the first hash value in the hash storage unit,
A method for preventing cache tampering in Android, characterized in that the storage is stored in the hash storage unit located in an execution environment physically isolated from the Android.
제 8 항에 있어서,
상기 애플리케이션을 업데이트하는 제3 이벤트에 기초하여, 상기 제1 및 제2 해시값과 동일한 변환 방식을 이용하여, 업데이트 된 상기 애플리케이션의 캐시파일로부터 제3 해시값을 더 생성하는 단계를 더 포함하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 방법.
9. The method of claim 8,
Based on the third event of updating the application, using the same conversion method as the first and second hash values, further comprising the step of generating a third hash value from the updated cache file of the application A method of preventing cache tampering in Android based on the features.
제 8 항에 있어서,
상기 애플리케이션을 실행하는 단계는,
애플리케이션의 빠른 실행속도를 위해서 미리 설정한 주요 기능들에 대응하는 해시값들만을 비교하는 빠른 모드 또는 모든 해시값들을 비교하는 전체 모드 중 어느 하나에 따라 상기 제1 해시값 및 상기 제2 해시값을 비교하는 것을 특징으로 하는 안드로이드 기반에서의 캐시 변조 방지 방법.
9. The method of claim 8,
The step of running the application is,
For a fast execution speed of the application, the first hash value and the second hash value according to either a fast mode comparing only hash values corresponding to preset main functions or a full mode comparing all hash values A method of preventing cache tampering on an Android-based basis, characterized in that comparison.
KR1020190150498A 2019-11-21 2019-11-21 Cache Tamper-Proof Method and System on Android KR102332588B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190150498A KR102332588B1 (en) 2019-11-21 2019-11-21 Cache Tamper-Proof Method and System on Android

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190150498A KR102332588B1 (en) 2019-11-21 2019-11-21 Cache Tamper-Proof Method and System on Android

Publications (2)

Publication Number Publication Date
KR20210062360A KR20210062360A (en) 2021-05-31
KR102332588B1 true KR102332588B1 (en) 2021-11-30

Family

ID=76150142

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190150498A KR102332588B1 (en) 2019-11-21 2019-11-21 Cache Tamper-Proof Method and System on Android

Country Status (1)

Country Link
KR (1) KR102332588B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102657620B1 (en) * 2022-11-23 2024-04-16 주식회사 인피니그루 Independently driven, always-on detection in-app control method and system to prevent financial fraud

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3026557A1 (en) * 2014-11-28 2016-06-01 Thomson Licensing Method and device for providing verifying application integrity
KR102582266B1 (en) * 2016-05-30 2023-09-27 삼성전자주식회사 Electronic device for authenticating application and operating method thereof

Also Published As

Publication number Publication date
KR20210062360A (en) 2021-05-31

Similar Documents

Publication Publication Date Title
JP5487479B2 (en) Method and apparatus for enforcing security policy for anti-virus (AV) scanner independent of operating system (OS)
KR101662616B1 (en) Methods and apparatus to protect memory regions during low-power states
US7308576B2 (en) Authenticated code module
US9092598B2 (en) Version-based software product activation
US10032029B2 (en) Verifying integrity of backup file in a multiple operating system environment
US9311475B2 (en) Trusted execution of binaries and modules
EP3779745A1 (en) Code pointer authentication for hardware flow control
TWI745333B (en) An apparatus and method for controlling use of bounded pointers
US20030126453A1 (en) Processor supporting execution of an authenticated code instruction
US11038860B2 (en) Virtualized host ID key sharing
US20090328022A1 (en) Systems and methods for maintaining crtm code
US20090293058A1 (en) Virtual system and method of restricting use of contents in the virtual system
CN112639789A (en) Integrity tree for memory integrity checking
JP2021051745A (en) Computer device and memory management method
US10474832B2 (en) Method for controlling file input-output in virtualization system
KR102332588B1 (en) Cache Tamper-Proof Method and System on Android
KR102579861B1 (en) In-vehicle software update system and method for controlling the same
US11397815B2 (en) Secure data protection
CN108491249B (en) Kernel module isolation method and system based on module weight
KR102058493B1 (en) Security device and method for providing security service through guest operating system integrity and file i / o control
CN115422554A (en) Request processing method, compiling method and trusted computing system
JP4955752B2 (en) Extending secure management of file attribute information to virtual hard disks
US10691586B2 (en) Apparatus and method for software self-test
KR101392821B1 (en) File access control device and control method for virtual enviroment
KR102558617B1 (en) Memory management

Legal Events

Date Code Title Description
AMND Amendment
E601 Decision to refuse application
AMND Amendment
X701 Decision to grant (after re-examination)