WO2018199366A1 - Method and system for detecting whether obfuscation has been applied to dex file and evaluating security - Google Patents

Method and system for detecting whether obfuscation has been applied to dex file and evaluating security Download PDF

Info

Publication number
WO2018199366A1
WO2018199366A1 PCT/KR2017/004584 KR2017004584W WO2018199366A1 WO 2018199366 A1 WO2018199366 A1 WO 2018199366A1 KR 2017004584 W KR2017004584 W KR 2017004584W WO 2018199366 A1 WO2018199366 A1 WO 2018199366A1
Authority
WO
WIPO (PCT)
Prior art keywords
class
dex file
application
obfuscation
file
Prior art date
Application number
PCT/KR2017/004584
Other languages
French (fr)
Korean (ko)
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 PCT/KR2017/004584 priority Critical patent/WO2018199366A1/en
Priority to JP2018080912A priority patent/JP7131946B2/en
Priority to US15/958,115 priority patent/US10963563B2/en
Publication of WO2018199366A1 publication Critical patent/WO2018199366A1/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/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities

Definitions

  • the following description relates to a method and system for detection and detection of obfuscation of a dex file, and a computer program stored in a computer readable recording medium in combination with a computer to execute the security evaluation method on a computer.
  • the App store is an online content marketplace that sells various applications that can be mounted on a terminal such as a smartphone.
  • a terminal such as a smartphone.
  • the developer of an application registers a file (for example, an Android Application Package (Apk)) for installing a developed application on a terminal in an app store, and users of the application are required through the app store.
  • By downloading a file for the application it is possible to install and run the application on their terminal.
  • various game applications such as game publishers are distributed to users.
  • the first risk of an application is that the application contains information developed by malicious intentions, such as malicious code, to perform malicious functions on the terminal of the application publisher or the user on which the application is installed and run.
  • Korean Patent Laid-Open No. 10-2014-0098025 relates to a system and method for security evaluation of an application uploaded to an app store, and when an application to be registered in an app store detects a malicious function, the application Disclosed is a technique for rejecting entry into an app store.
  • the second risk of an application is the risk to the security of the application itself.
  • the application performs a function other than the function originally intended by the developer, thereby reducing the reliability of the service to be provided through the application. This exists. Therefore, there is a need for application publishers to provide a certain level of security for applications in distributing various applications (installation files of applications) that they did not develop directly.
  • each application may be equipped with security solutions of different security levels and may not include any security measures.
  • security solutions of different security levels and may not include any security measures.
  • security levels provided by the security solutions mounted in each application.
  • Java-level vulnerability check can be performed at the programming language level (for example, Android Application Package (Apk)), and from the application publisher's point of view, each of the numerous registered applications There is a problem that it is difficult to provide security that is maintained above a certain level.
  • programming language level for example, Android Application Package (Apk)
  • the level of security applied to the registered application is analyzed and identified in an objective manner in terms of obfuscation, vulnerability, and / or security solution, and the analyzed information is provided to provide security for the application. It provides a method and system for evaluating security that can be used to improve gender.
  • a method for evaluating security of an application comprising: registering an Android application package (Apk); Searching for an application class in a dex file included in the android application package; Determining whether to call an API (Application Programming Interface) for loading another Dex file further included in the Android application package based on a class and a method called in a body instruction of a method included in the application class And determining that an obfuscation has been applied to the dex file when it is determined that there is an API call for loading the other dex file.
  • API Application Programming Interface
  • a computer program for recording a computer program for executing the security evaluation method is provided.
  • a computer program stored in a computer readable recording medium for executing the security evaluation method in a computer in combination with a computer is provided.
  • a system for evaluating the security of an application comprising: at least one processor implemented to execute instructions readable by a computer, the at least one processor registering an Android application package (Apk) Searching for an application class in a dex file included in the android application package, and further comprising the android application package based on a class and a method called in a body instruction of a method included in the application class. If it is determined whether an API (Application Programming Interface) call for loading another dex file is found, and it is determined that an API call for loading the other dex file exists, it is determined that obfuscation is applied to the dex file. It provides a security evaluation system characterized in that the decision.
  • API Application Programming Interface
  • the level of security applied to the registered application is analyzed and identified in an objective manner in terms of obfuscation, vulnerability, and / or security solution, and the analyzed information is provided to provide security for the application. Can be used to improve sex.
  • FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention.
  • FIG. 3 is a block diagram of a security evaluation system according to an embodiment of the present invention.
  • FIG. 4 is a diagram illustrating an example of determining whether to apply obfuscation of a dex file according to an embodiment of the present invention.
  • FIG. 5 is a diagram illustrating an example of a process of detecting an API call according to one embodiment of the present invention.
  • FIG. 6 is a diagram illustrating an example of detecting obfuscation using encryption of a body instruction according to an embodiment of the present invention.
  • FIG. 7 is a block diagram illustrating an example of components that may be included in a processor of a server according to an embodiment of the present invention.
  • FIG. 8 is a flowchart illustrating an example of a security evaluation method that can be performed by a server according to an embodiment of the present invention.
  • FIG. 9 is a block diagram illustrating another example of components that may be included in a processor of a server according to an embodiment of the present invention.
  • FIG. 10 is a flowchart illustrating another example of a security evaluation method that can be performed by a server according to an embodiment of the present invention.
  • the security evaluation system may be implemented through a server to be described later, and the security evaluation method according to the embodiments of the present invention may be performed through the server described above.
  • a computer program according to an embodiment of the present invention may be installed and run on a server, and the server may perform a security evaluation method according to an embodiment of the present invention under control of the driven computer program.
  • the computer program described above may be stored in a computer-readable recording medium in combination with a computer-implemented server to execute a security evaluation method on a computer.
  • FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
  • the network environment of FIG. 1 illustrates an example including a plurality of electronic devices 110, 120, 130, and 140, a plurality of servers 150 and 160, and a network 170.
  • 1 is an example for describing the present invention, and the number of electronic devices or the number of servers is not limited as shown in FIG. 1.
  • the plurality of electronic devices 110, 120, 130, and 140 may be fixed terminals or mobile terminals implemented as computer devices.
  • Examples of the plurality of electronic devices 110, 120, 130, and 140 include a smart phone, a mobile phone, a navigation device, a computer, a notebook computer, a digital broadcasting terminal, a personal digital assistant (PDA), and a portable multimedia player (PMP). Tablet PC).
  • FIG. 1 illustrates the shape of a smart phone as an example of the electronic device 1 110, in the embodiments of the present invention, the electronic device 1 110 may use a wireless or wired communication method to substantially connect the network 170. It may mean one of various physical devices that can communicate with other electronic devices 120, 130, 140 and / or servers 150, 160.
  • the communication method is not limited, and may include not only a communication method using a communication network (for example, a mobile communication network, a wired internet, a wireless internet, a broadcasting network) that the network 170 may include, but also a short range wireless communication between devices.
  • the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). And one or more of networks such as the Internet.
  • the network 170 may also include any one or more of network topologies, including bus networks, star networks, ring networks, mesh networks, star-bus networks, trees, or hierarchical networks, but It is not limited.
  • Each of the servers 150 and 160 communicates with the plurality of electronic devices 110, 120, 130, and 140 through the network 170 to provide a command, code, file, content, service, or the like. It may be implemented in devices.
  • the server 150 may be a system that provides a first service to a plurality of electronic devices 110, 120, 130, and 140 connected through the network 170, and the server 160 may also have a network ( It may be a system that provides a second service to the plurality of electronic devices 110, 120, 130, and 140 connected through the 170.
  • the server 150 may be at least some of the devices constituting the system of the application publisher, and receives a package file of an application installed and operated on the plurality of electronic devices 110, 120, 130, and 140.
  • the service to be distributed can be provided as the first service.
  • the server 160 may provide a service associated with the application as the second service to a plurality of electronic devices 110, 120, 130, and 140 that install and run the application through the distributed package file.
  • the server 150 may be implemented as a dedicated system for evaluating the security of a package file to be registered to provide information about the evaluated security for the package file to be registered.
  • 2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention. 2 illustrates an internal configuration of the electronic device 1 110 and the server 150 as an example of the electronic device. In addition, the other electronic devices 120, 130, 140, or the server 160 may also have the same or similar internal configuration as the aforementioned electronic device 1 110 or the server 150.
  • the electronic device 1 110 and the server 150 may include memories 211 and 221, processors 212 and 222, communication modules 213 and 223, and input / output interfaces 214 and 224.
  • the memories 211 and 221 may be computer-readable recording media, and may include a permanent mass storage device such as random access memory (RAM), read only memory (ROM), and a disk drive.
  • RAM random access memory
  • ROM read only memory
  • the non-volatile mass storage device such as a ROM and a disk drive may be included in the electronic device 1 110 or the server 150 as a separate permanent storage device that is separated from the memories 211 and 221.
  • the memory 211, 221 includes an operating system and at least one program code (for example, a browser installed and driven in the electronic device 1 110 or an application installed in the electronic device 1 110 to provide a specific service). Code) can be stored.
  • These software components may be loaded from a computer readable recording medium separate from the memories 211 and 221.
  • Such a separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, disk, tape, DVD / CD-ROM drive, memory card, and the like.
  • software components may be loaded into the memory 211, 221 through a communication module 213, 223 that is not a computer readable recording medium.
  • At least one program is a computer program that is installed by files provided by a file distribution system (for example, the server 160 described above) through the network 170 to distribute installation files of developers or applications. It may be loaded into the memories 211 and 221 based on (for example, the above-described application).
  • a file distribution system for example, the server 160 described above
  • the network 170 to distribute installation files of developers or applications. It may be loaded into the memories 211 and 221 based on (for example, the above-described application).
  • Processors 212 and 222 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations. Instructions may be provided to the processors 212, 222 by the memory 211, 221 or the communication modules 213, 223. For example, the processors 212 and 222 may be configured to execute a command received according to a program code stored in a recording device such as the memory 211 and 221.
  • the communication modules 213 and 223 may provide a function for the electronic device 1 110 and the server 150 to communicate with each other through the network 170, and the electronic device 1 110 and / or the server 150 may communicate with each other. May provide a function for communicating with another electronic device (eg, electronic device 2 120) or another server (eg, server 160). For example, a request generated by the processor 212 of the electronic device 1 110 according to a program code stored in a recording device such as the memory 211 may be controlled by the server 170 through the network 170 under the control of the communication module 213. 150).
  • control signals, commands, contents, files, and the like provided according to the control of the processor 222 of the server 150 are transmitted to the communication module of the electronic device 1 110 via the communication module 223 and the network 170 ( It may be received by the electronic device 1110 through 213.
  • the control signal, command, content, file, etc. of the server 150 received through the communication module 213 may be transmitted to the processor 212 or the memory 211, and the content, file, etc. may be transferred to the electronic device 1.
  • 110 may be stored as a storage medium (permanent storage described above) that may further include.
  • the input / output interface 214 may be a means for interfacing with the input / output device 215.
  • the input device may include a device such as a keyboard or a mouse, and the output device may include a device such as a display or a speaker.
  • the input / output interface 214 may be a means for interfacing with a device in which functions for input and output are integrated into one, such as a touch screen.
  • the input / output device 215 may be configured as one device with the electronic device 1110.
  • the input / output interface 224 of the server 150 may be a means for interfacing with an apparatus (not shown) for input or output that may be connected to or included in the server 150.
  • the processor 212 of the electronic device 1110 uses data provided by the server 150 or the electronic device 2 120 in processing a command of a computer program loaded in the memory 211.
  • the service screen or the content may be displayed on the display through the input / output interface 214.
  • the electronic device 1 110 and the server 150 may include more components than those of FIG. 2. However, it is not necessary to clearly show most of the prior art components.
  • the electronic device 1 110 may be implemented to include at least some of the above-described input / output devices 215 or other components such as a transceiver, a global positioning system (GPS) module, a camera, various sensors, a database, and the like. It may further include elements.
  • GPS global positioning system
  • an acceleration sensor when the electronic device 1 110 is a smartphone, an acceleration sensor, a gyro sensor, a camera module, various physical buttons, a button using a touch panel, an input / output port, and vibration for a smartphone generally include Various components such as a vibrator may be implemented to be further included in the electronic device 1 110.
  • FIG. 3 is a block diagram of a security evaluation system according to an embodiment of the present invention.
  • the security evaluation system 300 of FIG. 3 may be implemented through the server 150 described above.
  • the server 150 includes the package decomposition module 310, the file identification module 320, the parsing module 330, the analysis module 340, and the report module 350 included in the security evaluation system 300. May be representations of the different functions of the processor 222.
  • the package disassembly module 310 may be used as a function of the processor 222 in which the processor 222 of the server 150 disassembles a package file according to a control command included in a computer program.
  • the vulnerability detection module 342 included in the analysis module 340 may be implemented as a core module for vulnerability detection.
  • the server 150 may provide a service for distributing package files of applications registered by developers to users.
  • the package disassembly module 310 may disassemble the registered package files.
  • an Android application package (Apk) is a file format of a package file used for distributing software and middleware of Android, which is a mobile operating system, and has a '.apk' extension.
  • APK Android application package
  • embodiments of the present invention will be described based on a package file such as an APK, but it will be readily understood by those skilled in the art that the same or similar features may be applied to other kinds of package files through this description. .
  • the file identification module 320 may identify files included in the disassembled package file.
  • the extensions shown in Figure 3 ('dex', 'so', 'dll', 'json', 'ini', 'apk', 'xml', 'cert') as described previously, It will be readily understood by those skilled in the art.
  • the parsing module 330 may parse the identified files.
  • the parser 331 may parse files of a specific extension (eg, 'dex', 'so', 'dll') among the identified files, and the collector 332 may parse a specific extension (eg, You can collect the necessary information from the files of 'json', 'ini', 'apk', 'xml', and 'cert').
  • the parsing module 330 may identify each of the classes and methods included in the 'dex' file, and track a number of masses by instructing the instructions contained in the method. Can be identified by separating. The mass of instructions can be divided based on branch instructions such as the 'goto' statement, the 'switch' statement, or the 'if' statement.
  • the parsing module 330 may generate and manage information on call relationships between these instruction masses. For example, the call relations between the instruction masses may be managed in a tree structure, and the information on the call relations may include information on a method called by a specific instruction mass. The generation and management of such information may be processed for each of files included in a package file such as an APK file, and the parsing method may vary according to the characteristics of the file.
  • the parsed information and the collected information may be passed to the analysis module 340.
  • the analysis module 340 obfuscates a corresponding package file (or an application installed and driven in a user terminal such as the electronic device 1 110 through the package file) based on the information transmitted from the parsing module 330. It can generate and provide analysis information from an obfuscation point of view, a vulnerability point of view, and a security solution point of view.
  • the obfuscation detection module 341 may generate analysis information on the level of obfuscation applied to files of a specific extension (eg, 'dex', 'so', 'dll'). Can be. To this end, the obfuscation detection module 341 may determine whether obfuscation is applied for each preset item according to the type of file.
  • a specific extension eg, 'dex', 'so', 'dll'.
  • the vulnerability detection module 342 generates analysis information on whether there are any vulnerabilities in files of a specific extension (for example, 'dex', 'so', or 'config' which is a configuration file extension). can do.
  • the security evaluation system 300 may manage information about known vulnerabilities, and the vulnerability detection module 342 uses information about these vulnerabilities to determine which vulnerabilities exist in which files. Analyze information can be generated.
  • the platform detection module 343 may extract information about the platform on which the corresponding application is developed and / or the platform on which the corresponding application operates.
  • the security evaluation system 300 may use different analysis methods depending on which platform the application is developed on, for example, a development tool such as Unity or Cocos.
  • the security evaluation system 300 may use a different analysis method for each platform because the file format included in the package file may vary for each platform on which the application operates.
  • the security evaluation system 300 may extract information about the platform for the package file, and may analyze the package file or provide information about the extracted platform to the outside based on such information.
  • the security tool detection module 344 can detect the security solution that the developer of the package file has inserted into the package file. For example, a first security tool provided in a library form by a third party may be added to a corresponding package file by a developer. As another example, a second security tool developed by the developer may be added to the package file by the developer. In other words, the security tool detection module 344 may generate analysis information about whether the security tool is applied to the package file.
  • the relationship analysis module 345 may generate analysis information about a reference relationship between files included in the package file. For example, when the first file includes code for calling the second file, the analysis information may be generated such that the information about the reference relationship between the first file and the second file is included in the analysis information.
  • the report module 350 collects the analysis information generated by the analysis module 340 and provides a report for the person of the security evaluation system 300 (for example, an administrator of the server 150 or a security inspection team of an application publisher). Can be generated. Such a report may be provided to terminals of related parties using Hypertext Markup Language (HTML) or eXtensible Markup Language (XML) as in the example of FIG. 3.
  • HTML Hypertext Markup Language
  • XML eXtensible Markup Language
  • An Android application package (Apk) registered in the security evaluation system 300 may include a dex file in an obfuscated state or an obfuscated state. In this case, the security evaluation system 300 may determine whether obfuscation is applied to the dex file included in the registered Android application package.
  • the first dex file 410 illustrated in FIG. 4 may represent a file in which obfuscation is not applied, and the second dex file 420 and the third dex file 430 may represent files in the obfuscated state. Can be.
  • the first dex file 410 may be obfuscated into two dex files (multi dex), such as the second dex file 420 and the third dex file 430.
  • the second dex file 420 may include the classes (Class A, Class B, Class C, Class D, and Class E) in the first Dex file 410.
  • the five classes of, hereinafter, 'Class A ⁇ E') may be files that have been removed, and the removed classes are new dex files that contain encrypted and encrypted classes A ⁇ E (431).
  • the 3 Dex file 430 may be included in the Android application package.
  • the second dex file 420 is the third dex.
  • the application class 421 included in the second dex file 420 should include a function for loading the dex file.
  • an API for loading a dex file is provided. Therefore, the application class 421 included in the second dex file 420 may include a function (DexLoader) for calling the API.
  • the class loader ('ClassLoader' or 'DexClassLoader') class and the class loader class for loading the dex file (the third dex file 430 in the embodiment of FIG. 4) through the application class 421
  • the containing loadclass ('LoadClass') method must be called.
  • the security evaluation system 300 may include an application class included in the dex file. 4, whether an API call for loading a dex file (eg, the third dex file 430 in FIG. 4) is made through the application class 421 included in the second dex file 420 in FIG. 4. You can check.
  • whether or not to apply obfuscation of the corresponding dex file may be determined according to whether the class loader class and the load class method included in the class loader class are called.
  • the security evaluation system 300 may check whether the class loader class and the load class method are called in the dex file to determine whether to apply obfuscation.
  • the security evaluation system 300 makes the first dex file. It can be seen that the obfuscation is not applied to the file 410.
  • the second dex file 420 of FIG. 4 can obtain the encrypted classes A to E 431 only when the third dex file 430 is loaded, an API call for loading the third dex file 430 is performed. This will be done, and the security evaluation system 300 can detect that obfuscation is applied to the second dex file 420 through the detection of such an API call.
  • FIG. 5 is a diagram illustrating an example of a process of detecting an API call according to one embodiment of the present invention.
  • the security evaluation system 300 may register the APK 500.
  • APK 500 may be registered with an application publisher for distribution to users of the application.
  • the security evaluation system 300 may be implemented in an apparatus (eg, the server 150) that provides a service for distributing package files of applications for which an application publisher is registered, or the apparatus and network 170 described above. It can be implemented as a separate system to communicate over).
  • the security evaluation system 300 may receive and register the APK 500 registered in the server 150 through the network 170.
  • the security evaluation system 300 may extract the class name of the application class 521 from the Android manifest file 510.
  • the Android application package includes an Android manifest file 510 such as 'AndroidManifest.xml', it is well known that the Android manifest file 510 includes a class name of an application class 521.
  • the security evaluation system 300 may collect all calls from the application class 521 identified through the extracted class name. For example, the security evaluation system 300 may identify the application class 521 included in the first dex file 520 through the extracted class name, and include all of the identified application classes 521. You can create a call list for the classes and methods that are called in each of the body instructions. For example, the security evaluation system 300 may generate the above-mentioned call list based on the call relationship generated by the parsing module 330 described with reference to FIG. 3.
  • the security evaluation system 300 may detect an API call for loading another dex file (the second dex file 530 in the embodiment of FIG. 5). To this end, the security evaluation system 300 may check whether the class loader ('ClassLoader' or 'DexClassLoader') class and the load class ('LoadClass') method are called through the call list. In other words, the call of the classloader class and the load class method can be detected as an API call to load another Dex file.
  • the security evaluation system 300 may determine that obfuscation is applied to the first dex file 520 as in step 5. If the API call is not detected, the security evaluation system 300 may determine that obfuscation is not applied to the first dex file 520 as in step 6.
  • the API call is not made in the body instruction of the method included in the application class, and the API call for loading the Dex file may be made in the body instruction of another method called through the corresponding method.
  • the security evaluation system 300 detects the method included in the application class in such a manner that it detects the API call through another call list collected in the body instruction of the method identified through the call list. You can also check whether API calls are made to all methods that are called directly or indirectly. In this case, when the API call is not made in all methods that are directly or indirectly called through the method included in the application class, the security evaluation system 300 determines that obfuscation is not applied to the first dex file 520. Can be.
  • FIG. 6 is a diagram illustrating an example of detecting obfuscation using encryption of a body instruction according to an embodiment of the present invention.
  • FIG. 6 illustrates a method 620 including an operation code 612 that is modified by obfuscating the operation code 611 of a specific method 610 included in a dex file through encryption, encoding, or addition of a dummy code. ) Shows an example of the generation.
  • the modified operation code 612 is not replaced with arbitrary code, but rather with code that can be compiled, and thus has some patterns.
  • the modified opcode 612 may include a pattern of instructions that do not affect or have no meaning in the register (for example, a sequence or branch of LDR instructions in an ARM assembly instruction or a sequence of LSLS instructions).
  • normal byte codes are predefined codes according to a series of constant hexa values. For example, the following website describes the Dalvik OP code.
  • Each method can determine the number of local variable registers used by the '.local' directive. If '.local' is 2, it means that two local variable registers are used, such as v0 and v1. At this time, if a hexadecimal value is found, '0B' may be followed by the hexa value may mean a local variable register. For example, the hexadecimal value '0B' corresponds to the OP code name 'move-result-object vx', as described on the website described above, and this OP code is the long / double of the previous method invocation. It can be seen that the command moves the result value to 'vx' and 'vx + 1'.
  • '0B02' moves the long / double result of the previous command execution into two local variable registers, 'v2' and 'v3'.
  • the security evaluation system 300 may check whether the number of local variable registers checked through '.local' and whether local variable registers required through local variable registers required through '0B02' are available.
  • the hexadecimal value '6E' must specify the local variable registers corresponding to the parameters of the current instance and the local variable registers corresponding to the method parameters after the OP code 'invoke-virtual', as described on the website mentioned above. do.
  • the security evaluation system 300 may check whether these registers are available registers using '.local', and in this way, whether the operation code of the method 610 is a general (or normal) code. It is possible to determine if the code is obfuscated (or modified).
  • the security evaluation system 300 may store and manage the standardized pattern in advance, and then determine whether to apply obfuscation to the dex file by detecting a method of an operation code that processes the command of the pattern.
  • the security evaluation system 300 searches for the prestored pattern in the opcode 611 or the modified opcode 612, and the modified opcode 612 in which the prestored pattern is found. Through it can be determined that the obfuscation is applied to the method 620, which may mean that the obfuscation is applied to the dex file including the method (620).
  • the security evaluation system 300 may obfuscate based on the weight of obfuscated methods among the methods included in the dex file. You can also determine the security level according to.
  • FIG. 7 is a block diagram illustrating an example of components that may be included in a processor of a server according to an embodiment of the present invention
  • FIG. 8 is a security evaluation that may be performed by a server according to an embodiment of the present invention.
  • the security evaluation system 300 may be implemented in the form of a computer device such as the server 150 described above.
  • the processor 222 of the server 150 is a component for implementing the security evaluation system 300.
  • the APK registerer 710, the application class searcher 720, and the API call are checked.
  • the unit 730, the obfuscation determiner 740, a security determiner 750, and an information provider 760 may be included.
  • the processor 222 and the components of the processor 222 may perform steps 810 to 860 included in the security evaluation method of FIG. 8.
  • the processor 222 and the components of the processor 222 may be implemented to execute a control instruction according to a code of an operating system included in the memory 221 or a code of at least one program.
  • the components of the processor 222 may be representations of different functions of the processor 222 performed by the processor 222 according to a control command provided by a code stored in the server 150.
  • the APK registerer 710 may be used as a functional representation of the processor 222 in which the processor 222 registers an Android application package (Apk) according to the above-described control command.
  • the APK registerer 710 may register an Android application package.
  • An Android application package can be registered with an application publisher for distribution to users of the application.
  • the security evaluation system may be implemented in a device that provides a service for distributing package files of applications for which an application publisher is registered or as a separate system that communicates with the aforementioned device through the network 170. have.
  • the security evaluation system 300 may receive and register an Android application package registered with an application publisher through the network 170.
  • the application class search unit 720 may search for the application class in the Dex file included in the Android application package.
  • the application class search unit 720 may extract the class name of the application class from the Android manifest file, such as 'AndroidManifest.xml', the Android application package, extracted from the dex file using the extracted class name You can search for the application class corresponding to the class name.
  • the API call checker 730 may load another index file further included in the Android application package based on a class and a method called in a body instruction of a method included in an application class. You can check whether API (Application Programming Interface) is called.
  • the API call confirmation unit 730 may generate a call list for the classes and methods called in the body instructions of all the methods included in the identified application class.
  • the API call verification unit 730 may check whether the class loader ('ClassLoader' or 'DexClassLoader') class and the load class ('LoadClass') method are called through the call list. In other words, the call of the classloader class and the load class method can be detected as an API call to load another Dex file.
  • the API call checker 730 classloader class and load class through the call list collected in the body instruction of the method identified through the call list. You can further search whether the method is called. As such, the API call checking process is repeatedly performed not only on the classes and methods directly called by all the methods included in the application class, but also on the classes and methods called again by the called methods. This can be done for all classes and methods called directly or indirectly by.
  • the obfuscation determination unit 740 determines that an API call for loading another Dex file exists, the obfuscation may be determined to be applied to the Dex file. If the API call for loading the other dex file is not confirmed, the obfuscation determination unit 740 may determine that the obfuscation is not applied to the dex file in step 840.
  • the security determiner 750 may determine the security of the registered Android application package based at least on whether or not obfuscation is applied to the Dex file. For example, the security of a registered Android application package may be determined to be relatively higher when obfuscation is applied to the dex file than when obfuscation is not applied to the dex file.
  • the information provider 760 may provide information about whether obfuscation is applied to the dex file. For example, with respect to a specific dex file, information about a file name of the dex file and whether or not obfuscation is applied may be provided together. For example, the related information may be provided to an administrator or the like as described with reference to FIG. 3.
  • FIG. 9 is a block diagram illustrating another example of components that may be included in a processor of a server according to an embodiment of the present invention
  • FIG. 10 is a security diagram that the server may perform according to an embodiment of the present invention. It is a flowchart which shows the other example of an evaluation method.
  • the processor 222 of the server 150 is a component for implementing the security evaluation system 300, the APK registerer 910, the junk code pattern manager 920, and the junk code pattern searcher 930. ) And the obfuscation determination unit 940.
  • the processor 222 and the components of the processor 222 may perform steps 1010 to 1040 included in the security evaluation method of FIG. 10.
  • the processor 222 and the components of the processor 222 may be implemented to execute a control instruction according to a code of an operating system included in the memory 221 or a code of at least one program.
  • the components of the processor 222 may be representations of different functions of the processor 222 performed by the processor 222 according to a control command provided by a code stored in the server 150. .
  • the APK registerer 910 may register an Android application package.
  • the APK registration unit 910 may correspond to the APK registration unit 710 described with reference to FIG. 7.
  • the junk code pattern manager 920 may receive and manage a junk code pattern to be searched for. As described above with reference to FIG. 6, the junk code pattern may preset and use patterns that appear according to obfuscation of a body instruction of a method. In this case, step 1020 may be performed before step 1010.
  • the junk code pattern search unit 930 may search for the junk code pattern in a body instruction of a method included in the dex file.
  • Dex files are created through compilation, so the transformed code resulting from obfuscation of the body instructions of the method cannot contain any random values and has a certain pattern. Accordingly, the junk code pattern search unit 930 may check whether the junk code pattern is found in the body instruction of the method.
  • the obfuscation determiner 940 may determine that obfuscation is applied to the dex file.
  • the security of the registered Android application package may be determined based at least on whether obfuscation is applied to the Dex file.
  • security can be determined based on the ratio of obfuscated methods to the entire method since it is possible to determine whether obfuscation is performed for each method.
  • information about a method to which obfuscation is applied may be provided to an administrator or the like.
  • the embodiments of FIGS. 7 and 8 and the embodiments of FIGS. 9 and 10 may be combined. For example, detection of an API call for loading a dex file and detection of a junk code pattern may be performed in parallel for a registered APK. In this case, the obfuscation determination unit 740 or the obfuscation determination unit 940 determines that an API call for loading another Dex file exists or if the junk code pattern is detected, the deobfuscation is applied to the Dex file. Can be. In this case, the security may be determined through a weighted sum of the security determined in parallel, and each detected information may be provided to an administrator.
  • the security level applied to the registered application is determined in an objective manner in accordance with obfuscation, vulnerability, and / or security solution. It can be used to improve the security of the application by analyzing and understanding and providing the analyzed information. In addition, it is possible to determine whether to apply obfuscation to the dex file included in the Android Application Package (Apk).
  • the system or apparatus described above may be implemented as a hardware component, a software component or a combination of hardware components and software components.
  • the devices and components described in the embodiments are, for example, processors, controllers, arithmetic logic units (ALUs), digital signal processors, microcomputers, field programmable gate arrays (FPGAs).
  • ALUs arithmetic logic units
  • FPGAs field programmable gate arrays
  • PLU programmable logic unit
  • the processing device may execute an operating system (OS) and one or more software applications running on the operating system.
  • the processing device may also access, store, manipulate, process, and generate data in response to the execution of the software.
  • processing device includes a plurality of processing elements and / or a plurality of types of processing elements. It can be seen that it may include.
  • the processing device may include a plurality of processors or one processor and one controller.
  • other processing configurations are possible, such as parallel processors.
  • the software may include a computer program, code, instructions, or a combination of one or more of the above, and configure the processing device to operate as desired, or process it independently or collectively. You can command the device.
  • Software and / or data may be any type of machine, component, physical device, virtual equipment, computer storage medium or device in order to be interpreted by or to provide instructions or data to the processing device. It can be embodied in.
  • the software may be distributed over networked computer systems so that they may be stored or executed in a distributed manner.
  • Software and data may be stored on one or more computer readable media.
  • the method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium.
  • the computer readable medium may include program instructions, data files, data structures, etc. alone or in combination.
  • the program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks, such as floppy disks.
  • Such a recording medium may be various recording means or storage means in the form of a single or several hardware combined, and is not limited to a medium directly connected to any computer system, but may be distributed on a network.
  • Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.

Landscapes

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

Abstract

A method and a system for detecting whether obfuscation has been applied to a DEX file and evaluating security are provided. The security evaluation method can comprise the steps of: registering an Android application package (APK); searching a DEX file, included in the APK, for an application class; checking whether to call an application programming interface (API) for loading another DEX file further included in the APK, on the basis of a class and a method called by a body instruction of a method included in the application class; and determining that obfuscation has been applied to the DEX file, when the existence of API calling for loading another DEX file is confirmed.

Description

덱스 파일의 난독화 적용 여부의 탐지 및 보안성 평가를 위한 방법 및 시스템Method and system for detection and security evaluation of dex file application
아래의 설명은 덱스 파일의 난독화 적용 여부의 탐지 및 보안성 평가를 위한 방법 및 시스템 및 컴퓨터와 결합되어 보안성 평가 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램에 관한 것이다.The following description relates to a method and system for detection and detection of obfuscation of a dex file, and a computer program stored in a computer readable recording medium in combination with a computer to execute the security evaluation method on a computer.
앱스토어(App store)는 스마트폰과 같은 단말에 탑재할 수 있는 다양한 어플리케이션을 판매하는 온라인상의 콘텐츠 장터이다. 예를 들어, 어플리케이션의 개발자들은 개발된 어플리케이션을 단말에 설치하기 위한 파일(일례로, 안드로이드 응용 프로그램 패키지(Android Application Package, APK))를 앱스토어에 등록하고, 어플리케이션의 이용자들은 앱스토어를 통해 필요한 어플리케이션을 위한 파일을 다운로드받아 자신의 단말에 어플리케이션을 설치 및 구동할 수 있게 된다. 또한, 게임 퍼블리셔와 같이 다양한 게임 어플리케이션을 이용자들에게 배포하는 경우도 존재한다. 이처럼, 자신들이 직접 개발하지 않은 다양한 어플리케이션들을 개발자들로부터 등록받고, 등록받은 어플리케이션들을 이용자들에게 배포하는 어플리케이션 퍼블리셔들이 존재한다.The App store is an online content marketplace that sells various applications that can be mounted on a terminal such as a smartphone. For example, the developer of an application registers a file (for example, an Android Application Package (Apk)) for installing a developed application on a terminal in an app store, and users of the application are required through the app store. By downloading a file for the application it is possible to install and run the application on their terminal. In addition, there are cases where various game applications such as game publishers are distributed to users. As such, there are application publishers that register various applications that are not developed by themselves, and distribute the registered applications to users.
이때, 어플리케이션의 위험성은 다양한 관점에서 설명될 수 있다.At this time, the risk of the application can be described from various viewpoints.
일례로, 어플리케이션의 첫 번째 위험성은 어플리케이션이 악성 코드와 같이 악의적인 의도로 개발된 정보를 포함함으로써, 어플리케이션이 등록되는 어플리케이션 퍼블리셔나 또는 어플리케이션이 설치 및 구동되는 이용자들의 단말에서 악의적인 기능을 수행하는 경우의 위험성을 들 수 있다. 한국공개특허 제10-2014-0098025호는 앱 스토어로 업로드 된 어플리케이션의 보안 평가를 위한 시스템 및 그 방법에 관한 것으로, 앱스토어에 등록될 어플리케이션이 악의적인 기능을 수행하는 것으로 탐지되는 경우, 해당 어플리케이션의 진입(앱스토어로의 등록)을 거절하는 기술에 대해 개시하고 있다.For example, the first risk of an application is that the application contains information developed by malicious intentions, such as malicious code, to perform malicious functions on the terminal of the application publisher or the user on which the application is installed and run. There is a risk in the case. Korean Patent Laid-Open No. 10-2014-0098025 relates to a system and method for security evaluation of an application uploaded to an app store, and when an application to be registered in an app store detects a malicious function, the application Disclosed is a technique for rejecting entry into an app store.
다른 예로, 어플리케이션의 두 번째 위험성은 어플리케이션 자체의 보안성에 대한 위험성을 들 수 있다. 배포된 어플리케이션에 대한 분석을 통해 어플리케이션의 소스 코드가 변경 또는 수정됨에 따라 어플리케이션이 개발자에 의해 원래 의도된 기능이 아닌 다른 기능을 수행하게 됨으로써, 해당 어플리케이션을 통해 제공하고자 하는 서비스의 신뢰도가 감소하는 문제점이 존재한다. 따라서, 어플리케이션 퍼블리셔들은, 자신들이 직접 개발하지 않은 다양한 어플리케이션들(어플리케이션들의 설치 파일들)을 배포함에 있어서, 어플리케이션들에 대해 일정 수준 이상의 보안성을 제공할 필요성이 존재한다.As another example, the second risk of an application is the risk to the security of the application itself. As the source code of the application is changed or modified through analysis of the deployed application, the application performs a function other than the function originally intended by the developer, thereby reducing the reliability of the service to be provided through the application. This exists. Therefore, there is a need for application publishers to provide a certain level of security for applications in distributing various applications (installation files of applications) that they did not develop directly.
그러나, 이러한 어플리케이션의 두 번째 위험성과 관련하여, 등록되는 어플리케이션마다 제공하는 보안 수준은 차이가 있다. 예를 들어, 각 어플리케이션들에는 서로 다른 보안 수준의 보안 솔루션들이 탑재되어 있을 수 있고, 아무런 보안수단도 포함되어 있지 않을 수 있다. 또한, 각 어플리케이션들에 탑재된 보안 솔루션들마다 제공하는 보안 수준에도 차이가 존재한다.However, with respect to the second risk of such applications, there is a difference in the level of security provided for each registered application. For example, each application may be equipped with security solutions of different security levels and may not include any security measures. In addition, there are differences in the security levels provided by the security solutions mounted in each application.
종래기술에서는 단순히 프로그래밍 언어 수준(일례로, 안드로이드 응용 프로그램 패키지(Android Application Package, APK)에 대해 자바(java) 단의 취약점 점검만을 진행할 수 있을 뿐, 어플리케이션 퍼블리셔의 관점에서는, 등록되는 수많은 어플리케이션들 각각에 대해 일정한 수준 이상으로 유지되는 보안성을 제공하기 어렵다는 문제점이 있다.In the prior art, only a Java-level vulnerability check can be performed at the programming language level (for example, Android Application Package (Apk)), and from the application publisher's point of view, each of the numerous registered applications There is a problem that it is difficult to provide security that is maintained above a certain level.
어플리케이션 퍼블리셔의 관점에서, 등록되는 어플리케이션에 적용된 보안 수준을 난독화(obfuscation), 취약점(vulnerability) 및/또는 보안솔루션의 관점에 따라 객관적인 방법으로 분석 및 파악하고, 분석된 정보를 제공하여 어플리케이션의 보안성 향상을 위해 활용할 수 있는 보안성 평가 방법 및 시스템을 제공한다.From the point of view of the application publisher, the level of security applied to the registered application is analyzed and identified in an objective manner in terms of obfuscation, vulnerability, and / or security solution, and the analyzed information is provided to provide security for the application. It provides a method and system for evaluating security that can be used to improve gender.
안드로이드 응용 프로그램 패키지(Android Application Package, APK)가 포함하는 덱스 파일에 대한 난독화 적용 여부를 결정할 수 있는 보안성 평가 방법 및 시스템을 제공한다.Provides a method and system for evaluating security that can determine whether or not obfuscation is applied to Dex files included in Android Application Package (Apk).
어플리케이션의 보안성을 평가하는 방법에 있어서, 안드로이드 응용 프로그램 패키지(Android application package, APK)를 등록하는 단계; 상기 안드로이드 응용 프로그램 패키지가 포함하는 덱스 파일에서 어플리케이션 클래스를 검색하는 단계; 상기 어플리케이션 클래스가 포함하는 메서드의 바디 인스트럭션(body instruction)에서 호출되는 클래스 및 메서드에 기반하여 상기 안드로이드 응용 프로그램 패키지가 더 포함하는 다른 덱스 파일을 로딩하기 위한 API(Application Programming Interface) 호출 여부를 확인하는 단계 및 상기 다른 덱스 파일을 로딩하기 위한 API 호출이 존재하는 것으로 확인되는 경우, 상기 덱스 파일에 난독화(obfuscation)가 적용된 것으로 결정하는 단계를 포함하는 것을 특징으로 하는 보안성 평가 방법을 제공한다.A method for evaluating security of an application, the method comprising: registering an Android application package (Apk); Searching for an application class in a dex file included in the android application package; Determining whether to call an API (Application Programming Interface) for loading another Dex file further included in the Android application package based on a class and a method called in a body instruction of a method included in the application class And determining that an obfuscation has been applied to the dex file when it is determined that there is an API call for loading the other dex file.
상기 보안성 평가 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터 판독 가능한 기록매체를 제공한다.A computer program for recording a computer program for executing the security evaluation method is provided.
컴퓨터와 결합하여 상기 보안성 평가 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.A computer program stored in a computer readable recording medium for executing the security evaluation method in a computer in combination with a computer is provided.
어플리케이션의 보안성을 평가하는 시스템에 있어서, 컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는, 안드로이드 응용 프로그램 패키지(Android application package, APK)를 등록하고, 상기 안드로이드 응용 프로그램 패키지가 포함하는 덱스 파일에서 어플리케이션 클래스를 검색하고, 상기 어플리케이션 클래스가 포함하는 메서드의 바디 인스트럭션(body instruction)에서 호출되는 클래스 및 메서드에 기반하여 상기 안드로이드 응용 프로그램 패키지가 더 포함하는 다른 덱스 파일을 로딩하기 위한 API(Application Programming Interface) 호출 여부를 확인하고, 상기 다른 덱스 파일을 로딩하기 위한 API 호출이 존재하는 것으로 확인되는 경우, 상기 덱스 파일에 난독화(obfuscation)가 적용된 것으로 결정하는 것을 특징으로 하는 보안성 평가 시스템을 제공한다.A system for evaluating the security of an application, comprising: at least one processor implemented to execute instructions readable by a computer, the at least one processor registering an Android application package (Apk) Searching for an application class in a dex file included in the android application package, and further comprising the android application package based on a class and a method called in a body instruction of a method included in the application class. If it is determined whether an API (Application Programming Interface) call for loading another dex file is found, and it is determined that an API call for loading the other dex file exists, it is determined that obfuscation is applied to the dex file. It provides a security evaluation system characterized in that the decision.
어플리케이션 퍼블리셔의 관점에서, 등록되는 어플리케이션에 적용된 보안 수준을 난독화(obfuscation), 취약점(vulnerability) 및/또는 보안솔루션의 관점에 따라 객관적인 방법으로 분석 및 파악하고, 분석된 정보를 제공하여 어플리케이션의 보안성 향상을 위해 활용할 수 있다.From the point of view of the application publisher, the level of security applied to the registered application is analyzed and identified in an objective manner in terms of obfuscation, vulnerability, and / or security solution, and the analyzed information is provided to provide security for the application. Can be used to improve sex.
안드로이드 응용 프로그램 패키지(Android Application Package, APK)가 포함하는 덱스 파일에 대한 난독화 적용 여부를 결정할 수 있다.It is possible to determine whether to apply obfuscation to the Dex file included in the Android Application Package (Apk).
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
도 2는 본 발명의 일실시예에 있어서, 전자 기기 및 서버의 내부 구성을 설명하기 위한 블록도이다.2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention.
도 3은 본 발명의 일실시예에 따른 보안성 평가 시스템의 블록 다이어그램이다.3 is a block diagram of a security evaluation system according to an embodiment of the present invention.
도 4는 본 발명의 일실시예에 있어서, 덱스 파일의 난독화 적용 여부를 결정하는 예를 도시한 도면이다.4 is a diagram illustrating an example of determining whether to apply obfuscation of a dex file according to an embodiment of the present invention.
도 5는 본 발명의 일실시예에 있어서, API 호출의 탐지 과정의 예를 도시한 도면이다.5 is a diagram illustrating an example of a process of detecting an API call according to one embodiment of the present invention.
도 6은 본 발명의 일실시예에 있어서, 바디 인스트럭션의 암호화를 이용한 난독화를 탐지하는 예를 도시한 도면이다.6 is a diagram illustrating an example of detecting obfuscation using encryption of a body instruction according to an embodiment of the present invention.
도 7은 본 발명의 일실시예에 따른 서버의 프로세서가 포함할 수 있는 구성요소의 예를 도시한 블록도이다.7 is a block diagram illustrating an example of components that may be included in a processor of a server according to an embodiment of the present invention.
도 8은 본 발명의 일실시예에 따른 서버가 수행할 수 있는 보안성 평가 방법의 예를 도시한 흐름도이다.8 is a flowchart illustrating an example of a security evaluation method that can be performed by a server according to an embodiment of the present invention.
도 9는 본 발명의 일실시예에 따른 서버의 프로세서가 포함할 수 있는 구성요소의 다른 예를 도시한 블록도이다.9 is a block diagram illustrating another example of components that may be included in a processor of a server according to an embodiment of the present invention.
도 10은 본 발명의 일실시예에 따른 서버가 수행할 수 있는 보안성 평가 방법의 다른 예를 도시한 흐름도이다.10 is a flowchart illustrating another example of a security evaluation method that can be performed by a server according to an embodiment of the present invention.
이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings.
본 발명의 실시예들에 따른 보안성 평가 시스템은 이후 설명될 서버를 통해 구현될 수 있으며, 본 발명의 실시예들에 따른 보안성 평가 방법은 상술한 서버를 통해 수행될 수 있다. 예를 들어, 서버에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 서버는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 일실시예에 따른 보안성 평가 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터로 구현되는 서버와 결합되어 보안성 평가 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.The security evaluation system according to the embodiments of the present invention may be implemented through a server to be described later, and the security evaluation method according to the embodiments of the present invention may be performed through the server described above. For example, a computer program according to an embodiment of the present invention may be installed and run on a server, and the server may perform a security evaluation method according to an embodiment of the present invention under control of the driven computer program. have. The computer program described above may be stored in a computer-readable recording medium in combination with a computer-implemented server to execute a security evaluation method on a computer.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment of FIG. 1 illustrates an example including a plurality of electronic devices 110, 120, 130, and 140, a plurality of servers 150 and 160, and a network 170. 1 is an example for describing the present invention, and the number of electronic devices or the number of servers is not limited as shown in FIG. 1.
복수의 전자 기기들(110, 120, 130, 140)은 컴퓨터 장치로 구현되는 고정형 단말이거나 이동형 단말일 수 있다. 복수의 전자 기기들(110, 120, 130, 140)의 예를 들면, 스마트폰(smart phone), 휴대폰, 네비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 태블릿 PC 등이 있다. 일례로 도 1에서는 전자 기기 1(110)의 예로 스마트폰의 형상을 나타내고 있으나, 본 발명의 실시예들에서 전자 기기 1(110)은 실질적으로 무선 또는 유선 통신 방식을 이용하여 네트워크(170)를 통해 다른 전자 기기들(120, 130, 140) 및/또는 서버(150, 160)와 통신할 수 있는 다양한 물리적인 장치들 중 하나를 의미할 수 있다.The plurality of electronic devices 110, 120, 130, and 140 may be fixed terminals or mobile terminals implemented as computer devices. Examples of the plurality of electronic devices 110, 120, 130, and 140 include a smart phone, a mobile phone, a navigation device, a computer, a notebook computer, a digital broadcasting terminal, a personal digital assistant (PDA), and a portable multimedia player (PMP). Tablet PC). For example, although FIG. 1 illustrates the shape of a smart phone as an example of the electronic device 1 110, in the embodiments of the present invention, the electronic device 1 110 may use a wireless or wired communication method to substantially connect the network 170. It may mean one of various physical devices that can communicate with other electronic devices 120, 130, 140 and / or servers 150, 160.
통신 방식은 제한되지 않으며, 네트워크(170)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망)을 활용하는 통신 방식뿐만 아니라 기기들간의 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크(170)는, PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(170)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited, and may include not only a communication method using a communication network (for example, a mobile communication network, a wired internet, a wireless internet, a broadcasting network) that the network 170 may include, but also a short range wireless communication between devices. For example, the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). And one or more of networks such as the Internet. The network 170 may also include any one or more of network topologies, including bus networks, star networks, ring networks, mesh networks, star-bus networks, trees, or hierarchical networks, but It is not limited.
서버(150, 160) 각각은 복수의 전자 기기들(110, 120, 130, 140)과 네트워크(170)를 통해 통신하여 명령, 코드, 파일, 컨텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다. 예를 들어, 서버(150)는 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 제1 서비스를 제공하는 시스템일 수 있으며, 서버(160) 역시 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 제2 서비스를 제공하는 시스템일 수 있다. 보다 구체적인 예로, 서버(150)는 어플리케이션 퍼블리셔의 시스템을 구성하는 장치들 중 적어도 일부일 수 있으며, 복수의 전자 기기들(110, 120, 130, 140)에 설치되어 동작되는 어플리케이션의 패키지 파일을 등록받아 배포하는 서비스를 상기 제1 서비스로서 제공할 수 있다. 다른 예로, 서버(160)는 배포된 패키지 파일을 통해 어플리케이션을 설치 및 구동하는 복수의 전자 기기들(110, 120, 130, 140)로 상기 어플리케이션과 연관된 서비스를 상기 제2 서비스로서 제공할 수 있다. 실시예에 따라 서버(150)는 등록되는 패키지 파일의 보안성 평가를 위한 전용 시스템으로서 등록되는 패키지 파일에 대해 평가된 보안성에 대한 정보를 제공하도록 구현될 수도 있다.Each of the servers 150 and 160 communicates with the plurality of electronic devices 110, 120, 130, and 140 through the network 170 to provide a command, code, file, content, service, or the like. It may be implemented in devices. For example, the server 150 may be a system that provides a first service to a plurality of electronic devices 110, 120, 130, and 140 connected through the network 170, and the server 160 may also have a network ( It may be a system that provides a second service to the plurality of electronic devices 110, 120, 130, and 140 connected through the 170. As a more specific example, the server 150 may be at least some of the devices constituting the system of the application publisher, and receives a package file of an application installed and operated on the plurality of electronic devices 110, 120, 130, and 140. The service to be distributed can be provided as the first service. As another example, the server 160 may provide a service associated with the application as the second service to a plurality of electronic devices 110, 120, 130, and 140 that install and run the application through the distributed package file. . According to an embodiment, the server 150 may be implemented as a dedicated system for evaluating the security of a package file to be registered to provide information about the evaluated security for the package file to be registered.
도 2는 본 발명의 일실시예에 있어서, 전자 기기 및 서버의 내부 구성을 설명하기 위한 블록도이다. 도 2에서는 전자 기기에 대한 예로서 전자 기기 1(110), 그리고 서버(150)의 내부 구성을 설명한다. 또한, 다른 전자 기기들(120, 130, 140)이나 서버(160) 역시 상술한 전자 기기 1(110) 또는 서버(150)와 동일한 또는 유사한 내부 구성을 가질 수 있다.2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention. 2 illustrates an internal configuration of the electronic device 1 110 and the server 150 as an example of the electronic device. In addition, the other electronic devices 120, 130, 140, or the server 160 may also have the same or similar internal configuration as the aforementioned electronic device 1 110 or the server 150.
전자 기기 1(110)과 서버(150)는 메모리(211, 221), 프로세서(212, 222), 통신 모듈(213, 223) 그리고 입출력 인터페이스(214, 224)를 포함할 수 있다. 메모리(211, 221)는 컴퓨터에서 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(211, 221)와는 구분되는 별도의 영구 저장 장치로서 전자 기기 1(110)나 서버(150)에 포함될 수도 있다. 또한, 메모리(211, 221)에는 운영체제와 적어도 하나의 프로그램 코드(일례로 전자 기기 1(110)에 설치되어 구동되는 브라우저나 특정 서비스의 제공을 위해 전자 기기 1(110)에 설치된 어플리케이션 등을 위한 코드)가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(211, 221)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 모듈(213, 223)을 통해 메모리(211, 221)에 로딩될 수도 있다. 예를 들어, 적어도 하나의 프로그램은 개발자들 또는 어플리케이션의 설치 파일을 배포하는 파일 배포 시스템(일례로, 상술한 서버(160))이 네트워크(170)를 통해 제공하는 파일들에 의해 설치되는 컴퓨터 프로그램(일례로 상술한 어플리케이션)에 기반하여 메모리(211, 221)에 로딩될 수 있다.The electronic device 1 110 and the server 150 may include memories 211 and 221, processors 212 and 222, communication modules 213 and 223, and input / output interfaces 214 and 224. The memories 211 and 221 may be computer-readable recording media, and may include a permanent mass storage device such as random access memory (RAM), read only memory (ROM), and a disk drive. In this case, the non-volatile mass storage device such as a ROM and a disk drive may be included in the electronic device 1 110 or the server 150 as a separate permanent storage device that is separated from the memories 211 and 221. In addition, the memory 211, 221 includes an operating system and at least one program code (for example, a browser installed and driven in the electronic device 1 110 or an application installed in the electronic device 1 110 to provide a specific service). Code) can be stored. These software components may be loaded from a computer readable recording medium separate from the memories 211 and 221. Such a separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, disk, tape, DVD / CD-ROM drive, memory card, and the like. In other embodiments, software components may be loaded into the memory 211, 221 through a communication module 213, 223 that is not a computer readable recording medium. For example, at least one program is a computer program that is installed by files provided by a file distribution system (for example, the server 160 described above) through the network 170 to distribute installation files of developers or applications. It may be loaded into the memories 211 and 221 based on (for example, the above-described application).
프로세서(212, 222)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(211, 221) 또는 통신 모듈(213, 223)에 의해 프로세서(212, 222)로 제공될 수 있다. 예를 들어 프로세서(212, 222)는 메모리(211, 221)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다. Processors 212 and 222 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations. Instructions may be provided to the processors 212, 222 by the memory 211, 221 or the communication modules 213, 223. For example, the processors 212 and 222 may be configured to execute a command received according to a program code stored in a recording device such as the memory 211 and 221.
통신 모듈(213, 223)은 네트워크(170)를 통해 전자 기기 1(110)과 서버(150)가 서로 통신하기 위한 기능을 제공할 수 있으며, 전자 기기 1(110) 및/또는 서버(150)가 다른 전자 기기(일례로 전자 기기 2(120)) 또는 다른 서버(일례로 서버(160))와 통신하기 위한 기능을 제공할 수 있다. 일례로, 전자 기기 1(110)의 프로세서(212)가 메모리(211)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이 통신 모듈(213)의 제어에 따라 네트워크(170)를 통해 서버(150)로 전달될 수 있다. 역으로, 서버(150)의 프로세서(222)의 제어에 따라 제공되는 제어 신호나 명령, 컨텐츠, 파일 등이 통신 모듈(223)과 네트워크(170)를 거쳐 전자 기기 1(110)의 통신 모듈(213)을 통해 전자 기기 1(110)로 수신될 수 있다. 예를 들어 통신 모듈(213)을 통해 수신된 서버(150)의 제어 신호나 명령, 컨텐츠, 파일 등은 프로세서(212)나 메모리(211)로 전달될 수 있고, 컨텐츠나 파일 등은 전자 기기 1(110)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The communication modules 213 and 223 may provide a function for the electronic device 1 110 and the server 150 to communicate with each other through the network 170, and the electronic device 1 110 and / or the server 150 may communicate with each other. May provide a function for communicating with another electronic device (eg, electronic device 2 120) or another server (eg, server 160). For example, a request generated by the processor 212 of the electronic device 1 110 according to a program code stored in a recording device such as the memory 211 may be controlled by the server 170 through the network 170 under the control of the communication module 213. 150). Conversely, control signals, commands, contents, files, and the like provided according to the control of the processor 222 of the server 150 are transmitted to the communication module of the electronic device 1 110 via the communication module 223 and the network 170 ( It may be received by the electronic device 1110 through 213. For example, the control signal, command, content, file, etc. of the server 150 received through the communication module 213 may be transmitted to the processor 212 or the memory 211, and the content, file, etc. may be transferred to the electronic device 1. 110 may be stored as a storage medium (permanent storage described above) that may further include.
입출력 인터페이스(214)는 입출력 장치(215)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(214)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(215)는 전자 기기 1(110)과 하나의 장치로 구성될 수도 있다. 또한, 서버(150)의 입출력 인터페이스(224)는 서버(150)와 연결되거나 서버(150)가 포함할 수 있는 입력 또는 출력을 위한 장치(미도시)와의 인터페이스를 위한 수단일 수 있다. 보다 구체적인 예로, 전자 기기 1(110)의 프로세서(212)가 메모리(211)에 로딩된 컴퓨터 프로그램의 명령을 처리함에 있어서 서버(150)나 전자 기기 2(120)가 제공하는 데이터를 이용하여 구성되는 서비스 화면이나 컨텐츠가 입출력 인터페이스(214)를 통해 디스플레이에 표시될 수 있다.The input / output interface 214 may be a means for interfacing with the input / output device 215. For example, the input device may include a device such as a keyboard or a mouse, and the output device may include a device such as a display or a speaker. As another example, the input / output interface 214 may be a means for interfacing with a device in which functions for input and output are integrated into one, such as a touch screen. The input / output device 215 may be configured as one device with the electronic device 1110. In addition, the input / output interface 224 of the server 150 may be a means for interfacing with an apparatus (not shown) for input or output that may be connected to or included in the server 150. As a more specific example, the processor 212 of the electronic device 1110 uses data provided by the server 150 or the electronic device 2 120 in processing a command of a computer program loaded in the memory 211. The service screen or the content may be displayed on the display through the input / output interface 214.
또한, 다른 실시예들에서 전자 기기 1(110) 및 서버(150)는 도 2의 구성요소들보다 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 전자 기기 1(110)은 상술한 입출력 장치(215) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), GPS(Global Positioning System) 모듈, 카메라, 각종 센서, 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다. 보다 구체적인 예로, 전자 기기 1(110)이 스마트폰인 경우, 일반적으로 스마트폰이 포함하고 있는 가속도 센서나 자이로 센서, 카메라 모듈, 각종 물리적인 버튼, 터치패널을 이용한 버튼, 입출력 포트, 진동을 위한 진동기 등의 다양한 구성요소들이 전자 기기 1(110)에 더 포함되도록 구현될 수 있다.Also, in other embodiments, the electronic device 1 110 and the server 150 may include more components than those of FIG. 2. However, it is not necessary to clearly show most of the prior art components. For example, the electronic device 1 110 may be implemented to include at least some of the above-described input / output devices 215 or other components such as a transceiver, a global positioning system (GPS) module, a camera, various sensors, a database, and the like. It may further include elements. More specifically, when the electronic device 1 110 is a smartphone, an acceleration sensor, a gyro sensor, a camera module, various physical buttons, a button using a touch panel, an input / output port, and vibration for a smartphone generally include Various components such as a vibrator may be implemented to be further included in the electronic device 1 110.
도 3은 본 발명의 일실시예에 따른 보안성 평가 시스템의 블록 다이어그램이다. 도 3의 보안성 평가 시스템(300)은 앞서 설명한 서버(150)를 통해 구현될 수 있다. 이때, 보안성 평가 시스템(300)이 포함하는 패키지 분해 모듈(310), 파일 식별 모듈(320), 파싱 모듈(330), 분석 모듈(340) 및 리포트 모듈(350)은 서버(150)가 포함하는 프로세서(222)의 서로 다른 기능들(different functions)의 표현들일 수 있다. 예를 들어, 서버(150)의 프로세서(222)가 컴퓨터 프로그램이 포함하는 제어 명령에 따라 패키지 파일을 분해하는 프로세서(222)의 기능으로서 패키지 분해 모듈(310)이 이용될 수 있다. 이때, 분석 모듈(340)이 포함하는 취약점 탐지 모듈(342)이 취약점 탐지를 위한 핵심 모듈로서 구현될 수 있다.3 is a block diagram of a security evaluation system according to an embodiment of the present invention. The security evaluation system 300 of FIG. 3 may be implemented through the server 150 described above. In this case, the server 150 includes the package decomposition module 310, the file identification module 320, the parsing module 330, the analysis module 340, and the report module 350 included in the security evaluation system 300. May be representations of the different functions of the processor 222. For example, the package disassembly module 310 may be used as a function of the processor 222 in which the processor 222 of the server 150 disassembles a package file according to a control command included in a computer program. In this case, the vulnerability detection module 342 included in the analysis module 340 may be implemented as a core module for vulnerability detection.
앞서 설명한 바와 같이, 서버(150)는 개발자들이 등록하는 어플리케이션의 패키지 파일들을 이용자들에게 배포하는 서비스를 제공할 수 있다.As described above, the server 150 may provide a service for distributing package files of applications registered by developers to users.
이때, 패키지 분해 모듈(310)은 등록된 패키지 파일들을 분해할 수 있다. 예를 들어, 안드로이드 응용 프로그램 패키지(Android Application Package, APK)는 모바일 운영체제인 안드로이드의 소프트웨어와 미들웨어 배포에 사용되는 패키지 파일의 파일 포맷으로서 '.apk' 확장자를 갖는다. 이하의 실시예들에서는 이러한 APK와 같은 패키지 파일을 기반으로 본 발명의 실시예들을 설명하나, 이러한 설명을 통해 다른 종류의 패키지 파일에도 동일 또는 유사한 특징이 적용될 수 있음을 당업자라면 쉽게 이해할 수 있을 것이다.In this case, the package disassembly module 310 may disassemble the registered package files. For example, an Android application package (Apk) is a file format of a package file used for distributing software and middleware of Android, which is a mobile operating system, and has a '.apk' extension. In the following embodiments, embodiments of the present invention will be described based on a package file such as an APK, but it will be readily understood by those skilled in the art that the same or similar features may be applied to other kinds of package files through this description. .
또한, APK는 이미 잘 알려져 있기 때문에 APK 파일 또는 APK 파일이 포함하는 파일들 자체에 대한 설명 역시 당업자가 이미 잘려진 종래기술들을 통해 쉽게 이해할 수 있을 것이며, 따라서 APK 파일 또는 APK 파일이 포함하는 파일들 자체에 대한 자세한 설명은 생략한다.In addition, since the APK is already well known, the description of the APK file or the files themselves included in the APK file will be easily understood by those skilled in the art through the conventional arts, and thus, the APK file or the files included in the APK file itself. Detailed descriptions thereof will be omitted.
파일 식별 모듈(320)은 분해된 패키지 파일에 포함된 파일들을 식별할 수 있다. 도 3에서 나타난 확장자들('dex', 'so', 'dll', 'json', 'ini', 'apk', 'xml', 'cert')은 이미 설명한 바와 같이 APK와 관련된 종래기술들을 통해 당업자가 쉽게 이해할 수 있을 것이다.The file identification module 320 may identify files included in the disassembled package file. The extensions shown in Figure 3 ('dex', 'so', 'dll', 'json', 'ini', 'apk', 'xml', 'cert') as described previously, It will be readily understood by those skilled in the art.
파싱 모듈(330)은 식별된 파일들을 파싱할 수 있다. 이를 위해, 파서(331)는 식별된 파일들 중 특정 확장자(일례로, 'dex', 'so', 'dll')의 파일들을 파싱할 수 있으며, 콜렉터(332)는 특정 확장자(일례로, 'json', 'ini', 'apk', 'xml', 'cert')의 파일들로부터 필요한 정보를 수집할 수 있다.The parsing module 330 may parse the identified files. To this end, the parser 331 may parse files of a specific extension (eg, 'dex', 'so', 'dll') among the identified files, and the collector 332 may parse a specific extension (eg, You can collect the necessary information from the files of 'json', 'ini', 'apk', 'xml', and 'cert').
예를 들어, 파싱 모듈(330)은 'dex' 파일이 포함하는 클래스(class)들과 메서드(method)들 각각을 식별할 수 있으며, 메서드가 포함하는 인스트럭션들을 추적하여 다수의 매스(mass)들로 구분하여 식별할 수 있다. 인스트럭션들의 매스는 'goto' 문이나, 'switch' 문 또는 'if' 문 등과 같은 분기명령을 기준으로 구분될 수 있다. 또한, 파싱 모듈(330)은 이러한 인스트럭션 매스들간의 호출 관계에 대한 정보를 생성하여 관리할 수 있다. 일례로, 인스트럭션 매스들간의 호출 관계는 트리 구조로 관리될 수 있으며, 호출 관계에 대한 정보는 특정 인스트럭션 매스가 호출하는 메서드에 대한 정보를 포함할 수 있다. 이러한 정보의 생성 및 관리는 APK 파일과 같은 패키지 파일이 포함하는 파일들 각각에 대해 처리될 수 있으며, 파일의 특성에 따라 파싱 방식은 달라질 수 있다.For example, the parsing module 330 may identify each of the classes and methods included in the 'dex' file, and track a number of masses by instructing the instructions contained in the method. Can be identified by separating. The mass of instructions can be divided based on branch instructions such as the 'goto' statement, the 'switch' statement, or the 'if' statement. In addition, the parsing module 330 may generate and manage information on call relationships between these instruction masses. For example, the call relations between the instruction masses may be managed in a tree structure, and the information on the call relations may include information on a method called by a specific instruction mass. The generation and management of such information may be processed for each of files included in a package file such as an APK file, and the parsing method may vary according to the characteristics of the file.
파싱된 정보들과 수집된 정보들은 분석 모듈(340)로 전달될 수 있다.The parsed information and the collected information may be passed to the analysis module 340.
분석 모듈(340)은 파싱 모듈(330)로부터 전달되는 정보들에 기반하여 해당 패키지 파일(또는 해당 패키지 파일을 통해 전자 기기 1(110)과 같은 이용자 단말에서 설치 및 구동되는 어플리케이션)에 대한 난독화(obfuscation) 관점, 취약점(vulnerability) 관점 및 보안솔루션 관점의 분석정보를 생성 및 제공할 수 있다.The analysis module 340 obfuscates a corresponding package file (or an application installed and driven in a user terminal such as the electronic device 1 110 through the package file) based on the information transmitted from the parsing module 330. It can generate and provide analysis information from an obfuscation point of view, a vulnerability point of view, and a security solution point of view.
예를 들어, 난독화 탐지 모듈(341)은 특정 확장자(일례로, 'dex', 'so', 'dll')의 파일들에 어느 정도 수준의 난독화가 적용되어 있는가에 대한 분석정보를 생성할 수 있다. 이를 위해, 난독화 탐지 모듈(341)은 파일의 종류에 따라 미리 설정되는 항목별로 난독화가 적용되어 있는지 여부 등을 판단할 수 있다.For example, the obfuscation detection module 341 may generate analysis information on the level of obfuscation applied to files of a specific extension (eg, 'dex', 'so', 'dll'). Can be. To this end, the obfuscation detection module 341 may determine whether obfuscation is applied for each preset item according to the type of file.
또한, 취약점 탐지 모듈(342)은 특정 확장자(일례로, 'dex', 'so', 또는 설정(configuration) 파일의 확장자인 'config')의 파일들에 어떠한 취약점이 있는가에 대한 분석정보를 생성할 수 있다. 이를 위해, 보안성 평가 시스템(300)은 이미 알려진 취약점들에 대한 정보를 관리할 수 있으며, 취약점 탐지 모듈(342)은 이러한 취약점들에 대한 정보를 이용하여 어떠한 파일들에 어떠한 취약점이 존재하는가에 대한 분석정보를 생성할 수 있다.In addition, the vulnerability detection module 342 generates analysis information on whether there are any vulnerabilities in files of a specific extension (for example, 'dex', 'so', or 'config' which is a configuration file extension). can do. To this end, the security evaluation system 300 may manage information about known vulnerabilities, and the vulnerability detection module 342 uses information about these vulnerabilities to determine which vulnerabilities exist in which files. Analyze information can be generated.
또한, 플랫폼 탐지 모듈(343)은 해당 어플리케이션이 개발된 플랫폼 및/또는 해당 어플리케이션이 동작하는 플랫폼에 대한 정보를 추출할 수 있다. 예를 들어, 보안성 평가 시스템(300)은 해당 어플리케이션이 어떠한 플랫폼(일례로, 유니티(Unity)나 코코스(Cocos)와 같은 개발 툴)에서 개발되었는가에 따라 서로 다른 분석 방식을 활용할 수 있다.In addition, the platform detection module 343 may extract information about the platform on which the corresponding application is developed and / or the platform on which the corresponding application operates. For example, the security evaluation system 300 may use different analysis methods depending on which platform the application is developed on, for example, a development tool such as Unity or Cocos.
또는, 보안성 평가 시스템(300)은 어플리케이션이 동작하는 플랫폼마다 패키지 파일이 포함하는 파일 포맷이 달라질 수 있기 때문에, 이러한 플랫폼마다 서로 다른 분석 방식을 활용할 수도 있다.Alternatively, the security evaluation system 300 may use a different analysis method for each platform because the file format included in the package file may vary for each platform on which the application operates.
이를 위해, 보안성 평가 시스템(300)은 패키지 파일에 대한 플랫폼에 대한 정보를 추출할 수 있으며, 이러한 정보에 기반하여 패키지 파일을 분석하거나 또는 추출된 플랫폼에 대한 정보를 외부로 제공할 수 있다.To this end, the security evaluation system 300 may extract information about the platform for the package file, and may analyze the package file or provide information about the extracted platform to the outside based on such information.
보안 툴 탐지 모듈(344)은 패키지 파일의 개발자들이 자체적으로 패키지 파일에 삽입한 보안솔루션을 탐지할 수 있다. 예를 들어, 제3자에 의해 라이브러리 형태로 제공되는 제1 보안 툴이 개발자에 의해 해당 패키지 파일에 추가되어 있을 수 있다. 다른 예로, 개발자가 자체 개발한 제2 보안 툴이 개발자에 의해 해당 패키지 파일에 추가되어 있을 수도 있다. 다시 말해, 보안 툴 탐지 모듈(344)은 이러한 보안 툴의 패키지 파일에 대한 적용 여부에 대한 분석정보를 생성할 수 있다.The security tool detection module 344 can detect the security solution that the developer of the package file has inserted into the package file. For example, a first security tool provided in a library form by a third party may be added to a corresponding package file by a developer. As another example, a second security tool developed by the developer may be added to the package file by the developer. In other words, the security tool detection module 344 may generate analysis information about whether the security tool is applied to the package file.
관계 분석 모듈(345)은 패키지 파일이 포함하는 파일들간의 참조 관계에 대한 분석정보를 생성할 수 있다. 예를 들어, 제1 파일이 제2 파일을 호출하기 위한 코드를 포함하고 있는 경우, 제1 파일과 제2 파일간의 참조 관계에 대한 정보가 분석정보에 포함되도록 분석정보가 생성될 수 있다.The relationship analysis module 345 may generate analysis information about a reference relationship between files included in the package file. For example, when the first file includes code for calling the second file, the analysis information may be generated such that the information about the reference relationship between the first file and the second file is included in the analysis information.
리포트 모듈(350)은 분석 모듈(340)에서 생성되는 분석정보들을 수집하여 보안성 평가 시스템(300)의 관계자(일례로 서버(150)의 관리자 또는 어플리케이션 퍼블리셔의 보안 검수 팀)에게 제공하기 위한 보고서를 생성할 수 있다. 이러한 보고서는 도 3의 예에서와 같이 HTML(Hypertext Markup Language)나 XML(eXtensible Markup Language)를 이용하여 관계자들의 단말로 제공될 수 있다.The report module 350 collects the analysis information generated by the analysis module 340 and provides a report for the person of the security evaluation system 300 (for example, an administrator of the server 150 or a security inspection team of an application publisher). Can be generated. Such a report may be provided to terminals of related parties using Hypertext Markup Language (HTML) or eXtensible Markup Language (XML) as in the example of FIG. 3.
도 4는 본 발명의 일실시예에 있어서, 덱스 파일의 난독화 적용 여부를 결정하는 예를 도시한 도면이다. 보안성 평가 시스템(300)에 등록되는 안드로이드 응용 프로그램 패키지(Android application package, APK)는 난독화가 적용되지 않은 상태 또는 난독화가 적용된 상태의 덱스 파일을 포함할 수 있다. 이때, 보안성 평가 시스템(300)은 등록된 안드로이드 응용 프로그램 패키지가 포함하는 덱스 파일에 난독화가 적용되어 있는지 여부를 결정할 수 있다.4 is a diagram illustrating an example of determining whether to apply obfuscation of a dex file according to an embodiment of the present invention. An Android application package (Apk) registered in the security evaluation system 300 may include a dex file in an obfuscated state or an obfuscated state. In this case, the security evaluation system 300 may determine whether obfuscation is applied to the dex file included in the registered Android application package.
도 4에 도시된 제1 덱스 파일(410)은 난독화가 적용되지 않은 상태의 파일을 나타낼 수 있으며, 제2 덱스 파일(420) 및 제3 덱스 파일(430)은 난독화가 적용된 상태의 파일들을 나타낼 수 있다. 다시 말해, 제1 덱스 파일(410)은 제2 덱스 파일(420) 및 제3 덱스 파일(430)과 같이 두 개의 덱스 파일들(멀티 덱스(multi dex))로 난독화될 수 있다. 이때, 제2 덱스 파일(420)은 제1 덱스 파일(410)에서 클래스들(클래스 A(ClassA), 클래스 B(ClassB), 클래스 C(ClassC), 클래스 D(ClassD) 및 클래스 E(ClassE)의 다섯 개의 클래스들, 이하 '클래스 A~E')이 제거된 파일일 수 있으며, 제거된 클래스들은 암호화되어 암호화된 클래스 A~E(Crypted ClassA~E, 431)가 포함되는 새로운 덱스 파일인 제3 덱스 파일(430)이 안드로이드 응용 프로그램 패키지에 포함될 수 있다.The first dex file 410 illustrated in FIG. 4 may represent a file in which obfuscation is not applied, and the second dex file 420 and the third dex file 430 may represent files in the obfuscated state. Can be. In other words, the first dex file 410 may be obfuscated into two dex files (multi dex), such as the second dex file 420 and the third dex file 430. In this case, the second dex file 420 may include the classes (Class A, Class B, Class C, Class D, and Class E) in the first Dex file 410. The five classes of, hereinafter, 'Class A ~ E') may be files that have been removed, and the removed classes are new dex files that contain encrypted and encrypted classes A ~ E (431). The 3 Dex file 430 may be included in the Android application package.
이 경우 도 4의 실시예에서, 덱스 파일에 포함되어야 할 클래스들(클래스 A~E)은 제3 덱스 파일(430)에 암호화되어 저장되어 있기 때문에, 제2 덱스 파일(420)은 제3 덱스 파일(430)을 메모리에 로딩하기 위한 기능을 포함해야 한다. 다시 말해, 도 4에 도시된 바와 같이 제2 덱스 파일(420)이 포함하는 어플리케이션 클래스(Application, 421)에는 이러한 덱스 파일의 로딩을 위한 기능이 포함되어야 한다. 안드로이드 응용 프로그램 패키지에서는 덱스 파일의 로딩을 위한 API가 제공되고 있으며, 따라서 제2 덱스 파일(420)이 포함하는 어플리케이션 클래스(421)는 이러한 API 호출을 위한 기능(DexLoader)을 포함할 수 있다. 예를 들어, 어플리케이션 클래스(421)를 통해 덱스 파일(도 4의 실시예에서는 제3 덱스 파일(430))의 로딩을 위한 클래스로더('ClassLoader' 또는 'DexClassLoader') 클래스와 이러한 클래스로더 클래스가 포함하는 로드클래스('LoadClass') 메서드가 호출되어야만 한다.In this case, since the classes (classes A to E) to be included in the dex file are encrypted and stored in the third dex file 430 in the embodiment of FIG. 4, the second dex file 420 is the third dex. Must include a function for loading file 430 into memory. In other words, as shown in FIG. 4, the application class 421 included in the second dex file 420 should include a function for loading the dex file. In the Android application package, an API for loading a dex file is provided. Therefore, the application class 421 included in the second dex file 420 may include a function (DexLoader) for calling the API. For example, the class loader ('ClassLoader' or 'DexClassLoader') class and the class loader class for loading the dex file (the third dex file 430 in the embodiment of FIG. 4) through the application class 421 The containing loadclass ('LoadClass') method must be called.
이러한 관점에서 하나의 덱스 파일(일례로 도 4에서 제2 덱스 파일(420))에 대한 난독화 적용 여부를 탐지하기 위해, 보안성 평가 시스템(300)은 해당 덱스 파일이 포함하는 어플리케이션 클래스(일례로, 도 4에서 제2 덱스 파일(420)이 포함하는 어플리케이션 클래스(421))를 통해 덱스 파일(일례로, 도 4에서 제3 덱스 파일(430))의 로딩을 위한 API 호출이 이루어지는지 여부를 확인할 수 있다.In this regard, in order to detect whether or not obfuscation is applied to one dex file (for example, the second dex file 420 in FIG. 4), the security evaluation system 300 may include an application class included in the dex file. 4, whether an API call for loading a dex file (eg, the third dex file 430 in FIG. 4) is made through the application class 421 included in the second dex file 420 in FIG. 4. You can check.
보다 구체적인 예로, 안드로이드 응용 프로그램 패키지에서는 상술한 예에서의 클래스로더 클래스와 이러한 클래스로더 클래스가 포함하는 로드클래스 메서드가 호출되는지 여부에 따라 해당 덱스 파일의 난독화 적용 여부가 결정될 수 있다. 다시 말해, 보안성 평가 시스템(300)은 난독화 적용 여부를 결정하고자 하는 덱스 파일에서 클래스로더 클래스 및 로드클래스 메서드의 호출 여부를 확인할 수 있다.As a more specific example, in the Android application package, whether or not to apply obfuscation of the corresponding dex file may be determined according to whether the class loader class and the load class method included in the class loader class are called. In other words, the security evaluation system 300 may check whether the class loader class and the load class method are called in the dex file to determine whether to apply obfuscation.
도 4의 제1 덱스 파일(410)에서는 클래스 A~E를 모두 포함하고 있기 때문에 별도의 덱스 파일을 로딩하기 위한 API 호출이 이루어지지 않을 것이며, 이를 통해 보안성 평가 시스템(300)은 제1 덱스 파일(410)에 난독화가 적용되지 않았음을 파악할 수 있게 된다. 한편, 도 4의 제2 덱스 파일(420)은 제3 덱스 파일(430)이 로딩되어야만 암호화된 클래스 A~E(431)를 얻을 수 있기 때문에 제3 덱스 파일(430)을 로딩하기 위한 API 호출이 이루어질 것이고, 보안성 평가 시스템(300)은 이러한 API 호출의 탐지를 통해 제2 덱스 파일(420)에 난독화가 적용되어 있음을 파악할 수 있다.Since the first dex file 410 of FIG. 4 includes all of classes A to E, an API call for loading a separate dex file will not be made, and thus the security evaluation system 300 makes the first dex file. It can be seen that the obfuscation is not applied to the file 410. On the other hand, since the second dex file 420 of FIG. 4 can obtain the encrypted classes A to E 431 only when the third dex file 430 is loaded, an API call for loading the third dex file 430 is performed. This will be done, and the security evaluation system 300 can detect that obfuscation is applied to the second dex file 420 through the detection of such an API call.
도 5는 본 발명의 일실시예에 있어서, API 호출의 탐지 과정의 예를 도시한 도면이다.5 is a diagram illustrating an example of a process of detecting an API call according to one embodiment of the present invention.
과정 1에서 보안성 평가 시스템(300)은 APK(500)를 등록할 수 있다. APK(500)는 어플리케이션의 이용자들에게 배포되기 위해 어플리케이션 퍼블리셔에 등록될 수 있다. 이미 설명한 바와 같이 보안성 평가 시스템(300)은 어플리케이션 퍼블리셔가 등록되는 어플리케이션들의 패키지 파일들을 배포하기 위한 서비스를 제공하는 장치(일례로, 서버(150))에 구현되거나 또는 상술한 장치와 네트워크(170)를 통해 통신하는 별도의 시스템으로서 구현될 수 있다. 예를 들어, 보안성 평가 시스템(300)은 서버(150)에 등록되는 APK(500)를 네트워크(170)를 통해 수신하여 등록할 수 있다.In process 1, the security evaluation system 300 may register the APK 500. APK 500 may be registered with an application publisher for distribution to users of the application. As described above, the security evaluation system 300 may be implemented in an apparatus (eg, the server 150) that provides a service for distributing package files of applications for which an application publisher is registered, or the apparatus and network 170 described above. It can be implemented as a separate system to communicate over). For example, the security evaluation system 300 may receive and register the APK 500 registered in the server 150 through the network 170.
과정 2에서 보안성 평가 시스템(300)은 안드로이드 매니페스트 파일(510)로부터 어플리케이션 클래스(521)의 클래스명을 추출할 수 있다. 안드로이드 응용 프로그램 패키지가 'AndroidManifest.xml'과 같이 안드로이드 매니페스트 파일(510)을 포함하는 것이나, 이러한 안드로이드 매니페스트 파일(510)은 어플리케이션 클래스(521)의 클래스명을 포함함에 대해서는 이미 잘 알려져 있다.In process 2, the security evaluation system 300 may extract the class name of the application class 521 from the Android manifest file 510. Although the Android application package includes an Android manifest file 510 such as 'AndroidManifest.xml', it is well known that the Android manifest file 510 includes a class name of an application class 521.
과정 3에서 보안성 평가 시스템(300)은 추출된 클래스명을 통해 식별되는 어플리케이션 클래스(521)에서 모든 호출을 수집할 수 있다. 예를 들어, 보안성 평가 시스템(300)은 추출된 클래스명을 통해 제1 덱스 파일(520)에 포함된 어플리케이션 클래스(521)를 식별할 수 있으며, 식별된 어플리케이션 클래스(521)가 포함하는 모든 메서드들 각각의 바디 인스트럭션에서 호출되는 클래스와 메서드에 대한 호출 리스트를 생성할 수 있다. 일례로, 보안성 평가 시스템(300)은 도 3을 통해 설명한 파싱 모듈(330)에서 생성되는 호출 관계에 기반하여 상술한 호출 리스트를 생성할 수 있다.In step 3, the security evaluation system 300 may collect all calls from the application class 521 identified through the extracted class name. For example, the security evaluation system 300 may identify the application class 521 included in the first dex file 520 through the extracted class name, and include all of the identified application classes 521. You can create a call list for the classes and methods that are called in each of the body instructions. For example, the security evaluation system 300 may generate the above-mentioned call list based on the call relationship generated by the parsing module 330 described with reference to FIG. 3.
과정 4에서 보안성 평가 시스템(300)은 다른 덱스 파일(도 5의 실시예에서는 제2 덱스 파일(530))을 로딩하기 위한 API 호출을 탐지할 수 있다. 이를 위해, 보안성 평가 시스템(300)은 호출 리스트를 통해 클래스로더('ClassLoader' 또는 'DexClassLoader') 클래스 및 로드클래스('LoadClass') 메서드가 호출되었는지 여부를 확인할 수 있다. 다시 말해, 클래스로더 클래스 및 로드클래스 메서드의 호출이 다른 덱스 파일을 로딩하기 위한 API 호출로서 탐지될 수 있다.In step 4, the security evaluation system 300 may detect an API call for loading another dex file (the second dex file 530 in the embodiment of FIG. 5). To this end, the security evaluation system 300 may check whether the class loader ('ClassLoader' or 'DexClassLoader') class and the load class ('LoadClass') method are called through the call list. In other words, the call of the classloader class and the load class method can be detected as an API call to load another Dex file.
만약, API 호출이 탐지되면, 보안성 평가 시스템(300)은 과정 5에서와 같이 제1 덱스 파일(520)에 난독화가 적용된 것으로 결정할 수 있다. 만약, API 호출이 탐지되지 않으며, 보안성 평가 시스템(300)은 과정 6에서와 같이 제1 덱스 파일(520)에 난독화가 미적용된 것으로 결정할 수 있다.If the API call is detected, the security evaluation system 300 may determine that obfuscation is applied to the first dex file 520 as in step 5. If the API call is not detected, the security evaluation system 300 may determine that obfuscation is not applied to the first dex file 520 as in step 6.
다만, 어플리케이션 클래스의 구현에 따라 어플리케이션 클래스가 포함하는 메서드의 바디 인스트럭션에서 API 호출이 이루어지지 않고, 해당 메서드를 통해 호출되는 다른 메서드의 바디 인스트럭션에서 덱스 파일의 로딩을 위한 API 호출이 이루어질 수도 있다. 이러한 경우의 API 호출을 탐지하기 위해, 보안성 평가 시스템(300)은 호출 리스트를 통해 식별되는 메서드의 바디 인스트럭션에서 수집되는 다른 호출 리스트를 통해 API 호출을 탐지하는 방식으로 어플리케이션 클래스가 포함하는 메서드를 통해 직/간접적으로 호출되는 모든 메서드들에서 API 호출이 이루어지는가를 확인할 수도 있다. 이때, 어플리케이션 클래스가 포함하는 메서드를 통해 직/간접적으로 호출되는 모든 메서드들에서 API 호출이 이루어지지 않는 경우, 보안성 평가 시스템(300)은 제1 덱스 파일(520)에 난독화가 미적용된 것으로 결정할 수 있다.However, depending on the implementation of the application class, the API call is not made in the body instruction of the method included in the application class, and the API call for loading the Dex file may be made in the body instruction of another method called through the corresponding method. In order to detect an API call in such a case, the security evaluation system 300 detects the method included in the application class in such a manner that it detects the API call through another call list collected in the body instruction of the method identified through the call list. You can also check whether API calls are made to all methods that are called directly or indirectly. In this case, when the API call is not made in all methods that are directly or indirectly called through the method included in the application class, the security evaluation system 300 determines that obfuscation is not applied to the first dex file 520. Can be.
제2 덱스 파일(530)의 경우에는 안드로이드 매니페스트 파일(510)에서 관련된 어플리케이션 클래스의 클래스명이 추출되지 않기 때문에 별도로 난독화 적용 여부가 탐지되지 않을 수 있다.In the case of the second dex file 530, since the class name of the related application class is not extracted from the Android manifest file 510, whether obfuscation is applied separately may not be detected.
또한, 앞서 설명한 바와 같이 멀티 덱스를 이용하는 난독화 방식 이외에 메서드의 바디 인스트럭션 전체를 암호화하는 난독화 방식이 존재한다.In addition, as described above, in addition to the obfuscation method using multiplex, there is an obfuscation method for encrypting the entire body instruction of the method.
도 6은 본 발명의 일실시예에 있어서, 바디 인스트럭션의 암호화를 이용한 난독화를 탐지하는 예를 도시한 도면이다. 도 6은 덱스 파일이 포함하는 특정 메서드(610)의 연산코드(611)를 암호화나 부호화 또는 더미(dummy) 코드의 추가 등을 통해 난독화하여 변형된 연산코드(612)를 포함하는 메서드(620)가 생성된 예를 나타내고 있다.6 is a diagram illustrating an example of detecting obfuscation using encryption of a body instruction according to an embodiment of the present invention. FIG. 6 illustrates a method 620 including an operation code 612 that is modified by obfuscating the operation code 611 of a specific method 610 included in a dex file through encryption, encoding, or addition of a dummy code. ) Shows an example of the generation.
이때, 덱스 파일은 컴파일을 통해 생성된다는 점을 고려할 때, 변형된 연산코드(612)는 임의의 코드로 대체되는 것이 아니라, 컴파일이 가능한 코드로 대체되어야 하며 따라서 몇 가지 패턴을 갖게 된다. 예를 들어, 변형된 연산코드(612)는 레지스터에 영향을 주지 않거나 의미를 갖지 않는 명령의 패턴(일례로 ARM 어셈블리 명령에서의 LDR 명령의 연속이나 분기 또는 LSLS 명령의 연속)을 포함하게 된다.In this case, considering that the dex file is generated through compilation, the modified operation code 612 is not replaced with arbitrary code, but rather with code that can be compiled, and thus has some patterns. For example, the modified opcode 612 may include a pattern of instructions that do not affect or have no meaning in the register (for example, a sequence or branch of LDR instructions in an ARM assembly instruction or a sequence of LSLS instructions).
또한, 정상적인 바이트 코드는 일정한 헥사(hexa) 값의 연속에 따라 코드들이 미리 정의되어 있다. 예를 들어, 아래 웹사이트에서는 달빅 OP 코드에 대해 설명하고 있다.In addition, normal byte codes are predefined codes according to a series of constant hexa values. For example, the following website describes the Dalvik OP code.
- 웹사이트(http://pallergabor.uw.hu/androidblog/dalvik_opcodes.html)-Website (http://pallergabor.uw.hu/androidblog/dalvik_opcodes.html)
각 메서드들은 '.local'이라는 명령(directive)을 통해서 사용되는 로컬 변수 레지스터(local variable register)의 개수를 파악할 수 있다. '.local'이 2이면 v0, v1과 같이 두 개의 로컬 변수 레지스터들이 사용되었음을 의미할 수 있다. 이때, '0B'란 헥사 값이 발견되면, 그 뒤에 있는 헥사 값은 로컬 변수 레지스터를 의미할 수 있다. 예를 들어, '0B'란 헥사 값은 상술한 웹사이트에서 설명하는 바와 같이 OP 코드 네임 'move-result-object vx'에 대응하고 있으며, 이러한 OP 코드는 이전 메서드 실시(invocation)의 long/double 결과 값을 'vx'과 'vx+1'로 이동시키는 명령임을 알 수 있다. 다시 말해, '0B02'는 이전 명령 실시의 long/double 결과 값을 'v2'와 'v3'의 두 개의 로컬 변수 레지스터들로 이동시키게 된다. 이 경우, 보안성 평가 시스템(300)은 '.local'을 통해 확인한 로컬 변수 레지스터의 개수와 '0B02'를 통해 요구되는 로컬 변수 레지스터들을 통해 요구되는 로컬 변수 레지스터들이 가용한지 여부를 확인할 수 있다. 다른 예로, 헥사 값 '6E'는 상술한 웹사이트에서 설명하는 바와 같이, OP 코드 'invoke-virtual' 뒤에 현재 인스턴스의 파라미터에 해당하는 로컬 변수 레지스터와 메서드 파라미터들에 대응하는 로컬 변수 레지스터들을 명시해야 한다. 이 경우에도 보안성 평가 시스템(300)은 '.local'을 이용하여 이러한 레지스터들이 가용한 레지스터들인지 확인하는 것이 가능하고, 이러한 방법을 통해 메서드(610)의 연산코드가 일반적인(또는 정상적인) 코드인지 난독화된(또는 변형된) 코드인지 판별할 수 있게 된다.Each method can determine the number of local variable registers used by the '.local' directive. If '.local' is 2, it means that two local variable registers are used, such as v0 and v1. At this time, if a hexadecimal value is found, '0B' may be followed by the hexa value may mean a local variable register. For example, the hexadecimal value '0B' corresponds to the OP code name 'move-result-object vx', as described on the website described above, and this OP code is the long / double of the previous method invocation. It can be seen that the command moves the result value to 'vx' and 'vx + 1'. In other words, '0B02' moves the long / double result of the previous command execution into two local variable registers, 'v2' and 'v3'. In this case, the security evaluation system 300 may check whether the number of local variable registers checked through '.local' and whether local variable registers required through local variable registers required through '0B02' are available. As another example, the hexadecimal value '6E' must specify the local variable registers corresponding to the parameters of the current instance and the local variable registers corresponding to the method parameters after the OP code 'invoke-virtual', as described on the website mentioned above. do. Even in this case, the security evaluation system 300 may check whether these registers are available registers using '.local', and in this way, whether the operation code of the method 610 is a general (or normal) code. It is possible to determine if the code is obfuscated (or modified).
따라서, 보안성 평가 시스템(300)은 정형화된 패턴을 미리 저장 및 관리하고 있다가, 해당 패턴의 명령을 처리하는 연산코드의 메서드를 탐지함으로써, 덱스 파일에 대한 난독화 적용 여부를 결정할 수 있다. 다시 말해, 도 6의 실시예에서 보안성 평가 시스템(300)은 미리 저장된 패턴을 연산코드(611)나 변형된 연산코드(612)에서 검색하여 미리 저장된 패턴이 발견되는 변형된 연산코드(612)를 통해 해당 메서드(620)에 난독화가 적용되었음을 판단할 수 있고, 이는 해당 메서드(620)를 포함하는 덱스 파일에 난독화가 적용되었음을 의미할 수 있다.Therefore, the security evaluation system 300 may store and manage the standardized pattern in advance, and then determine whether to apply obfuscation to the dex file by detecting a method of an operation code that processes the command of the pattern. In other words, in the embodiment of FIG. 6, the security evaluation system 300 searches for the prestored pattern in the opcode 611 or the modified opcode 612, and the modified opcode 612 in which the prestored pattern is found. Through it can be determined that the obfuscation is applied to the method 620, which may mean that the obfuscation is applied to the dex file including the method (620).
이때, 덱스 파일이 포함하는 메서드별로 난독화의 적용 여부가 결정될 수 있기 때문에 보안성 평가 시스템(300)은 실시예에 따라 덱스 파일이 포함하는 메서드들 중 난독화가 적용된 메서드들의 비중에 기반하여 난독화에 따른 보안 등급을 결정할 수도 있다.In this case, whether or not obfuscation is applied for each method included in the dex file may be determined. Therefore, according to an embodiment, the security evaluation system 300 may obfuscate based on the weight of obfuscated methods among the methods included in the dex file. You can also determine the security level according to.
도 7은 본 발명의 일실시예에 따른 서버의 프로세서가 포함할 수 있는 구성요소의 예를 도시한 블록도이고, 도 8은 본 발명의 일실시예에 따른 서버가 수행할 수 있는 보안성 평가 방법의 예를 도시한 흐름도이다.FIG. 7 is a block diagram illustrating an example of components that may be included in a processor of a server according to an embodiment of the present invention, and FIG. 8 is a security evaluation that may be performed by a server according to an embodiment of the present invention. A flowchart illustrating an example of the method.
본 발명의 실시예들에 따른 보안성 평가 시스템(300)은 앞서 설명한 서버(150)와 같은 컴퓨터 장치의 형태로 구현될 수 있다. 또한, 도 7에 도시된 바와 같이 서버(150)의 프로세서(222)는 보안성 평가 시스템(300)을 구현하기 위한 구성요소들로서 APK 등록부(710), 어플리케이션 클래스 검색부(720), API 호출 확인부(730), 난독화 결정부(740), 보안성 결정부(750) 및 정보 제공부(760)를 포함할 수 있다. 이러한 프로세서(222) 및 프로세서(222)의 구성요소들은 도 8의 보안성 평가 방법이 포함하는 단계들(810 내지 860)을 수행할 수 있다. 이때, 프로세서(222) 및 프로세서(222)의 구성요소들은 메모리(221)가 포함하는 운영체제의 코드나 적어도 하나의 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(222)의 구성요소들은 서버(150)에 저장된 코드가 제공하는 제어 명령에 따라 프로세서(222)에 의해 수행되는 프로세서(222)의 서로 다른 기능들(different functions)의 표현들일 수 있다. 예를 들어, 프로세서(222)가 상술한 제어 명령에 따라 안드로이드 응용 프로그램 패키지(Android application package, APK)를 등록하는 프로세서(222)의 기능적 표현으로 APK 등록부(710)가 사용될 수 있다.The security evaluation system 300 according to the embodiments of the present invention may be implemented in the form of a computer device such as the server 150 described above. In addition, as shown in FIG. 7, the processor 222 of the server 150 is a component for implementing the security evaluation system 300. The APK registerer 710, the application class searcher 720, and the API call are checked. The unit 730, the obfuscation determiner 740, a security determiner 750, and an information provider 760 may be included. The processor 222 and the components of the processor 222 may perform steps 810 to 860 included in the security evaluation method of FIG. 8. In this case, the processor 222 and the components of the processor 222 may be implemented to execute a control instruction according to a code of an operating system included in the memory 221 or a code of at least one program. Here, the components of the processor 222 may be representations of different functions of the processor 222 performed by the processor 222 according to a control command provided by a code stored in the server 150. . For example, the APK registerer 710 may be used as a functional representation of the processor 222 in which the processor 222 registers an Android application package (Apk) according to the above-described control command.
단계(810)에서 APK 등록부(710)는 안드로이드 응용 프로그램 패키지를 등록할 수 있다. 안드로이드 응용 프로그램 패키지는 어플리케이션의 이용자들에게 배포되기 위해 어플리케이션 퍼블리셔에 등록될 수 있다. 이미 설명한 바와 같이 보안성 평가 시스템은 어플리케이션 퍼블리셔가 등록되는 어플리케이션들의 패키지 파일들을 배포하기 위한 서비스를 제공하는 장치에 구현되거나 또는 상술한 장치와 네트워크(170)를 통해 통신하는 별도의 시스템으로서 구현될 수 있다. 예를 들어, 보안성 평가 시스템(300)은 어플리케이션 퍼블리셔에 등록되는 안드로이드 응용 프로그램 패키지를 네트워크(170)를 통해 수신하여 등록할 수도 있다.In operation 810, the APK registerer 710 may register an Android application package. An Android application package can be registered with an application publisher for distribution to users of the application. As already described, the security evaluation system may be implemented in a device that provides a service for distributing package files of applications for which an application publisher is registered or as a separate system that communicates with the aforementioned device through the network 170. have. For example, the security evaluation system 300 may receive and register an Android application package registered with an application publisher through the network 170.
단계(820)에서 어플리케이션 클래스 검색부(720)는 안드로이드 응용 프로그램 패키지가 포함하는 덱스 파일에서 어플리케이션 클래스를 검색할 수 있다. 일례로, 어플리케이션 클래스 검색부(720)는 안드로이드 응용 프로그램 패키지가 'AndroidManifest.xml'과 같이 안드로이드 매니페스트 파일로부터 어플리케이션 클래스의 클래스명을 추출할 수 있고, 추출된 클래스명을 이용하여 덱스 파일에서 추출된 클래스명에 대응하는 어플리케이션 클래스를 검색할 수 있다.In operation 820, the application class search unit 720 may search for the application class in the Dex file included in the Android application package. For example, the application class search unit 720 may extract the class name of the application class from the Android manifest file, such as 'AndroidManifest.xml', the Android application package, extracted from the dex file using the extracted class name You can search for the application class corresponding to the class name.
단계(830)에서 API 호출 확인부(730)는 어플리케이션 클래스가 포함하는 메서드의 바디 인스트럭션(body instruction)에서 호출되는 클래스 및 메서드에 기반하여 상기 안드로이드 응용 프로그램 패키지가 더 포함하는 다른 덱스 파일을 로딩하기 위한 API(Application Programming Interface) 호출 여부를 확인할 수 있다. 이미 설명한 바와 같이, API 호출 확인부(730)는 식별된 어플리케이션 클래스가 포함하는 모든 메서드들 각각의 바디 인스트럭션에서 호출되는 클래스와 메서드에 대한 호출 리스트를 생성할 수 있다. 이때, API 호출 확인부(730)는 호출 리스트를 통해 클래스로더('ClassLoader' 또는 'DexClassLoader') 클래스 및 로드클래스('LoadClass') 메서드가 호출되었는지 여부를 확인할 수 있다. 다시 말해, 클래스로더 클래스 및 로드클래스 메서드의 호출이 다른 덱스 파일을 로딩하기 위한 API 호출로서 탐지될 수 있다.In operation 830, the API call checker 730 may load another index file further included in the Android application package based on a class and a method called in a body instruction of a method included in an application class. You can check whether API (Application Programming Interface) is called. As described above, the API call confirmation unit 730 may generate a call list for the classes and methods called in the body instructions of all the methods included in the identified application class. At this time, the API call verification unit 730 may check whether the class loader ('ClassLoader' or 'DexClassLoader') class and the load class ('LoadClass') method are called through the call list. In other words, the call of the classloader class and the load class method can be detected as an API call to load another Dex file.
만약, 생성된 호출 리스트에서 클래스로더 클래스 및 로드클래스 메서드가 검색되지 않으면, API 호출 확인부(730)는 호출 리스트를 통해 식별되는 메서드의 바디 인스트럭션에서 수집되는 호출 리스트를 통해 클래스로더 클래스 및 로드클래스 메서드의 호출 여부를 더 검색할 수 있다. 이처럼, API 호출 여부의 확인 과정은 어플리케이션 클래스가 포함하는 모든 메서드들에서 직접적으로 호출되는 클래스와 메서드 뿐만 아니라, 호출되는 메서드에서 다시 호출되는 클래스와 메서드에 대해서도 반복적으로 진행되어 어플리케이션 클래스가 포함하는 메서드에 의해 직/간접적으로 호출되는 모든 클래스와 메서드들에 대해 수행될 수 있다.If the class loader class and the load class method are not found in the generated call list, the API call checker 730 classloader class and load class through the call list collected in the body instruction of the method identified through the call list. You can further search whether the method is called. As such, the API call checking process is repeatedly performed not only on the classes and methods directly called by all the methods included in the application class, but also on the classes and methods called again by the called methods. This can be done for all classes and methods called directly or indirectly by.
단계(840)에서 난독화 결정부(740)는 다른 덱스 파일을 로딩하기 위한 API 호출이 존재하는 것으로 확인되는 경우, 덱스 파일에 난독화(obfuscation)가 적용된 것으로 결정할 수 있다. 만약, 다른 덱스 파일을 로딩하기 위한 API 호출이 확인되지 않는 경우, 난독화 결정부(740)는 단계(840)에서 덱스 파일에 난독화가 적용되지 않은 것으로 결정할 수 있다.In operation 840, when the obfuscation determination unit 740 determines that an API call for loading another Dex file exists, the obfuscation may be determined to be applied to the Dex file. If the API call for loading the other dex file is not confirmed, the obfuscation determination unit 740 may determine that the obfuscation is not applied to the dex file in step 840.
단계(850)에서 보안성 결정부(750)는 덱스 파일에 난독화가 적용되었는지 여부에 적어도 기초하여 등록된 안드로이드 응용 프로그램 패키지의 보안성을 결정할 수 있다. 예를 들어, 등록된 안드로이드 응용 프로그램 패키지의 보안성은 덱스 파일에 난독화가 적용된 경우가 덱스 파일에 난독화가 적용되지 않은 경우보다 상대적으로 더 높게 결정될 수 있다.In operation 850, the security determiner 750 may determine the security of the registered Android application package based at least on whether or not obfuscation is applied to the Dex file. For example, the security of a registered Android application package may be determined to be relatively higher when obfuscation is applied to the dex file than when obfuscation is not applied to the dex file.
단계(860)에서 정보 제공부(760)는 덱스 파일에 난독화가 적용되었는지 여부에 대한 정보를 제공할 수 있다. 예를 들어, 특정 덱스 파일에 대해, 해당 덱스 파일의 파일명, 난독화 적용 여부 등에 대한 정보가 함께 제공될 수 있다. 예를 들어, 관련 정보들은 도 3을 통해 설명한 바와 같이 관리자 등에게 제공될 수 있다.In operation 860, the information provider 760 may provide information about whether obfuscation is applied to the dex file. For example, with respect to a specific dex file, information about a file name of the dex file and whether or not obfuscation is applied may be provided together. For example, the related information may be provided to an administrator or the like as described with reference to FIG. 3.
도 9는 본 발명의 일실시예에 따른 서버의 프로세서가 포함할 수 있는 구성요소의 다른 예를 도시한 블록도이고, 도 10은 본 발명의 일실시예에 따른 서버가 수행할 수 있는 보안성 평가 방법의 다른 예를 도시한 흐름도이다.9 is a block diagram illustrating another example of components that may be included in a processor of a server according to an embodiment of the present invention, and FIG. 10 is a security diagram that the server may perform according to an embodiment of the present invention. It is a flowchart which shows the other example of an evaluation method.
본 실시예에 따른 서버(150)의 프로세서(222)는 보안성 평가 시스템(300)을 구현하기 위한 구성요소들로서 APK 등록부(910), 정크 코드 패턴 관리부(920), 정크 코드 패턴 검색부(930) 및 난독화 결정부(940)를 포함할 수 있다. 이러한 프로세서(222) 및 프로세서(222)의 구성요소들은 도 10의 보안성 평가 방법이 포함하는 단계들(1010 내지 1040)을 수행할 수 있다. 이때, 프로세서(222) 및 프로세서(222)의 구성요소들은 메모리(221)가 포함하는 운영체제의 코드나 적어도 하나의 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(222)의 구성요소들은 서버(150)에 저장된 코드가 제공하는 제어 명령에 따라 프로세서(222)에 의해 수행되는 프로세서(222)의 서로 다른 기능들(different functions)의 표현들일 수 있다.The processor 222 of the server 150 according to the present embodiment is a component for implementing the security evaluation system 300, the APK registerer 910, the junk code pattern manager 920, and the junk code pattern searcher 930. ) And the obfuscation determination unit 940. The processor 222 and the components of the processor 222 may perform steps 1010 to 1040 included in the security evaluation method of FIG. 10. In this case, the processor 222 and the components of the processor 222 may be implemented to execute a control instruction according to a code of an operating system included in the memory 221 or a code of at least one program. Here, the components of the processor 222 may be representations of different functions of the processor 222 performed by the processor 222 according to a control command provided by a code stored in the server 150. .
단계(1010)에서 APK 등록부(910)는 안드로이드 응용 프로그램 패키지를 등록할 수 있다. 이러한 APK 등록부(910)는 도 7을 통해 설명한 APK 등록부(710)에 대응할 수 있다.In step 1010, the APK registerer 910 may register an Android application package. The APK registration unit 910 may correspond to the APK registration unit 710 described with reference to FIG. 7.
단계(1020)에서 정크 코드 패턴 관리부(920)는 탐색하고자 하는 정크 코드 패턴을 입력받아 관리할 수 있다. 도 6을 통해 이미 설명한 바와 같이 정크 코드 패턴은 메서드의 바디 인스트럭션에 대한 난독화에 따라 나타나게 되는 패턴들을 미리 기설정하여 활용할 수 있다. 이때, 단계(1020)는 단계(1010) 이전에 수행될 수도 있다.In operation 1020, the junk code pattern manager 920 may receive and manage a junk code pattern to be searched for. As described above with reference to FIG. 6, the junk code pattern may preset and use patterns that appear according to obfuscation of a body instruction of a method. In this case, step 1020 may be performed before step 1010.
단계(1030)에서 정크 코드 패턴 검색부(930)는 덱스 파일이 포함하는 메서드의 바디 인스트럭션에서 정크 코드 패턴을 검색할 수 있다. 덱스 파일은 컴파일을 통해 생성되며, 따라서 메서드의 바디 인스트럭션에 대한 난독화에 따른 변환된 코드가 임의의 랜덤한 값을 포함할 수 없으며, 일정한 패턴을 갖게 된다. 따라서, 정크 코드 패턴 검색부(930)는 이러한 정크 코드 패턴이 메서드의 바디 인스트럭션에서 검색되는지 여부를 확인할 수 있다.In operation 1030, the junk code pattern search unit 930 may search for the junk code pattern in a body instruction of a method included in the dex file. Dex files are created through compilation, so the transformed code resulting from obfuscation of the body instructions of the method cannot contain any random values and has a certain pattern. Accordingly, the junk code pattern search unit 930 may check whether the junk code pattern is found in the body instruction of the method.
단계(1040)에서 난독화 결정부(940)는 정크 코드 패턴이 검색되는 경우, 덱스 파일에 난독화가 적용된 것으로 결정할 수 있다. 이때, 덱스 파일에 난독화가 적용되었는지 여부에 적어도 기초하여 등록된 안드로이드 응용 프로그램 패키지의 보안성을 결정될 수 있다. 또는 메서드별로 난독화 여부의 결정이 가능하기 때문에 전체 메서드에 대한 난독화된 메서드의 비율 등에 기반하여 보안성이 결정될 수도 있다. 또한, 난독화가 적용된 메서드에 대한 정보가 관리자 등에게 제공될 수도 있다.In operation 1040, when the junk code pattern is detected, the obfuscation determiner 940 may determine that obfuscation is applied to the dex file. In this case, the security of the registered Android application package may be determined based at least on whether obfuscation is applied to the Dex file. Alternatively, security can be determined based on the ratio of obfuscated methods to the entire method since it is possible to determine whether obfuscation is performed for each method. In addition, information about a method to which obfuscation is applied may be provided to an administrator or the like.
실시예에 따라 도 7 및 도 8의 실시예와 도 9 및 도 10의 실시예가 결합될 수 있다. 예를 들어, 등록되는 APK에 대해 덱스 파일의 로딩을 위한 API 호출 여부에 대한 탐지와 정크 코드 패턴의 탐지가 병렬적으로 수행될 수 있다. 이때, 난독화 결정부(740) 또는 난독화 결정부(940)는 다른 덱스 파일을 로딩하기 위한 API 호출이 존재하는 것으로 확인되거나 또는 정크 코드 패턴이 검색되는 경우, 덱스 파일에 난독화가 적용된 것으로 결정할 수 있다. 이 경우, 보안성은 병렬적으로 각각 결정된 보안성의 가중합 등을 통해 결정될 수 있으며, 각각의 탐지된 정보들이 관리자 등에게 제공될 수 있다.According to an embodiment, the embodiments of FIGS. 7 and 8 and the embodiments of FIGS. 9 and 10 may be combined. For example, detection of an API call for loading a dex file and detection of a junk code pattern may be performed in parallel for a registered APK. In this case, the obfuscation determination unit 740 or the obfuscation determination unit 940 determines that an API call for loading another Dex file exists or if the junk code pattern is detected, the deobfuscation is applied to the Dex file. Can be. In this case, the security may be determined through a weighted sum of the security determined in parallel, and each detected information may be provided to an administrator.
이상에서와 같이, 본 발명의 실시예들에 따르면, 어플리케이션 퍼블리셔의 관점에서, 등록되는 어플리케이션에 적용된 보안 수준을 난독화(obfuscation), 취약점(vulnerability) 및/또는 보안솔루션의 관점에 따라 객관적인 방법으로 분석 및 파악하고, 분석된 정보를 제공하여 어플리케이션의 보안성 향상을 위해 활용할 수 있다. 또한, 안드로이드 응용 프로그램 패키지(Android Application Package, APK)가 포함하는 덱스 파일에 대한 난독화 적용 여부를 결정할 수 있다.As described above, according to embodiments of the present invention, in the objective of the application publisher, the security level applied to the registered application is determined in an objective manner in accordance with obfuscation, vulnerability, and / or security solution. It can be used to improve the security of the application by analyzing and understanding and providing the analyzed information. In addition, it is possible to determine whether to apply obfuscation to the dex file included in the Android Application Package (Apk).
이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 소프트웨어 구성요소 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The system or apparatus described above may be implemented as a hardware component, a software component or a combination of hardware components and software components. For example, the devices and components described in the embodiments are, for example, processors, controllers, arithmetic logic units (ALUs), digital signal processors, microcomputers, field programmable gate arrays (FPGAs). Can be implemented using one or more general purpose or special purpose computers, such as a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to the execution of the software. For convenience of explanation, one processing device may be described as being used, but one of ordinary skill in the art will appreciate that the processing device includes a plurality of processing elements and / or a plurality of types of processing elements. It can be seen that it may include. For example, the processing device may include a plurality of processors or one processor and one controller. In addition, other processing configurations are possible, such as parallel processors.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the above, and configure the processing device to operate as desired, or process it independently or collectively. You can command the device. Software and / or data may be any type of machine, component, physical device, virtual equipment, computer storage medium or device in order to be interpreted by or to provide instructions or data to the processing device. It can be embodied in. The software may be distributed over networked computer systems so that they may be stored or executed in a distributed manner. Software and data may be stored on one or more computer readable media.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 이러한 기록매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있으며, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks, such as floppy disks. Magneto-optical media, and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Such a recording medium may be various recording means or storage means in the form of a single or several hardware combined, and is not limited to a medium directly connected to any computer system, but may be distributed on a network. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described by the limited embodiments and the drawings as described above, various modifications and variations are possible to those skilled in the art from the above description. For example, the described techniques may be performed in a different order than the described method, and / or components of the described systems, structures, devices, circuits, etc. may be combined or combined in a different form than the described method, or other components. Or even if replaced or substituted by equivalents, an appropriate result can be achieved.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are within the scope of the claims that follow.

Claims (15)

  1. 어플리케이션의 보안성을 평가하는 방법에 있어서,In the method of evaluating the security of an application,
    안드로이드 응용 프로그램 패키지(Android application package, APK)를 등록하는 단계;Registering an Android application package (Apk);
    상기 안드로이드 응용 프로그램 패키지가 포함하는 덱스 파일에서 어플리케이션 클래스를 검색하는 단계;Searching for an application class in a dex file included in the android application package;
    상기 어플리케이션 클래스가 포함하는 메서드의 바디 인스트럭션(body instruction)에서 호출되는 클래스 및 메서드에 기반하여 상기 안드로이드 응용 프로그램 패키지가 더 포함하는 다른 덱스 파일을 로딩하기 위한 API(Application Programming Interface) 호출 여부를 확인하는 단계; 및Determining whether to call an API (Application Programming Interface) for loading another Dex file further included in the Android application package based on a class and a method called in a body instruction of a method included in the application class step; And
    상기 다른 덱스 파일을 로딩하기 위한 API 호출이 존재하는 것으로 확인되는 경우, 상기 덱스 파일에 난독화(obfuscation)가 적용된 것으로 결정하는 단계If it is determined that an API call for loading the other dex file exists, determining that obfuscation has been applied to the dex file
    를 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method comprising the.
  2. 제1항에 있어서,The method of claim 1,
    상기 덱스 파일에 난독화가 적용되었는지 여부에 적어도 기초하여 상기 등록된 안드로이드 응용 프로그램 패키지의 보안성을 결정하는 단계Determining the security of the registered Android application package based at least on whether obfuscation has been applied to the dex file
    를 더 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method characterized in that it further comprises.
  3. 제1항에 있어서,The method of claim 1,
    상기 덱스 파일에 난독화가 적용되었는지 여부에 대한 정보를 제공하는 단계Providing information on whether obfuscation has been applied to the dex file.
    를 더 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method characterized in that it further comprises.
  4. 제1항에 있어서,The method of claim 1,
    상기 어플리케이션 클래스를 검색하는 단계는,Searching for the application class,
    상기 안드로이드 응용 프로그램 패키지가 포함하는 안드로이드 매니페스트(AndroidManifest.xml) 파일로부터 상기 어플리케이션 클래스의 클래스명을 추출하고, 상기 추출된 클래스명을 통해 상기 덱스 파일에서 상기 어플리케이션 클래스를 식별하는 것을 특징으로 하는 보안성 평가 방법.Security class characterized in that to extract the class name of the application class from the Android manifest (AndroidManifest.xml) file included in the Android application package, and to identify the application class in the dex file through the extracted class name Assessment Methods.
  5. 제1항에 있어서,The method of claim 1,
    상기 다른 덱스 파일을 로딩하기 위한 API 호출 여부를 확인하는 단계는,Checking whether the API for loading the other dex file is called,
    상기 어플리케이션 클래스가 포함하는 메서드의 바디 인스트럭션에서의 모든 호출에 대한 호출 리스트를 생성하고, 상기 생성된 호출 리스트에서 클래스로더 클래스 및 로드클래스 메서드의 호출 여부를 검색하는 것을 특징으로 하는 보안성 평가 방법.And generating a call list for all calls in the body instruction of the method included in the application class, and searching whether the classloader class and the load class method are called in the generated call list.
  6. 제5항에 있어서,The method of claim 5,
    상기 다른 덱스 파일을 로딩하기 위한 API 호출 여부를 확인하는 단계는,Checking whether the API for loading the other dex file is called,
    상기 생성된 호출 리스트에서 상기 클래스로더 클래스 및 상기 로드클래스 메서드가 검색되지 않는 경우, 상기 호출 리스트를 통해 식별되는 메서드의 바디 인스트럭션에서 수집되는 호출 리스트를 통해 상기 클래스로더 클래스 및 상기 로드클래스 메서드의 호출 여부를 검색하는 것을 특징으로 하는 보안성 평가 방법.If the classloader class and the load class method are not found in the generated call list, calling the classloader class and the load class method through a call list collected in a body instruction of a method identified through the call list. Security evaluation method characterized in that the search for.
  7. 제1항에 있어서,The method of claim 1,
    상기 다른 덱스 파일을 로딩하기 위한 API 호출이 확인되지 않는 경우, 상기 덱스 파일에 난독화(obfuscation)가 적용되지 않은 것으로 결정하는 단계If an API call to load the other dex file is not confirmed, determining that obfuscation is not applied to the dex file
    를 더 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method characterized in that it further comprises.
  8. 제1항에 있어서,The method of claim 1,
    탐색하고자 하는 정크 코드 패턴을 입력받아 관리하는 단계; 및Receiving and managing a junk code pattern to be searched for; And
    상기 덱스 파일이 포함하는 메서드의 바디 인스트럭션에서 상기 정크 코드 패턴을 검색하는 단계Retrieving the junk code pattern from a body instruction of a method included in the dex file
    를 더 포함하고,More,
    상기 덱스 파일에 난독화(obfuscation)가 적용된 것으로 결정하는 단계는,Determining that obfuscation is applied to the dex file,
    상기 다른 덱스 파일을 로딩하기 위한 API 호출이 존재하는 것으로 확인되거나 또는 상기 정크 코드 패턴이 검색되는 경우, 상기 덱스 파일에 난독화가 적용된 것으로 결정하는 것을 특징으로 하는 보안성 평가 방법.And determining that an obfuscation is applied to the dex file when it is determined that an API call for loading the other dex file exists or when the junk code pattern is detected.
  9. 제1항 내지 제8항 중 어느 한 항의 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터 판독 가능한 기록매체.A computer readable recording medium having recorded thereon a computer program for causing a computer to execute the method of any one of claims 1 to 8.
  10. 어플리케이션의 보안성을 평가하는 시스템에 있어서,In the system for evaluating the security of the application,
    컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서At least one processor implemented to execute computer-readable instructions
    를 포함하고,Including,
    상기 적어도 하나의 프로세서는,The at least one processor,
    안드로이드 응용 프로그램 패키지(Android application package, APK)를 등록하고,Register your Android application package (Apk),
    상기 안드로이드 응용 프로그램 패키지가 포함하는 덱스 파일에서 어플리케이션 클래스를 검색하고,Search for an application class in a dex file included in the Android application package,
    상기 어플리케이션 클래스가 포함하는 메서드의 바디 인스트럭션(body instruction)에서 호출되는 클래스 및 메서드에 기반하여 상기 안드로이드 응용 프로그램 패키지가 더 포함하는 다른 덱스 파일을 로딩하기 위한 API(Application Programming Interface) 호출 여부를 확인하고,On the basis of the class and method called in the body instruction of the method included in the application class to check whether the API (Application Programming Interface) for loading another Dex file further included in the Android application package ,
    상기 다른 덱스 파일을 로딩하기 위한 API 호출이 존재하는 것으로 확인되는 경우, 상기 덱스 파일에 난독화(obfuscation)가 적용된 것으로 결정하는 것Determining that obfuscation has been applied to the dex file when it is determined that an API call exists to load the other dex file
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
  11. 제10항에 있어서,The method of claim 10,
    상기 적어도 하나의 프로세서는,The at least one processor,
    상기 덱스 파일에 난독화가 적용되었는지 여부에 적어도 기초하여 상기 등록된 안드로이드 응용 프로그램 패키지의 보안성을 결정하는 것Determining the security of the registered Android application package based at least on whether obfuscation has been applied to the dex file
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
  12. 제10항에 있어서,The method of claim 10,
    상기 적어도 하나의 프로세서는,The at least one processor,
    상기 덱스 파일에 난독화가 적용되었는지 여부에 대한 정보를 제공하는 것Providing information on whether obfuscation has been applied to the dex file
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
  13. 제10항에 있어서,The method of claim 10,
    상기 적어도 하나의 프로세서는,The at least one processor,
    상기 어플리케이션 클래스를 검색하기 위해,To retrieve the application class,
    상기 안드로이드 응용 프로그램 패키지가 포함하는 안드로이드 매니페스트(AndroidManifest.xml) 파일로부터 상기 어플리케이션 클래스의 클래스명을 추출하고,Extract the class name of the application class from the Android manifest (AndroidManifest.xml) file included in the Android application package,
    상기 추출된 클래스명을 통해 상기 덱스 파일에서 상기 어플리케이션 클래스를 식별하는 것Identifying the application class in the dex file via the extracted class name
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
  14. 제10항에 있어서,The method of claim 10,
    상기 적어도 하나의 프로세서는,The at least one processor,
    상기 다른 덱스 파일을 로딩하기 위한 API 호출 여부를 확인하기 위해,To check whether an API call for loading the other Dex file is performed,
    상기 어플리케이션 클래스가 포함하는 메서드의 바디 인스트럭션에서의 모든 호출에 대한 호출 리스트를 생성하고,Generate a call list for all calls in the body instructions of the methods included in the application class,
    상기 생성된 호출 리스트에서 클래스로더 클래스 및 로드클래스 메서드의 호출 여부를 검색하는 것Searching whether the class loader class and the load class method are called in the generated call list.
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
  15. 제10항에 있어서,The method of claim 10,
    상기 적어도 하나의 프로세서는,The at least one processor,
    탐색하고자 하는 정크 코드 패턴을 입력받아 관리하고,Receive and manage junk code patterns that you want to search,
    상기 덱스 파일이 포함하는 메서드의 바디 인스트럭션에서 상기 정크 코드 패턴을 검색하며,Searching for the junk code pattern in a body instruction of a method included in the dex file,
    상기 덱스 파일에 난독화가 적용된 것으로 결정함에 있어서, 상기 다른 덱스 파일을 로딩하기 위한 API 호출이 존재하는 것으로 확인되거나 또는 상기 정크 코드 패턴이 검색되는 경우, 상기 덱스 파일에 난독화가 적용된 것으로 결정하는 것In determining that obfuscation is applied to the dex file, determining that obfuscation is applied to the dex file when it is determined that an API call for loading the other dex file exists or when the junk code pattern is detected.
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
PCT/KR2017/004584 2017-04-20 2017-04-28 Method and system for detecting whether obfuscation has been applied to dex file and evaluating security WO2018199366A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/KR2017/004584 WO2018199366A1 (en) 2017-04-28 2017-04-28 Method and system for detecting whether obfuscation has been applied to dex file and evaluating security
JP2018080912A JP7131946B2 (en) 2017-04-20 2018-04-19 Method and system for assessing application security
US15/958,115 US10963563B2 (en) 2017-04-20 2018-04-20 Method and system for evaluating security of application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/KR2017/004584 WO2018199366A1 (en) 2017-04-28 2017-04-28 Method and system for detecting whether obfuscation has been applied to dex file and evaluating security

Related Parent Applications (2)

Application Number Title Priority Date Filing Date
PCT/KR2017/004236 Continuation WO2018194196A1 (en) 2017-04-20 2017-04-20 Method and system for detecting application of obfuscation to and evaluating security of elf file
PCT/KR2017/004243 Continuation WO2018194198A1 (en) 2017-04-20 2017-04-20 Method and system for detecting application of obfuscation to and evaluating security of pe file

Related Child Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/006903 Continuation WO2019004502A1 (en) 2017-04-20 2017-06-29 Application security assessment method and system

Publications (1)

Publication Number Publication Date
WO2018199366A1 true WO2018199366A1 (en) 2018-11-01

Family

ID=63918554

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/004584 WO2018199366A1 (en) 2017-04-20 2017-04-28 Method and system for detecting whether obfuscation has been applied to dex file and evaluating security

Country Status (1)

Country Link
WO (1) WO2018199366A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109614773A (en) * 2018-11-20 2019-04-12 江苏通付盾信息安全技术有限公司 Code self-modifying method, apparatus and electronic equipment
CN110489159A (en) * 2019-08-02 2019-11-22 北京字节跳动网络技术有限公司 Installation kit compressing method and data analysis method, device, medium and equipment
CN111935061A (en) * 2019-12-26 2020-11-13 长扬科技(北京)有限公司 Industrial control host and network security protection implementation method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120120686A (en) * 2011-04-25 2012-11-02 삼성전자주식회사 Apparatus and method for processing application package in portable terminal
KR20140029562A (en) * 2012-08-28 2014-03-11 바른소프트기술 주식회사 Encryption method for preventing decompile of andriod application
KR20160118920A (en) * 2015-04-04 2016-10-12 홍동철 Method of apk file protection, apk file protection system performing the same, and storage medium storing the same
KR101700731B1 (en) * 2012-04-26 2017-01-31 텐센트 테크놀로지(센젠) 컴퍼니 리미티드 Method and apparatus for accessing application
KR20170018744A (en) * 2015-08-10 2017-02-20 라인 가부시키가이샤 System and method for protecting code of application

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120120686A (en) * 2011-04-25 2012-11-02 삼성전자주식회사 Apparatus and method for processing application package in portable terminal
KR101700731B1 (en) * 2012-04-26 2017-01-31 텐센트 테크놀로지(센젠) 컴퍼니 리미티드 Method and apparatus for accessing application
KR20140029562A (en) * 2012-08-28 2014-03-11 바른소프트기술 주식회사 Encryption method for preventing decompile of andriod application
KR20160118920A (en) * 2015-04-04 2016-10-12 홍동철 Method of apk file protection, apk file protection system performing the same, and storage medium storing the same
KR20170018744A (en) * 2015-08-10 2017-02-20 라인 가부시키가이샤 System and method for protecting code of application

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109614773A (en) * 2018-11-20 2019-04-12 江苏通付盾信息安全技术有限公司 Code self-modifying method, apparatus and electronic equipment
CN110489159A (en) * 2019-08-02 2019-11-22 北京字节跳动网络技术有限公司 Installation kit compressing method and data analysis method, device, medium and equipment
CN111935061A (en) * 2019-12-26 2020-11-13 长扬科技(北京)有限公司 Industrial control host and network security protection implementation method thereof
CN111935061B (en) * 2019-12-26 2021-06-11 长扬科技(北京)有限公司 Industrial control host and network security protection implementation method thereof

Similar Documents

Publication Publication Date Title
US10963563B2 (en) Method and system for evaluating security of application
WO2017026739A1 (en) System and method for obfuscating application code
WO2013089340A1 (en) Apparatus and method for detecting similarity between applications
CN104517054B (en) Method, device, client and server for detecting malicious APK
WO2014035043A1 (en) Apparatus and method for diagnosing malicious applications
WO2013077538A1 (en) Device and method for analyzing api-based application
CN107408176A (en) The execution of malicious objects dissects detection
WO2019054613A1 (en) Method and system for identifying open source software package on basis of binary file
WO2014088262A1 (en) Apparatus and method for detecting fraudulent/altered applications
WO2013137616A1 (en) Method and apparatus for evaluating required permissions for application
WO2017026738A1 (en) System and method for protecting codes for application
Yao et al. Identifying privilege separation vulnerabilities in IoT firmware with symbolic execution
WO2018194196A1 (en) Method and system for detecting application of obfuscation to and evaluating security of elf file
CN111163094B (en) Network attack detection method, network attack detection device, electronic device, and medium
WO2018199366A1 (en) Method and system for detecting whether obfuscation has been applied to dex file and evaluating security
WO2016024838A1 (en) Method and system for providing cloud-based application security service
Mao et al. Detecting malicious behaviors in javascript applications
WO2019066222A1 (en) Method and system for identifying open source software package on basis of binary file
WO2018016671A2 (en) Dangerous code detection system for checking security vulnerability and method thereof
WO2019135425A1 (en) Open source software license verification method and system
JP2020531936A (en) How and systems to detect application vulnerabilities
KR102382889B1 (en) Method and system for detecting web shell using process information
WO2020111482A1 (en) Reverse engineering method and system utilizing big data based on program execution context
CN116974947A (en) Component detection method and device, electronic equipment and storage medium
CN108874462A (en) A kind of browser behavior acquisition methods, device, storage medium and electronic equipment

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: 17907838

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17907838

Country of ref document: EP

Kind code of ref document: A1