WO2022260254A1 - 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법, 이를 수행하기 위한 기록 매체 및 장치 - Google Patents

전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법, 이를 수행하기 위한 기록 매체 및 장치 Download PDF

Info

Publication number
WO2022260254A1
WO2022260254A1 PCT/KR2022/004665 KR2022004665W WO2022260254A1 WO 2022260254 A1 WO2022260254 A1 WO 2022260254A1 KR 2022004665 W KR2022004665 W KR 2022004665W WO 2022260254 A1 WO2022260254 A1 WO 2022260254A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
transfer learning
server
android
user
Prior art date
Application number
PCT/KR2022/004665
Other languages
English (en)
French (fr)
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 US17/888,983 priority Critical patent/US20230177156A1/en
Publication of WO2022260254A1 publication Critical patent/WO2022260254A1/ko

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/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • G06F21/563Static detection by source code analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties 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/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • 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/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • 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/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44589Program code verification, e.g. Java bytecode verification, proof-carrying code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/03Indexing scheme relating to G06F21/50, monitoring users, programs or devices to maintain the integrity of platforms
    • G06F2221/033Test or assess software

Definitions

  • the present invention relates to an on-device Android malware detection method based on an adaptive model through transfer learning, a recording medium and an apparatus for performing the same, and more particularly, in a base model to generate a model optimized for a user environment. It relates to serverless and on-device technologies that perform transfer learning and transfer the transferred model to a user device to execute malicious code.
  • users have different criteria for frequently accessed application categories or malicious codes depending on their types. For example, if a specific user's device usage type is biased toward games, there is a high probability of being exposed to game-type malware.
  • adware-type malicious code it is necessary to detect malicious code optimized for the user environment because the determination of malicious code depends on the user's criteria.
  • Android malware analysis is divided into dynamic analysis based on Android Run Time (ART) and static analysis based on Android Package (APK) file information.
  • Patent Document 1 KR 10-1337215 B1
  • Patent Document 2 KR 10-2180098 B1
  • Patent Document 3 KR 10-2168496 B1
  • an object of the present invention is to provide an on-device Android malware detection method based on an adaptive model through transfer learning.
  • Another object of the present invention is to provide a recording medium on which a computer program for performing the on-device Android malicious code detection method based on the adaptive model through transfer learning is recorded.
  • Another object of the present invention is to provide an apparatus for performing the on-device Android malware detection method based on the adaptive model through transfer learning.
  • a method for detecting on-device Android malware based on an adaptive model through transfer learning includes determining whether an application list installed in a device is malicious or not preferred; Decompiling the APK of the application installed in the device in the device; Generating a head model in the server and transmitting the determined list and the decompiled APK file to the server so that the head model can be used for transfer learning with the base model; Analyzing malicious code in the device using the transfer learning model received from the server for the application newly installed in the device; and providing the malicious code analysis result to the user through the device.
  • the application in the step of determining whether the application is malicious or unpreferred from the list of applications installed in the device, the application may be determined as a malicious or unpreferred application when selected by the user.
  • the base model may be based on a CNN using a 2D matrix as input data.
  • the base model may be generated based on authority of a manifest file or based on API signature information defined in an APK.
  • the step of decompiling the APK of the application installed in the device in the device can be run in the Android environment by removing the branching process for each operating system of APKTool.
  • the on-device Android malware detection method based on the adaptive model through transfer learning may further include generating a new transfer learning model by communicating with a server according to a user's need. .
  • a computer program for performing the on-device Android malware detection method based on the adaptive model through the transfer learning is recorded in a computer-readable storage medium according to an embodiment for realizing another object of the present invention described above. have.
  • An apparatus for detecting on-device Android malware based on an adaptive model through transfer learning is for a user to determine whether an application list installed on a device is malicious or not preferred. environmental reflection part; a decompilation unit for decompiling the APK of the application installed in the device in the device; A communication unit for generating a head model in the server and transmitting the determined list and the decompiled APK file to the server so that the head model can be used for transfer learning with the base model; An analysis unit that analyzes malicious code in the device using the transfer learning model received from the server for the application newly installed in the device; and a result providing unit that provides the result of the malicious code analysis to the user through the device.
  • the user environment reflection unit when the user environment reflection unit is selected by the user, it may be determined as a malicious or non-preferred application.
  • the base model may be based on a CNN using a 2D matrix as input data.
  • the base model may be generated based on authority of a manifest file or based on API signature information defined in an APK.
  • the decompilation unit can operate in an Android environment by removing the branching process for each operating system of APKTool.
  • the communication unit may communicate with a server to generate a new transfer learning model according to a user's needs.
  • the on-device Android malware detection method based on an adaptive model through transfer learning, a model optimized for user standards is provided through one-time communication with the server, and then all analyzes are performed at the client end. Therefore, there is no concern about leakage of personal information, and since the availability and real-time performance that enables analysis outside the scope of the network are guaranteed, problems of availability and real-time performance of existing analysis systems can be solved.
  • FIG. 1 is a conceptual diagram of an analysis system that performs model retraining through transfer learning according to the present invention.
  • FIG. 2 is a block diagram of an on-device Android malware detection device based on an adaptive model through transfer learning according to an embodiment of the present invention.
  • 3 is a diagram for explaining the internal structure of an APK file.
  • FIG. 4 is a diagram showing an example of branch processing for each OS in AaptManager.
  • 5 is an exemplary view showing conversion of a pb file into a tflite model using Toco.
  • FIG. 6 is a diagram showing the configuration of an entire APK data set for evaluation of the present invention.
  • FIG. 7 is a diagram showing the result of performing transfer learning when the present invention is used.
  • FIG. 8 is a flowchart of an on-device Android malware detection method based on an adaptive model through transfer learning according to an embodiment of the present invention.
  • 1 is a conceptual diagram of an analysis system that performs model retraining through transfer learning according to the present invention.
  • 2 is a block diagram of an on-device Android malware detection device based on an adaptive model through transfer learning according to an embodiment of the present invention.
  • the present invention provides an analysis system 1 that analyzes malicious codes in a user device 4 and performs model retraining through transfer learning.
  • the analysis system 1 provides a model optimized for user criteria through a single communication with the server 2 or the cloud, and then all analyzes are performed at the client end.
  • the user When the user installs the analysis system 1 for the first time, the user can determine whether the application is malicious or not preferred in the list of applications installed in the device 4 .
  • the determined list is transmitted to the server 2 to generate a head model, which is used for transfer learning with the base model.
  • the preprocessing part in FIG. 1 is completed by generating the corresponding transfer learning model.
  • the analysis system 1 transfers the transfer learning model to the device 4, and the analysis starts in the device 4. This process corresponds to the main processing part in FIG. 1, and then analyzes the newly installed application.
  • This analysis process is an on-device environment, analysis within the device 4 without going through the server 2.
  • the analysis result is delivered to the user, and a new transfer learning model can be created by communicating with the server 2 according to the user's needs.
  • the on-device Android malware detection device (10, hereinafter referred to as device 10) based on the adaptive model through transfer learning according to the present invention provides a model optimized for user criteria through one-time communication with the server, and then the client stage, That is, the analysis is performed within the device.
  • the apparatus 10 includes a user environment reflection unit 110, a decompilation unit 130, a communication unit 150, an analysis unit 170, and a result providing unit 190. .
  • the apparatus 10 may be the device 4 of FIG. 1 or may be part of the device 4 .
  • software for performing on-device Android malware detection based on an adaptive model through transfer learning may be installed and executed, and the user environment reflection unit 110, the device
  • the composition of the compilation unit 130, the communication unit 150, the analysis unit 170, and the result providing unit 190 is an on-device Android based on the adaptive model through the transfer learning executed in the device 10 It can be controlled by software to perform malware detection.
  • the device 10 may be a separate terminal or a part of a module of the terminal.
  • the configuration of the user environment reflection unit 110, the decompilation unit 130, the communication unit 150, the analysis unit 170, and the result providing unit 190 is formed as an integrated module, or one or more It can be done as a module.
  • each component may be composed of a separate module.
  • the device 10 is a user's mobile terminal and may be a smart phone or a tablet.
  • the device 10 is also referred to as a device, an apparatus, a terminal, a user equipment (UE), a mobile station (MS), a wireless device, and a handheld device. can be called
  • the user environment reflection unit 110 determines whether the applications are malicious or not preferred in the list of applications installed in the device. In one embodiment, when the user installs the analysis system 1 for the first time, it is possible to determine whether the application is malicious or not preferred in the list of applications installed in the device.
  • the determined list is transmitted to the server 2 to generate a head model, which is used for transfer learning with the base model.
  • a head model which is used for transfer learning with the base model.
  • the decompiler 130 decompiles the APK of the application installed in the device in the device.
  • Android applications are composed of executable files in the form of APK files, and are divided into Java-based classes.dex file, AndroidMainifest.xml file, res/ directory in charge of resources, and resources.arsc file in charge of ID mapping of resources. Components inside the APK file are shown in FIG. 3 .
  • the classes.dex file contains most of the source codes related to Android application functions, which can be extracted as a file with the smali extension during decompilation.
  • the AndroidMainifest.xml file does not include the Android source code, but has information on attributes constituting the Android APK. This includes the package name of the APK file, permission information, and the names of declared components. Unlike the classes.dex file that is compiled, the AndroidMainifest.xml file has a feature that can be viewed immediately after decompressing the APK file.
  • the communication unit 150 communicates with the server 2, generates a head model in the server 2, and transmits the determined list and the decompiled APK file to the server 2 so that the head model can be used for transfer learning with the base model. do. In addition, the transfer learning model generated by the server 2 is received.
  • Transfer learning is a machine learning learning technique that reuses a model trained in a data-rich area to build a model in an area with insufficient training data. It is a technique that reuses some layers of a model with excellent performance.
  • Each of these methods has the advantage of inheriting the performance of the existing model and solving the model training problem caused by insufficient data.
  • the analysis unit 170 analyzes malicious code in the device using the transfer learning model received from the server for the application newly installed in the device.
  • the result providing unit 190 provides the malicious code analysis result to the user through the device.
  • APKTool an APK decompiler
  • APKTool is basically set to be executable only in Linux, Mac, and Windows environments, but as shown in FIG.
  • Decompilation inside such an Android device causes a problem of lack of resources or some dependencies for decompilation.
  • decompilation errors occur only in uncompiled resources or layout-related resources within the res/ directory.
  • Tensorflow Lite supports transfer learning based on a pre-trained base model. These Tensorflow Lite models receive models with the .tflite extension as input. To this end, the h5 model learned through existing karas must be converted into a tflite-type model.
  • Toco an open source model conversion tool
  • Toco can convert a pb file, which is a binary representation of the model structure, into a tflite-type model
  • the h5 model must first be converted into a pb file.
  • the converted pb file is converted with tflite once again, and for this, the feature set information of the input data must be specified. This is the same as in FIG. 5, and conversion to a model usable in Tensorflow Lite can be performed by entering TELITE in the output_format option.
  • the base model is based on CNN, so 2d-matrix can be used as input data.
  • 2d-matrix can be used as input data.
  • APKs used for learning and testing use data converted into a 12*12 matrix, and include a process of converting data by flipping 0 and 1 to improve accuracy.
  • the base model may be generated based on the authority of the manifest file or may be generated based on API signature information defined in the APK.
  • the evaluation was based on simulation, and was conducted in the direction of performing transfer learning on applications designated by the user and then evaluating all applications in the terminal.
  • the data set for evaluation is 600 malicious APKs and 300 normal APKs collected from a total of 4 categories. In each category, a base model was created using only two categories, and then fine tuning was performed by using the two categories in turn for transfer learning.
  • the detection accuracy for malicious code rises to 89.2% level, and when transfer learning is performed for all categories, it rises to about 92.5% level.
  • the accuracy of the overall model shows an average improvement of 2.45%.
  • the present invention performs model retraining through transfer learning and malware detection in an Android device using Tensorflow Lite.
  • the Android APK manifest file is parsed, permission definition contents are extracted, and conversion into a two-dimensional matrix is performed in the Android device.
  • a 2.45% level of improvement was obtained in terms of accuracy compared to before transfer learning.
  • FIG. 8 is a flowchart of an on-device Android malware detection method based on an adaptive model through transfer learning according to an embodiment of the present invention.
  • the on-device Android malicious code detection method based on the adaptive model through transfer learning according to the present embodiment may be performed in substantially the same configuration as the system 1 of FIG. 1 and the device 10 of FIG. 2 . Accordingly, components identical to those of the system 1 of FIG. 1 and the apparatus 10 of FIG. 2 are assigned the same reference numerals, and repeated descriptions are omitted.
  • the on-device Android malware detection method based on the adaptive model through transfer learning is executed by software (application) for detecting on-device Android malware based on the adaptive model through transfer learning.
  • the present invention provides a model optimized for user standards through only one-time communication with the server, and then analyzes it in the client end, that is, in the device.
  • step S10 it is determined whether the application list is malicious or not preferred.
  • the server when selected by the user, it may be determined as a malicious or non-preferred application.
  • the determined list is transmitted to the server to create a head model, which is used for transfer learning with the base model.
  • the APK of the application installed in the device is decompiled in the device (step S20).
  • Android applications are composed of executable files in the form of APK files, and are divided into Java-based classes.dex file, AndroidMainifest.xml file, res/ directory in charge of resources, and resources.arsc file in charge of ID mapping of resources.
  • the classes.dex file contains most of the source codes related to Android application functions, which can be extracted as a file with the smali extension during decompilation.
  • the AndroidMainifest.xml file does not include the Android source code, but has information on attributes constituting the Android APK. This includes the package name of the APK file, permission information, and the names of declared components. Unlike the classes.dex file that is compiled, the AndroidMainifest.xml file has a feature that can be viewed immediately after decompressing the APK file.
  • the head model is generated in the server and the determined list and the decompiled APK file are transmitted to the server so that they can be used for transfer learning with the base model (step S30). Then, the transfer learning model generated by the server is received.
  • the base model may be based on a CNN using a 2D matrix as input data.
  • the base model may be generated based on the authority of the manifest file or based on API signature information defined in the APK.
  • Transfer learning is a machine learning learning technique that reuses a model trained in a data-rich area to build a model in an area with insufficient training data. It is a technique that reuses some layers of a model with excellent performance.
  • Each of these methods has the advantage of inheriting the performance of the existing model and solving the model training problem caused by insufficient data.
  • Malicious code analysis is performed in the device using the transfer learning model received from the server for the application newly installed in the device (step S40).
  • the malicious code analysis result is provided to the user through the device (step S50).
  • APKTool an APK decompiler
  • decompilation within a device can be run in an Android environment by removing APKTool's branching process for each operating system.
  • Decompilation inside such an Android device causes a problem of lack of resources or some dependencies for decompilation.
  • decompilation errors occur only in uncompiled resources or layout-related resources within the res/ directory.
  • Tensorflow Lite supports transfer learning based on a pre-trained base model. These Tensorflow Lite models receive models with the .tflite extension as input. To this end, the h5 model learned through existing karas must be converted into a tflite-type model.
  • Toco an open source model conversion tool
  • Toco can convert a pb file, which is a binary representation of the model structure, into a tflite-type model
  • the h5 model must first be converted into a pb file.
  • the converted pb file is converted with tflite once again, and for this, the feature set information of the input data must be specified. This is the same as in FIG. 5, and conversion to a model usable in Tensorflow Lite can be performed by entering TELITE in the output_format option.
  • a new transfer learning model may be created by communicating with a server according to a user's need.
  • the present invention performs transfer learning in the base model to create a model optimized for the user environment, and the transferred model is delivered to the user device to execute malicious code Serverless and On-Device technology can be implemented.
  • Such an adaptive model-based on-device Android malware detection method through transfer learning is implemented as an application or implemented in the form of program commands that can be executed through various computer components and can be recorded on a computer-readable recording medium.
  • the computer readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.
  • Program instructions recorded on the computer-readable recording medium may be those specially designed and configured for the present invention, or those known and usable to those skilled in the art of computer software.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and magneto-optical media such as floptical disks. media), and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like.
  • Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter or the like as well as machine language codes such as those produced by a compiler.
  • the hardware device may be configured to act as one or more software modules to perform processing according to the present invention and vice versa.
  • the present invention detects malicious code in an on-device method through an analysis system that analyzes malicious code in a device and retrains a model through transfer learning, it can be applied in various ways such as an Android malware detection module and an adware blocking engine. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Molecular Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Quality & Reliability (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법은, 디바이스에 설치된 어플리케이션 리스트에서 악성 여부 또는 비선호 여부를 결정하는 단계; 디바이스에 설치된 어플리케이션의 APK를 디바이스 내에서 디컴파일하는 단계; 서버에서 헤드 모델을 생성하여 베이스 모델과의 전이학습에 활용할 수 있도록 결정된 리스트 및 디컴파일된 APK 파일을 서버로 전송하는 단계; 디바이스에 신규로 설치되는 어플리케이션에 대해 서버로부터 수신한 전이학습 모델을 이용하여 디바이스 내에서 악성코드 분석을 수행하는 단계; 및 악성코드 분석 결과를 디바이스를 통해 사용자에게 제공하는 단계;를 포함한다. 이에 따라, 디바이스 상에서 악성코드 분석이 이루어지므로, 네트워크 범위 밖에서도 분석이 가능한 가용성과 실시간성이 보장된다. [대표도] 도 1

Description

전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법, 이를 수행하기 위한 기록 매체 및 장치
본 발명은 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법, 이를 수행하기 위한 기록 매체 및 장치에 관한 것으로서, 더욱 상세하게는 사용자 환경에 최적화된 모델을 생성하기 위해 베이스 모델에서의 전이학습을 수행하며, 전이된 모델은 사용자 디바이스로 전달되어 악성코드를 수행하는 서버리스(Serverless) 및 온 디바이스(On-Device) 기술에 관한 것이다.
안드로이드는 2008년 첫 버전이 출시된 이후 지난 몇 년간 안드로이드 악성코드 분석에 대한 연구가 꾸준히 이루어졌다. 그럼에도 불구하고 안드로이드 악성코드는 꾸준히 증가하였으며, 이러한 악성코드는 다양한 카테고리에 존재한다.
반면, 사용자는 그 유형에 따라 자주 접근하는 어플리케이션 카테고리 또는 악성코드의 기준이 다르다. 예를 들어, 특정 사용자의 디바이스 사용 유형이 게임으로 치우쳐져 있다면 게임 형태의 악성코드에 노출될 확률이 높다. 또한, adware 형태의 악성코드의 경우, 사용자의 기준에 따라 악성 판별 여부가 결정되므로 사용자 환경에 최적화된 악성코드 탐지가 필요하다.
일반적으로 안드로이드 악성코드의 분석은 Android Run Time(ART)을 기반으로 하는 동적 분석과, Android Package(APK) 파일 정보를 기반으로 하는 정적 분석으로 나누어진다.
두 분석 방법 모두 연구에서 머신러닝 기법을 활용한 패턴 분석을 통해 악성코드를 탐지하는 방향으로 진행되어 왔다. 반면, 기본의 연구들은 전달 받은 APK를 서버에서 분석하는 것을 목표로 하였으며, 이로 인해 서버단의 부하와 실시간성, 가용성의 부재가 발생하였다.
기존의 딥러닝 기반 안드로이드 악성코드 분석 방식은 다양한 악성코드 유형을 통해 모델을 빌드하기 때문에 사용자 환경에 최적화되지 않는다. 또한, 기존 분석 방식에서는 분석 서버에서 모든 분석을 담당하기 때문에, 서비스 제공자의 비용이 증가하며, 가용성과 실시간성이 떨어지는 문제가 있다.
따라서, 최근 디바이스 내의 분석을 수행하는 온 디바이스(on-device) 분석 관련 연구가 수행되었다. 이러한 연구는 서버를 거치지 않는 형태로, 일반적으로 디바이스 내에서 Tensorflow Lite를 통한 분석을 수행한다.
최근 연구는 실시간성과 빠른 반응성을 위해 디바이스 내에서 딥러닝을 통한 악성코드 탐지를 수행하였다. 그러나, Tensorflow Lite는 디바이스 내에서의 모델 빌드 기능을 제공하지 않기 때문에, 생성된 모델을 이용한 추론만이 가능하다. 따라서, 기존 모델을 이용한 디바이스 내에서의 분석만이 가능하며, 이는 사용자 디바이스와의 최적화와는 관련이 없다.
또한, 다른 연구는 경량화된 온 디바이스 탐지 모델을 구현하여 디바이스 내 모델 빌드를 수행하였다. 온 디바이스 환경에서의 모델 빌드를 위해 Tensorflow Lite를 사용하지 않았으며, 보드 러닝(broad learning)을 통한 모델을 생성하였다. 그러나, 이 경우에는 각 디바이스에서 모델을 처음부터 끝까지 생성해야 하며, 데이터의 편향과 데이터의 질적 수준을 보장할 수 없기 때문에 실제 환경에서 신뢰성의 문제가 발생한다.
[선행기술문헌]
[특허문헌]
(특허문헌 1) KR 10-1337215 B1
(특허문헌 2) KR 10-2180098 B1
(특허문헌 3) KR 10-2168496 B1
이에, 본 발명의 기술적 과제는 이러한 점에서 착안된 것으로 본 발명의 목적은 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법을 제공하는 것이다.
본 발명의 다른 목적은 상기 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법을 수행하기 위한 컴퓨터 프로그램이 기록된 기록 매체를 제공하는 것이다.
본 발명의 또 다른 목적은 상기 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법을 수행하기 위한 장치를 제공하는 것이다.
상기한 본 발명의 목적을 실현하기 위한 일 실시예에 따른 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법은, 디바이스에 설치된 어플리케이션 리스트에서 악성 여부 또는 비선호 여부를 결정하는 단계; 디바이스에 설치된 어플리케이션의 APK를 디바이스 내에서 디컴파일하는 단계; 서버에서 헤드 모델을 생성하여 베이스 모델과의 전이학습에 활용할 수 있도록 결정된 리스트 및 디컴파일된 APK 파일을 서버로 전송하는 단계; 디바이스에 신규로 설치되는 어플리케이션에 대해 서버로부터 수신한 전이학습 모델을 이용하여 디바이스 내에서 악성코드 분석을 수행하는 단계; 및 악성코드 분석 결과를 디바이스를 통해 사용자에게 제공하는 단계;를 포함한다.
본 발명의 실시예에서, 상기 디바이스에 설치된 어플리케이션 리스트에서 악성 여부 또는 비선호 여부를 결정하는 단계는, 사용자에 의해 선택된 경우 악성 또는 비선호 어플리케이션으로 결정할 수 있다.
본 발명의 실시예에서, 상기 베이스 모델은 2차원 매트릭스(2D matrix)를 입력 데이터로 사용하는 CNN을 기반으로 할 수 있다.
본 발명의 실시예에서, 상기 베이스 모델은 매니페스트 파일의 권한을 기준으로 생성되거나 또는 APK에 정의된 API 시그니처 정보를 기반으로 생성될 수 있다.
본 발명의 실시예에서, 상기 디바이스에 설치된 어플리케이션의 APK를 디바이스 내에서 디컴파일하는 단계는, APKTool의 운영 체제별 분기 처리를 제거하여 안드로이드 환경에서 구동할 수 있다.
본 발명의 실시예에서, 상기 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법은, 사용자의 필요에 따라 서버와 통신하여 새로운 전이학습 모델을 생성하는 단계;를 더 포함할 수 있다.
상기한 본 발명의 다른 목적을 실현하기 위한 일 실시예에 따른 컴퓨터로 판독 가능한 저장 매체에는, 상기 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법을 수행하기 위한 컴퓨터 프로그램이 기록되어 있다.
상기한 본 발명의 또 다른 목적을 실현하기 위한 일 실시예에 따른 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 장치는, 디바이스에 설치된 어플리케이션 리스트에서 악성 여부 또는 비선호 여부를 결정하는 사용자 환경 반영부; 디바이스에 설치된 어플리케이션의 APK를 디바이스 내에서 디컴파일하는 디컴파일부; 서버에서 헤드 모델을 생성하여 베이스 모델과의 전이학습에 활용할 수 있도록 결정된 리스트 및 디컴파일된 APK 파일을 서버로 전송하는 통신부; 디바이스에 신규로 설치되는 어플리케이션에 대해 서버로부터 수신한 전이학습 모델을 이용하여 디바이스 내에서 악성코드 분석을 수행하는 분석부; 및 악성코드 분석 결과를 디바이스를 통해 사용자에게 제공하는 결과 제공부;를 포함한다.
본 발명의 실시예에서, 상기 사용자 환경 반영부는, 사용자에 의해 선택된 경우 악성 또는 비선호 어플리케이션으로 결정할 수 있다.
본 발명의 실시예에서, 상기 베이스 모델은 2차원 매트릭스(2D matrix)를 입력 데이터로 사용하는 CNN을 기반으로 할 수 있다.
본 발명의 실시예에서, 상기 베이스 모델은 매니페스트 파일의 권한을 기준으로 생성되거나 또는 APK에 정의된 API 시그니처 정보를 기반으로 생성될 수 있다.
본 발명의 실시예에서, 상기 디컴파일부는, APKTool의 운영 체제별 분기 처리를 제거하여 안드로이드 환경에서 구동할 수 있다.
본 발명의 실시예에서, 상기 통신부는, 사용자의 필요에 따라 새로운 전이학습 모델을 생성하도록 서버와 통신할 수 있다.
이와 같은 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법에 따르면, 서버와의 단 한번의 통신을 통해 사용자 기준에 최적화된 모델을 제공하며, 이후 클라이언트 단에서 모든 분석이 이루어진다. 따라서, 개인정보 유출의 우려가 없으며, 네트워크 범위 밖에서도 분석이 가능한 가용성과 실시간성이 보장되므로 기존 분석 시스템의 가용성과 실시간성 문제를 해결할 수 있다.
도 1은 본 발명의 전이학습을 통한 모델 재훈련을 수행하는 분석 시스템의 개념도이다.
도 2는 본 발명의 일 실시예에 따른 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 장치의 블록도이다.
도 3은 APK 파일의 내부 구조를 설명하기 위한 도면이다.
도 4는 AaptManager 내의 OS별 분기 처리의 예시를 보여주는 도면이다.
도 5는 Toco를 이용한 pb 파일의 tflite 모델로의 변환을 보여주는 예시 도면이다.
도 6은 본 발명의 평가를 위한 전체 APK 데이터 셋의 구성을 보여주는 도면이다.
도 7은 본 발명을 사용한 경우 전이학습의 수행 결과를 보여주는 도면이다.
도 8은 본 발명의 일 실시예에 따른 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법의 흐름도이다.
후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다.
이하, 도면들을 참조하여 본 발명의 바람직한 실시예들을 보다 상세하게 설명하기로 한다.
도 1은 본 발명의 전이학습을 통한 모델 재훈련을 수행하는 분석 시스템의 개념도이다. 도 2는 본 발명의 일 실시예에 따른 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 장치의 블록도이다.
도 1을 참조하면, 본 발명은 사용자 디바이스(4) 내의 악성코드 분석과 전이학습을 통한 모델 재훈련을 수행하는 분석 시스템(1)을 제공한다. 분석 시스템(1)은 서버(2) 또는 클라우드와의 단 한번의 통신을 통해 사용자 기준에 최적화된 모델을 제공하며, 이후 클라이언트 단에서 모든 분석이 이루어진다.
따라서, 개인정보 유출의 우려가 없으며, 네트워크 범위 밖에서도 분석이 가능한 가용성과 실시간성이 보장되므로 기존 분석 시스템의 문제를 해결할 수 있다.
사용자가 최초로 분석 시스템(1)을 설치하는 시점에 사용자는 디바이스(4)에 설치된 어플리케이션 리스트에서 악성 여부 혹은 비선호 여부를 결정할 수 있다. 결정된 리스트는 서버(2)로 전송되어 헤드 모델을 생성하며, 이는 베이스 모델과의 전이학습에 활용된다.
이 때 어플리케이션이 사용자에 의해 선택되지 않은 경우 정상, 선택된 경우 악성으로 간주되어 전이학습 모델에 반영될 수 있다. 해당 전이학습 모델을 생성하는 것으로 도 1에서의 전처리(preprocessing) 부분이 완료된다.
전처리 과정에서 분석 시스템(1)은 디바이스(4) 내에서의 구동을 목표로 하므로, APK의 디컴파일은 디바이스(4) 내에서 수행되어야 한다.
이후 분석 시스템(1)은 디바이스(4)로 전이학습 모델을 전달하며, 디바이스(4) 내에서 분석을 시작한다. 해당 과정은 도 1에서의 주 처리(Main Processing) 부분에 해당하며, 이후에는 신규 설치 어플리케이션에 대한 분석을 수행한다.
이러한 분석 과정은 on-device 환경으로, 서버(2)를 거치지 않는 디바이스(4) 내 분석이다. 분석이 완료되면 사용자에게 분석 결과를 전달하며, 사용자의 필요에 따라 서버(2)와 통신하며 새로운 전이학습 모델을 생성할 수 있다.
본 발명에 따른 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 장치(10, 이하 장치)는 서버와의 단 한번의 통신을 통해 사용자 기준에 최적화된 모델을 제공하며, 이후 클라이언트 단, 즉 디바이스 내에서 분석을 수행한다.
도 2를 참조하면, 본 발명에 따른 장치(10)는 사용자 환경 반영부(110), 디컴파일부(130), 통신부(150), 분석부(170) 및 결과 제공부(190)를 포함한다. 상기 장치(10)는 도 1의 디바이스(4)이거나 디바이스(4)의 일부일 수 있다.
본 발명의 상기 장치(10)는 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지를 수행하기 위한 소프트웨어(애플리케이션)가 설치되어 실행될 수 있으며, 상기 사용자 환경 반영부(110), 상기 디컴파일부(130), 상기 통신부(150), 상기 분석부(170) 및 상기 결과 제공부(190)의 구성은 상기 장치(10)에서 실행되는 상기 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지를 수행하기 위한 소프트웨어에 의해 제어될 수 있다.
상기 장치(10)는 별도의 단말이거나 또는 단말의 일부 모듈일 수 있다. 또한, 상기 사용자 환경 반영부(110), 상기 디컴파일부(130), 상기 통신부(150), 상기 분석부(170) 및 상기 결과 제공부(190)의 구성은 통합 모듈로 형성되거나, 하나 이상의 모듈로 이루어 질 수 있다. 그러나, 이와 반대로 각 구성은 별도의 모듈로 이루어질 수도 있다.
상기 장치(10)는 사용자의 모바일 단말기로서 스마트 폰이나 태블릿 일 수 있다. 상기 장치(10)는, 디바이스(device), 기구(apparatus), 단말(terminal), UE(user equipment), MS(mobile station), 무선기기(wireless device), 휴대기기(handheld device) 등 다른 용어로 불릴 수 있다.
상기 사용자 환경 반영부(110)는 디바이스에 설치된 어플리케이션 리스트에서 악성 여부 또는 비선호 여부를 결정한다. 일 실시예에서, 사용자가 최초로 분석 시스템(1)을 설치하는 시점에 디바이스에 설치된 어플리케이션 리스트에서 악성 여부 혹은 비선호 여부를 결정할 수 있다.
결정된 리스트는 서버(2)로 전송되어 헤드 모델을 생성하며, 이는 베이스 모델과의 전이학습에 활용된다. 이 때 어플리케이션이 사용자에 의해 선택되지 않은 경우 정상, 선택된 경우 악성으로 간주되어 전이학습 모델에 반영될 수 있다.
상기 디컴파일부(130)는 디바이스에 설치된 어플리케이션의 APK를 디바이스 내에서 디컴파일한다.
안드로이드 어플리케이션은 APK 파일 형태의 실행파일로 구성되며, 자바 기반의 classes.dex 파일과 AndroidMainifest.xml 파일, 리소스를 담당하는 res/ 디렉터리와 리소스의 id 매핑을 담당하는 resources.arsc 파일 등으로 나누어진다. 이러한 APK 파일 내부의 구성 요소는 도 3과 같다.
이 중 classes.dex 파일은 안드로이드 어플리케이션 기능과 관련된 소스 코드의 대부분을 가지고 있으며, 이는 디컴파일 시 smali 확장자의 파일로 추출 가능하다.
반면, AndroidMainifest.xml 파일은 안드로이드 소스코드를 포함하지는 않지만, 안드로이드 APK를 구성하는 속성에 대한 정보를 가진다. 이는 APK 파일의 패키지명을 비롯하여 사용 권한 정보, 선언된 컴포넌트의 이름 등이 포함된다. AndroidMainifest.xml 파일은 컴파일되는 classes.dex 파일과는 다르게 APK 파일을 압축 해제하면 즉시 열람 가능한 특징을 가진다.
상기 통신부(150)는 상기 서버(2)와 통신하며, 서버(2)에서 헤드 모델을 생성하여 베이스 모델과의 전이학습에 활용할 수 있도록 결정된 리스트 및 디컴파일된 APK 파일을 서버(2)로 전송한다. 또한, 서버(2)에서 생성한 전이학습 모델을 수신한다.
전이학습은 학습 데이터가 부족한 분야의 모델 구축을 위해 데이터가 풍부한 분야에서 훈련된 모델을 재사용하는 머신러닝 학습 기법으로, 우수한 성능의 모델의 일부 계층을 재활용하는 기법이다.
대부분의 모델 학습에서는 학습 및 예측을 위해 대량의 데이터를 필요로 하지만 실제로는 이러한 데이터셋을 구축하는 과정에 많은 리소스가 소모된다.
따라서, 이러한 전이학습을 통해 사전 학습된 모델의 fine tuning을 수행하며, 재사용된 모델을 이용하는 것이 효율적이다. 이러한 fine tuning 과정에는 미리 학습된 모델의 가중치를 새로운 모델에 적용하는 방식과 기존 모델의 일부 층(layer)만을 재사용하는 방식이 있다.
이러한 방식은 각각 기존 모델의 성능을 상속받는다는 점과 부족한 데이터로 인한 모델 훈련 문제를 해결할 수 있다는 장점이 있다.
상기 분석부(170)는 디바이스에 신규로 설치되는 어플리케이션에 대해 서버로부터 수신한 전이학습 모델을 이용하여 디바이스 내에서 악성코드 분석을 수행한다. 상기 결과 제공부(190)는 악성코드 분석 결과를 디바이스를 통해 사용자에게 제공한다.
본 발명은 디바이스 내에서의 구동을 목표로 하므로, APK의 디컴파일은 디바이스 내에서 수행되어야 한다. 따라서, APK 디컴파일러인 APKTool을 안드로이드 내에서 실행 가능하도록 수정하여 사용할 수 있다.
APKTool은 기본적으로 리눅스와 맥, 윈도우 환경에서만 실행 가능하도록 설정되어 있지만, 도 4와 같이 AaptManager 내에서 해당 운영체제 관련 분기 처리를 제거하여 안드로이드 환경에서 구동 가능하다.
이러한 안드로이드 디바이스 내부에서의 디컴파일은 디컴파일을 위한 리소스 부족 또는 일부 의존성의 문제가 발생한다. 반면, 이런 디컴파일 오류가 발생하는 부분은 res/ 디렉터리 내의 컴파일되지 않은 리소스 또는 레이아웃 관련 리소스에서만 발생한다.
따라서, 어플리케이션 기능의 특징을 담고 있는 classes.dex 파일과 매니페스트 파일은 정상적인 디컴파일이 가능하다.
Tensorflow Lite는 사전 훈련된 베이스 모델을 기반으로 전이학습을 지원한다. 이러한 Tensorflow Lite 모델 .tflite 확장자의 모델을 입력으로 받는다. 이를 위해, 기존의 karas를 통해 학습된 h5 모델을 tflite 형태의 모델로 변환해야 한다.
이러한 모델 간의 변환을 위하여, 예를 들어 오픈소스 모델 변환 툴인 Toco를 이용할 수 있다. 예를 들어, Toco는 모델의 구조를 나타내는 바이너리인 pb 파일을 tflite 형태의 모델로 변환할 수 있기 때문에 h5 모델은 우선 pb 파일로 변환되어야 한다.
변환된 pb 파일은 다시 한번 tflite로 변환을 수행하며, 이를 위해서는 입력 데이터의 특징 셋 정보를 명시해야 한다. 이는 도 5와 같으며, output_format 옵션에 TELITE를 입력하여 Tensorflow Lite에서 이용 가능한 모델로의 변환을 수행할 수 있다.
베이스 모델은 CNN을 기반으로 하며, 따라서 2d-matrix를 입력 데이터로 사용할 수 있다. 현재 안드로이드 문서에서 정의한 권한의 경우 165개로, 이 중 사용 빈도가 낮은 21개의 권한을 제외한 144개의 데이터를 입력 데이터로 사용할 수 있다.
각 권한의 경우 APK의 매니페스트 안에서 사용이 정의된 경우 1로 표시되며, 정의되지 않는 경우 0으로 표시된다. 따라서, 학습과 테스트에 사용되는 모든 APK는 이러한 12*12 형태의 행렬로 변환된 데이터가 사용되며, 정확도를 향상시키기 위해 0 과 1을 flip하여 데이터화 하는 과정을 포함한다.
베이스 모델의 생성에는 이러한 매니페스트 파일의 권한을 기준으로 생성될 수도 있으며, 또는 APK에 정의된 API 시그니처 정보를 기반으로 생성될 수도 있다.
본 발명의 시스템(1) 평가를 위해 안드로이드 10 운영체제를 사용하는 단말을 사용하였으며, Ubuntu 16.0.4 운영체제 기반의 전이학습 서버를 구현하였다.
평가는 시뮬레이션 기반으로, 사용자가 지정하는 어플리케이션에 대한 전이학습을 수행한 후 단말에서 모든 어플리케이션에 대한 평가를 수행하는 방향으로 이루어졌다.
평가를 위한 데이터 셋은 총 4개의 카테고리에서 수집된 600개의 악성 APK와 300개의 정상 APK이다. 각 카테고리에서 모델은 2개의 카테고리만 이용하여 베이스 모델을 생성하였으며, 이후 2개의 카테고리를 차례로 전이학습에 사용하여 fine tuning을 수행하였다.
베이스 모델의 생성에는 전체 데이터 셋의 44% 수준인 400개의 APK가 사용되었으며, 이후 150개, 300개의 APK를 사용하여 fine tuning을 수행하였다. 전체 데이터의 구성은 도 6과 같다.
첫 학습에서는 BankBot, Mecor 카테고리의 전체 APK와 200개의 정상 앱으로 훈련되며, 전이학습이 이루어지지 않은 베이스 모델을 생성한다. 이후 평가에 대해서는 학습에 사용되지 않은 카테고리의 APK와 정상 앱 100개의 APK가 사용되었다.
각 평가 결과에서 정상 앱의 경우 비슷한 특징을 가지고 있으므로, 적은 수의 샘플을 학습하여도 94.3% 수준의 정확도를 보였지만 악성 앱의 경우 학습되지 않은 카테고리의 특징을 예측하기 때문에 88.3% 수준의 정확도를 보인다. 이후 전이학습에는 악성 앱 카테고리의 APK 개수인 150개 중 100개만이 전이학습에 사용되고, 50개는 테스트에 활용되었다.
도 7을 참조하면, 전이학습을 통해 fine tuning을 수행하면 악성코드에 대한 탐지 정확도는 89.2% 수준으로 상승하며, 모든 카테고리에 대하여 전이학습을 수행하는 경우 약 92.5% 수준으로 상승한다. 전체적인 모델의 정확도는 평균 2.45% 수준의 향상도를 보인다.
본 발명은 전이학습을 통한 모델 재학습과 Tensorflow Lite를 이용한 안드로이드 디바이스 내에서의 악성코드 탐지를 수행한다. 이를 위해, 안드로이드 APK 매니페스트 파일의 파싱과 권한 정의 내용을 추출하며, 안드로이드 디바이스 내에서 2차원 매트릭스로의 변환이 이루어진다. 평가 결과, 전이학습 이전과 비교하여 정확도 면에서 2.45% 수준의 향상도를 얻어내었다.
도 8은 본 발명의 일 실시예에 따른 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법의 흐름도이다.
본 실시예에 따른 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법은, 도 1의 시스템(1) 및 도 2의 장치(10)와 실질적으로 동일한 구성에서 진행될 수 있다. 따라서, 도 1의 시스템(1) 및 도 2의 장치(10)와 동일한 구성요소는 동일한 도면부호를 부여하고, 반복되는 설명은 생략한다.
또한, 본 실시예에 따른 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법은 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지를 수행하기 위한 소프트웨어(애플리케이션)에 의해 실행될 수 있다.
본 발명은 서버와의 단 한번의 통신을 통해 사용자 기준에 최적화된 모델을 제공하며, 이후 클라이언트 단, 즉 디바이스 내에서 분석을 수행한다.
따라서, 개인정보 유출의 우려가 없으며, 네트워크 범위 밖에서도 분석이 가능한 가용성과 실시간성이 보장되므로 기존 분석 시스템의 문제를 해결할 수 있다.
도 8을 참조하면, 본 실시예에 따른 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법은, 디바이스에 설치된 어플리케이션 리스트에서 악성 여부 또는 비선호 여부를 결정한다(단계 S10).
이 경우, 사용자에 의해 선택된 경우 악성 또는 비선호 어플리케이션으로 결정할 수 있다. 결정된 리스트는 서버로 전송되어 헤드 모델을 생성하며, 이는 베이스 모델과의 전이학습에 활용된다.
디바이스에 설치된 어플리케이션의 APK를 디바이스 내에서 디컴파일한다(단계 S20).
안드로이드 어플리케이션은 APK 파일 형태의 실행파일로 구성되며, 자바 기반의 classes.dex 파일과 AndroidMainifest.xml 파일, 리소스를 담당하는 res/ 디렉터리와 리소스의 id 매핑을 담당하는 resources.arsc 파일 등으로 나누어진다.
이 중 classes.dex 파일은 안드로이드 어플리케이션 기능과 관련된 소스 코드의 대부분을 가지고 있으며, 이는 디컴파일 시 smali 확장자의 파일로 추출 가능하다.
반면, AndroidMainifest.xml 파일은 안드로이드 소스코드를 포함하지는 않지만, 안드로이드 APK를 구성하는 속성에 대한 정보를 가진다. 이는 APK 파일의 패키지명을 비롯하여 사용 권한 정보, 선언된 컴포넌트의 이름 등이 포함된다. AndroidMainifest.xml 파일은 컴파일되는 classes.dex 파일과는 다르게 APK 파일을 압축 해제하면 즉시 열람 가능한 특징을 가진다.
서버에서 헤드 모델을 생성하여 베이스 모델과의 전이학습에 활용할 수 있도록 결정된 리스트 및 디컴파일된 APK 파일을 서버로 전송한다(단계 S30). 이후, 서버에서 생성한 전이학습 모델을 수신한다.
일 실시예에서, 상기 베이스 모델은 2차원 매트릭스(2D matrix)를 입력 데이터로 사용하는 CNN을 기반으로 할 수 있다. 또한, 상기 베이스 모델은 매니페스트 파일의 권한을 기준으로 생성되거나 또는 APK에 정의된 API 시그니처 정보를 기반으로 생성될 수 있다.
전이학습은 학습 데이터가 부족한 분야의 모델 구축을 위해 데이터가 풍부한 분야에서 훈련된 모델을 재사용하는 머신러닝 학습 기법으로, 우수한 성능의 모델의 일부 계층을 재활용하는 기법이다.
대부분의 모델 학습에서는 학습 및 예측을 위해 대량의 데이터를 필요로 하지만 실제로는 이러한 데이터셋을 구축하는 과정에 많은 리소스가 소모된다.
따라서, 이러한 전이학습을 통해 사전 학습된 모델의 fine tuning을 수행하며, 재사용된 모델을 이용하는 것이 효율적이다. 이러한 fine tuning 과정에는 미리 학습된 모델의 가중치를 새로운 모델에 적용하는 방식과 기존 모델의 일부 층(layer)만을 재사용하는 방식이 있다.
이러한 방식은 각각 기존 모델의 성능을 상속받는다는 점과 부족한 데이터로 인한 모델 훈련 문제를 해결할 수 있다는 장점이 있다.
디바이스에 신규로 설치되는 어플리케이션에 대해 서버로부터 수신한 전이학습 모델을 이용하여 디바이스 내에서 악성코드 분석을 수행한다(단계 S40). 악성코드 분석 결과를 디바이스를 통해 사용자에게 제공한다(단계 S50).
본 발명은 디바이스 내에서의 구동을 목표로 하므로, APK의 디컴파일은 디바이스 내에서 수행되어야 한다. 따라서, APK 디컴파일러인 APKTool을 안드로이드 내에서 실행 가능하도록 수정하여 사용할 수 있다.
일 실시예에서, 디바이스 내에서 디컴파일은 APKTool의 운영 체제별 분기 처리를 제거하여 안드로이드 환경에서 구동할 수 있다.
이러한 안드로이드 디바이스 내부에서의 디컴파일은 디컴파일을 위한 리소스 부족 또는 일부 의존성의 문제가 발생한다. 반면, 이런 디컴파일 오류가 발생하는 부분은 res/ 디렉터리 내의 컴파일되지 않은 리소스 또는 레이아웃 관련 리소스에서만 발생한다.
따라서, 어플리케이션 기능의 특징을 담고 있는 classes.dex 파일과 매니페스트 파일은 정상적인 디컴파일이 가능하다.
Tensorflow Lite는 사전 훈련된 베이스 모델을 기반으로 전이학습을 지원한다. 이러한 Tensorflow Lite 모델 .tflite 확장자의 모델을 입력으로 받는다. 이를 위해, 기존의 karas를 통해 학습된 h5 모델을 tflite 형태의 모델로 변환해야 한다.
이러한 모델 간의 변환을 위하여, 예를 들어 오픈소스 모델 변환 툴인 Toco를 이용할 수 있다. 예를 들어, Toco는 모델의 구조를 나타내는 바이너리인 pb 파일을 tflite 형태의 모델로 변환할 수 있기 때문에 h5 모델은 우선 pb 파일로 변환되어야 한다.
변환된 pb 파일은 다시 한번 tflite로 변환을 수행하며, 이를 위해서는 입력 데이터의 특징 셋 정보를 명시해야 한다. 이는 도 5와 같으며, output_format 옵션에 TELITE를 입력하여 Tensorflow Lite에서 이용 가능한 모델로의 변환을 수행할 수 있다.
일 실시예에서, 사용자의 필요에 따라 서버와 통신하여 새로운 전이학습 모델을 생성할 수 있다.
본 발명은 사용자 환경에 최적화된 모델을 생성하기 위해 베이스 모델에서의 전이학습을 수행하며, 전이된 모델은 사용자 디바이스로 전달되어 악성코드를 수행하는 서버리스(Serverless) 및 온 디바이스(On-Device) 기술로 구현될 수 있다.
이와 같은, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법은 애플리케이션으로 구현되거나 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다.
상기 컴퓨터 판독 가능한 기록 매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거니와 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다.
컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다.
프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
이상에서는 실시예들을 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.
[산업상 이용가능성]
본 발명은 디바이스 내의 악성코드 분석과 전이학습을 통한 모델 재훈련을 수행하는 분석 시스템을 통하여 온 디바이스 방식으로 악성코드를 탐지하므로, 안드로이드 악성코드 탐지 모듈, 애드웨어 차단 엔진 등에 다양하게 적용할 수 있다.
[부호의 설명]
1: 분석 시스템
2: 서버
4: 디바이스
10: 온 디바이스 안드로이드 악성코드 탐지 장치
110: 사용자 환경 반영부
130: 디컴파일부
150: 통신부
170: 분석부
190: 결과 제공부

Claims (13)

  1. 디바이스에 설치된 어플리케이션 리스트에서 악성 여부 또는 비선호 여부를 결정하는 단계;
    디바이스에 설치된 어플리케이션의 APK를 디바이스 내에서 디컴파일하는 단계;
    서버에서 헤드 모델을 생성하여 베이스 모델과의 전이학습에 활용할 수 있도록 결정된 리스트 및 디컴파일된 APK 파일을 서버로 전송하는 단계;
    디바이스에 신규로 설치되는 어플리케이션에 대해 서버로부터 수신한 전이학습 모델을 이용하여 디바이스 내에서 악성코드 분석을 수행하는 단계; 및
    악성코드 분석 결과를 디바이스를 통해 사용자에게 제공하는 단계;를 포함하는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법.
  2. 제1항에 있어서, 상기 디바이스에 설치된 어플리케이션 리스트에서 악성 여부 또는 비선호 여부를 결정하는 단계는,
    사용자에 의해 선택된 경우 악성 또는 비선호 어플리케이션으로 결정하는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법.
  3. 제1항에 있어서,
    상기 베이스 모델은 2차원 매트릭스(2D matrix)를 입력 데이터로 사용하는 CNN을 기반으로 하는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법.
  4. 제1항에 있어서,
    상기 베이스 모델은 매니페스트 파일의 권한을 기준으로 생성되거나 또는 APK에 정의된 API 시그니처 정보를 기반으로 생성되는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법.
  5. 제1항에 있어서, 상기 디바이스에 설치된 어플리케이션의 APK를 디바이스 내에서 디컴파일하는 단계는,
    APKTool의 운영 체제별 분기 처리를 제거하여 안드로이드 환경에서 구동하는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법.
  6. 제1항에 있어서,
    사용자의 필요에 따라 서버와 통신하여 새로운 전이학습 모델을 생성하는 단계;를 더 포함하는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법.
  7. 제1항에 따른 상기 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법을 수행하기 위한 컴퓨터 프로그램이 기록된 컴퓨터로 판독 가능한 저장 매체.
  8. 디바이스에 설치된 어플리케이션 리스트에서 악성 여부 또는 비선호 여부를 결정하는 사용자 환경 반영부;
    디바이스에 설치된 어플리케이션의 APK를 디바이스 내에서 디컴파일하는 디컴파일부;
    서버에서 헤드 모델을 생성하여 베이스 모델과의 전이학습에 활용할 수 있도록 결정된 리스트 및 디컴파일된 APK 파일을 서버로 전송하는 통신부;
    디바이스에 신규로 설치되는 어플리케이션에 대해 서버로부터 수신한 전이학습 모델을 이용하여 디바이스 내에서 악성코드 분석을 수행하는 분석부; 및
    악성코드 분석 결과를 디바이스를 통해 사용자에게 제공하는 결과 제공부;를 포함하는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 장치.
  9. 제8항에 있어서, 상기 사용자 환경 반영부는,
    사용자에 의해 선택된 경우 악성 또는 비선호 어플리케이션으로 결정하는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 장치.
  10. 제8항에 있어서,
    상기 베이스 모델은 2차원 매트릭스(2D matrix)를 입력 데이터로 사용하는 CNN을 기반으로 하는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 장치.
  11. 제8항에 있어서,
    상기 베이스 모델은 매니페스트 파일의 권한을 기준으로 생성되거나 또는 APK에 정의된 API 시그니처 정보를 기반으로 생성되는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 장치.
  12. 제8항에 있어서, 상기 디컴파일부는,
    APKTool의 운영 체제별 분기 처리를 제거하여 안드로이드 환경에서 구동하는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 장치.
  13. 제8항에 있어서, 상기 통신부는,
    사용자의 필요에 따라 새로운 전이학습 모델을 생성하도록 서버와 통신하는, 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 장치.
PCT/KR2022/004665 2021-06-07 2022-03-31 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법, 이를 수행하기 위한 기록 매체 및 장치 WO2022260254A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/888,983 US20230177156A1 (en) 2021-06-07 2022-08-16 On-device android malware detection method based on adaptive model through transfer learning, and recording medium and apparatus for performing the same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2021-0073580 2021-06-07
KR1020210073580A KR102535978B1 (ko) 2021-06-07 2021-06-07 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법, 이를 수행하기 위한 기록 매체 및 장치

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/888,983 Continuation-In-Part US20230177156A1 (en) 2021-06-07 2022-08-16 On-device android malware detection method based on adaptive model through transfer learning, and recording medium and apparatus for performing the same

Publications (1)

Publication Number Publication Date
WO2022260254A1 true WO2022260254A1 (ko) 2022-12-15

Family

ID=84426047

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2022/004665 WO2022260254A1 (ko) 2021-06-07 2022-03-31 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법, 이를 수행하기 위한 기록 매체 및 장치

Country Status (3)

Country Link
US (1) US20230177156A1 (ko)
KR (1) KR102535978B1 (ko)
WO (1) WO2022260254A1 (ko)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12001552B1 (en) * 2023-02-14 2024-06-04 Snowflake Inc. Application trust framework
CN117574364B (zh) * 2023-07-27 2024-05-10 广东工业大学 一种基于PSEAM-MobileNet神经网络的安卓恶意软件检测方法及系统
TWI839291B (zh) * 2023-08-16 2024-04-11 臺灣中小企業銀行股份有限公司 在安卓系統對金融應用程式進行偽冒檢測之系統及方法
CN117034273A (zh) * 2023-08-28 2023-11-10 山东省计算中心(国家超级计算济南中心) 基于图卷积网络的安卓恶意软件检测方法及系统
CN117574371B (zh) * 2023-11-28 2024-06-25 中华人民共和国新疆出入境边防检查总站(新疆维吾尔自治区公安厅边境管理总队) 面向边缘计算平台熵敏感调用特征的恶意代码检测系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190042743A1 (en) * 2017-12-15 2019-02-07 Intel Corporation Malware detection and classification using artificial neural network
US20190272375A1 (en) * 2019-03-28 2019-09-05 Intel Corporation Trust model for malware classification
US20210073377A1 (en) * 2019-08-16 2021-03-11 Fireeye, Inc. System and method for heterogeneous transferred learning for enhanced cybersecurity threat detection

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101337215B1 (ko) 2011-12-27 2013-12-05 주식회사 안랩 대상정보 백업 장치 및 백업서버
KR102168496B1 (ko) 2020-04-29 2020-10-22 주식회사 이글루시큐리티 전이 학습을 위한 환경분석 및 보정시스템과 그 방법
KR102180098B1 (ko) 2020-08-13 2020-11-17 최원천 악성코드 모니터링 및 사용자 단말 제어 기능을 수행하는 악성코드 탐지 시스템

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190042743A1 (en) * 2017-12-15 2019-02-07 Intel Corporation Malware detection and classification using artificial neural network
US20190272375A1 (en) * 2019-03-28 2019-09-05 Intel Corporation Trust model for malware classification
US20210073377A1 (en) * 2019-08-16 2021-03-11 Fireeye, Inc. System and method for heterogeneous transferred learning for enhanced cybersecurity threat detection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AL-FAWA'REH MOHAMMAD, SAIF AMAL, JAFAR MOUSA TAYSEER, ELHASSAN AMMAR: "Malware Detection by Eating a Whole APK", 2020 15TH INTERNATIONAL CONFERENCE FOR INTERNET TECHNOLOGY AND SECURED TRANSACTIONS (ICITST), 8 December 2020 (2020-12-08) - 10 December 2020 (2020-12-10), pages 1 - 7, XP093012754, ISBN: 978-1-913572-21-1, DOI: 10.23919/ICITST51030.2020.9351333 *
심현석 등. 전이학습을 통한 적응형 모델 기반의 서버리스 On-Device 안드로이드 악성코드 탐지 기법. 2020년 한국정보보호학회 동계학술대회 CISC-W’20. 28 November 2020, non-official translation (SHIM, Hyunseok et al. Detection Techniques of Serverless On-Device Android Malware Based on Adaptive Model Through Transfer Learning. Conference on lnformation Security and Cryptography-Winter 2020 (CISC-W’20).) *

Also Published As

Publication number Publication date
KR102535978B1 (ko) 2023-05-26
KR20220165073A (ko) 2022-12-14
US20230177156A1 (en) 2023-06-08

Similar Documents

Publication Publication Date Title
WO2022260254A1 (ko) 전이학습을 통한 적응형 모델 기반의 온 디바이스 안드로이드 악성코드 탐지 방법, 이를 수행하기 위한 기록 매체 및 장치
WO2014035043A1 (ko) 악성 애플리케이션 진단 장치 및 방법
WO2017213400A1 (en) Malware detection by exploiting malware re-composition variations
WO2013168951A1 (ko) 악성 파일 검사 장치 및 방법
WO2021045428A1 (en) Method and apparatus for improving runtime performance after application update in electronic device
WO2014088262A1 (ko) 애플리케이션 위/변조 탐지장치 및 방법
WO2022108318A1 (ko) 스마트 컨트랙트 코드 취약점 분석 장치 및 방법
WO2019054613A1 (ko) 바이너리 파일에 기초하여 오픈소스 소프트웨어 패키지를 식별하는 방법 및 시스템
WO2014042297A1 (ko) 코드분석과 화면분석을 이용한 안드로이드 어플의 자동실행 방법
WO2022114392A1 (ko) 특성 선택에 기반한 모바일 악성 코드 분류 방법, 이를 수행하기 위한 기록 매체 및 장치
CN107623738A (zh) 一种面向安卓应用的WebView桥接口污点映射及分析方法
CN113158191B (zh) 基于智能探针的漏洞验证方法及相关iast方法、系统
CN109684829B (zh) 一种虚拟化环境中服务调用监控方法和系统
WO2016064024A1 (ko) 이상 접속 검출 장치 및 방법
WO2023282442A1 (ko) 컨테이너 환경에서 프로파일 공유를 위한 설계 방법, 이를 수행하기 위한 기록 매체 및 장치
WO2014168406A1 (ko) 메모리 보호기능 우회 공격 진단 장치 및 방법
WO2019093755A1 (ko) 폰트 저작권 보호 시스템 및 방법
WO2022163908A1 (ko) 애플리케이션 내부의 데이터 유출 위험성 평가 방법, 이를 수행하기 위한 기록 매체 및 장치
CN114417347A (zh) 应用程序的漏洞检测方法、装置、设备、存储介质和程序
WO2013077552A1 (ko) 서브셋/풀셋 폰트를 이용한 메시지 서비스 시스템 및 방법
WO2021221266A1 (ko) 위협 사용자의 접속차단방법 및 프로그램 보안 적용방법
WO2016048070A1 (ko) 실행파일 복원 장치 및 방법
WO2024111757A1 (ko) 계층 그래프를 이용한 네트워크 관리모델 학습 방법 및 장치
WO2022139063A1 (ko) 코드 시퀀스 기반 지능형 핵심코드 식별 방법, 이를 수행하기 위한 기록 매체 및 장치
WO2023282439A1 (ko) 컨테이너 시스템 콜 구성 오류에 대한 분석 방법, 이를 수행하기 위한 기록 매체 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22820383

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE