WO2019004503A1 - Application vulnerability detection method and system - Google Patents

Application vulnerability detection method and system Download PDF

Info

Publication number
WO2019004503A1
WO2019004503A1 PCT/KR2017/006913 KR2017006913W WO2019004503A1 WO 2019004503 A1 WO2019004503 A1 WO 2019004503A1 KR 2017006913 W KR2017006913 W KR 2017006913W WO 2019004503 A1 WO2019004503 A1 WO 2019004503A1
Authority
WO
WIPO (PCT)
Prior art keywords
pattern
detection
file
vulnerability
searching
Prior art date
Application number
PCT/KR2017/006913
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/006913 priority Critical patent/WO2019004503A1/en
Priority to JP2019569960A priority patent/JP2020531936A/en
Publication of WO2019004503A1 publication Critical patent/WO2019004503A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • 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 detecting vulnerabilities in an application and to a computer program stored on a computer readable recording medium for causing a computer to execute a vulnerability detection method in combination with the computer.
  • the App store is an online content marketplace that sells a variety of applications that can be installed on terminals such as smart phones.
  • an application developer registers a file (for example, an Android application package (APK)) for installing the developed application on a terminal in the App Store, and users of the application The user can download the file for the application and install and operate the application in his / her terminal.
  • various game applications such as game publishers are distributed to users. As such, there are application publishers that register various applications that developers themselves have not developed and distribute registered applications to users.
  • the first risk of an application is that the application contains information developed with malicious intent, such as malicious code, so that the application publisher in which the application is registered, or a malicious function in the terminal of the user This is the risk of 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 application store. When an application to be registered in the application store is detected as performing a malicious function, (Registration in the AppStore) of the application.
  • the second risk of an application is the risk to the security of the application itself.
  • the application performs functions other than those originally intended by the developer, thereby reducing the reliability of the service to be provided through the application Lt; / RTI > Accordingly, there is a need for application publishers to provide a certain level of security to applications in distributing various applications (installation files of applications) that they have not developed directly.
  • each application may have security solutions at different security levels and may not include any security measures.
  • a vulnerability detection method and system capable of detecting a vulnerability of a package file of an application registered for distribution on the basis of a detection pattern set in advance and a search pattern for diagnosing an application vulnerability are preset.
  • a method for detecting a vulnerability of an application comprising: detecting a predetermined detection pattern for diagnosing a vulnerability of the application, with respect to at least one of files included in a package file for installing and running an application and codes included in the files; ; Registering a package file for distribution to users for installation and operation of an application; And analyzing the registered package file according to the detection pattern of at least one of the detection patterns to detect the vulnerability information according to the at least one detection pattern.
  • a computer program for causing the computer to execute the vulnerability detection method is recorded in the computer readable recording medium.
  • a system for detecting a vulnerability in an application comprising: at least one processor configured to execute computer readable instructions, the at least one processor comprising: Managing a predetermined detection pattern for diagnosing a vulnerability of the application with respect to at least one of codes included in the files, registering a package file for distribution to users for installation and operation of the application, Analyzing the registered package file according to at least one detection pattern among the patterns, and detecting the vulnerability information according to the at least one detection pattern.
  • a search pattern for diagnosing an application vulnerability can be set in advance and a vulnerability of a package file of an application registered for distribution based on a set detection pattern can be detected.
  • 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 for explaining a call relationship between instruction masses in an embodiment of the present invention.
  • FIG. 5 is a diagram for explaining a calling relationship between methods in an embodiment of the present invention.
  • FIG. 6 is a diagram for explaining rules and patterns according to an embodiment of the present invention.
  • FIG. 7 is a diagram for explaining a structure of a pattern in an embodiment of the present invention.
  • FIG. 8 is a diagram for explaining a source of a pattern in an embodiment of the present invention.
  • FIG. 9 is a diagram showing an example of a pattern for arbitrary files in an embodiment of the present invention.
  • FIG. 10 is a diagram illustrating an example of a result of detecting a specific character string in a file and a result of detecting a specific file in a package file in an embodiment of the present invention.
  • FIG. 11 is a diagram showing an example of a pattern for an Android manifest file in an embodiment of the present invention.
  • FIG. 12 is a diagram showing an example of a pattern for a Dex file in an embodiment of the present invention.
  • FIG. 13 is a diagram showing an example of a pattern for a so file in an embodiment of the present invention.
  • FIG. 14 is a diagram showing an example of a pattern for a dll file in an embodiment of the present invention.
  • the vulnerability detection system can be implemented through a server to be described later, and a vulnerability detection method according to embodiments of the present invention can be performed through the server described above.
  • a computer program according to an exemplary embodiment of the present invention may be installed and operated on a server, and the server may perform a vulnerability detection method according to an embodiment of the present invention under the control of a computer program that is run .
  • the above-described computer program may be stored in a computer-readable recording medium in combination with a computer-implemented server to cause the computer to execute the vulnerability detection method.
  • 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. 1 shows an example in which a plurality of electronic devices 110, 120, 130, 140, a plurality of servers 150, 160, and a network 170 are included. 1, the number of electronic devices and the number of servers are not limited to those shown in FIG.
  • the plurality of electronic devices 110, 120, 130, 140 may be a fixed terminal implemented as a computer device or a mobile terminal.
  • 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, a digital broadcast terminal, a PDA (Personal Digital Assistants) ), And tablet PCs.
  • FIG. 1 illustrates the shape of a smartphone as an example of the first electronic device 110, but in the embodiments of the present invention, the first electronic device 110 transmits the network 170 using a wireless or wired communication method. May refer to any one of a variety of physical devices capable of communicating with other electronic devices 120, 130, 140 and / or servers 150,
  • the communication method is not limited, and may include 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, as well as a short-range wireless communication between the devices.
  • the network 170 may be a personal area network (LAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN) , A network such as the Internet, and the like.
  • the network 170 may also include any one or more of a network topology including a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree or a hierarchical network, It is not limited.
  • Each of the servers 150 and 160 is a computer device or a plurality of computers that communicate with a plurality of electronic devices 110, 120, 130 and 140 through a network 170 to provide commands, codes, files, Lt; / RTI > devices.
  • the server 150 may be a system that provides a first service to a plurality of electronic devices 110, 120, 130, 140 connected through a network 170, 170, and 140 to the first and second electronic devices 110, 120, 130, and 140, respectively. More specifically, the server 150 may be at least a part of the apparatuses constituting the system of the application publisher, and the package file of the application installed and operated in the plurality of electronic apparatuses 110, 120, 130 and 140 may be registered And distribute the service as the first service.
  • the server 160 may provide a service associated with the application as a second service to a plurality of electronic devices 110, 120, 130, 140 that install and operate the application through the distributed package file .
  • the server 150 may be used to implement a dedicated system for detecting vulnerability information of a 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. Other electronic devices 120, 130, 140 and server 160 may also have the same or similar internal configuration as electronic device 1 110 or server 150 described above.
  • 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 a computer-readable recording medium and may include a permanent mass storage device such as a random access memory (RAM), a read only memory (ROM), and a disk drive.
  • the non-decaying mass storage device such as a ROM and a disk drive may be included in the electronic device 110 or the server 150 as a separate persistent storage device different from the memory 211 or 221.
  • the memory 211 and the memory 221 are provided with an operating system and at least one program code (for example, a program installed in the electronic device 1 (110) and used for a browser or an application installed in the electronic device 1 Code) can be stored.
  • These software components may be loaded from a computer readable recording medium separate from the memories 211 and 221.
  • a computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, and a memory card.
  • the software components may be loaded into memory 211, 221 via communication modules 213, 223 rather than a computer readable recording medium.
  • At least one program may be a computer program installed by files provided by a file distribution system (e.g., the server 160 described above) that distributes installation files of developers or applications, May be loaded into the memory 211, 221 based on the application (e.g., the application described above).
  • a file distribution system e.g., the server 160 described above
  • the application e.g., the application described above.
  • Processors 212 and 222 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations.
  • the instructions may be provided to the processors 212 and 222 by the memories 211 and 221 or the communication modules 213 and 223.
  • the processor 212, 222 may be configured to execute a command received in accordance with a program code stored in a recording device, such as the memory 211, 221.
  • the communication modules 213 and 223 may provide functions for the electronic device 1 110 and the server 150 to communicate with each other through the network 170 and may be provided to the electronic device 1 110 and / May provide a function for communicating with another electronic device (e.g., electronic device 2 120) or another server (e.g., server 160).
  • another electronic device e.g., electronic device 2 120
  • another server e.g., server 160
  • the request generated by the processor 212 of the electronic device 1 110 according to the program code stored in the recording device such as the memory 211 is transmitted to the server 170 via the network 170 under the control of the communication module 213 150 < / RTI > Conversely, control signals, commands, contents, files, and the like provided under the control of the processor 222 of the server 150 are transmitted to the communication module 223 of the electronic device 110 via the communication module 223 and the network 170 213 to the electronic device 1 (110).
  • control signals, commands, contents, files, and the like of the server 150 received through the communication module 213 can be transmitted to the processor 212 or the memory 211, (The above-mentioned persistent storage device), which may further include a storage medium 110.
  • 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, a speaker, and the like.
  • the input / output interface 214 may be a means for interfacing with a device having integrated functions for input and output, such as a touch screen.
  • the input / output device 215 may be composed of the electronic device 1 (110) and one device.
  • the input / output interface 224 of the server 150 may be a means for interfacing with the server 150 or an interface with a device (not shown) for input or output that the server 150 may include.
  • the configuration is performed using the data provided by the server 150 or the electronic device 2 (120)
  • a service screen or contents can be displayed on the display through the input / output interface 214.
  • electronic device 1 110 and server 150 may include more components than the components of FIG. However, there is no need to clearly illustrate most prior art components.
  • electronic device 1 110 may be implemented to include at least a portion of input / output devices 215 described above, or may be implemented with other components such as a transceiver, Global Positioning System (GPS) module, camera, Elements. More specifically, when the electronic device 1 (110) is a smart phone, the acceleration sensor, the gyro sensor, the camera module, various physical buttons, buttons using a touch panel, input / output ports, A vibrator, and the like may be further included in the electronic device 1 (110).
  • GPS Global Positioning System
  • 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 vulnerability detection system described above may be implemented to be included in the security evaluation system 300, It is possible to include only the configuration for detecting the vulnerability separately.
  • the package decomposition module 310 may be used as a function of the processor 222 in which the processor 222 of the server 150 decomposes the package file according to control commands included in the computer program.
  • the vulnerability detection module 342 included in the analysis module 340 may be implemented as a core module for detecting the vulnerability.
  • the server 150 may provide a service for distributing package files of applications registered by developers to users.
  • the package decomposition module 310 can decompose the registered package files.
  • the Android Application Package has a file extension of '.apk' as the file format of the package file used for Android's software and middleware distribution, the mobile operating system.
  • APK Android Application Package
  • embodiments of the present invention will be described based on a package file such as APK, but it will be understood by those skilled in the art that the same or similar features may be applied to other kinds of package files .
  • the file identification module 320 can identify files included in the decomposed package file.
  • the extensions ('dex', 'so', 'dll', 'json', 'ini', 'apk', 'xml', 'cert') shown in FIG. 3, It will be readily apparent to those skilled in the art.
  • the parsing module 330 may parse the identified files. To do this, the parser 331 may parse files of a particular extension (e.g., 'dex', 'so', 'dll') of the identified files and the collector 332 may parse the files of a particular extension You can gather the necessary information from the files 'json', 'ini', 'apk', 'xml', 'cert'
  • a particular extension e.g., 'dex', 'so', 'dll'
  • the parsing module 330 can identify each of the classes and methods included in the 'dex' file, track instructions included in the method, And the like. Masses of instructions can be separated by a branch instruction such as a 'goto' statement, a 'switch' statement, or an 'if' statement.
  • the parsing module 330 may generate and manage information about the call relationships between these instruction masses. For example, the call relationships between instruction masses can be managed in a tree structure, and the information about the call relationship can include information about the methods that a particular instruction mass calls. The generation and management of such information can be processed for each of the files included in the package file such as the APK file, and the parsing method can be changed according to the characteristics of the file.
  • the parsed information and the collected information may be passed to the analysis module 340.
  • the analyzing module 340 analyzes the package file (or the application installed and operated on the user terminal such as the electronic device 1 110 through the package file) based on the information transmitted from the parsing module 330, vulnerability viewpoints, and security solutions from the viewpoints of security, obfuscation, vulnerability, and security solution.
  • obfuscation detection module 341 may generate analysis information about how much obfuscation is applied to files of a particular extension (e.g., 'dex', 'so', 'dll') .
  • the obfuscation detection module 341 can determine whether obfuscation is applied to each item set in advance according to the type of the file.
  • the vulnerability detection module 342 generates analysis information as to what vulnerability exists in the files of a specific extension (for example, 'dex', 'so', or the extension of the configuration file 'config' can do.
  • the security evaluation system 300 can manage information on already known vulnerabilities, and the vulnerability detection module 342 uses information on the vulnerabilities to determine what vulnerabilities exist in which files Can be generated.
  • the platform detection module 343 can extract information about a platform on which the application is developed and / or a platform on which the application operates.
  • the security assessment system 300 can utilize different analysis methods depending on the platform in which the application is developed (for example, a development tool such as Unity or Cocos).
  • the security evaluation system 300 may utilize different analysis methods for each platform.
  • the security evaluation system 300 can extract information about the platform for the package file, analyze the package file based on the information, or provide the extracted platform information to the outside.
  • the security tool detection module 344 may detect the security solution that the developers of the package file themselves have inserted into the package file. For example, a first security tool provided in the form of a library by a third party may be added to the corresponding package file by the developer. As another example, the second security tool developed by the developer may be added to the corresponding package file by the developer. In other words, the security tool detection module 344 can generate analysis information on whether the security tool is applied to the package file.
  • the relationship analysis module 345 can generate analysis information on a reference relationship between files included in the package file. For example, when the first file includes a code for calling a second file, analysis information may be generated such that information about a reference relationship between the first file and the second file is included in the analysis information.
  • the report module 350 collects analysis information generated by the analysis module 340 and provides a report for providing the analysis information to the persons concerned (for example, the administrator of the server 150 or the security inspection team of the application publisher) of the security evaluation system 300 Lt; / RTI > Such a report can be provided to a terminal of an interested party using Hypertext Markup Language (HTML) or XML (extensible Markup Language) as in the example of FIG.
  • HTML Hypertext Markup Language
  • XML extensible Markup Language
  • FIG. 4 is a diagram for explaining a call relationship between instruction masses in an embodiment of the present invention.
  • FIG. 4 illustrates a method 400 for a method A 400 including a root mass 410, an instruction mass 1 420, an instruction mass 2 430, an instruction mass 3 440, Five instruction masses, such as mass 5 (450), are identified.
  • instruction masses can be distinguished based on branch instructions, and when each of the instruction masses is assumed to be a node, the dashed arrows in FIG. 4 indicate the parent node of the particular node.
  • FIG. 4 shows that the parent node of instruction mass 3 (440) is instruction mass 2 (430).
  • the child node may include a mass of instructions which are classified according to a branch instruction included in the parent node.
  • the root mass 410 may be the mass of instructions that are executed first for the method A 400.
  • instruction mass 1 420 includes instructions for a conditional branch 421 and that instructions of instruction mass 3 440 or instruction mass 4 450 are executed according to the conditions
  • instruction mass 3 440 and instruction mass 4 450 can be identified, and the parent nodes of instruction mass 3 440 and instruction mass 4 450 can be Instance Mass 1 420 .
  • the position to be moved to instruction mass 3 440 according to the instruction for conditional branch 421 is moved by label 1 (Lable 1, 441) and the position where instruction mass 4 (450) 2, and 451, respectively.
  • a call can be detected at instruction mass 1 420 and instruction masses 440 and 450, which are called through the detected call, can be directed through labels 441 and 451.
  • solid lines indicate such an indicating relationship.
  • FIG. 5 is a diagram for explaining a calling relationship between methods in an embodiment of the present invention.
  • 5 shows information 510 and method a 520 for call reference.
  • Method a 520 may include at least one instruction mass, and
  • FIG. 5 illustrates one instruction mass 521.
  • FIG. 5 shows an example in which a call to the method b 511 and the method c 512 is detected in the instruction mass 521.
  • Each method can be identified by a unique method ID.
  • the vulnerability detection system acquires information on the method b 511 and the method c 512 using the method ID of the method a 520 in the information 510 of the call reference in accordance with the detected call can do.
  • the information on the method b 511 and the method c 512 are information on the instruction masses for the called method b 511 and the method c 512, respectively, as described with reference to FIG. 4, And information on the reference relationship between the nodes. Therefore, the vulnerability detection system can grasp how the execution control of the program according to the file is being transferred.
  • 6 is a diagram for explaining rules and patterns according to an embodiment of the present invention. 6 illustrates an example of the structure of a rule (Rule) 600 according to the present embodiment.
  • the rule 600 may include information on a detection pattern for detecting a vulnerability corresponding to any one of known vulnerabilities.
  • the 'Name' item 610 may include the name of the corresponding rule 600
  • the 'Description' item 620 may include a detailed description of the corresponding rule 600
  • the rule 600 may include explanatory information on the vulnerability.
  • the 'Guide' item 640 may include information on the behavioral principles and instructions related to the use of the rule 600.
  • the 'Priority' item 630 may include information on the risk level for the vulnerability. For example, a value for one of three risk classes, such as 'Critical', 'Warning', and 'Normal' is set to 'Priority' item 630 . It is clear that this risk level may be set to two or more than four levels.
  • the 'Dependency' item 650 may indicate whether there is a condition that dynamically determines the actual vulnerability of the vulnerable layer. For example, there may be cases where the risk for a single vulnerability is conditional. For example, a vulnerability a may have a "critical" risk rating in condition 1, but a vulnerability a may have a "normal” risk rating in condition 2, or no risk at all . Therefore, in order to distinguish such a conditional difference, the 'Dependency' item 650 may include information on the condition and information on the danger level according to the condition. Or may simply include information as to whether such conditions exist.
  • the items of the rule 600 described above can be optionally included in the rule 600 according to the embodiment.
  • the 'Pattern' item 660 may include one or more detection patterns for detecting vulnerabilities.
  • the detection patterns may be preset, and one rule 600 may include one detection pattern for detecting vulnerabilities or a combination of two or more detection patterns.
  • the detection pattern may be implemented with at least one instruction, and each of the at least one instruction may be implemented in the form of a method or class having parameters.
  • the parameter may be set in advance or dynamically set to a value extracted through another pattern.
  • FIG. 7 is a diagram for explaining a structure of a pattern in an embodiment of the present invention.
  • the rule table may include information on the set rule.
  • 'rule_id (pk)' may mean a rule corresponding to a primary key (pk) among the set rules.
  • 'rule_id (pk)' may refer to a function that takes the main identifier pk as a parameter and returns the identifier of the corresponding rule.
  • 'name (key)' can mean the name of the rule corresponding to the key. This 'name (key)' can also mean a function that actually returns the name of the corresponding rule by taking the key key as a parameter. In this way, 'x (y)' in FIG.
  • 'pattern_hash (fk)' may mean a hash value of a pattern corresponding to an external identifier (foreign key, fk).
  • 'description', 'priority', 'guide' and 'dependency' are 'Description' item 620, 'Priority item' May refer to values corresponding to a 'Priority' item 630, a 'Guide' item 640, and a 'Dependency' item 650.
  • 'pattern_hash (key)' can mean a hash value of the pattern corresponding to the key.
  • the vulnerability detection system can obtain information on necessary rules using the rule table 710 and obtain a hash value of the pattern as an identifier of the pattern included in the obtained rule.
  • the pattern table may include information on the set pattern.
  • 'pattern_id (pk)' may refer to a pattern corresponding to a primary key (pk)
  • 'rule_id (pk)' may refer to a rule corresponding to an external identifier (foreign key, fk).
  • 'source' may mean information about the source of the pattern.
  • the source of a pattern may represent the type of file to be searched in a package file such as APK.
  • 'Join_pattern' is information of another pattern composing one rule, 'join_type (and / or or)', and 'join_type' is information of a type of pattern to be returned.
  • the vulnerability detection system can identify the patterns included in the rule through information on rules obtained from the rule table 710 and obtain information on the patterns included in the rule through the pattern table 720 .
  • the dex file table may include information extracted from the DEK file of the APK.
  • 'pattern_id (fk)' may mean a pattern corresponding to the foreign key (fk) among the set patterns.
  • 'Called_class_name' may be a value for identifying a class name to be called, and 'called_method_name' may be a value for identifying a method name to be called.
  • 'argument_index (optional)' is a function that returns the index of the argument, and 'argument_type' is the type of the argument that is returned. It can mean.
  • the dex file table 730 also includes an argument (argument_from_detect_api_list) from the detected API list, an argument (argument_from_except_api_list) from the exception-treated API list, an argument from the detected field list (argument_from_detect_field_list) (argument_from_except_list).
  • the vulnerability detection system can refer to the dex file table 730 in detecting information necessary for detecting a vulnerability according to a pattern. For example, the vulnerability detection system can identify a method or a class to be invoked in a corresponding instruction mass by using a dex file table 730 in detecting a vulnerability to a specific instruction mass.
  • the file table may include pattern information for extracting information of a specific file included in the package file.
  • 'pattern_id (fk)' may mean a pattern corresponding to an external identifier (foreign key) fk
  • 'pattern_hash (key)' may mean a hash value of a pattern corresponding to a key.
  • 'File_type' is the type of the file to be searched through the pattern
  • 'file_extension' is the extension of the file to be searched through the pattern
  • 'file_name' is the file Quot ;, respectively.
  • the content table may include pattern information for extracting characters included in the file.
  • 'pattern_id (fk)' may mean a pattern corresponding to an external identifier (foreign key) fk
  • 'pattern_hash (key)' may mean a hash value of a pattern corresponding to a key.
  • 'File_type' is the type of the file to be searched through the pattern
  • 'character_type' is the type of the character (or string)
  • 'character' is the character String).
  • the permission table may include pattern information for extracting permission information of the package file.
  • 'pattern_id (fk)' may mean a pattern corresponding to an external identifier (fk) among the set patterns, and 'name' may mean the name of a permission.
  • the activity table may include pattern information for extracting activity information.
  • 'pattern_id (fk)' may mean a pattern corresponding to an external identifier (fk) among the set patterns, and 'name' may mean the name of an activity.
  • an activity means a screen with a user interface.
  • an activity class can be inherited from an APK. As such, terms such as activities and permissions described above will be readily understood by those skilled in the art through conventional techniques for APK.
  • the SDK table may include pattern information for extracting information on an SDK (Software Development Kit).
  • 'pattern_id (fk)' may mean a pattern corresponding to an external identifier (fk) among the set patterns
  • 'version' means version information of SDK
  • 'version detection condition' Can each mean a detection condition of the version. For example, if the version is set to '21' and the 'conditional_equality' is 'small or equal', then the version of the SDK may be detected if the version is 21 or less.
  • the source of the pattern 660 included in the rule 600 may be a specific file of a package file such as APK.
  • the pattern 660 includes any file (810), a dex file (dex) 820, an Android manifest file (AndroidManifest.xml) 830, Or a dll file (dll, 850) as a source.
  • FIG. 9 is a diagram showing an example of a pattern for arbitrary files in an embodiment of the present invention.
  • FIG. 9 shows the types of patterns 900 for arbitrary files 810.
  • FIG. 9 shows the types of patterns 900 for arbitrary files 810.
  • the pattern of the first kind 910 may refer to a pattern for finding a specific character (or string) in a file, and may be expressed as pattern 1 below.
  • a pattern for finding a URL (Uniform Resource Locator) in a JavaScript Object Notation (JSON) file can be implemented as 'RetrieveFileContents: FileType (json) CharacterType (string) Character (http: // *)'.
  • the above-mentioned example pattern may be a command to search for 'http: // *' as a string of a 'string' type in a file of 'json' type as a pattern for retrieving contents contained in a file.
  • the file type 'all' can mean files of all extensions.
  • the parameter of the character type 'CharacterType ()' may mean a character or a string type such as 'string', 'hexa', and the like.
  • a parameter of 'Character ()' may mean a string to be searched, and an asterisk (*) may mean any string starting with a string before the asterisk.
  • the pattern of the second kind 920 may refer to a pattern for finding a specific file in the package file, and may be expressed as pattern 2 below.
  • a pattern that contains a DLL (Dynamic Linking Library) type and has a file name of "Assembly-Csharp" among the files included in the package file is "RetrieveFile: FileType (string) FileName (Assembly-Csharp) Can be implemented together.
  • a pattern for searching DLL type files among the files included in the package file can be implemented as 'RetrieveFile: FileType (string)'.
  • the parameters of the file type 'FileType ()' are the file extensions such as 'all', 'apk', 'txt', 'ini', 'property', 'json', 'xml', 'img', 'mp4' Or may be set dynamically.
  • the parameters of the file name 'FileName ()' can also be pre-set or dynamically set.
  • 'FileExtension ()' may be further used to search for a file based on the file extension, and the 'FileExtension ()' parameter may be set in advance or dynamically.
  • FIG. 10 is a diagram illustrating an example of a result of detecting a specific character string in a file and a result of detecting a specific file in a package file in an embodiment of the present invention.
  • the detected information 1010 indicates that it may include a detected file name 1011 and a match string 1012 according to the pattern of the first type 910.
  • a detected file name 1011 when there are three 'json' type files, 'http: // *' can be searched as a string of 'string' type in each of the three files, May be provided by file name. If one 'json' file contains multiple URLs, multiple strings may be detected.
  • the detected information 1020 indicates that it may include a file name (File name, 1021) detected in the package file according to the pattern of the second kind (920). Even in this case, a plurality of file names can be searched according to the pattern.
  • 11 is a diagram showing an example of a pattern for an Android manifest file in an embodiment of the present invention. 11 shows the type of the pattern 1100 for the Android manifest file (AndroidManifest.xml, 830).
  • the pattern of the third kind 1110 may refer to a pattern for finding a permission group in the Android manifest file 830 and may be expressed as pattern 3 below.
  • permissions such as 'android.permission.GET_TASKS' and 'android.permission.INTERNET' may be provided.
  • a permission with that name may be searched for a specific permission name, such as the pattern 'RetrievePermission: Name (android.permission.READ_EXTERNAL_STORAGE)'.
  • a vulnerability associated with a particular permission is known, a pattern can be set to detect if the permission exists and vulnerability detection can be performed based on the configured pattern.
  • the common factors may include a common role.
  • the pattern of the fourth kind 1120 may refer to a pattern for finding an activity group in the Android manifest file 830 and may be expressed as pattern 4 below.
  • the pattern of the fifth kind 1130 may refer to a pattern for finding the minimum SDK API version in the Android manifest file 830 and may be expressed as pattern 5 below.
  • the parameter of version 'Version ()' can be set to dynamically set the value of the desired version as a string type, or an asterisk (*) to mean all versions.
  • 'ConditionalEquality' which means a comparison condition, can be utilized for comparison between the value set in the version 'Version ()' using the equal sign or inequality and the SDK API version set in the Android manifest file.
  • 'RetrieveMinSDK Version (21)
  • the pattern of the sixth kind 1140 may refer to a pattern for searching the target SDK API version in the Android manifest file 830 and may be expressed as pattern 6 below.
  • the version 'Version ()' and 'ConditionalEquality' which means the comparison condition, can be common with the pattern 6.
  • the pattern of the seventh kind 1150 may refer to a pattern in which the main application is found in the Android manifest file 830 and may be expressed as pattern 7 below.
  • the pattern of the eighth kind 1160 may refer to a pattern of finding a service group in the Android manifest file 830 and may be expressed as pattern 8 below.
  • the pattern of the ninth kind 1170 may refer to a pattern for finding a receiver group in the Android manifest file 830 and may be expressed as pattern 9 below.
  • the pattern of the tenth kind (1180) may refer to a pattern of finding a provider group in the Android manifest file (830), and may be expressed as pattern 10 below.
  • the permissions, activity, minimum SDK API version, target SDK API version, main application, service, receiver, and provider searched in the Android manifest file 830 may be readily understood by those skilled in the art through well known prior art techniques for APK .
  • 12 is a diagram showing an example of a pattern for a Dex file in an embodiment of the present invention. 12 shows the types of the patterns 1200 for the dex file dex 820. FIG.
  • the pattern of the eleventh kind 1210 may refer to a pattern for searching a called API, and may be expressed as pattern 11 below.
  • 'DexFindApi' can refer to the pattern name of the pattern for which the called API is searched.
  • 'DexCalledAPI' can mean a factor for specifying a specific method of a specific class. These classes and methods can be specified according to 'ClassName' and 'MethodName'.
  • 'DexTraceArgument' may refer to a factor for specifying a specific index and / or an argument of a certain type.
  • 'DexArgumentFrom' can mean a factor for determining whether to handle an exception, detecting an argument from a null, or specifying a specific API list or a field list.
  • Table 1 below shows a first example of an instruction mass
  • Table 2 shows a first example of a pattern.
  • DexFindApi DexCalledAPI :: ClassName (Liavax / net / ssl / SSLContext) MethodName (init)
  • the pattern in Table 2 can refer to a pattern that looks for an API that calls the method 'init' in class 'Liavax / net / ssl / SSLContext'.
  • the vulnerability detection system can detect that the method 'mfindMe' of the class' cfindMe 'calls the corresponding method' init 'in the instruction mass of Table 1 based on the corresponding pattern, and' called from cfindMe- gt; mfindMe '. < / RTI >
  • Table 3 below shows the second example of the instruction mass, and Table 4 shows the second example of the pattern.
  • DexFindApi DexCalledAPI :: ClassName (Ljavax / net / ssl / SSLContext) MethodName (init)
  • DexTraceArgument ArgumentIndex (2): ArgumentType (Ljavax / net / ssl / TrustManager) FromApiList :: FromApiList [0] ⁇ ClassName (Ljavax / net / ssl / TrustManagerFactory), MethodName (getTrustManagers) ⁇ : Exception (true)
  • the pattern in Table 4 finds the API calling the method 'init' in class 'Liavax / net / ssl / SSLContext' and traces the arguments of type 'Ljavax / net / ssl / TrustManager' in index '2'
  • this can mean a pattern treated as an exception (true) for the class 'Ljavax / net / ssl / TrustManagerFactory' specified in ApiList and method 'getTrustManagers'.
  • the API calling the method 'init' of the class' Liavax / net / ssl / SSLContext ' is the method' mfindMe 'of the class' cfindMe' and the type 'Ljavax / net / ssl / TrustManager 'argument is' tm'.
  • the method 'getTrustManagers' of the class 'Ljavax / net / ssl / TrustManagerFactory' does exception handling, the method 'mfindMe' of the argument 'tm' or class 'cfindMe' can be detected without exception.
  • Table 5 below shows a third example of the instruction mass
  • Table 6 shows a third example of the pattern.
  • DexFindApi DexCalledAPI :: ClassName (Ljavax / net / ssl / SSLContext) MethodName (init) DexTraceArgument :: ArgumentIndex (2) DexArgumentFrom :: FromNull
  • the pattern in Table 6 finds the API calling the method 'init' in class 'Liavax / net / ssl / SSLContext' and traces the argument of index '2' in method 'init' May refer to a pattern of looking for.
  • the API calling the method 'init' of class 'Liavax / net / ssl / SSLContext' is the method 'mfindMe' of class 'cfindMe' and the argument of index '2' Is null.
  • 'DexCalledAPI' it can detect that method 'mfindMe' of class 'cfindMe' calls its method 'init', and arguments from 'null' according to 'DexTraceArgument' and 'DexArgumentFrom' init 'at index 2.
  • 'called from cfindMe-> mfindMe' message and 'argument from null' message may be provided.
  • Table 7 below shows the fourth example of the instruction mass
  • Table 8 shows the fourth example of the pattern.
  • DexFindApi DexCalledAPI :: ClassName (System) MethodName (loadLibrary) DexTraceArgument :: ArgumentIndex (1)
  • the pattern in Table 8 can refer to a pattern that looks for APIs that call the method 'loadLibrary' in class 'System' and traces the arguments at index '1' in method 'loadLibrary'.
  • the detection result of the pattern can be provided as shown in the message of Table 9 below.
  • str input (parameter) may mean that the argument 'str' was passed as parameter 'input', and parameter ' It can mean "xxx" in method 'init'. Therefore, it can be seen that the argument 'str' of the index '1' of the method 'loadLibrary' of the class 'System' has the value 'xxxxx' of the current 'string' type.
  • Table 10 below shows the fifth example of the instruction mass
  • Table 11 shows the fifth example of the pattern.
  • DexFindApi DexCalledAPI :: ClassName (Liavax / net / ssl / TrustManager) MethodName (init) DexTraceArgument :: ArgumentIndex (2) DexArgumentFrom : Exception (false): FromFieldList FromField [0] ⁇ ClassName (Lorg / apache / http / conn / ssl / SSLSocketFactory), FieldName (ALLOW_ALL_HOSTNAME_VERIFIER)
  • the pattern in Table 11 finds the API calling the method 'init' in class 'Liavax / net / ssl / SSLContext' and traces the arguments of index '2' in method 'init' May refer to a pattern that does not handle exceptions.
  • the API calling the method 'init' of the class 'Liavax / net / ssl / SSLContext' (called from cfindMe -> mfindMe, for example) may be provided as a result of detection, and the argument 'tm' of index '2' of method 'init' (E.g., 'argument from SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER') to indicate that it is an argument from SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER may be further provided as a detection result.
  • the pattern of the twelfth kind 1220 may refer to a pattern for finding a specific instruction of a method, and may be expressed as pattern 12 below.
  • 'DexMethodyBody' can refer to a pattern name to find a specific instruction within a particular method.
  • 'MethodName' may mean a factor for specifying a method.
  • 'DexInstructionList' may mean a factor for specifying an instruction to detect.
  • 'List ⁇ DexInstruction>' can be used to specify the instruction to detect, and 'Except (true / false)' can be used to determine whether to handle the specified instruction.
  • 'VoidBody' can be used to specify an instruction of type void, and 'InvokeInstruction' can be used to specify the instruction to be called.
  • Table 12 below shows the sixth example of the instruction mass
  • Table 13 shows the sixth example of the pattern.
  • DexMethodyBody MethodName :: checkServerTrusted
  • DexInstructionList :: ⁇ DexInstruction (VoidBody) ⁇ : Except (false)
  • the pattern in Table 13 can refer to a pattern that checks whether the method 'checkServerTrusted' is a void type. Since the method 'checkServerTrusted' is declared as void type in the instruction mass of Table 12, a message (for example, 'Body is void') may be provided to notify that the method 'checkServerTrusted' is of type void.
  • Table 14 below shows the seventh example of the instruction mass, and Table 15 shows the seventh example of the pattern.
  • DexMethodyBody MethodName :: checkServerTrusted
  • DexInstructionList :: ⁇ DexInstruction (InvokeInstruction (Ljava / security / cert / CertificateException, ⁇ init>), DexInstruction (Ljava / lang / IllegalArgumentException,
  • the pattern in Table 13 can refer to a method that calls the method 'Ljava / security / cert / CertificateException' in the method 'checkServerTrusted' and the instruction to call the method 'Ljava / lang / IllegalArgumentException'.
  • the instruction mass in Table 14 it can be seen that there is an instruction to call the method 'Ljava / security / cert / CertificateException'.
  • a message eg, 'Invoke instruction isdetected, CertificateException -> ⁇ init>'
  • the patterns can be joined. For example, you can use the pattern 'DexFindApi' to find a specific class 'a', then use the pattern 'DexMethodyBody' to find the specific instruction in the method of class 'a'. For example, these two patterns can be joined and included in one rule.
  • the pattern of the thirteenth kind 1230 may refer to a pattern of finding a child class of a specific class, and may be expressed as pattern 13 below.
  • DexFindSubClass
  • 'DexFindSubClass' can refer to a pattern name for finding a child class of a specific class.
  • 'DexParent' can be a factor for specifying the parent class of the child class to be searched.
  • Table 16 below shows the eighth example of the instruction mass, and Table 17 shows the eighth example of the pattern.
  • Class cfindMe extend IamYourFather ⁇
  • Class csearchMe extend IamYourFather ⁇
  • DexFindSubClass DexParent :: ClassName (IamYourFather)
  • Table 17 can refer to a pattern for locating a child class that has the class 'IamYourFather' as its parent.
  • class' cfindMe 'and class' csearchMe' can be detected respectively, because class' cfindMe 'and class' csearchMe' are child nodes of class' IamYourFather 'respectively and detected class' cfindMe &Quot; and a class " csearchMe " may be provided.
  • the joins between the patterns can be utilized in various ways. For example, the pattern 'DexFindSubClass' is used to find the child class 'b' having the class 'a' as a parent, and then the detected class 'b' is dynamically changed as 'ClassName (b)' in the pattern 'DexFindApi' It can be used as a parameter.
  • FIG. 13 is a diagram showing an example of a pattern for a so file in an embodiment of the present invention.
  • FIG. 13 shows the types of patterns 1400 for the so file 840.
  • FIG. 13 shows the types of patterns 1400 for the so file 840.
  • the pattern of the 14th type 1310 may be a pattern for searching a string (specific string) in the so file 840, and may be expressed as pattern 14 below.
  • the pattern 'RetrieveSoContents' may be a pattern name for retrieving a string in the so file 840, and' Character (string) 'may be a specific string (for example,' http: Quot; // * "). At this time, the string can be retrieved from the '.rdata' section included in the so file 840.
  • the pattern of the fifteenth kind 1320 may be a pattern for searching the API in the so file 840 and may be expressed as pattern 15 below.
  • the pattern 'RetrieveApiContents' may refer to a pattern name for retrieving the API in the so file 840, and 'APIType ()' indicates the type of the API as one of an Import Address Table (IAT) and an Export Address Table , And 'Name ()' may be a factor for specifying a name of an API to be searched.
  • 'APIType ()' indicates the type of the API as one of an Import Address Table (IAT) and an Export Address Table
  • And 'Name ()' may be a factor for specifying a name of an API to be searched.
  • FIG. 14 is a diagram showing an example of a pattern for a dll file in an embodiment of the present invention. 14 shows the type of the pattern 1400 with respect to the dll file 850. Fig.
  • the pattern of the sixteenth kind 1410 may refer to a pattern for searching a string (specific string) in the dll file 850, and may be expressed as pattern 16 below.
  • the pattern 'RetrieveDllContents' may refer to a pattern name for searching a string in the dll file 850, and' Character (string) 'refers to a specific string (for example,' http: Quot; // * ").
  • the parameters in the pattern can be dynamically determined as described above.
  • the value extracted through the pattern a through the combination of the pattern a and the pattern b can be dynamically utilized as a parameter for the pattern b.
  • the patterns 1 to 16 described above are examples for the APK, and other patterns may be utilized for other package files.
  • the vulnerability detection system can provide the administrator or user with an editor function to register such patterns or to edit registered patterns. For example, if a new vulnerability is known to an application, a new pattern can be registered through the editor function to detect a newly known vulnerability.
  • the vulnerability detection system analyzes the package files of the application through a new pattern Vulnerabilities can be detected.
  • the types of patterns may appear as shown in Table 18 below.
  • the pattern 'dex (find_api)' may correspond to the pattern 11 'DexFindApi' described above.
  • This pattern 'dex (find_api)' can be a pattern for detecting calls to the specified api in a method.
  • the pattern 'dex (find_sub)' may correspond to the pattern 13 'DexFindSubClass' described above, and may be used to detect child classes inherited from the specified class.
  • the pattern 'dex (method_body)' may correspond to the pattern 12 'DexMethodBody' described above, and may be used for comparing and detecting invoke instructions, instructions, method names, and the like in aptjem.
  • the pattern 'dex (method_annotation)' can also be used in Java to detect annotations specified in a method.
  • the pattern 'dex (exist_api)' may be used to detect whether a particular class and / or method exists. For example, when a combination of patterns using logic operations to be described later is used, a pattern combination (dex (exist_api) sub dex (find_api)) is a pattern that is searched for a class found through 'dex (exist_api) You can search for api calls specified via the pattern 'dex (find_api)'.
  • the pattern 'dex (exist_field)' can be used to search for the existence of a member of a specific class.
  • the pattern 'dex (exist_field)' can be searched for a member of the specified regular expression by specifying a regular expression to compare the value of the form 'class ⁇ member name' with the value of that member.
  • the pattern 'manifest' can be used for comparison with the items in AndroidManifest.xml.
  • the patterns 'xml', 'so', 'dll', and 'find_file' can be used to perform searches on xml files, so files, dll files, and all files.
  • a search in a dll file is described in more detail in Pattern 16 (RetrieveDllContents).
  • the patterns may be combined using logical operations and parentheses.
  • Table 19 shows examples of logic operations that can be used for combinations of patterns.
  • pattern A is detected in (pattern A or pattern B)
  • detection for pattern B may not be performed because it is already 'true'.
  • pattern A is 'false' (pattern A sub pattern B)
  • detection for pattern B may not be performed.
  • a more specific example of a combination of patterns using such logic operations is a pattern combination (dex (find_sub_class) sub dex (find_api)).
  • the children of all activities are searched through the pattern 'dex (find_sub_class)' on the left, and the classes searched through the pattern on the left can be used as classes for the right pattern.
  • the right pattern 'dex (find_api)' traverses the api in the classes found through the left pattern.
  • FIG. 15 is a block diagram illustrating an example of a component that a processor of a server according to an exemplary embodiment of the present invention may include;
  • FIG. 16 is a diagram illustrating a vulnerability detection method Fig.
  • the vulnerability detection system 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 a vulnerability detection system, and includes a detection pattern management unit 1510, a package file registration unit 1520, and a vulnerability information detection unit 1530, . ≪ / RTI >
  • the components of the processor 222 and the processor 222 may perform the steps 1610 through 1630 of the vulnerability detection method of FIG.
  • the components of the processor 222 and the processor 222 may be implemented to execute control instructions according to code of the operating system or code of at least one program that the memory 221 includes.
  • processor 222 may be representations of different functions of processor 222 performed by processor 222 in accordance with the control instructions provided by the code stored in server 150 .
  • the detection pattern manager 1510 may be used as a functional representation of the processor 222 in which the processor 222 manages detection patterns in accordance with the control commands described above.
  • the detection pattern management unit 1510 determines whether or not a predetermined detection pattern for diagnosing the vulnerability of the application is detected in association with at least one of the files included in the package file for installation and operation of the application, Can be managed. It should be understood by those skilled in the art that the above detailed embodiments of the detection patterns have been described and that various embodiments can be derived according to the vulnerability.
  • the detection pattern management unit 1510 provides an editor function for registering a new detection pattern or editing a registered detection pattern in step 1610, and provides information on the registered or edited detection pattern through the provided editor function Stored and managed.
  • the editor function can be provided to the administrator or user of the vulnerability detection system in the form of a specific web page or a specific application, for example.
  • an administrator terminal and a vulnerability detection system can communicate with each other through a specific application installed in an administrator's terminal, and information about a detection pattern registered or edited in a specific application can be transmitted to the vulnerability detection system through the network have.
  • the detection pattern management unit 1510 can register a new detection pattern or update the edited detection pattern.
  • the parameters of the factors included in the patterns may be preset, but may be dynamically determined as necessary, and the detection patterns may be implemented in a more various ways as the parameters can be dynamically determined .
  • the package file registration unit 1520 may register a package file to be distributed to users for installation and operation of the application.
  • the server 150 may be implemented in a form including a vulnerability detection system as described above.
  • the server 150 may be implemented as a combination of an application publisher system and a vulnerability detection system.
  • the package file can be registered and received from the developer side for distributing to the users by the application publisher.
  • each file can be identified in the registered package file, and classes and methods can be identified.
  • each of the methods may be classified in the form of an instruction mass based on a branch instruction (branch statement), and a call relationship between instruction masses and / or a call relation between methods may be stored in the form of a data structure such as a tree structure And managed. Information about this call relationship can be used to trace arguments, retrieve APIs, and so on.
  • the vulnerability information detection unit 1530 may analyze the registered package file according to at least one detection pattern among the detection patterns to detect vulnerability information according to at least one detection pattern. Detection of such vulnerability information has been described in detail in various embodiments above. At this time, the vulnerability information detection unit 1530 combines the plurality of detection patterns and dynamically changes the first information detected in the package file registered according to the first detection pattern to a parameter of the factor including the second detection pattern And detect the vulnerability information in the registered package file according to the second detection pattern including the fact that the detected first information is set as a parameter.
  • the detection pattern may include a pattern for retrieving a specific string from at least one of the files included in the registered package file.
  • Pattern 1, Pattern 14, and Pattern 16 described above describe a pattern for retrieving a specific string (or string) in a file.
  • Pattern 1 explained that a registered package file includes a factor for designating a specific type of file to be included.
  • the detection pattern may include a pattern for searching at least one of a file of a specific type and a file of a specific file name among the files included in the registered package file.
  • pattern 2 described above describes a pattern for searching a file of a specified type and / or a file of a specified filename.
  • the detection pattern includes a pattern for searching for permission in the Android manifest file included in the APK (Android application package), a pattern for searching for activity, an SDK (Application Development Programming) API, At least one of a pattern for searching a version, a pattern for searching a main application, a pattern for searching for a service, a pattern for searching for a receiver, and a pattern for searching for a provider Pattern. ≪ / RTI > These patterns have been described in detail in Patterns 3 to 10.
  • the detection pattern may also include a pattern for retrieving an API called from at least one of a specified class and a specified method.
  • the pattern for searching the called API includes a factor specifying at least one of a class and a method, a factor specifying at least one of an index and a type of the argument to track an argument of the specified method, A factor specifying at least one of an API, a field, and a null to detect an argument passed from at least one of an API specified for the argument, a specified field, and a null .
  • the detection pattern may also include a pattern that retrieves the specified instruction from the specified method.
  • the pattern for searching for a specific instruction may include a factor for specifying an instruction to be searched, a factor for specifying a type of an instruction to be searched, and a factor for specifying a class and a method to be searched by the instruction to be searched. have. These patterns are described in detail in Pattern 12.
  • the detection pattern may include a pattern for searching a child class of a designated class and / or a pattern for searching an API in at least one of the files included in the registered package file.
  • a search pattern for diagnosing the vulnerability of an application is set in advance, and a vulnerability of a package file of an application registered for distribution based on a set detection pattern It can detect.
  • 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 apparatus and components described in the embodiments may be implemented within a computer system, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA) , 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 execution of the software.
  • OS operating system
  • the processing device may also access, store, manipulate, process, and generate data in response to execution of the software.
  • the processing apparatus may be described as being used singly, but those skilled in the art will recognize that the processing apparatus may have a plurality of processing elements and / As shown in FIG.
  • the processing unit may comprise a plurality of processors or one processor and one controller.
  • Other processing configurations are also possible, such as a parallel processor.
  • the software may include a computer program, code, instructions, or a combination of one or more of the foregoing, and may be configured to configure the processing device to operate as desired or to process it collectively or collectively Device can be commanded.
  • the software and / or data may be in the form of any type of machine, component, physical device, virtual equipment, computer storage media, or device As shown in FIG.
  • the software may be distributed over a networked computer system and stored or executed in a distributed manner.
  • the software and data may be stored on one or more computer readable recording media.
  • the method according to an embodiment may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium.
  • the computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination.
  • the program instructions to be recorded on the medium may be those specially designed and configured for the embodiments or may be available to those skilled in the art of computer software.
  • Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media 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 a variety of recording means or storage means in the form of a single or a plurality of hardware combined and is not limited to a medium directly connected to any computer system but may be dispersed on a network.
  • Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like.

Abstract

Provided are an application vulnerability detection method and system. The vulnerability detection method may comprise the steps of: managing predetermined detection patterns for diagnosing vulnerabilities of an application with respect to at least one among files included in a package file for installing and executing the application, and codes included in the files; registering the package file for distribution to users so as to enable the installation and execution of the application; and by analyzing the registered package file according to at least one detection pattern among the detection patterns, detecting vulnerability data per each of the at least one detection patterns.

Description

어플리케이션의 취약점을 탐지하는 방법 및 시스템A method and system for detecting vulnerabilities in an application
아래의 설명은 어플리케이션의 취약점을 탐지하는 방법 및 시스템, 그리고 컴퓨터와 결합되어 취약점 탐지 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램에 관한 것이다.The following description relates to a method and system for detecting vulnerabilities in an application and to a computer program stored on a computer readable recording medium for causing a computer to execute a vulnerability detection method in combination with the computer.
앱스토어(App store)는 스마트폰과 같은 단말에 탑재할 수 있는 다양한 어플리케이션을 판매하는 온라인상의 컨텐츠 장터이다. 예를 들어, 어플리케이션의 개발자들은 개발된 어플리케이션을 단말에 설치하기 위한 파일(일례로, 안드로이드 응용 프로그램 패키지(Android Application Package, APK))를 앱스토어에 등록하고, 어플리케이션의 이용자들은 앱스토어를 통해 필요한 어플리케이션을 위한 파일을 다운로드받아 자신의 단말에 어플리케이션을 설치 및 구동할 수 있게 된다. 또한, 게임 퍼블리셔와 같이 다양한 게임 어플리케이션을 이용자들에게 배포하는 경우도 존재한다. 이처럼, 자신들이 직접 개발하지 않은 다양한 어플리케이션들을 개발자들로부터 등록받고, 등록받은 어플리케이션들을 이용자들에게 배포하는 어플리케이션 퍼블리셔들이 존재한다.The App store is an online content marketplace that sells a variety of applications that can be installed on terminals such as smart phones. For example, an application developer registers a file (for example, an Android application package (APK)) for installing the developed application on a terminal in the App Store, and users of the application The user can download the file for the application and install and operate the application in his / her terminal. There are also cases where various game applications such as game publishers are distributed to users. As such, there are application publishers that register various applications that developers themselves have not developed and distribute registered applications to users.
이때, 어플리케이션의 위험성은 다양한 관점에서 설명될 수 있다.At this time, the risk of the application can be explained from various viewpoints.
일례로, 어플리케이션의 첫 번째 위험성은 어플리케이션이 악성 코드와 같이 악의적인 의도로 개발된 정보를 포함함으로써, 어플리케이션이 등록되는 어플리케이션 퍼블리셔나 또는 어플리케이션이 설치 및 구동되는 이용자들의 단말에서 악의적인 기능을 수행하는 경우의 위험성을 들 수 있다. 한국공개특허 제10-2014-0098025호는 앱 스토어로 업로드 된 어플리케이션의 보안 평가를 위한 시스템 및 그 방법에 관한 것으로, 앱스토어에 등록될 어플리케이션이 악의적인 기능을 수행하는 것으로 탐지되는 경우, 해당 어플리케이션의 진입(앱스토어로의 등록)을 거절하는 기술에 대해 개시하고 있다.For example, the first risk of an application is that the application contains information developed with malicious intent, such as malicious code, so that the application publisher in which the application is registered, or a malicious function in the terminal of the user This is the risk of 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 application store. When an application to be registered in the application store is detected as performing a malicious function, (Registration in the AppStore) of the application.
다른 예로, 어플리케이션의 두 번째 위험성은 어플리케이션 자체의 보안성에 대한 위험성을 들 수 있다. 배포된 어플리케이션에 대한 분석을 통해 어플리케이션의 소스 코드가 변경 또는 수정됨에 따라 어플리케이션이 개발자에 의해 원래 의도된 기능이 아닌 다른 기능을 수행하게 됨으로써, 해당 어플리케이션을 통해 제공하고자 하는 서비스의 신뢰도가 감소하는 문제점이 존재한다. 따라서, 어플리케이션 퍼블리셔들은, 자신들이 직접 개발하지 않은 다양한 어플리케이션들(어플리케이션들의 설치 파일들)을 배포함에 있어서, 어플리케이션들에 대해 일정 수준 이상의 보안성을 제공할 필요성이 존재한다.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 the analysis of the distributed application, the application performs functions other than those originally intended by the developer, thereby reducing the reliability of the service to be provided through the application Lt; / RTI > Accordingly, there is a need for application publishers to provide a certain level of security to applications in distributing various applications (installation files of applications) that they have not developed directly.
그러나, 이러한 어플리케이션의 두 번째 위험성과 관련하여, 등록되는 어플리케이션마다 제공하는 보안 수준은 차이가 있다. 예를 들어, 각 어플리케이션들에는 서로 다른 보안 수준의 보안 솔루션들이 탑재되어 있을 수 있고, 아무런 보안수단도 포함되어 있지 않을 수 있다. 또한, 각 어플리케이션들에 탑재된 보안 솔루션들마다 제공하는 보안 수준에도 차이가 존재한다.However, with respect to the second risk of such an application, there is a difference in the level of security provided by each registered application. For example, each application may have security solutions at different security levels and may not include any security measures. There is also a difference in the level of security provided for each security solution installed in each application.
종래기술에서는 단순히 프로그래밍 언어 수준(일례로, 안드로이드 응용 프로그램 패키지(Android Application Package, APK)에 대해 자바(java) 단의 취약점 점검만을 진행할 수 있을 뿐, 어플리케이션 퍼블리셔의 관점에서는, 등록되는 수많은 어플리케이션들 각각에 대해 일정한 수준 이상으로 유지되는 보안성을 제공하기 어렵다는 문제점이 있다.In the prior art, only the vulnerability of the Java platform can be checked only at the programming language level (for example, the Android application package (APK)). From the viewpoint of the application publisher, There is a problem in that it is difficult to provide a security that is maintained at a certain level or more.
어플리케이션의 취약점(vulnerability)을 진단하기 위한 탐색 패턴을 미리 설정하고, 설정된 탐지 패턴에 기반하여 배포를 위해 등록되는 어플리케이션의 패키지 파일에 대한 취약점을 탐지할 수 있는 취약점 탐지 방법 및 시스템을 제공한다.A vulnerability detection method and system capable of detecting a vulnerability of a package file of an application registered for distribution on the basis of a detection pattern set in advance and a search pattern for diagnosing an application vulnerability are preset.
어플리케이션의 취약점을 탐지하는 방법에 있어서, 어플리케이션의 설치 및 구동을 위한 패키지 파일이 포함하는 파일들 및 상기 파일들이 포함하는 코드들 중 적어도 하나와 관련하여, 상기 어플리케이션의 취약점 진단을 위한 기 설정된 탐지 패턴들을 관리하는 단계; 어플리케이션의 설치 및 구동을 위해 이용자들에게 배포하기 위한 패키지 파일을 등록하는 단계; 및 상기 탐지 패턴들 중 적어도 하나의 탐지 패턴에 따라 상기 등록된 패키지 파일을 분석하여 상기 적어도 하나의 탐지 패턴별로 취약점 정보를 탐지하는 단계를 포함하는 것을 특징으로 하는 취약점 탐지 방법을 제공한다.A method for detecting a vulnerability of an application, the method comprising: detecting a predetermined detection pattern for diagnosing a vulnerability of the application, with respect to at least one of files included in a package file for installing and running an application and codes included in the files; ; Registering a package file for distribution to users for installation and operation of an application; And analyzing the registered package file according to the detection pattern of at least one of the detection patterns to detect the vulnerability information according to the at least one detection pattern.
상기 취약점 탐지 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터 판독 가능한 기록매체를 제공한다.And a computer program for causing the computer to execute the vulnerability detection method is recorded in the computer readable recording medium.
컴퓨터와 결합하여 상기 취약점 탐지 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.And a computer program stored in a computer-readable recording medium for causing the computer to execute the vulnerability detection method in combination with the computer.
어플리케이션의 취약점을 탐지하는 시스템에 있어서, 컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는, 어플리케이션의 설치 및 구동을 위한 패키지 파일이 포함하는 파일들 및 상기 파일들이 포함하는 코드들 중 적어도 하나와 관련하여, 상기 어플리케이션의 취약점 진단을 위한 기 설정된 탐지 패턴들을 관리하고, 어플리케이션의 설치 및 구동을 위해 이용자들에게 배포하기 위한 패키지 파일을 등록하고, 상기 탐지 패턴들 중 적어도 하나의 탐지 패턴에 따라 상기 등록된 패키지 파일을 분석하여 상기 적어도 하나의 탐지 패턴별로 취약점 정보를 탐지하는 것을 특징으로 하는 취약점 탐지 시스템을 제공한다.A system for detecting a vulnerability in an application, the system comprising: at least one processor configured to execute computer readable instructions, the at least one processor comprising: Managing a predetermined detection pattern for diagnosing a vulnerability of the application with respect to at least one of codes included in the files, registering a package file for distribution to users for installation and operation of the application, Analyzing the registered package file according to at least one detection pattern among the patterns, and detecting the vulnerability information according to the at least one detection pattern.
어플리케이션의 취약점(vulnerability)을 진단하기 위한 탐색 패턴을 미리 설정하고, 설정된 탐지 패턴에 기반하여 배포를 위해 등록되는 어플리케이션의 패키지 파일에 대한 취약점을 탐지할 수 있다.A search pattern for diagnosing an application vulnerability can be set in advance and a vulnerability of a package file of an application registered for distribution based on a set detection pattern can be detected.
도 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 for explaining a call relationship between instruction masses in an embodiment of the present invention.
도 5는 본 발명의 일실시예에 있어서, 메서드들간의 호출 관계를 설명하기 위한 도면이다.5 is a diagram for explaining a calling relationship between methods in an embodiment of the present invention.
도 6은 본 발명의 일실시예에 따른 룰 및 패턴을 설명하기 위한 도면이다.6 is a diagram for explaining rules and patterns according to an embodiment of the present invention.
도 7은 본 발명의 일실시예에 있어서, 패턴의 구조를 설명하기 위한 도면이다. 7 is a diagram for explaining a structure of a pattern in an embodiment of the present invention.
도 8은 본 발명의 일실시예에 있어서, 패턴의 소스를 설명하기 위한 도면이다.8 is a diagram for explaining a source of a pattern in an embodiment of the present invention.
도 9는 본 발명의 일실시예에 있어서, 임의의 파일들에 대한 패턴의 예를 도시한 도면이다.9 is a diagram showing an example of a pattern for arbitrary files in an embodiment of the present invention.
도 10은 본 발명의 일실시예에 있어서, 파일에서 특정 문자열을 탐지한 결과와 패키지 파일에서 특정 파일을 탐지한 결과의 예를 도시한 도면이다. 10 is a diagram illustrating an example of a result of detecting a specific character string in a file and a result of detecting a specific file in a package file in an embodiment of the present invention.
도 11은 본 발명의 일실시예에 있어서, 안드로이드 매니페스트 파일에 대한 패턴의 예를 도시한 도면이다.11 is a diagram showing an example of a pattern for an Android manifest file in an embodiment of the present invention.
도 12는 본 발명의 일실시예에 있어서, 덱스 파일에 대한 패턴의 예를 도시한 도면이다.12 is a diagram showing an example of a pattern for a Dex file in an embodiment of the present invention.
도 13은 본 발명의 일실시예에 있어서, so 파일에 대한 패턴의 예를 도시한 도면이다.13 is a diagram showing an example of a pattern for a so file in an embodiment of the present invention.
도 14는 본 발명의 일실시예에 있어서, dll 파일에 대한 패턴의 예를 도시한 도면이다.14 is a diagram showing an example of a pattern for a dll file in an embodiment of the present invention.
이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.
본 발명의 실시예들에 따른 취약점 탐지 시스템은 이후 설명될 서버를 통해 구현될 수 있으며, 본 발명의 실시예들에 따른 취약점 탐지 방법은 상술한 서버를 통해 수행될 수 있다. 예를 들어, 서버에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 서버는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 일실시예에 따른 취약점 탐지 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터로 구현되는 서버와 결합되어 취약점 탐지 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.The vulnerability detection system according to embodiments of the present invention can be implemented through a server to be described later, and a vulnerability detection method according to embodiments of the present invention can be performed through the server described above. For example, a computer program according to an exemplary embodiment of the present invention may be installed and operated on a server, and the server may perform a vulnerability detection method according to an embodiment of the present invention under the control of a computer program that is run . The above-described computer program may be stored in a computer-readable recording medium in combination with a computer-implemented server to cause the computer to execute the vulnerability detection method.
도 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. 1 shows an example in which a plurality of electronic devices 110, 120, 130, 140, a plurality of servers 150, 160, and a network 170 are included. 1, the number of electronic devices and the number of servers are not limited to those shown in FIG.
복수의 전자 기기들(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, 140 may be a fixed terminal implemented as a computer device or a mobile terminal. 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, a digital broadcast terminal, a PDA (Personal Digital Assistants) ), And tablet PCs. For example, FIG. 1 illustrates the shape of a smartphone as an example of the first electronic device 110, but in the embodiments of the present invention, the first electronic device 110 transmits the network 170 using a wireless or wired communication method. May refer to any one of a variety of physical devices capable of communicating with other electronic devices 120, 130, 140 and / or servers 150,
통신 방식은 제한되지 않으며, 네트워크(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 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, as well as a short-range wireless communication between the devices. For example, the network 170 may be a personal area network (LAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN) , A network such as the Internet, and the like. The network 170 may also include any one or more of a network topology including a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree or a hierarchical network, 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 is a computer device or a plurality of computers that communicate with a plurality of electronic devices 110, 120, 130 and 140 through a network 170 to provide commands, codes, files, Lt; / RTI > devices. For example, the server 150 may be a system that provides a first service to a plurality of electronic devices 110, 120, 130, 140 connected through a network 170, 170, and 140 to the first and second electronic devices 110, 120, 130, and 140, respectively. More specifically, the server 150 may be at least a part of the apparatuses constituting the system of the application publisher, and the package file of the application installed and operated in the plurality of electronic apparatuses 110, 120, 130 and 140 may be registered And distribute the service as the first service. As another example, the server 160 may provide a service associated with the application as a second service to a plurality of electronic devices 110, 120, 130, 140 that install and operate the application through the distributed package file . According to an embodiment, the server 150 may be used to implement a dedicated system for detecting vulnerability information of a 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. Other electronic devices 120, 130, 140 and server 160 may also have the same or similar internal configuration as electronic device 1 110 or server 150 described above.
전자 기기 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 a computer-readable recording medium and may include a permanent mass storage device such as a random access memory (RAM), a read only memory (ROM), and a disk drive. The non-decaying mass storage device such as a ROM and a disk drive may be included in the electronic device 110 or the server 150 as a separate persistent storage device different from the memory 211 or 221. The memory 211 and the memory 221 are provided with an operating system and at least one program code (for example, a program installed in the electronic device 1 (110) and used for a browser or an application installed in the electronic device 1 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 computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, and a memory card. In other embodiments, the software components may be loaded into memory 211, 221 via communication modules 213, 223 rather than a computer readable recording medium. For example, at least one program may be a computer program installed by files provided by a file distribution system (e.g., the server 160 described above) that distributes installation files of developers or applications, May be loaded into the memory 211, 221 based on the application (e.g., the application described above).
프로세서(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. The instructions may be provided to the processors 212 and 222 by the memories 211 and 221 or the communication modules 213 and 223. For example, the processor 212, 222 may be configured to execute a command received in accordance with a program code stored in a recording device, such as the memory 211, 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 functions for the electronic device 1 110 and the server 150 to communicate with each other through the network 170 and may be provided to the electronic device 1 110 and / May provide a function for communicating with another electronic device (e.g., electronic device 2 120) or another server (e.g., server 160). The request generated by the processor 212 of the electronic device 1 110 according to the program code stored in the recording device such as the memory 211 is transmitted to the server 170 via the network 170 under the control of the communication module 213 150 < / RTI > Conversely, control signals, commands, contents, files, and the like provided under the control of the processor 222 of the server 150 are transmitted to the communication module 223 of the electronic device 110 via the communication module 223 and the network 170 213 to the electronic device 1 (110). For example, control signals, commands, contents, files, and the like of the server 150 received through the communication module 213 can be transmitted to the processor 212 or the memory 211, (The above-mentioned persistent storage device), which may further include a storage medium 110.
입출력 인터페이스(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, a speaker, and the like. As another example, the input / output interface 214 may be a means for interfacing with a device having integrated functions for input and output, such as a touch screen. The input / output device 215 may be composed of the electronic device 1 (110) and one device. The input / output interface 224 of the server 150 may be a means for interfacing with the server 150 or an interface with a device (not shown) for input or output that the server 150 may include. More specifically, when the processor 212 of the electronic device 1 (110) processes the command of the computer program loaded in the memory 211, the configuration is performed using the data provided by the server 150 or the electronic device 2 (120) A service screen or contents can 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, electronic device 1 110 and server 150 may include more components than the components of FIG. However, there is no need to clearly illustrate most prior art components. For example, electronic device 1 110 may be implemented to include at least a portion of input / output devices 215 described above, or may be implemented with other components such as a transceiver, Global Positioning System (GPS) module, camera, Elements. More specifically, when the electronic device 1 (110) is a smart phone, the acceleration sensor, the gyro sensor, the camera module, various physical buttons, buttons using a touch panel, input / output ports, A vibrator, and the like may be further included in the electronic device 1 (110).
도 3은 본 발명의 일실시예에 따른 보안성 평가 시스템의 블록 다이어그램이다. 도 3의 보안성 평가 시스템(300)은 앞서 설명한 서버(150)를 통해 구현될 수 있으며, 앞서 설명한 취약점 탐지 시스템은 보안성 평가 시스템(300)에 포함되도록 구현되거나 또는 보안성 평가 시스템(300)에서 취약점 탐지를 위한 구성만을 별도로 포함하도록 구현될 수 있다.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 vulnerability detection system described above may be implemented to be included in the security evaluation system 300, It is possible to include only the configuration for detecting the vulnerability separately.
보안성 평가 시스템(300)이 포함하는 패키지 분해 모듈(310), 파일 식별 모듈(320), 파싱 모듈(330), 분석 모듈(340) 및 리포트 모듈(350)은 서버(150)가 포함하는 프로세서(222)의 서로 다른 기능들(different functions)의 표현들일 수 있다. 예를 들어, 서버(150)의 프로세서(222)가 컴퓨터 프로그램이 포함하는 제어 명령에 따라 패키지 파일을 분해하는 프로세서(222)의 기능으로서 패키지 분해 모듈(310)이 이용될 수 있다. 이때, 분석 모듈(340)이 포함하는 취약점 탐지 모듈(342)이 취약점 탐지를 위한 핵심 모듈로서 구현될 수 있다.The package disassembly 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 are installed in the server 150, Lt; RTI ID = 0.0 > 222 < / RTI > For example, the package decomposition module 310 may be used as a function of the processor 222 in which the processor 222 of the server 150 decomposes the package file according to control commands included in the computer program. At this time, the vulnerability detection module 342 included in the analysis module 340 may be implemented as a core module for detecting the vulnerability.
앞서 설명한 바와 같이, 서버(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와 같은 패키지 파일을 기반으로 본 발명의 실시예들을 설명하나, 이러한 설명을 통해 다른 종류의 패키지 파일에도 동일 또는 유사한 특징이 적용될 수 있음을 당업자라면 쉽게 이해할 수 있을 것이다.At this time, the package decomposition module 310 can decompose the registered package files. For example, the Android Application Package (APK) has a file extension of '.apk' as the file format of the package file used for Android's software and middleware distribution, the mobile operating system. In the following embodiments, embodiments of the present invention will be described based on a package file such as APK, but it will be understood by those skilled in the art that the same or similar features may be applied to other kinds of package files .
또한, APK는 이미 잘 알려져 있기 때문에 APK 파일 또는 APK 파일이 포함하는 파일들 자체에 대한 설명 역시 당업자가 이미 잘려진 종래기술들을 통해 쉽게 이해할 수 있을 것이며, 따라서 APK 파일 또는 APK 파일이 포함하는 파일들 자체에 대한 자세한 설명은 생략한다.Also, since the APK is already well known, the description of the files themselves included in the APK file or the APK file will also be easily understood by those skilled in the art through the already-cut conventional techniques, and thus the APK file or the files Will not be described in detail.
파일 식별 모듈(320)은 분해된 패키지 파일에 포함된 파일들을 식별할 수 있다. 도 3에서 나타난 확장자들('dex', 'so', 'dll', 'json', 'ini', 'apk', 'xml', 'cert')은 이미 설명한 바와 같이 APK와 관련된 종래기술들을 통해 당업자가 쉽게 이해할 수 있을 것이다.The file identification module 320 can identify files included in the decomposed package file. The extensions ('dex', 'so', 'dll', 'json', 'ini', 'apk', 'xml', 'cert') shown in FIG. 3, It will be readily apparent to 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 do this, the parser 331 may parse files of a particular extension (e.g., 'dex', 'so', 'dll') of the identified files and the collector 332 may parse the files of a particular extension You can gather the necessary information from the files 'json', 'ini', 'apk', 'xml', 'cert'
예를 들어, 파싱 모듈(330)은 'dex' 파일이 포함하는 클래스(class)들과 메서드(method)들 각각을 식별할 수 있으며, 메서드가 포함하는 인스트럭션들을 추적하여 다수의 매스(mass)들로 구분하여 식별할 수 있다. 인스트럭션들의 매스는 'goto' 문이나, 'switch' 문 또는 'if' 문 등과 같은 분기명령을 기준으로 구분될 수 있다. 또한, 파싱 모듈(330)은 이러한 인스트럭션 매스들간의 호출 관계에 대한 정보를 생성하여 관리할 수 있다. 일례로, 인스트럭션 매스들간의 호출 관계는 트리 구조로 관리될 수 있으며, 호출 관계에 대한 정보는 특정 인스트럭션 매스가 호출하는 메서드에 대한 정보를 포함할 수 있다. 이러한 정보의 생성 및 관리는 APK 파일과 같은 패키지 파일이 포함하는 파일들 각각에 대해 처리될 수 있으며, 파일의 특성에 따라 파싱 방식은 달라질 수 있다.For example, the parsing module 330 can identify each of the classes and methods included in the 'dex' file, track instructions included in the method, And the like. Masses of instructions can be separated by a branch instruction such as a 'goto' statement, a 'switch' statement, or an 'if' statement. In addition, the parsing module 330 may generate and manage information about the call relationships between these instruction masses. For example, the call relationships between instruction masses can be managed in a tree structure, and the information about the call relationship can include information about the methods that a particular instruction mass calls. The generation and management of such information can be processed for each of the files included in the package file such as the APK file, and the parsing method can be changed 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 analyzing module 340 analyzes the package file (or the application installed and operated on the user terminal such as the electronic device 1 110 through the package file) based on the information transmitted from the parsing module 330, vulnerability viewpoints, and security solutions from the viewpoints of security, obfuscation, vulnerability, and security solution.
예를 들어, 난독화 탐지 모듈(341)은 특정 확장자(일례로, 'dex', 'so', 'dll')의 파일들에 어느 정도 수준의 난독화가 적용되어 있는가에 대한 분석정보를 생성할 수 있다. 이를 위해, 난독화 탐지 모듈(341)은 파일의 종류에 따라 미리 설정되는 항목별로 난독화가 적용되어 있는지 여부 등을 판단할 수 있다.For example, obfuscation detection module 341 may generate analysis information about how much obfuscation is applied to files of a particular extension (e.g., 'dex', 'so', 'dll') . For this purpose, the obfuscation detection module 341 can determine whether obfuscation is applied to each item set in advance according to the type of the file.
또한, 취약점 탐지 모듈(342)은 특정 확장자(일례로, 'dex', 'so', 또는 설정(configuration) 파일의 확장자인 'config')의 파일들에 어떠한 취약점이 있는가에 대한 분석정보를 생성할 수 있다. 이를 위해, 보안성 평가 시스템(300)은 이미 알려진 취약점들에 대한 정보를 관리할 수 있으며, 취약점 탐지 모듈(342)은 이러한 취약점들에 대한 정보를 이용하여 어떠한 파일들에 어떠한 취약점이 존재하는가에 대한 분석정보를 생성할 수 있다.In addition, the vulnerability detection module 342 generates analysis information as to what vulnerability exists in the files of a specific extension (for example, 'dex', 'so', or the extension of the configuration file 'config' can do. To this end, the security evaluation system 300 can manage information on already known vulnerabilities, and the vulnerability detection module 342 uses information on the vulnerabilities to determine what vulnerabilities exist in which files Can be generated.
또한, 플랫폼 탐지 모듈(343)은 해당 어플리케이션이 개발된 플랫폼 및/또는 해당 어플리케이션이 동작하는 플랫폼에 대한 정보를 추출할 수 있다. 예를 들어, 보안성 평가 시스템(300)은 해당 어플리케이션이 어떠한 플랫폼(일례로, 유니티(Unity)나 코코스(Cocos)와 같은 개발 툴)에서 개발되었는가에 따라 서로 다른 분석 방식을 활용할 수 있다.In addition, the platform detection module 343 can extract information about a platform on which the application is developed and / or a platform on which the application operates. For example, the security assessment system 300 can utilize different analysis methods depending on the platform in which the application is developed (for example, a development tool such as Unity or Cocos).
또는, 보안성 평가 시스템(300)은 어플리케이션이 동작하는 플랫폼마다 패키지 파일이 포함하는 파일 포맷이 달라질 수 있기 때문에, 이러한 플랫폼마다 서로 다른 분석 방식을 활용할 수도 있다.Alternatively, since the file format of the package file may be different for each platform on which the application operates, the security evaluation system 300 may utilize different analysis methods for each platform.
이를 위해, 보안성 평가 시스템(300)은 패키지 파일에 대한 플랫폼에 대한 정보를 추출할 수 있으며, 이러한 정보에 기반하여 패키지 파일을 분석하거나 또는 추출된 플랫폼에 대한 정보를 외부로 제공할 수 있다.For this purpose, the security evaluation system 300 can extract information about the platform for the package file, analyze the package file based on the information, or provide the extracted platform information to the outside.
보안 툴 탐지 모듈(344)은 패키지 파일의 개발자들이 자체적으로 패키지 파일에 삽입한 보안솔루션을 탐지할 수 있다. 예를 들어, 제3자에 의해 라이브러리 형태로 제공되는 제1 보안 툴이 개발자에 의해 해당 패키지 파일에 추가되어 있을 수 있다. 다른 예로, 개발자가 자체 개발한 제2 보안 툴이 개발자에 의해 해당 패키지 파일에 추가되어 있을 수도 있다. 다시 말해, 보안 툴 탐지 모듈(344)은 이러한 보안 툴의 패키지 파일에 대한 적용 여부에 대한 분석정보를 생성할 수 있다.The security tool detection module 344 may detect the security solution that the developers of the package file themselves have inserted into the package file. For example, a first security tool provided in the form of a library by a third party may be added to the corresponding package file by the developer. As another example, the second security tool developed by the developer may be added to the corresponding package file by the developer. In other words, the security tool detection module 344 can generate analysis information on whether the security tool is applied to the package file.
관계 분석 모듈(345)은 패키지 파일이 포함하는 파일들간의 참조 관계에 대한 분석정보를 생성할 수 있다. 예를 들어, 제1 파일이 제2 파일을 호출하기 위한 코드를 포함하고 있는 경우, 제1 파일과 제2 파일간의 참조 관계에 대한 정보가 분석정보에 포함되도록 분석정보가 생성될 수 있다.The relationship analysis module 345 can generate analysis information on a reference relationship between files included in the package file. For example, when the first file includes a code for calling a second file, analysis information may be generated such that information about a 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 analysis information generated by the analysis module 340 and provides a report for providing the analysis information to the persons concerned (for example, the administrator of the server 150 or the security inspection team of the application publisher) of the security evaluation system 300 Lt; / RTI > Such a report can be provided to a terminal of an interested party using Hypertext Markup Language (HTML) or XML (extensible Markup Language) as in the example of FIG.
도 4는 본 발명의 일실시예에 있어서, 인스트럭션 매스들간의 호출 관계를 설명하기 위한 도면이다. 도 4는 하나의 메서드 A(Method A, 400)에 대해 루트 매스(Root Mass, 410), 인스트럭션 매스 1(Instruction Mass 1, 420), 인스트럭션 매스 2(430), 인스트럭션 매스 3(440) 및 인스트럭션 매스 5(450)와 같은 다섯 개의 인스트럭션 매스들이 식별된 예를 나타내고 있다. 이미 설명한 바와 같이 인스트럭션 매스는 분기명령에 기반하여 구분될 수 있으며, 인스트럭션 매스들 각각을 노드라 가정할 때, 도 4에서 점선 화살표들은 특정 노드의 부모 노드를 지시하고 있다. 예를 들어, 도 4는 인스트럭션 매스 3(440)의 부모 노드가 인스트럭션 매스 2(430)임을 지시하고 있다. 여기서 자식 노드는 부모 노드가 포함하는 분기명령에 따라 구분되는 인스트럭션들의 매스를 포함할 수 있다. 루트 매스(410)는 메서드 A(400)에 대해 가장 먼저 실행되는 인스트럭션들의 매스일 수 있다.4 is a diagram for explaining a call relationship between instruction masses in an embodiment of the present invention. FIG. 4 illustrates a method 400 for a method A 400 including a root mass 410, an instruction mass 1 420, an instruction mass 2 430, an instruction mass 3 440, Five instruction masses, such as mass 5 (450), are identified. As already described, instruction masses can be distinguished based on branch instructions, and when each of the instruction masses is assumed to be a node, the dashed arrows in FIG. 4 indicate the parent node of the particular node. For example, FIG. 4 shows that the parent node of instruction mass 3 (440) is instruction mass 2 (430). Herein, the child node may include a mass of instructions which are classified according to a branch instruction included in the parent node. The root mass 410 may be the mass of instructions that are executed first for the method A 400.
보다 구체적인 예로, 도 4는 인스트럭션 매스 1(420)이 조건부 분기(conditional branch, 421)를 위한 명령을 포함하고, 조건에 따라 인스트럭션 매스 3(440) 또는 인스트럭션 매스 4(450)의 명령들이 실행된다고 가정하자. 이때, 인스트럭션 매스 3(440)과 인스트럭션 매스 4(450)가 식별될 수 있으며, 인스트럭션 매스 3(440)과 인스트럭션 매스 4(450)의 부모 노드는 인스트력션 매스 1(420)이 될 수 있다. 또한, 조건부 분기(421)를 위한 명령에 따라 인스트럭션 매스 3(440)으로 이동되는 위치가 레이블 1(Lable 1, 441)에 의해, 그리고 인스트럭션 매스 4(450)로 이동되는 위치가 레이블 2(Lable 2, 451)에 의해 각각 지시될 수 있다. 다시 말해, 인스트럭션 매스 1(420)에서 호출이 탐지될 수 있으며, 탐지된 호출을 통해 호출되는 인스트럭션 매스들(440, 450)이 레이블들(441, 451)을 통해 지시될 수 있다. 도 4에서 실선들이 이러한 지시 관계를 나타내고 있다.4 illustrates that instruction mass 1 420 includes instructions for a conditional branch 421 and that instructions of instruction mass 3 440 or instruction mass 4 450 are executed according to the conditions Let's assume. At this time, instruction mass 3 440 and instruction mass 4 450 can be identified, and the parent nodes of instruction mass 3 440 and instruction mass 4 450 can be Instance Mass 1 420 . In addition, the position to be moved to instruction mass 3 440 according to the instruction for conditional branch 421 is moved by label 1 (Lable 1, 441) and the position where instruction mass 4 (450) 2, and 451, respectively. In other words, a call can be detected at instruction mass 1 420 and instruction masses 440 and 450, which are called through the detected call, can be directed through labels 441 and 451. In Fig. 4, solid lines indicate such an indicating relationship.
도 5는 본 발명의 일실시예에 있어서, 메서드들간의 호출 관계를 설명하기 위한 도면이다. 도 5는 호출 참조에 대한 정보(510)와 메서드 a(520)를 나타내고 있다. 메서드 a(520)는 적어도 하나의 인스트럭션 매스들을 포함할 수 있으며, 도 5는 하나의 인스트럭션 매스(521)를 나타내고 있다.5 is a diagram for explaining a calling relationship between methods in an embodiment of the present invention. 5 shows information 510 and method a 520 for call reference. Method a 520 may include at least one instruction mass, and FIG. 5 illustrates one instruction mass 521.
이때, 도 5에서는 인스트럭션 매스(521)에서 메서드 b(511)와 메서드 c(512)에 대한 호출이 탐지된 예를 나타내고 있다. 메서드들은 각각 고유한 메서드 ID에 의해 식별될 수 있다. 본 실시예에 따른 취약점 탐지 시스템은 탐지된 호출에 따라 호출 참조에 대한 정보(510)에서 메서드 a(520)의 메서드 ID를 이용하여 메서드 b(511)와 메서드 c(512)에 대한 정보를 획득할 수 있다. 5 shows an example in which a call to the method b 511 and the method c 512 is detected in the instruction mass 521. Each method can be identified by a unique method ID. The vulnerability detection system according to the present embodiment acquires information on the method b 511 and the method c 512 using the method ID of the method a 520 in the information 510 of the call reference in accordance with the detected call can do.
여기서, 메서드 b(511)와 메서드 c(512)에 대한 정보는 각각 도 4를 통해 설명한 바와 같이 호출된 메서드 b(511)와 메서드 c(512) 각각에 대한 인스트럭션 매스들에 대한 정보 그리고 인스트럭션 매스들간의 참조 관계에 대한 정보 등을 포함할 수 있다. 따라서, 취약점 탐지 시스템은 해당 파일에 따른 프로그램의 실행 제어가 어떤 방법으로 옮겨지고 있는가를 파악할 수 있게 된다.Here, the information on the method b 511 and the method c 512 are information on the instruction masses for the called method b 511 and the method c 512, respectively, as described with reference to FIG. 4, And information on the reference relationship between the nodes. Therefore, the vulnerability detection system can grasp how the execution control of the program according to the file is being transferred.
도 6은 본 발명의 일실시예에 따른 룰 및 패턴을 설명하기 위한 도면이다. 도 6은 본 실시예에 따른 룰(Rule, 600)의 구조의 예를 설명하고 있다. 본 실시예에서 룰(600)은 이미 알려진 취약점들 중 어느 하나에 대응하여, 해당 취약점을 탐지하기 위한 탐지 패턴에 대한 정보를 포함할 수 있다.6 is a diagram for explaining rules and patterns according to an embodiment of the present invention. 6 illustrates an example of the structure of a rule (Rule) 600 according to the present embodiment. In the present embodiment, the rule 600 may include information on a detection pattern for detecting a vulnerability corresponding to any one of known vulnerabilities.
도 6에서 '이름(Name)' 항목(610)은 해당 룰(600)의 이름을 포함할 수 있으며, '설명(Description)' 항목(620)은 해당 룰(600)에 대한 자세한 설명을 포함할 수 있다. 예를 들어, 해당 룰(600)이 어떠한 취약점에 대한 것인가에 대한 설명 정보를 포함할 수 있다. 또한, '가이드(Guide)' 항목(640)은 해당 룰(600)의 사용과 관련된 행동 원리나 지침에 대한 정보를 포함할 수 있다.In FIG. 6, the 'Name' item 610 may include the name of the corresponding rule 600, and the 'Description' item 620 may include a detailed description of the corresponding rule 600 . For example, the rule 600 may include explanatory information on the vulnerability. Also, the 'Guide' item 640 may include information on the behavioral principles and instructions related to the use of the rule 600.
또한, '우선순위(Priority)' 항목(630)은 해당 취약점에 대한 위험성 등급에 대한 정보를 포함할 수 있다. 예를 들어, '크리티컬(Critical)', '워닝(Warning)', '노멀(Normal)'과 같은 세 개의 위험성 등급 중 하나의 등급에 대한 값이 '우선순위(priority)' 항목(630)에 포함될 수 있다. 이러한 위험성 등급이 두 개의 등급이나 넷 이상의 등급으로도 설정될 수도 있음은 자명하다.Also, the 'Priority' item 630 may include information on the risk level for the vulnerability. For example, a value for one of three risk classes, such as 'Critical', 'Warning', and 'Normal' is set to 'Priority' item 630 . It is clear that this risk level may be set to two or more than four levels.
또한, '의존성(Dependency)' 항목(650)은 취약 계층의 실제 취약성을 동적으로 결정해야 하는 조건이 존재하는지 여부를 나타낼 수 있다. 예를 들어, 하나의 취약점에 대한 위험성이 조건에 따라 달라지는 경우가 존재할 수 있다. 예를 들어, 취약점 a가 조건 1에서는 '크리티컬(Critical)'한 위험성 등급을 갖지만, 취약점 a가 조건 2에서는 '노멀(Normal)'한 위험성 등급을 갖거나 또는 전혀 위험성이 없는 경우도 존재할 수 있다. 따라서, 이러한 조건별 차이를 구분하기 위해 '의존성(Dependency)' 항목(650)은 조건에 대한 정보와 조건별 위험성 등급에 대한 정보를 포함할 수 있다. 또는 단순히 이러한 조건이 존재하는지 여부에 대한 정보를 포함할 수도 있다.Also, the 'Dependency' item 650 may indicate whether there is a condition that dynamically determines the actual vulnerability of the vulnerable layer. For example, there may be cases where the risk for a single vulnerability is conditional. For example, a vulnerability a may have a "critical" risk rating in condition 1, but a vulnerability a may have a "normal" risk rating in condition 2, or no risk at all . Therefore, in order to distinguish such a conditional difference, the 'Dependency' item 650 may include information on the condition and information on the danger level according to the condition. Or may simply include information as to whether such conditions exist.
이상에서 설명한 룰(600)의 항목들은 실시예에 따라 선택적으로 룰(600)에 포함되어 활용될 수 있다.The items of the rule 600 described above can be optionally included in the rule 600 according to the embodiment.
'패턴(Pattern)' 항목(660)은 취약점 탐지를 위한 하나 이상의 탐지 패턴을 포함할 수 있다. 탐지 패턴들은 기 설정될 수 있으며, 하나의 룰(600)은 취약점 탐지를 위한 하나의 탐지 패턴을 포함하거나 또는 둘 이상의 탐지 패턴의 조합을 포함할 수 있다. 탐지 패턴은 적어도 하나의 명령들로 구현될 수 있으며, 적어도 하나의 명령들 각각은 파라미터를 갖는 메서드나 클래스의 형태로 구현될 수 있다. 파라미터는 미리 설정될 수도 있고, 다른 패턴을 통해 추출되는 값으로 동적으로 설정될 수도 있다.The 'Pattern' item 660 may include one or more detection patterns for detecting vulnerabilities. The detection patterns may be preset, and one rule 600 may include one detection pattern for detecting vulnerabilities or a combination of two or more detection patterns. The detection pattern may be implemented with at least one instruction, and each of the at least one instruction may be implemented in the form of a method or class having parameters. The parameter may be set in advance or dynamically set to a value extracted through another pattern.
도 7은 본 발명의 일실시예에 있어서, 패턴의 구조를 설명하기 위한 도면이다.7 is a diagram for explaining a structure of a pattern in an embodiment of the present invention.
룰 테이블(rule_tbl, 710)은 설정된 룰에 대한 정보를 포함할 수 있다. 'rule_id(pk)'는 설정된 룰들 중에서 주식별자(primary key, pk)에 대응하는 룰을 의미할 수 있다. 이러한 실제로는 'rule_id(pk)'는 주식별자 pk를 파라미터로 받아서 대응하는 룰의 식별자를 반환하는 함수를 의미할 수 있다. 'name(key)'는 키(key)에 대응하는 룰의 이름을 의미할 수 있다. 이러한 'name(key)' 역시 실제로는 키 key를 파라미터로 받아서 대응하는 룰의 이름을 반환하는 함수를 의미할 수 있다. 이처럼, 도 7에서 'x(y)'는 'y'가 입력된 함수 'x'를 의미할 수 있으나 간략하게 'y'에 대응하는 'x'를 의미하는 것으로 설명한다. 'pattern_hash(fk)'는 외부식별자(foreign key, fk)에 대응하는 패턴의 해시값을 의미할 수 있다. 또한, '설명(description)', '우선순위(priority)', '가이드(guide)', '의존성(dependency)'은 각각 도 6을 통해 설명한 '설명(Description)' 항목(620), '우선순위(Priority)' 항목(630), '가이드(Guide)' 항목(640) 및 '의존성(Dependency)' 항목(650)에 대응하는 값들을 의미할 수 있다. 'pattern_hash(key)'는 키에 대응하는 패턴의 해시값을 의미할 수 있다. 취약점 탐지 시스템은 룰 테이블(710)을 이용하여 필요한 룰에 대한 정보를 얻을 수 있으며, 얻어진 룰에 포함된 패턴의 식별자로서 패턴의 해시값을 획득할 수 있다.The rule table (rule_tbl, 710) may include information on the set rule. 'rule_id (pk)' may mean a rule corresponding to a primary key (pk) among the set rules. In this case, 'rule_id (pk)' may refer to a function that takes the main identifier pk as a parameter and returns the identifier of the corresponding rule. 'name (key)' can mean the name of the rule corresponding to the key. This 'name (key)' can also mean a function that actually returns the name of the corresponding rule by taking the key key as a parameter. In this way, 'x (y)' in FIG. 7 means 'x' corresponding to 'y' although 'y' can mean function 'x' inputted. 'pattern_hash (fk)' may mean a hash value of a pattern corresponding to an external identifier (foreign key, fk). In addition, 'description', 'priority', 'guide' and 'dependency' are 'Description' item 620, 'Priority item' May refer to values corresponding to a 'Priority' item 630, a 'Guide' item 640, and a 'Dependency' item 650. 'pattern_hash (key)' can mean a hash value of the pattern corresponding to the key. The vulnerability detection system can obtain information on necessary rules using the rule table 710 and obtain a hash value of the pattern as an identifier of the pattern included in the obtained rule.
패턴 테이블(pattern_tbl, 720)은 설정된 패턴에 대한 정보를 포함할 수 있다. 'pattern_id(pk)'는 주식별자(primary key, pk)에 대응하는 패턴을, 'rule_id(pk)'는 외부식별자(foreign key, fk)에 대응하는 룰을 각각 의미할 수 있다. 또한, '소스(source)'는 패턴의 소스에 대한 정보를 의미할 수 있다. 예를 들어, 패턴의 소스는 APK와 같은 패키지 파일에서 탐색될 파일의 종류를 나타낼 수 있다. '테이블 타입(table_type)'은 반환되는 패턴의 타입에 대한 정보를, '조인 패턴(join_pattern)'은 해당 패턴과 결합되어 하나의 룰을 구성하는 다른 패턴에 대한 정보를, 'join_type(and/or/sub)'는 패턴들이 어떠한 타입으로 결합되는가에 대한 정보를 각각 의미할 수 있다. 여기서 'and', 'or' 및 'sub'는 이후 표 19를 통해 설명되는 바와 같이 패턴들의 조합을 위한 논리 연산자들을 의미할 수 있다. 취약점 탐지 시스템은 룰 테이블(710)에서 얻어지는 룰에 대한 정보를 통해 해당 룰이 포함하는 패턴들을 식별할 수 있으며, 패턴 테이블(720)을 통해 해당 룰이 포함하는 패턴들에 대한 정보를 얻을 수 있다.The pattern table (pattern_tbl, 720) may include information on the set pattern. 'pattern_id (pk)' may refer to a pattern corresponding to a primary key (pk), and 'rule_id (pk)' may refer to a rule corresponding to an external identifier (foreign key, fk). Also, 'source' may mean information about the source of the pattern. For example, the source of a pattern may represent the type of file to be searched in a package file such as APK. 'Join_pattern' is information of another pattern composing one rule, 'join_type (and / or or)', and 'join_type' is information of a type of pattern to be returned. / sub) ' can each mean information as to what type of patterns are combined. Here, 'and', 'or', and 'sub' may refer to logical operators for combinations of patterns as described in Table 19 below. The vulnerability detection system can identify the patterns included in the rule through information on rules obtained from the rule table 710 and obtain information on the patterns included in the rule through the pattern table 720 .
덱스 파일 테이블(pattern_data_dex_find_api, 730)은 APK의 덱스 파일에서 추출되는 정보를 포함할 수 있다. 'pattern_id(fk)'는 설정된 패턴들 중에서 외부식별자(foreign key, fk)에 대응하는 패턴을 의미할 수 있다. '호출된 클래스 이름(called_class_name)'은 호출되는 클래스 이름을 식별하기 위한 값을, '호출된 메서드 이름(called_method_name)'은 호출되는 메서드 이름을 식별하기 위한 값을 각각 의미할 수 있다. 'enable_tracing_argument(optional)'는 추적 가능한 인수(argument)를 반환하는 함수를, 'argument_index(optional)'는 인수의 인덱스를 반환하는 함수를, '인수 타입(argument_type)'은 반환되는 인수의 타입을 각각 의미할 수 있다. 'argument_from_null_detect(true/false)'는 널(null) 인수를 탐지할 것인지 여부를, 와 'argument_from_null_except(true/false)'는 널(null) 인수를 예외로 할 것인지 여부를 각각 의미할 수 있다. 또한, 덱스 파일 테이블(730)은 탐지된 API 리스트로부터의 인수(argument_from_detect_api_list), 예외 처리된 API 리스트로부터의 인수(argument_from_except_api_list), 탐지된 필드 리스트로부터의 인수(argument_from_detect_field_list) 및 예외 처리된 리스트로부터의 인수(argument_from_except_list)에 대한 정보들을 포함할 수 있다. 취약점 탐지 시스템은 패턴에 따라 취약점 탐지에 필요한 정보를 탐지함에 있어서 덱스 파일 테이블(730)을 참조할 수 있다. 예를 들어, 취약점 탐지 시스템은 특정 인스트럭션 매스에 대한 취약점을 탐지함에 있어서, 해당 인스트럭션 매스에서 호출하는 메서드나 클래스를 덱스 파일 테이블(730)을 이용하여 식별할 수 있다. The dex file table (pattern_data_dex_find_api, 730) may include information extracted from the DEK file of the APK. 'pattern_id (fk)' may mean a pattern corresponding to the foreign key (fk) among the set patterns. 'Called_class_name' may be a value for identifying a class name to be called, and 'called_method_name' may be a value for identifying a method name to be called. 'argument_index (optional)' is a function that returns the index of the argument, and 'argument_type' is the type of the argument that is returned. It can mean. 'argument_from_null_detect (true / false)' can indicate whether to detect a null argument, and whether 'argument_from_null_except (true / false)' is an exception to the null argument. The dex file table 730 also includes an argument (argument_from_detect_api_list) from the detected API list, an argument (argument_from_except_api_list) from the exception-treated API list, an argument from the detected field list (argument_from_detect_field_list) (argument_from_except_list). The vulnerability detection system can refer to the dex file table 730 in detecting information necessary for detecting a vulnerability according to a pattern. For example, the vulnerability detection system can identify a method or a class to be invoked in a corresponding instruction mass by using a dex file table 730 in detecting a vulnerability to a specific instruction mass.
파일 테이블(pattern_data_retrieve_file_tbl, 740)은 패키지 파일이 포함하는 특정 파일의 정보를 추출하는 패턴 정보를 포함할 수 있다. 'pattern_id(fk)'는 설정된 패턴들 중에서 외부식별자(foreign key, fk)에 대응하는 패턴을 의미할 수 있고, 'pattern_hash(key)'는 키에 대응하는 패턴의 해시값을 의미할 수 있다. '파일 타입(file_type)'은 패턴을 통해 검색되는 파일의 타입을, '파일 확장자(file_extension)'은 패턴을 통해 검색되는 파일의 확장자를, '파일 이름(file_name)'은 패턴을 통해 검색되는 파일의 이름을 각각 의미할 수 있다.The file table (pattern_data_retrieve_file_tbl, 740) may include pattern information for extracting information of a specific file included in the package file. 'pattern_id (fk)' may mean a pattern corresponding to an external identifier (foreign key) fk, and 'pattern_hash (key)' may mean a hash value of a pattern corresponding to a key. 'File_type' is the type of the file to be searched through the pattern, 'file_extension' is the extension of the file to be searched through the pattern, 'file_name' is the file Quot ;, respectively.
컨텐츠 테이블(pattern_data_retrieve_file_contents_tbl, 750)은 파일에 포함된 문자를 추출하는 패턴 정보를 포함할 수 있다. 'pattern_id(fk)'는 설정된 패턴들 중에서 외부식별자(foreign key, fk)에 대응하는 패턴을 의미할 수 있고, 'pattern_hash(key)'는 키에 대응하는 패턴의 해시값을 의미할 수 있다. '파일 타입(file_type)'은 패턴을 통해 검색되는 파일의 타입을, '문자 타입(character_type)'은 문자(또는 문자열)의 타입을, '문자(character)'는 파일에서 검색하고자 하는 문자(또는 문자열)을 의미할 수 있다.The content table (pattern_data_retrieve_file_contents_tbl, 750) may include pattern information for extracting characters included in the file. 'pattern_id (fk)' may mean a pattern corresponding to an external identifier (foreign key) fk, and 'pattern_hash (key)' may mean a hash value of a pattern corresponding to a key. 'File_type' is the type of the file to be searched through the pattern, 'character_type' is the type of the character (or string), 'character' is the character String).
퍼미션 테이블(pattern_data_retrieve_permission_tbl, 760)은 패키지 파일의 퍼미션(permission) 정보를 추출하는 패턴 정보를 포함할 수 있다. 'pattern_id(fk)'는 설정된 패턴들 중에서 외부식별자(foreign key, fk)에 대응하는 패턴을 의미할 수 있고, '이름(name)'은 퍼미션의 이름을 의미할 수 있다.The permission table (pattern_data_retrieve_permission_tbl, 760) may include pattern information for extracting permission information of the package file. 'pattern_id (fk)' may mean a pattern corresponding to an external identifier (fk) among the set patterns, and 'name' may mean the name of a permission.
액티비티 테이블(pattern_data_retrieve_activity_tbl, 770)은 액티비티 정보를 추출하는 패턴 정보를 포함할 수 있다. 'pattern_id(fk)'는 설정된 패턴들 중에서 외부식별자(foreign key, fk)에 대응하는 패턴을 의미할 수 있고, '이름(name)'은 액티비티의 이름을 의미할 수 있다. 여기서 액티비티는 사용자 인터페이스가 있는 하나의 화면을 의미하는 것으로, 일례로 APK에서 액티비티 클래스(activity class)를 상속해서 구현될 수 있다. 이처럼, 상술한 액티비티나 퍼미션 등의 용어들은 APK에 대한 종래의 기술들을 통해 당업자가 용이하게 이해할 수 있을 것이다.The activity table (pattern_data_retrieve_activity_tbl, 770) may include pattern information for extracting activity information. 'pattern_id (fk)' may mean a pattern corresponding to an external identifier (fk) among the set patterns, and 'name' may mean the name of an activity. Here, an activity means a screen with a user interface. For example, an activity class can be inherited from an APK. As such, terms such as activities and permissions described above will be readily understood by those skilled in the art through conventional techniques for APK.
SDK 테이블(pattern_data_retrieve_min_sdk, 780)은 SDK(Software Development Kit)에 대한 정보를 추출하는 패턴 정보를 포함할 수 있다. 'pattern_id(fk)'는 설정된 패턴들 중에서 외부식별자(foreign key, fk)에 대응하는 패턴을 의미할 수 있고, '버전(version)'은 SDK의 버전 정보를, '버전 탐지 조건(conditional_equality)'는 버전의 탐지 조건을 각각 의미할 수 있다. 예를 들어, '버전(version)'이 '21'로 설정되고, '버전 탐지 조건(conditional_equality)' 이 '작거나 같다'인 경우, 버전이 21 이하인 경우 해당 SDK의 버전이 탐지될 수 있다.The SDK table (pattern_data_retrieve_min_sdk, 780) may include pattern information for extracting information on an SDK (Software Development Kit). 'pattern_id (fk)' may mean a pattern corresponding to an external identifier (fk) among the set patterns, 'version' means version information of SDK, 'version detection condition' Can each mean a detection condition of the version. For example, if the version is set to '21' and the 'conditional_equality' is 'small or equal', then the version of the SDK may be detected if the version is 21 or less.
도 8은 본 발명의 일실시예에 있어서, 패턴의 소스를 설명하기 위한 도면이다. 룰(600)이 포함하는 패턴(660)의 소스는 APK와 같은 패키지 파일의 특정 파일일 수 있다. 도 8에서는 패턴(660)이 패키지 파일이 포함하는 임의의 파일들(Any files, 810), 덱스 파일(dex, 820), 안드로이드 매니페스트 파일(AndroidManifest.xml, 830), so 파일(so, 840) 또는 dll 파일(dll, 850)을 소스로 가질 수 있음을 나타내고 있다.8 is a diagram for explaining a source of a pattern in an embodiment of the present invention. The source of the pattern 660 included in the rule 600 may be a specific file of a package file such as APK. In FIG. 8, the pattern 660 includes any file (810), a dex file (dex) 820, an Android manifest file (AndroidManifest.xml) 830, Or a dll file (dll, 850) as a source.
도 9는 본 발명의 일실시예에 있어서, 임의의 파일들에 대한 패턴의 예를 도시한 도면이다. 도 9는 임의의 파일들(810)에 대한 패턴들(900)의 종류를 나타내고 있다.9 is a diagram showing an example of a pattern for arbitrary files in an embodiment of the present invention. FIG. 9 shows the types of patterns 900 for arbitrary files 810. FIG.
제1 종류(910)의 패턴은 파일에서 특정 문자(또는 문자열)를 찾는 패턴을 의미할 수 있으며, 아래 패턴 1과 같이 표현될 수 있다.The pattern of the first kind 910 may refer to a pattern for finding a specific character (or string) in a file, and may be expressed as pattern 1 below.
[패턴 1][Pattern 1]
RetrieveFileContents:RetrieveFileContents:
: FileType(string) CharacterType(string) Character(string)     : FileType (string) CharacterType (string) Character (string)
예를 들어, JSON(JavaScript Object Notation) 파일에서 URL(Uniform Resource Locator)를 찾는 패턴은 'RetrieveFileContents: FileType(json) CharacterType(string) Character(http://*)'와 같이 구현될 수 있다. 다시 말해, 상술한 예시의 패턴은 파일에 포함된 컨텐츠를 검색하는 패턴으로서 'json' 타입의 파일에서 'string' 타입의 문자열로서 'http://*'를 탐색하라는 명령을 의미할 수 있다. 이러한 패턴 'RetrieveFileContents'에서 파일 타입 'FileType()'의 파라미터는 'all', 'apk', 'txt', 'ini', 'property', 'json', 'xml', 'img', 'mp4' 등과 같은 파일 확장자에 기반하여 기설정된 값들 중에서 미리 기설정되거나 동적으로 설정될 수 있다. 여기서 파일 타입 'all'은 모든 확장자의 파일들을 의미할 수 있다. 또한, 캐릭터 타입 'CharacterType()'의 파라미터는 'string', 'hexa' 등과 같이 문자나 문자열의 종류를 의미할 수 있다. 'Character()'의 파라미터는 검색하고자 하는 문자열을 의미할 수 있으며, 별표(*)는 별표 앞의 문자열로 시작하는 모든 문자열을 의미할 수 있다.For example, a pattern for finding a URL (Uniform Resource Locator) in a JavaScript Object Notation (JSON) file can be implemented as 'RetrieveFileContents: FileType (json) CharacterType (string) Character (http: // *)'. In other words, the above-mentioned example pattern may be a command to search for 'http: // *' as a string of a 'string' type in a file of 'json' type as a pattern for retrieving contents contained in a file. In this pattern 'RetrieveFileContents', the parameters of the file type' FileType () 'are' all ',' apk ',' txt ',' ini ',' property ',' json ',' xml ',' img ',' mp4 &Quot;, etc. < / RTI > Here, the file type 'all' can mean files of all extensions. In addition, the parameter of the character type 'CharacterType ()' may mean a character or a string type such as 'string', 'hexa', and the like. A parameter of 'Character ()' may mean a string to be searched, and an asterisk (*) may mean any string starting with a string before the asterisk.
제2 종류(920)의 패턴은 패키지 파일 내에서 특정 파일을 찾는 패턴을 의미할 수 있고, 아래 패턴 2와 같이 표현될 수 있다.The pattern of the second kind 920 may refer to a pattern for finding a specific file in the package file, and may be expressed as pattern 2 below.
[패턴 2] [Pattern 2]
RetrieveFile:RetrieveFile:
: FileType(string) FileName(string)     : FileType (string) FileName (string)
예를 들어, 패키지 파일이 포함하는 파일들 중에서 DLL(Dynamic Linking Library) 타입을 갖고 파일 이름이 "Assembly-Csharp"인 파일을 찾는 패턴은 'RetrieveFile: FileType(string) FileName(Assembly-Csharp)'와 같이 구현될 수 있다. 다른 예로, 패키지 파일이 포함하는 파일들 중에서 DLL 타입의 파일을 찾는 패턴은 'RetrieveFile: FileType(string)'와 같이 구현될 수 있다.For example, a pattern that contains a DLL (Dynamic Linking Library) type and has a file name of "Assembly-Csharp" among the files included in the package file is "RetrieveFile: FileType (string) FileName (Assembly-Csharp) Can be implemented together. As another example, a pattern for searching DLL type files among the files included in the package file can be implemented as 'RetrieveFile: FileType (string)'.
파일 타입 'FileType()'의 파라미터는 'all', 'apk', 'txt', 'ini', 'property', 'json', 'xml', 'img', 'mp4' 등과 같은 파일 확장자에 기반하여 설정된 값들 중에서 미리 기설정되거나 또는 동적으로 설정될 수 있다. 파일 이름 'FileName()'의 파라미터 역시 미리 기설정되거나 또는 동적으로 설정될 수 있다. 필요에 따라 파일 확장자를 기준으로 파일을 탐색하기 위한 'FileExtension()'이 더 이용될 수도 있으며, 'FileExtension()'의 파라미터 역시 미리 기설정되거나 또는 동적으로 설정될 수 있다.The parameters of the file type 'FileType ()' are the file extensions such as 'all', 'apk', 'txt', 'ini', 'property', 'json', 'xml', 'img', 'mp4' Or may be set dynamically. The parameters of the file name 'FileName ()' can also be pre-set or dynamically set. 'FileExtension ()' may be further used to search for a file based on the file extension, and the 'FileExtension ()' parameter may be set in advance or dynamically.
도 10은 본 발명의 일실시예에 있어서, 파일에서 특정 문자열을 탐지한 결과와 패키지 파일에서 특정 파일을 탐지한 결과의 예를 도시한 도면이다. 10 is a diagram illustrating an example of a result of detecting a specific character string in a file and a result of detecting a specific file in a package file in an embodiment of the present invention.
탐지된 정보(1010)는 제1 종류(910)의 패턴에 따라 탐지된 파일 이름(File name, 1011)과 매칭 스트링(Match string, 1012)을 포함할 수 있음을 나타내고 있다. 상술한 도 9의 예에서, 'json' 타입의 파일이 3 개가 존재하는 경우, 3 개의 파일들 각각에서 'string' 타입의 문자열로서 'http://*'가 탐색될 수 있으며, 탐지된 문자열들이 파일 이름별로 제공될 수 있다. 하나의 'json' 파일이 복수의 URL들을 포함하는 경우, 복수의 문자열들이 탐지될 수 있다.The detected information 1010 indicates that it may include a detected file name 1011 and a match string 1012 according to the pattern of the first type 910. In the example of FIG. 9 described above, when there are three 'json' type files, 'http: // *' can be searched as a string of 'string' type in each of the three files, May be provided by file name. If one 'json' file contains multiple URLs, multiple strings may be detected.
또한, 탐지된 정보(1020)는 제2 종류(920)의 패턴에 따라 패키지 파일에서 탐지된 파일 이름(File name, 1021)을 포함할 수 있음을 나타내고 있다. 이 경우에도 패턴에 따라 복수의 파일 이름들이 탐색될 수 있다.In addition, the detected information 1020 indicates that it may include a file name (File name, 1021) detected in the package file according to the pattern of the second kind (920). Even in this case, a plurality of file names can be searched according to the pattern.
도 11은 본 발명의 일실시예에 있어서, 안드로이드 매니페스트 파일에 대한 패턴의 예를 도시한 도면이다. 도 11은 안드로이드 매니페스트 파일(AndroidManifest.xml, 830)에 대한 패턴(1100)의 종류를 나타내고 있다.11 is a diagram showing an example of a pattern for an Android manifest file in an embodiment of the present invention. 11 shows the type of the pattern 1100 for the Android manifest file (AndroidManifest.xml, 830).
제3 종류(1110)의 패턴은 안드로이드 매니페스트 파일(830)에서 퍼미션(permission) 그룹을 찾는 패턴을 의미할 수 있으며, 아래 패턴 3과 같이 표현될 수 있다.The pattern of the third kind 1110 may refer to a pattern for finding a permission group in the Android manifest file 830 and may be expressed as pattern 3 below.
[패턴 3][Pattern 3]
RetrievePermission:RetrievePermission:
: Name(string or *)     : Name (string or *)
예를 들어, 패턴 'RetrievePermission: Name(*)'에 대한 탐지 결과로 'android.permission.GET_TASKS' 및 'android.permission.INTERNET'과 같은 퍼미션들이 제공될 수 있다. 다른 예로, 패턴 'RetrievePermission: Name(android.permission.READ_EXTERNAL_STORAGE)'와 같이 특정 퍼미션 이름으로 해당 이름의 퍼미션이 검색될 수도 있다. 만약, 특정 퍼미션과 관련된 취약점이 알려져 있다면, 해당 퍼미션이 존재하는지 찾기 위한 패턴이 기설정될 수 있고, 설정된 패턴에 기반하여 취약점 탐지가 수행될 수 있다. 이후 설명될 패턴들에서도 공통된 팩터들은 공통된 역할을 포함할 수 있다.For example, as a result of detection for pattern 'RetrievePermission: Name (*)', permissions such as 'android.permission.GET_TASKS' and 'android.permission.INTERNET' may be provided. As another example, a permission with that name may be searched for a specific permission name, such as the pattern 'RetrievePermission: Name (android.permission.READ_EXTERNAL_STORAGE)'. If a vulnerability associated with a particular permission is known, a pattern can be set to detect if the permission exists and vulnerability detection can be performed based on the configured pattern. In the patterns to be described later, the common factors may include a common role.
제4 종류(1120)의 패턴은 안드로이드 매니페스트 파일(830)에서 액티비티(activity) 그룹을 찾는 패턴을 의미할 수 있으며, 아래 패턴 4와 같이 표현될 수 있다.The pattern of the fourth kind 1120 may refer to a pattern for finding an activity group in the Android manifest file 830 and may be expressed as pattern 4 below.
[패턴 4][Pattern 4]
RetrieveActivity:RetrieveActivity:
: Name(string or *)     : Name (string or *)
제5 종류(1130)의 패턴은 안드로이드 매니페스트 파일(830)에서 최소 SDK API 버전을 찾는 패턴을 의미할 수 있으며, 아래 패턴 5와 같이 표현될 수 있다.The pattern of the fifth kind 1130 may refer to a pattern for finding the minimum SDK API version in the Android manifest file 830 and may be expressed as pattern 5 below.
[패턴 5][Pattern 5]
RetrieveMinSDK:RetrieveMinSDK:
: Version(string or *)     : Version (string or *)
: ConditionalEquality     : ConditionalEquality
버전 'Version()'의 파라미터는 원하는 버전의 값이 스트링 타입으로 동적으로 설정되거나 또는 모든 버전을 의미하는 별표(*)가 활용될 수 있다. 또한, 비교조건을 의미하는 'ConditionalEquality'는 등호나 부등호를 이용하여 버전 'Version()'에서 설정된 값과 안드로이드 매니페스트 파일에 설정된 SDK API 버전간의 비교를 위해 활용될 수 있다. 예를 들어, ' RetrieveMinSDK: Version(21) ConditionalEquality(<=)'는 버전 21 이하인 경우를 탐지하는 패턴을 의미할 수 있다.The parameter of version 'Version ()' can be set to dynamically set the value of the desired version as a string type, or an asterisk (*) to mean all versions. Also, 'ConditionalEquality', which means a comparison condition, can be utilized for comparison between the value set in the version 'Version ()' using the equal sign or inequality and the SDK API version set in the Android manifest file. For example, 'RetrieveMinSDK: Version (21) ConditionalEquality (<=)' may refer to a pattern that detects a version 21 or less.
제6 종류(1140)의 패턴은 안드로이드 매니페스트 파일(830)에서 타겟 SDK API 버전을 찾는 패턴을 의미할 수 있으며, 아래 패턴 6과 같이 표현될 수 있다.The pattern of the sixth kind 1140 may refer to a pattern for searching the target SDK API version in the Android manifest file 830 and may be expressed as pattern 6 below.
[패턴 6][Pattern 6]
RetrieveTargetSDK:RetrieveTargetSDK:
: Version(string or *)     : Version (string or *)
: ConditionalEquality     : ConditionalEquality
버전 'Version()'과 비교조건을 의미하는 'ConditionalEquality'는 패턴 6에서와 공통될 수 있다.The version 'Version ()' and 'ConditionalEquality', which means the comparison condition, can be common with the pattern 6.
제7 종류(1150)의 패턴은 안드로이드 매니페스트 파일(830)에서 메인 어플리케이션(main application)을 찾는 패턴을 의미할 수 있으며, 아래 패턴 7과 같이 표현될 수 있다.The pattern of the seventh kind 1150 may refer to a pattern in which the main application is found in the Android manifest file 830 and may be expressed as pattern 7 below.
[패턴 7][Pattern 7]
RetrieveMainApplication:RetrieveMainApplication:
: Name(string or *)     : Name (string or *)
제8 종류(1160)의 패턴은 안드로이드 매니페스트 파일(830)에서 서비스 그룹을 찾는 패턴을 의미할 수 있으며, 아래 패턴 8과 같이 표현될 수 있다.The pattern of the eighth kind 1160 may refer to a pattern of finding a service group in the Android manifest file 830 and may be expressed as pattern 8 below.
[패턴 8][Pattern 8]
RetrieveService:RetrieveService:
: Name(string or *)     : Name (string or *)
제9 종류(1170)의 패턴은 안드로이드 매니페스트 파일(830)에서 리시버 그룹을 찾는 패턴을 의미할 수 있으며, 아래 패턴 9와 같이 표현될 수 있다.The pattern of the ninth kind 1170 may refer to a pattern for finding a receiver group in the Android manifest file 830 and may be expressed as pattern 9 below.
[패턴 9][Pattern 9]
RetrieveReceiver: RetrieveReceiver:
: Name(string or *)     : Name (string or *)
제10 종류(1180)의 패턴은 안드로이드 매니페스트 파일(830)에서 프로바이더 그룹를 찾는 패턴을 의미할 수 있으며, 아래 패턴 10과 같이 표현될 수 있다.The pattern of the tenth kind (1180) may refer to a pattern of finding a provider group in the Android manifest file (830), and may be expressed as pattern 10 below.
[패턴 10][Pattern 10]
RetrieveProvider:RetrieveProvider:
: Name(string or *)     : Name (string or *)
안드로이드 매니페스트 파일(830)에서 탐색되는 퍼미션, 액티비티, 최소 SDK API 버전, 타겟 SDK API 버전, 메인 어플리케이션, 서비스, 리시버, 프로바이더는 APK에 대해 이미 잘 알려진 종래기술들을 통해 당업자가 쉽게 이해할 수 있을 것이다.The permissions, activity, minimum SDK API version, target SDK API version, main application, service, receiver, and provider searched in the Android manifest file 830 may be readily understood by those skilled in the art through well known prior art techniques for APK .
도 12는 본 발명의 일실시예에 있어서, 덱스 파일에 대한 패턴의 예를 도시한 도면이다. 도 12는 덱스 파일(dex, 820)에 대한 패턴들(1200)의 종류를 나타내고 있다.12 is a diagram showing an example of a pattern for a Dex file in an embodiment of the present invention. 12 shows the types of the patterns 1200 for the dex file dex 820. FIG.
제11 종류(1210)의 패턴은 호출된 API를 찾는 패턴을 의미할 수 있으며, 아래 패턴 11과 같이 표현될 수 있다.The pattern of the eleventh kind 1210 may refer to a pattern for searching a called API, and may be expressed as pattern 11 below.
[패턴 11][Pattern 11]
DexFindApi: DexFindApi :
: DexCalledAPI (require): DexCalledAPI (require)
: ClassName, MethodName          : ClassName, MethodName
: DexTraceArgument (optional): DexTraceArgument (optional)
: ArgumentIndex(number)          : ArgumentIndex (number)
: ArgumentType(string)          : ArgumentType (string)
: DexArgumentFrom (optional): DexArgumentFrom (optional)
: Exceptional(true/false)          : Exceptional (true / false)
: FromNull          : FromNull
: List: FromAPIList : List: FromAPIList
:ClassName, MethodName               : ClassName, MethodName
: List: FromFieldList : List: FromFieldList
:ClassName, MethodName               : ClassName, MethodName
여기서 'DexFindApi'는 호출된 API를 찾는 패턴의 패턴명을 의미할 수 있다. 또한, 'DexCalledAPI'는 특정 클래스의 특정 메서드를 지정하기 위한 팩터를 의미할 수 있다. 이러한 클래스와 메서드는 'ClassName' 및 'MethodName'에 따라 지정될 수 있다. 또한, 'DexTraceArgument'는 특정 인덱스 및/또는 특정 타입의 인수(argument)를 지정하기 위한 팩터를 의미할 수 있다. 또한, 'DexArgumentFrom'은 예외처리 여부를 결정하거나 널(null)로부터의 인수를 탐지하거나 또는 특정 API 리스트나 필드 리스트를 지정하기 위한 팩터를 의미할 수 있다.Here, 'DexFindApi' can refer to the pattern name of the pattern for which the called API is searched. Also, 'DexCalledAPI' can mean a factor for specifying a specific method of a specific class. These classes and methods can be specified according to 'ClassName' and 'MethodName'. Also, 'DexTraceArgument' may refer to a factor for specifying a specific index and / or an argument of a certain type. Also, 'DexArgumentFrom' can mean a factor for determining whether to handle an exception, detecting an argument from a null, or specifying a specific API list or a field list.
아래 표 1은 인스트럭션 매스의 제1 예를 표 2는 패턴의 제1 예를 각각 나타내고 있다.Table 1 below shows a first example of an instruction mass, and Table 2 shows a first example of a pattern.
Class cfindMe{ public void mfindMe{ SSLContext sc = SSLContext.getInstance("TLS"); sc.init(null, new TrustManager[]{new VulnClass01()}, new java.security.SecureRandom()); }}Class cfindMe {public void mfindMe {SSLContext sc = SSLContext. getInstance ("TLS"); sc.init (null, new TrustManager [] {new VulnClass01 ()}, new java.security.SecureRandom ()); }}
DexFindApi: DexCalledAPI:: ClassName(Liavax/net/ssl/SSLContext) MethodName(init) DexFindApi : DexCalledAPI :: ClassName (Liavax / net / ssl / SSLContext) MethodName (init)
표 2의 패턴은 클래스 'Liavax/net/ssl/SSLContext'의 메서드 'init'를 호출하는 API를 찾는 패턴을 의미할 수 있다. 이 경우, 취약점 탐지 시스템은 해당 패턴에 기반하여 표 1의 인스트럭션 매스에서 클래스 'cfindMe'의 메서드 'mfindMe'가 해당 메서드 'init'를 호출함을 탐지할 수 있고, 탐지 결과로서 'called from cfindMe->mfindMe'와 같은 메시지를 제공할 수 있다.The pattern in Table 2 can refer to a pattern that looks for an API that calls the method 'init' in class 'Liavax / net / ssl / SSLContext'. In this case, the vulnerability detection system can detect that the method 'mfindMe' of the class' cfindMe 'calls the corresponding method' init 'in the instruction mass of Table 1 based on the corresponding pattern, and' called from cfindMe- gt; mfindMe &apos;. &lt; / RTI &gt;
아래 표 3은 인스트럭션 매스의 제2 예를 표 4는 패턴의 제2 예를 각각 나타내고 있다.Table 3 below shows the second example of the instruction mass, and Table 4 shows the second example of the pattern.
Class cfindMe{ public void mfindMe{SSLContext sc = SSLContext.getInstance("TLS");TrustManager tm = TrustManagerFactory.getTrustManagers();sc.init(null, tm, new java.security.SecureRandom()); }}Class cfindMe {public void mfindMe {SSLContext sc = SSLContext. getInstance ("TLS"); TrustManager tm = TrustManagerFactory.getTrustManagers (); sc.init (null, tm, new java.security.SecureRandom ()); }}
DexFindApi : DexCalledAPI :: ClassName (Ljavax/net/ssl/SSLContext) MethodName(init) DexTraceArgument :: ArgumentIndex(2): ArgumentType(Ljavax/net/ssl/TrustManager) FromApiList :: FromApiList[0]{ClassName(Ljavax/net/ssl/TrustManagerFactory), MethodName(getTrustManagers) }: Exception(true) DexFindApi : DexCalledAPI :: ClassName (Ljavax / net / ssl / SSLContext) MethodName (init) DexTraceArgument :: ArgumentIndex (2): ArgumentType (Ljavax / net / ssl / TrustManager) FromApiList :: FromApiList [0] {ClassName (Ljavax / net / ssl / TrustManagerFactory), MethodName (getTrustManagers)}: Exception (true)
표 4의 패턴은 클래스 'Liavax/net/ssl/SSLContext'의 메서드 'init'를 호출하는 API를 찾아 메서드 'init'의 인덱스 '2'의 타입 'Ljavax/net/ssl/TrustManager'의 인수를 추적하되, ApiList에 지정된 클래스 'Ljavax/net/ssl/TrustManagerFactory'와 메서드 'getTrustManagers'에 대해서는 예외(true)로 취급하는 패턴을 의미할 수 있다.The pattern in Table 4 finds the API calling the method 'init' in class 'Liavax / net / ssl / SSLContext' and traces the arguments of type 'Ljavax / net / ssl / TrustManager' in index '2' However, this can mean a pattern treated as an exception (true) for the class 'Ljavax / net / ssl / TrustManagerFactory' specified in ApiList and method 'getTrustManagers'.
표 3을 살펴보면, 클래스 'Liavax/net/ssl/SSLContext'의 메서드 'init'를 호출하는 API는 클래스 'cfindMe'의 메서드 'mfindMe'이고, 메서드 'init'의 인덱스 '2'의 타입 'Ljavax/net/ssl/TrustManager'의 인수가 'tm'임을 알 수 있다. 그러나 클래스 'Ljavax/net/ssl/TrustManagerFactory'의 메서드 'getTrustManagers'에 대해서는 예외처리를 하기 때문에, 인수 'tm'이나 클래스 'cfindMe'의 메서드 'mfindMe'가 탐지되지 않고, 예외처리될 수 있다.As shown in Table 3, the API calling the method 'init' of the class' Liavax / net / ssl / SSLContext 'is the method' mfindMe 'of the class' cfindMe' and the type 'Ljavax / net / ssl / TrustManager 'argument is' tm'. However, since the method 'getTrustManagers' of the class 'Ljavax / net / ssl / TrustManagerFactory' does exception handling, the method 'mfindMe' of the argument 'tm' or class 'cfindMe' can be detected without exception.
아래 표 5는 인스트럭션 매스의 제3 예를 표 6은 패턴의 제3 예를 각각 나타내고 있다.Table 5 below shows a third example of the instruction mass, and Table 6 shows a third example of the pattern.
Class cfindMe{public void mfindMe{SSLContext sc = SSLContext.getInstance("TLS");sc.init(null, null, new java.security.SecureRandom());}}Class cfindMe {public void mfindMe {SSLContext sc = SSLContext. getInstance ("TLS"); sc.init (null, null, new java.security.SecureRandom ());
DexFindApi : DexCalledAPI :: ClassName (Ljavax/net/ssl/SSLContext) MethodName(init) DexTraceArgument :: ArgumentIndex(2) DexArgumentFrom :: FromNull DexFindApi : DexCalledAPI :: ClassName (Ljavax / net / ssl / SSLContext) MethodName (init) DexTraceArgument :: ArgumentIndex (2) DexArgumentFrom :: FromNull
표 6의 패턴은 클래스 'Liavax/net/ssl/SSLContext'의 메서드 'init'를 호출하는 API를 찾고, 메서드 'init'의 인덱스 '2'의 인수를 추적하되, 널(null)로부터의 인수인지를 찾는 패턴을 의미할 수 있다.The pattern in Table 6 finds the API calling the method 'init' in class 'Liavax / net / ssl / SSLContext' and traces the argument of index '2' in method 'init' May refer to a pattern of looking for.
표 5의 인스트럭션 매스를 살펴보면, 클래스 'Liavax/net/ssl/SSLContext'의 메서드 'init'를 호출하는 API는 클래스 'cfindMe'의 메서드 'mfindMe'이고, 메서드 'init'의 인덱스 '2'의 인수가 널(null)임을 알 수 있다. 따라서, 'DexCalledAPI'에 따라 클래스 'cfindMe'의 메서드 'mfindMe'가 해당 메서드 'init'를 호출함을 탐지할 수 있고, 'DexTraceArgument' 및 'DexArgumentFrom'에 따라 널(null)로부터의 인수가 메서드 'init'의 인덱스 2에 존재함을 탐지할 수 있다. 이때, 탐지 결과로서 'called from cfindMe->mfindMe' 메시지 및 'argument from null' 메시지가 제공될 수 있다.Looking at the instruction mass in Table 5, the API calling the method 'init' of class 'Liavax / net / ssl / SSLContext' is the method 'mfindMe' of class 'cfindMe' and the argument of index '2' Is null. Thus, according to 'DexCalledAPI', it can detect that method 'mfindMe' of class 'cfindMe' calls its method 'init', and arguments from 'null' according to 'DexTraceArgument' and 'DexArgumentFrom' init 'at index 2. At this time, as the detection result, 'called from cfindMe-> mfindMe' message and 'argument from null' message may be provided.
아래 표 7은 인스트럭션 매스의 제4 예를 표 8은 패턴의 제4 예를 각각 나타내고 있다.Table 7 below shows the fourth example of the instruction mass, and Table 8 shows the fourth example of the pattern.
Class A {public init(){ String str = "xxx"; C.m(str);}}Class C { public static void m(string input){StringBuilder str = new StringBuilder(input);str.append("xx");System.loadlibrary(str); }}Class A {public init () {String str = "xxx"; System.Collections.Start ();}} C # public static void m (string input) {StringBuilder str = new StringBuilder (input); }}
DexFindApi : DexCalledAPI :: ClassName (System) MethodName(loadLibrary) DexTraceArgument :: ArgumentIndex(1) DexFindApi : DexCalledAPI :: ClassName (System) MethodName (loadLibrary) DexTraceArgument :: ArgumentIndex (1)
표 8의 패턴은 클래스 'System'의 메서드 'loadLibrary'를 호출하는 API를 찾고, 메서드 'loadLibrary'의 인덱스 '1'의 인수를 추적하는 패턴을 의미할 수 있다.The pattern in Table 8 can refer to a pattern that looks for APIs that call the method 'loadLibrary' in class 'System' and traces the arguments at index '1' in method 'loadLibrary'.
표 7의 인스트럭션 매스에 따르면, 클래스 'System'의 메서드 'loadLibrary'를 호출하는 API는 클래스 'C'의 메서드 'm'임을 알 수 있다. 이때, 메서드 'loadLibrary'의 인덱스 '1'의 인수는 'str'이며, 인수 'str'은 메서드 m을 호출하는 클래스 'A'의 메서드 'init'에서 "xxx"이고, 클래스 'C'의 메서드 'm'에서 "xx"가 'append'됨을 알 수 있다. 이러한 인수 'str'에 대한 추적은 앞서 설명한 바와 같이 미리 생성 및 관리되는 메서드들간의 호출 관계를 이용하여 이루어질 수 있다.According to the instruction mass in Table 7, it can be seen that the API calling the method 'loadLibrary' of the class 'System' is the method 'm' of the class 'C'. At this time, the argument of the index '1' of the method 'loadLibrary' is 'str', the argument 'str' is 'xxx' in the method 'init' of the class 'A' Notice that "xx" is 'append' in 'm'. The tracing for this argument 'str' can be done using the call relation between previously created and managed methods as described above.
이때 패턴에 대한 탐지 결과는 아래 표 9의 메시지와 같이 제공될 수 있다.At this time, the detection result of the pattern can be provided as shown in the message of Table 9 below.
called from C->mcalled from C-> m argument argument strstr is string is string str+="xx"str + = " xx " str=input(parameter)str = input (parameter) Parameter is "xxx" in A->Parameter is "xxx" in A-> initinit
'called from C->m'는 클래스 'System'의 메서드 'loadLibrary'를 호출하는 API가 클래스 C의 메서드 m임을 나타낼 수 있다. 'argument str is string'는 인수 'str'의 타입이 'string'임을 나타낼 수 있다. 또한, 'str+="xx"'는 표 7의 메서드 'str.append("xx");'에 의해 인수 'str'에 "xx"가 덧붙여짐을 의미할 수 있다. 또한, str=input(parameter)는 인수 'str'이 파라미터 'input'으로서 전달되었음을 의미할 수 있으며, 'Parameter is "xxx" in A->init' 전달된 파라미터 'input'은 클래스 'A'의 메서드 'init'에서 "xxx" 임을 의미할 수 있다. 따라서, 클래스 'System'의 메서드 'loadLibrary'의 인덱스 '1'의 인수인 'str'이 현재 'string' 타입의 값 "xxxxx"를 가짐을 알 수 있다.'called from C-> m' can indicate that the API calling the method 'loadLibrary' of class 'System' is a method m of class C. 'argument str is string' can indicate that the type of the argument 'str' is 'string'. In addition, 'str + = "xx"' can mean that "xx" is appended to the argument 'str' by the method 'str.append ("xx"); In addition, str = input (parameter) may mean that the argument 'str' was passed as parameter 'input', and parameter ' It can mean "xxx" in method 'init'. Therefore, it can be seen that the argument 'str' of the index '1' of the method 'loadLibrary' of the class 'System' has the value 'xxxxx' of the current 'string' type.
아래 표 10은 인스트럭션 매스의 제5 예를 표 11은 패턴의 제5 예를 각각 나타내고 있다.Table 10 below shows the fifth example of the instruction mass, and Table 11 shows the fifth example of the pattern.
Class cfindMe{ public void mfindMe{SSLContext sc = SSLContext.getInstance("TLS");TrustManager tm = SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;sc.init(null, tm, new java.security.SecureRandom()); }}Class cfindMe {public void mfindMe {SSLContext sc = SSLContext. getInstance ("TLS"); TrustManager tm = SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER; sc.init (null, tm, new java.security.SecureRandom ()); }}
DexFindApi : DexCalledAPI :: ClassName (Liavax/net/ssl/TrustManager) MethodName(init) DexTraceArgument :: ArgumentIndex(2) DexArgumentFrom :Exception(false): FromFieldList FromField[0]{ ClassName(Lorg/apache/http/conn/ssl/SSLSocketFactory), FieldName(ALLOW_ALL_HOSTNAME_VERIFIER)} DexFindApi : DexCalledAPI :: ClassName (Liavax / net / ssl / TrustManager) MethodName (init) DexTraceArgument :: ArgumentIndex (2) DexArgumentFrom : Exception (false): FromFieldList FromField [0] {ClassName (Lorg / apache / http / conn / ssl / SSLSocketFactory), FieldName (ALLOW_ALL_HOSTNAME_VERIFIER)
표 11의 패턴은 클래스 'Liavax/net/ssl/SSLContext'의 메서드 'init'를 호출하는 API를 찾고, 메서드 'init'의 인덱스 '2'의 인수를 추적하되, 'FromFieldList'를 통해 지정되는 필드들에 대해서는 예외 처리를 하지 않는 패턴을 의미할 수 있다.The pattern in Table 11 finds the API calling the method 'init' in class 'Liavax / net / ssl / SSLContext' and traces the arguments of index '2' in method 'init' May refer to a pattern that does not handle exceptions.
표 10의 인스트럭션 매스를 통해 클래스 'Liavax/net/ssl/SSLContext'의 메서드 'init'를 호출하는 API가 클래스 'cfindMe'의 메서드 'mfindMe'임을 알 수 있으며, 메서드 'init'의 인덱스 '2'의 인수가 'tm'임을 알 수 있다.It can be seen that the API calling the method 'init' of class 'Liavax / net / ssl / SSLContext' through the instruction mass of Table 10 is the method 'mfindMe' of class 'cfindMe' Can be found to be 'tm'.
이때, 클래스 'Lorg/apache/http/conn/ssl/SSLSocketFactory'의 필드 'ALLOW_ALL_HOSTNAME_VERIFIER'는 예외처리를 하지 않기 때문에 클래스 'Liavax/net/ssl/SSLContext'의 메서드 'init'를 호출하는 API가 클래스 'cfindMe'의 메서드 'mfindMe'임을 알리기 위한 메시지(일례로, 'called from cfindMe ->mfindMe')가 탐지 결과로서 제공될 수 있으며, 메서드 'init'의 인덱스 '2'의 인수 'tm'이 필드 'SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER'로부터의 인수임을 알리기 위한 메시지(일례로, 'argument from SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER')가 탐지 결과로서 더 제공될 수 있다.At this time, since the field 'ALLOW_ALL_HOSTNAME_VERIFIER' of the class 'Lorg / apache / http / conn / ssl / SSLSocketFactory' does not handle exceptions, the API calling the method 'init' of the class 'Liavax / net / ssl / SSLContext' (called from cfindMe -> mfindMe, for example) may be provided as a result of detection, and the argument 'tm' of index '2' of method 'init' (E.g., 'argument from SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER') to indicate that it is an argument from SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER may be further provided as a detection result.
다시 도 12를 참조하면, 제12 종류(1220)의 패턴은 메서드의 특정 인스트럭션을 찾는 패턴을 의미할 수 있으며, 아래 패턴 12와 같이 표현될 수 있다.Referring again to FIG. 12, the pattern of the twelfth kind 1220 may refer to a pattern for finding a specific instruction of a method, and may be expressed as pattern 12 below.
[패턴 12][Pattern 12]
DexMethodBody : DexMethodBody :
: MethodName (require): MethodName (require)
: MethodName          : MethodName
: DexInstructionList (require): DexInstructionList (require)
: List<DexInstruction>          : List <DexInstruction>
: Except(ture/false)          : Except (true / false)
: DexInstruction : DexInstruction
: VoidBody          : VoidBody
: InvokeInstruction          : InvokeInstruction
: ClassName(string)               : ClassName (string)
: MethodName(string)               : MethodName (string)
여기서, 'DexMethodyBody'는 특정 메서드 내에서 특정 인스트럭션을 찾기 위한 패턴명을 의미할 수 있다. 또한, 'MethodName'은 메서드를 지정하기 위한 팩터를 의미할 수 있다. 또한, 'DexInstructionList'는 탐지하기 위한 인스트럭션을 특정하기 위한 팩터를 의미할 수 있다. 예를 들어 'List<DexInstruction>'은 탐지하기 위한 인스트럭션을 지정 지정하기 위해 이용될 수 있으며, 'Except(true/false)'는 지정된 인스트럭션의 예외 처리 여부를 결정하기 위해 이용될 수 있다. 또한, 'VoidBody'는 void 타입의 인스트럭션을 지정하기 위해 이용될 수 있으며, 'InvokeInstruction'은 호출되는 인스트럭션을 지정하기 위해 이용될 수 있다.Here, 'DexMethodyBody' can refer to a pattern name to find a specific instruction within a particular method. Also, 'MethodName' may mean a factor for specifying a method. Also, 'DexInstructionList' may mean a factor for specifying an instruction to detect. For example, 'List <DexInstruction>' can be used to specify the instruction to detect, and 'Except (true / false)' can be used to determine whether to handle the specified instruction. Also, 'VoidBody' can be used to specify an instruction of type void, and 'InvokeInstruction' can be used to specify the instruction to be called.
아래 표 12는 인스트럭션 매스의 제6 예를 표 13은 패턴의 제6 예를 각각 나타내고 있다.Table 12 below shows the sixth example of the instruction mass, and Table 13 shows the sixth example of the pattern.
TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() {@Overridepublic void checkServerTrusted(…) { throws IllegalArgumentException { }}}TrustManager [] trustAllCerts = new TrustManager [] {new X509TrustManager () {@Override public void checkServerTrusted (...) {throws IllegalArgumentException {}}}
DexMethodyBody : MethodName :: checkServerTrusted DexInstructionList :: {DexInstruction(VoidBody)}: Except(false) DexMethodyBody : MethodName :: checkServerTrusted DexInstructionList :: {DexInstruction (VoidBody)}: Except (false)
표 13의 패턴은 메서드 'checkServerTrusted'가 void 타입인지 여부를 확인하는 패턴을 의미할 수 있다. 표 12의 인스트럭션 매스에서 메서드 'checkServerTrusted'는 void 타입으로 선언되어 있기 때문에 메서드 'checkServerTrusted'가 void 타입임을 알리기 위한 메시지(일례로, 'Body is void')가 제공될 수 있다.The pattern in Table 13 can refer to a pattern that checks whether the method 'checkServerTrusted' is a void type. Since the method 'checkServerTrusted' is declared as void type in the instruction mass of Table 12, a message (for example, 'Body is void') may be provided to notify that the method 'checkServerTrusted' is of type void.
아래 표 14는 인스트럭션 매스의 제7 예를 표 15는 패턴의 제7 예를 각각 나타내고 있다.Table 14 below shows the seventh example of the instruction mass, and Table 15 shows the seventh example of the pattern.
TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() { @Override public void checkServerTrusted( … ) { throws IllegalArgumentException { for (java.security.cert.X509Certificate c : chain) { if(c.getIssuerDN().getName().compareTo("correct")!=0){ throw new CertificateException("None of the TrustManagers trust this certificate chain"); } } } }}TrustManager [] trustAllCerts = new TrustManager [] {new X509TrustManager () {@Override public void checkServerTrusted (...) {throws IllegalArgumentException {for (java.security.cert.X509Certificate c: chain) {if (c.getIssuerDN () .compareTo ("correct")! = 0) {throw new CertificateException ("None of the TrustManagers trust this certificate chain"); }}}}}}
DexMethodyBody : MethodName :: checkServerTrusted DexInstructionList :: {DexInstruction(InvokeInstruction(Ljava/security/cert/CertificateException,<init>)),DexInstruction(InvokeInstruction(Ljava/lang/IllegalArgumentException,<init>))}: Except(false) DexMethodyBody : MethodName :: checkServerTrusted DexInstructionList :: {DexInstruction (InvokeInstruction (Ljava / security / cert / CertificateException, <init>), DexInstruction (Ljava / lang / IllegalArgumentException,
표 13의 패턴은 메서드 'checkServerTrusted'에서 메서드 'Ljava/security/cert/CertificateException'를 호출하는 인스트럭션과 메서드 'Ljava/lang/IllegalArgumentException'를 호출하는 인스트럭션을 찾는 패턴을 의미할 수 있다. 표 14의 인스트럭션 매스와 관련하여, 메서드 'Ljava/security/cert/CertificateException'를 호출하는 인스트럭션이 존재함을 알 수 있다. 따라서, 메서드 'Ljava/security/cert/CertificateException'를 호출하는 인스트럭션이 탐지되었음을 알리기 위한 메시지(일례로, 'Invoke instruction isdetected, CertificateException-><init>')가 제공될 수 있다.The pattern in Table 13 can refer to a method that calls the method 'Ljava / security / cert / CertificateException' in the method 'checkServerTrusted' and the instruction to call the method 'Ljava / lang / IllegalArgumentException'. With respect to the instruction mass in Table 14, it can be seen that there is an instruction to call the method 'Ljava / security / cert / CertificateException'. Thus, a message (eg, 'Invoke instruction isdetected, CertificateException -> <init>') may be provided to indicate that an instruction that calls the method 'Ljava / security / cert / CertificateException' has been detected.
앞서 간략히 설명한 바와 같이, 패턴들은 결합(join)될 수 있다. 예를 들어, 패턴 'DexFindApi'를 이용하여 특정 클래스 'a'를 찾은 후, 패턴 'DexMethodyBody'를 이용하여 클래스 'a'의 메서드에서 특정 인스트럭션을 찾을 수 있다. 예를 들어, 하나의 룰에 이러한 두 개의 패턴들이 조인되어 포함될 수 있다.As briefly described above, the patterns can be joined. For example, you can use the pattern 'DexFindApi' to find a specific class 'a', then use the pattern 'DexMethodyBody' to find the specific instruction in the method of class 'a'. For example, these two patterns can be joined and included in one rule.
다시 도 12를 참조하면, 제13 종류(1230)의 패턴은 특정 클래스의 자식 클래스를 찾는 패턴을 의미할 수 있으며, 아래 패턴 13과 같이 표현될 수 있다.Referring again to FIG. 12, the pattern of the thirteenth kind 1230 may refer to a pattern of finding a child class of a specific class, and may be expressed as pattern 13 below.
[패턴 13][Pattern 13]
DexFindSubClass : DexFindSubClass :
: DexParent (require): DexParent (require)
: ClassName(string)                  : ClassName (string)
여기서, 'DexFindSubClass'는 특정 클래스의 자식 클래스를 찾는 패턴명을 의미할 수 있다. 'DexParent'는 찾고자 하는 자식 클래스의 부모 클래스를 지정하기 위한 팩터를 의미할 수 있다.Here, 'DexFindSubClass' can refer to a pattern name for finding a child class of a specific class. 'DexParent' can be a factor for specifying the parent class of the child class to be searched.
아래 표 16은 인스트럭션 매스의 제8 예를 표 17은 패턴의 제8 예를 각각 나타내고 있다.Table 16 below shows the eighth example of the instruction mass, and Table 17 shows the eighth example of the pattern.
Class cfindMe extend IamYourFather {}Class csearchMe extend IamYourFather {}Class cfindMe extend IamYourFather {} Class csearchMe extend IamYourFather {}
DexFindSubClass : DexParent :: ClassName(IamYourFather) DexFindSubClass : DexParent :: ClassName (IamYourFather)
표 17은 클래스 'IamYourFather'를 부모로 갖는 자식 클래스를 찾기 위한 패턴을 의미할 수 있다. 표 16의 인스트럭션 매스와 관련하여, 클래스 'cfindMe'와 클래스 'csearchMe'는 각각 클래스 'IamYourFather'의 자식 노드이기 때문에 클래스 'cfindMe'와 클래스 'csearchMe'가 각각 탐지될 수 있으며, 탐지된 클래스 'cfindMe'와 클래스 'csearchMe'를 알리기 위한 메시지가 제공될 수 있다.Table 17 can refer to a pattern for locating a child class that has the class 'IamYourFather' as its parent. With respect to the instruction mass of Table 16, class' cfindMe 'and class' csearchMe' can be detected respectively, because class' cfindMe 'and class' csearchMe' are child nodes of class' IamYourFather 'respectively and detected class' cfindMe &Quot; and a class &quot; csearchMe &quot; may be provided.
패턴들간의 결합(join)은 보다 다양하게 활용될 수 있다. 예를 들어, 패턴 'DexFindSubClass'를 이용하여 클래스 'a'를 부모로 갖는 자식 클래스 'b'를 찾은 후, 탐지된 클래스 'b'를 패턴 'DexFindApi'에서의 'ClassName(b)'와 같이 동적 파라미터로 활용될 수 있다.The joins between the patterns can be utilized in various ways. For example, the pattern 'DexFindSubClass' is used to find the child class 'b' having the class 'a' as a parent, and then the detected class 'b' is dynamically changed as 'ClassName (b)' in the pattern 'DexFindApi' It can be used as a parameter.
도 13은 본 발명의 일실시예에 있어서, so 파일에 대한 패턴의 예를 도시한 도면이다. 도 13은 so 파일(840)에 대한 패턴들(1400)의 종류를 나타내고 있다.13 is a diagram showing an example of a pattern for a so file in an embodiment of the present invention. FIG. 13 shows the types of patterns 1400 for the so file 840. FIG.
제14 종류(1310)의 패턴은 so 파일(840)에서 스트링(특정 문자열)을 검색하는 패턴을 의미할 수 있으며, 아래 패턴 14와 같이 표현될 수 있다.The pattern of the 14th type 1310 may be a pattern for searching a string (specific string) in the so file 840, and may be expressed as pattern 14 below.
[패턴 14][Pattern 14]
RetrieveSoContents :RetrieveSoContents:
: Character(string)     : Character (string)
여기서, 패턴 'RetrieveSoContents'는 so 파일(840)에서 스트링을 검색하는 패턴명을 의미할 수 있으며, 'Character(string)'은 so 파일(840)에서 검색하고자 하는 특정 스트링(일례로, 'http://*'와 같은 문자열)을 지정하기 위한 팩터를 의미할 수 있다. 이때, 스트링은 so 파일(840)이 포함하는 '.rdata' 섹션에서 검색될 수 있다.Here, the pattern 'RetrieveSoContents' may be a pattern name for retrieving a string in the so file 840, and' Character (string) 'may be a specific string (for example,' http: Quot; // * &quot;). At this time, the string can be retrieved from the '.rdata' section included in the so file 840.
제15 종류(1320)의 패턴은 so 파일(840)에서 API를 검색하는 패턴을 의미할 수 있으며, 아래 패턴 15와 같이 표현될 수 있다.The pattern of the fifteenth kind 1320 may be a pattern for searching the API in the so file 840 and may be expressed as pattern 15 below.
[패턴 15][Pattern 15]
RetrieveApiContents :RetrieveApiContents:
: APIType(iat) Name(strcpy)     : APIType (iat) Name (strcpy)
여기서, 패턴 'RetrieveApiContents'는 so 파일(840)에서 API를 검색하는 패턴명을 의미할 수 있으며, 'APIType()'은 API의 타입을 IAT(Import Address Table)과 EAT(Export Address Table) 중 하나로 설정하기 위한 팩터를, 'Name()'은 검색하고자 하는 API의 이름을 지정하기 위한 팩터를 각각 의미할 수 있다.Here, the pattern 'RetrieveApiContents' may refer to a pattern name for retrieving the API in the so file 840, and 'APIType ()' indicates the type of the API as one of an Import Address Table (IAT) and an Export Address Table , And 'Name ()' may be a factor for specifying a name of an API to be searched.
도 14는 본 발명의 일실시예에 있어서, dll 파일에 대한 패턴의 예를 도시한 도면이다. 도 14은 dll 파일(850)에 대한 패턴(1400)의 종류를 나타내고 있다.14 is a diagram showing an example of a pattern for a dll file in an embodiment of the present invention. 14 shows the type of the pattern 1400 with respect to the dll file 850. Fig.
제16 종류(1410)의 패턴은 dll 파일(850)에서 스트링(특정 문자열)을 검색하기 위한 패턴을 의미할 수 있으며, 아래 패턴 16과 같이 표현될 수 있다.The pattern of the sixteenth kind 1410 may refer to a pattern for searching a string (specific string) in the dll file 850, and may be expressed as pattern 16 below.
[패턴 16][Pattern 16]
RetrieveDllContents :RetrieveDllContents:
: Character(string)     : Character (string)
여기서, 패턴 'RetrieveDllContents'는 dll 파일(850)에서 스트링을 검색하는 패턴명을 의미할 수 있으며, 'Character(string)'은 dll 파일(850)에서 검색하고자 하는 특정 스트링(일례로, 'http://*'와 같은 문자열)을 지정하기 위한 팩터를 의미할 수 있다.Here, the pattern 'RetrieveDllContents' may refer to a pattern name for searching a string in the dll file 850, and' Character (string) 'refers to a specific string (for example,' http: Quot; // * &quot;).
패턴에서 파라미터들은 앞서 설명한 바와 같이 동적으로 결정될 수 있다. 예를 들어, 패턴 a와 패턴 b의 결합을 통해 패턴 a를 통해 추출되는 값이 패턴 b를 위한 파라미터로 동적으로 활용될 수 있다.The parameters in the pattern can be dynamically determined as described above. For example, the value extracted through the pattern a through the combination of the pattern a and the pattern b can be dynamically utilized as a parameter for the pattern b.
상술한 패턴 1 내지 패턴 16은 APK를 위한 일실시예로서 다른 패키지 파일을 위해서는 다른 패턴이 활용될 수 있다. 취약점 탐지 시스템은 이러한 패턴을 등록받거나 등록된 패턴을 편집할 수 있는 에디터 기능을 관리자나 이용자에게 제공할 수 있다. 예를 들어, 어플리케이션에 대한 새로운 취약점이 알려지는 경우, 새롭게 알려지는 취약점을 탐지할 수 있도록 에디터 기능을 통해 새로운 패턴이 등록될 수 있으며, 취약점 탐지 시스템은 새로운 패턴을 통해 어플리케이션의 패키지 파일들을 분석하여 취약점을 탐지할 수 있다.The patterns 1 to 16 described above are examples for the APK, and other patterns may be utilized for other package files. The vulnerability detection system can provide the administrator or user with an editor function to register such patterns or to edit registered patterns. For example, if a new vulnerability is known to an application, a new pattern can be registered through the editor function to detect a newly known vulnerability. The vulnerability detection system analyzes the package files of the application through a new pattern Vulnerabilities can be detected.
또 다른 실시예에서 패턴의 종류들은 아래 표 18과 같이 나타날 수 있다.In another embodiment, the types of patterns may appear as shown in Table 18 below.
TypeType 탐지대상Target of detection
find_apifind_api dexdex
find_subfind_sub dexdex
method_bodymethod_body dexdex
method_annotationmethod_annotation dexdex
exist_apiexist_api dexdex
exist_fieldexist_field dexdex
manifestmanifest AndroidManifest.xmlAndroidManifest.xml
xmlxml *.xml* .xml
dlldll *.dll* .dll
soso *.so* .so
find_filefind_file 모든 파일All files
표 18의 패턴들 중 패턴 'dex(find_api)'은 앞서 설명한 패턴 11 'DexFindApi'에 대응할 수 있다. 이러한 패턴 'dex(find_api)'는 메서드 내에서 지정된 api의 호출을 탐지하기 위한 패턴일 수 있다.Of the patterns in Table 18, the pattern 'dex (find_api)' may correspond to the pattern 11 'DexFindApi' described above. This pattern 'dex (find_api)' can be a pattern for detecting calls to the specified api in a method.
또한, 패턴 'dex(find_sub)'은 앞서 설명한 패턴 13 'DexFindSubClass'에 대응할 수 있으며, 지정된 클래스를 상속받아 구현한 자식 클래스들을 탐지하기 위해 이용될 수 있다.In addition, the pattern 'dex (find_sub)' may correspond to the pattern 13 'DexFindSubClass' described above, and may be used to detect child classes inherited from the specified class.
또한, 패턴 'dex(method_body)'은 앞서 설명한 패턴 12 'DexMethodBody'에 대응할 수 있으며, aptjem 내의 인보크 인스트럭션(invoke instruction), 인스트럭션 개수, 메서드 이름 등을 비교 및 탐지하기 위해 이용될 수 있다.Also, the pattern 'dex (method_body)' may correspond to the pattern 12 'DexMethodBody' described above, and may be used for comparing and detecting invoke instructions, instructions, method names, and the like in aptjem.
또한, 패턴 'dex(method_annotation)'은 Java에서 메서드에 지정된 주석(annotation)을 탐지하기 위해 이용될 수 있다.The pattern 'dex (method_annotation)' can also be used in Java to detect annotations specified in a method.
또한, 패턴 'dex(exist_api)'는 특정 클래스 및/또는 메서드가 존재하는지를 탐색하기 위해 이용될 수 있다. 예를 들어, 이후 설명될 논리 연산을 이용한 패턴들의 조합을 이용하는 경우, 패턴 조합 (dex(exist_api) sub dex(find_api))는 왼쪽 패턴인 'dex(exist_api)'를 통해 탐색된 클래스를 대상으로 오른쪽 패턴인 'dex(find_api)'를 통해 지정된 api 호출을 탐색할 수 있다. Also, the pattern 'dex (exist_api)' may be used to detect whether a particular class and / or method exists. For example, when a combination of patterns using logic operations to be described later is used, a pattern combination (dex (exist_api) sub dex (find_api)) is a pattern that is searched for a class found through 'dex (exist_api) You can search for api calls specified via the pattern 'dex (find_api)'.
또한, 패턴 'dex(exist_field)'는 특정 클래스의 멤버가 존재하는지를 탐색하기 위해 이용될 수 있다. 예를 들어, 패턴 'dex(exist_field)'는 '클래스 → 멤버이름'과 같은 형태의 값을, 해당 멤버의 값과 비교할 정규표현식을 지정함으로써 지정된 정규표현식에 해당하는 멤버가 탐색될 수 있다.Also, the pattern 'dex (exist_field)' can be used to search for the existence of a member of a specific class. For example, the pattern 'dex (exist_field)' can be searched for a member of the specified regular expression by specifying a regular expression to compare the value of the form 'class → member name' with the value of that member.
또한, 패턴 'manifest'는 AndroidManifest.xml의 항목들과의 비교를 위해 이용될 수 있다.Also, the pattern 'manifest' can be used for comparison with the items in AndroidManifest.xml.
또한, 패턴 'xml', 'so', 'dll', 'find_file'은 각각 xml 파일, so 파일, dll 파일 및 모든 파일에서 탐색을 수행하기 위해 이용될 수 있다. 예를 들어, dll 파일에서 탐색을 수행하는 예에 대해서는 앞서 패턴 16 (RetrieveDllContents)을 통해 자세히 설명한 바 있다.Also, the patterns 'xml', 'so', 'dll', and 'find_file' can be used to perform searches on xml files, so files, dll files, and all files. For example, an example of performing a search in a dll file is described in more detail in Pattern 16 (RetrieveDllContents).
또한, 패턴들은 논리 연산과 괄호를 이용하여 조합되어 활용될 수도 있다. 예를 들어, 아래 표 19는 패턴들의 조합을 위해 활용 가능한 논리 연산의 예를 나타내고 있다.In addition, the patterns may be combined using logical operations and parentheses. For example, Table 19 below shows examples of logic operations that can be used for combinations of patterns.
TypeType 설명Explanation 예제example
oror 일반적인 논리 연산의 orOrdinary logical operation or true or true = truefalse or true = truetrue or true = true false or true = true
andand 일반적인 논리 연산의 andOf general logic operations true and false = falsetrue and true = truetrue and false = falsetrue and true = true
subsub 왼쪽 패턴이 탐지되면 그 탐지 결과가 오른쪽 패턴의 패턴으로 사용됨.When the left pattern is detected, the detection result is used as the pattern of the right pattern. true and true = truefalse and true = falsetrue and true = true false and true = false
예를 들어, (패턴 A or 패턴 B)에서 패턴 A가 탐지되면 이미 'true'이기 때문에 패턴 B에 대한 탐지는 수행되지 않을 수 있다. 또한, (패턴 A sub 패턴 B)에서 패턴 A가 'false'라면 패턴 B에 대한 탐지는 수행되지 않을 수 있다. 이러한 논리 연산을 이용한 패턴들의 조합에 대한 보다 구체적인 예로, 패턴 조합 (dex(find_sub_class) sub dex(find_api))를 들 수 있다. 해당 패턴 조합에서는 왼쪽의 패턴 'dex(find_sub_class)'를 통해 모든 액티비티들의 자식들을 탐색하게 되고, 왼쪽의 패턴을 통해 탐색된 클래스들이 오른쪽 패턴을 위한 클래스들로 이용될 수 있다. 다시 말해, 오른쪽 패턴 'dex(find_api)'는 왼쪽 패턴을 통해 탐색된 클래스들에서 api를 탐색하게 된다.For example, if pattern A is detected in (pattern A or pattern B), detection for pattern B may not be performed because it is already 'true'. In addition, if pattern A is 'false' (pattern A sub pattern B), detection for pattern B may not be performed. A more specific example of a combination of patterns using such logic operations is a pattern combination (dex (find_sub_class) sub dex (find_api)). In this pattern combination, the children of all activities are searched through the pattern 'dex (find_sub_class)' on the left, and the classes searched through the pattern on the left can be used as classes for the right pattern. In other words, the right pattern 'dex (find_api)' traverses the api in the classes found through the left pattern.
도 15는 본 발명의 일실시예에 따른 서버의 프로세서가 포함할 수 있는 구성요소의 예를 도시한 블록도이고, 도 16은 본 발명의 일실시예에 따른 서버가 수행할 수 있는 취약점 탐지 방법의 예를 도시한 흐름도이다.FIG. 15 is a block diagram illustrating an example of a component that a processor of a server according to an exemplary embodiment of the present invention may include; FIG. 16 is a diagram illustrating a vulnerability detection method Fig.
본 발명의 실시예들에 따른 취약점 탐지 시스템은 앞서 설명한 서버(150)와 같은 컴퓨터 장치의 형태로 구현될 수 있다. 또한, 도 15에 도시된 바와 같이 서버(150)의 프로세서(222)는 취약점 탐지 시스템을 구현하기 위한 구성요소들로서 탐지 패턴 관리부(1510), 패키지 파일 등록부(1520) 및 취약점 정보 탐지부(1530)를 포함할 수 있다. 이러한 프로세서(222) 및 프로세서(222)의 구성요소들은 도 16의 취약점 탐지 방법이 포함하는 단계들(1610 내지 1630)을 수행할 수 있다. 이때, 프로세서(222) 및 프로세서(222)의 구성요소들은 메모리(221)가 포함하는 운영체제의 코드나 적어도 하나의 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(222)의 구성요소들은 서버(150)에 저장된 코드가 제공하는 제어 명령에 따라 프로세서(222)에 의해 수행되는 프로세서(222)의 서로 다른 기능들(different functions)의 표현들일 수 있다. 예를 들어, 프로세서(222)가 상술한 제어 명령에 따라 탐지 패턴들을 관리하는 프로세서(222)의 기능적 표현으로 탐지 패턴 관리부(1510)가 사용될 수 있다.The vulnerability detection system according to embodiments of the present invention may be implemented in the form of a computer device such as the server 150 described above. 15, the processor 222 of the server 150 is a component for implementing a vulnerability detection system, and includes a detection pattern management unit 1510, a package file registration unit 1520, and a vulnerability information detection unit 1530, . &Lt; / RTI &gt; The components of the processor 222 and the processor 222 may perform the steps 1610 through 1630 of the vulnerability detection method of FIG. At this time, the components of the processor 222 and the processor 222 may be implemented to execute control instructions according to code of the operating system or code of at least one program that the memory 221 includes. Here, the components of processor 222 may be representations of different functions of processor 222 performed by processor 222 in accordance with the control instructions provided by the code stored in server 150 . For example, the detection pattern manager 1510 may be used as a functional representation of the processor 222 in which the processor 222 manages detection patterns in accordance with the control commands described above.
단계(1610)에서 탐지 패턴 관리부(1510)는 어플리케이션의 설치 및 구동을 위한 패키지 파일이 포함하는 파일들 및 파일들이 포함하는 코드들 중 적어도 하나와 관련하여, 어플리케이션의 취약점 진단을 위한 기 설정된 탐지 패턴들을 관리할 수 있다. 탐지 패턴들에 대해서는 앞서 자세한 실시예들을 설명하였으며, 취약점에 따라 보다 다양한 실시예들이 도출될 수 있음을 앞서 설명한 실시예들을 통해 당업자가 쉽게 이해할 수 있을 것이다.In step 1610, the detection pattern management unit 1510 determines whether or not a predetermined detection pattern for diagnosing the vulnerability of the application is detected in association with at least one of the files included in the package file for installation and operation of the application, Can be managed. It should be understood by those skilled in the art that the above detailed embodiments of the detection patterns have been described and that various embodiments can be derived according to the vulnerability.
이때, 탐지 패턴 관리부(1510)는 단계(1610)에서 새로운 탐지 패턴을 등록받거나 또는 등록된 탐지 패턴을 편집하기 위한 에디터 기능을 제공하고, 제공된 에디터 기능을 통해 등록 또는 편집된 탐지 패턴에 대한 정보를 저장 및 관리할 수 있다. 에디터 기능은 일례로 특정 웹페이지의 형태나 특정 어플리케이션의 형태로 취약점 탐지 시스템의 관리자나 이용자에게 제공될 수 있다. 예를 들어, 관리자의 단말에 설치되는 특정 어플리케이션을 통해 관리자의 단말과 취약점 탐지 시스템이 통신할 수 있고, 특정 어플리케이션에서 등록 또는 편집되는 탐지 패턴에 대한 정보가 네트워크를 통해 취약점 탐지 시스템으로 전송될 수 있다. 이때, 탐지 패턴 관리부(1510)는 새로운 탐지 패턴을 등록하거나 또는 편집된 탐지 패턴을 갱신할 수 있다.At this time, the detection pattern management unit 1510 provides an editor function for registering a new detection pattern or editing a registered detection pattern in step 1610, and provides information on the registered or edited detection pattern through the provided editor function Stored and managed. The editor function can be provided to the administrator or user of the vulnerability detection system in the form of a specific web page or a specific application, for example. For example, an administrator terminal and a vulnerability detection system can communicate with each other through a specific application installed in an administrator's terminal, and information about a detection pattern registered or edited in a specific application can be transmitted to the vulnerability detection system through the network have. At this time, the detection pattern management unit 1510 can register a new detection pattern or update the edited detection pattern.
앞선 실시예들에서는 패턴이 포함하는 팩터의 파라미터가 기설정될 수도 있으나, 필요에 따라 동적으로 결정될 수도 있음을 설명하였고, 파라미터가 동적으로 결정될 수 있음에 따라 보다 다양한 방식으로 탐지 패턴이 구현될 수 있음을 설명하였다.In the foregoing embodiments, it has been described that the parameters of the factors included in the patterns may be preset, but may be dynamically determined as necessary, and the detection patterns may be implemented in a more various ways as the parameters can be dynamically determined .
단계(1620)에서 패키지 파일 등록부(1520)는 어플리케이션의 설치 및 구동을 위해 이용자들에게 배포하기 위한 패키지 파일을 등록할 수 있다. 서버(150)는 이미 설명한 바와 같이 취약점 탐지 시스템이 포함되는 형태로 구현될 수 있다. 예를 들어, 어플리케이션 퍼블리셔의 시스템과 취약점 탐지 시스템이 결합된 형태로 서버(150)가 구현될 수 있다. 이때, 패키지 파일은 어플리케이션 퍼블리셔가 이용자들에게 배포하기 위해 개발자측으로부터 제공받아 등록될 수 있다.In step 1620, the package file registration unit 1520 may register a package file to be distributed to users for installation and operation of the application. The server 150 may be implemented in a form including a vulnerability detection system as described above. For example, the server 150 may be implemented as a combination of an application publisher system and a vulnerability detection system. At this time, the package file can be registered and received from the developer side for distributing to the users by the application publisher.
이때, 등록되는 패키지 파일에서 각각의 파일들이 식별될 수 있으며, 클래스들과 메서드들이 식별될 수 있다. 또한, 메서드들 각각은 분기명령(분기문)에 기반하여 인스트럭션 매스의 형태로 구분될 수 있으며, 인스트럭션 매스들간의 호출 관계 및/또는 메서드들간의 호출 관계가 트리 구조와 같은 데이터 구조의 형태로 저장 및 관리될 수 있다. 이러한 호출 관계에 대한 정보는 인수(argument)의 추적이나 호출된 API 등을 검색하기 위해 활용될 수 있다.At this time, each file can be identified in the registered package file, and classes and methods can be identified. In addition, each of the methods may be classified in the form of an instruction mass based on a branch instruction (branch statement), and a call relationship between instruction masses and / or a call relation between methods may be stored in the form of a data structure such as a tree structure And managed. Information about this call relationship can be used to trace arguments, retrieve APIs, and so on.
단계(1630)에서 취약점 정보 탐지부(1530)는 탐지 패턴들 중 적어도 하나의 탐지 패턴에 따라 등록된 패키지 파일을 분석하여 적어도 하나의 탐지 패턴별로 취약점 정보를 탐지할 수 있다. 이러한 취약점 정보의 탐지에 대해서는 앞서 다양한 실시예들을 통해 자세히 설명한 바 있다. 이때, 취약점 정보 탐지부(1530)는 복수의 탐지 패턴을 결합(join)하여 제1 탐지 패턴에 따라 등록된 패키지 파일에서 탐지된 제1 정보를 제2 탐지 패턴이 포함하는 팩터의 파라미터로 동적으로 설정하고, 탐지된 제1 정보가 파라미터로 설정된 팩터를 포함하는 제2 탐지 패턴에 따라 등록된 패키지 파일에서 취약점 정보를 탐지할 수 있다.In step 1630, the vulnerability information detection unit 1530 may analyze the registered package file according to at least one detection pattern among the detection patterns to detect vulnerability information according to at least one detection pattern. Detection of such vulnerability information has been described in detail in various embodiments above. At this time, the vulnerability information detection unit 1530 combines the plurality of detection patterns and dynamically changes the first information detected in the package file registered according to the first detection pattern to a parameter of the factor including the second detection pattern And detect the vulnerability information in the registered package file according to the second detection pattern including the fact that the detected first information is set as a parameter.
탐지 패턴은 등록된 패키지 파일이 포함하는 파일들 중 적어도 하나의 파일로부터 특정 문자열을 검색하는 패턴을 포함할 수 있다. 예를 들어, 앞서 설명한 패턴 1, 패턴 14 및 패턴 16은 파일에서 특정 문자열(또는 스트링)을 검색하는 패턴에 대해 설명하고 있다. 특히 패턴 1은 등록된 패키지 파일이 포함하는 파일들 중 특정 타입의 파일을 지정하기 위한 팩터를 포함함을 설명하였다.The detection pattern may include a pattern for retrieving a specific string from at least one of the files included in the registered package file. For example, Pattern 1, Pattern 14, and Pattern 16 described above describe a pattern for retrieving a specific string (or string) in a file. In particular, Pattern 1 explained that a registered package file includes a factor for designating a specific type of file to be included.
또한, 탐지 패턴은 등록된 패키지 파일이 포함하는 파일들 중 특정 타입의 파일 및 특정 파일 이름의 파일 중 적어도 하나를 검색하기 위한 패턴을 포함할 수 있다. 예를 들어, 앞서 설명한 패턴 2는 지정된 타입의 파일 및/또는 지정된 파일 이름의 파일을 검색하기 위한 패턴에 대해 설명하고 있다.In addition, the detection pattern may include a pattern for searching at least one of a file of a specific type and a file of a specific file name among the files included in the registered package file. For example, pattern 2 described above describes a pattern for searching a file of a specified type and / or a file of a specified filename.
또한, 탐지 패턴은 APK(Android application package)가 포함하는 안드로이드 매니페스트 파일에서 퍼미션(permission)을 검색하기 위한 패턴, 액티비티(activity)를 검색하기 위한 패턴, SDK(Software Development Kit) API(Application Programming Interface) 버전을 검색하기 위한 패턴, 메인 어플리케이션(main application)을 검색하기 위한 패턴, 서비스를 검색하기 위한 패턴, 리시버(receiver)를 검색하기 위한 패턴 및 프로바이더(provider)를 검색하기 위한 패턴 중 적어도 하나의 패턴을 포함할 수 있다. 이러한 패턴들은 패턴 3 내지 패턴 10을 통해 자세히 설명한 바 있다.In addition, the detection pattern includes a pattern for searching for permission in the Android manifest file included in the APK (Android application package), a pattern for searching for activity, an SDK (Application Development Programming) API, At least one of a pattern for searching a version, a pattern for searching a main application, a pattern for searching for a service, a pattern for searching for a receiver, and a pattern for searching for a provider Pattern. &Lt; / RTI &gt; These patterns have been described in detail in Patterns 3 to 10.
또한, 탐지 패턴은 지정된 클래스 및 지정된 메서드 중 적어도 하나에서 호출된 API를 검색하는 패턴을 포함할 수 있다. 이때, 호출된 API를 검색하기 위한 패턴은 클래스 및 메서드 중 적어도 하나를 지정하는 팩터, 지정된 메서드의 인수(argument)를 추적하기 위해 상기 인수의 인덱스 및 타입 중 적어도 하나를 지정하는 팩터 및 지정된 메서드의 인수에 대해 지정된 API, 지정된 필드 및 널(null) 중 적어도 하나로부터 전달된 인수를 탐지하기 위해, API, 필드 및 널(null) 중 적어도 하나를 지정하는 팩터 중 적어도 하나의 팩터를 포함할 수 있다. 이러한 패턴에 대해서는 패턴 11을 통해 자세히 설명한 바 있다.The detection pattern may also include a pattern for retrieving an API called from at least one of a specified class and a specified method. At this time, the pattern for searching the called API includes a factor specifying at least one of a class and a method, a factor specifying at least one of an index and a type of the argument to track an argument of the specified method, A factor specifying at least one of an API, a field, and a null to detect an argument passed from at least one of an API specified for the argument, a specified field, and a null . These patterns are described in detail in Pattern 11.
또한, 탐지 패턴은 지정된 메서드로부터 지정된 인스트럭션을 검색하는 패턴을 포함할 수 있다. 이때, 특정 인스트럭션을 검색하기 위한 패턴은 검색할 인스트럭션을 지정하는 팩터, 검색할 인스트럭션의 타입을 지정하는 팩터 및 검색할 인스트럭션이 호출하는 클래스와 메서드를 지정하는 팩터 중 적어도 하나의 팩터를 포함할 수 있다. 이러한 패턴에 대해서는 패턴 12를 통해 자세히 설명한 바 있다.The detection pattern may also include a pattern that retrieves the specified instruction from the specified method. At this time, the pattern for searching for a specific instruction may include a factor for specifying an instruction to be searched, a factor for specifying a type of an instruction to be searched, and a factor for specifying a class and a method to be searched by the instruction to be searched. have. These patterns are described in detail in Pattern 12.
또한, 탐지 패턴은 지정된 클래스의 자식 클래스를 검색하는 패턴 및/또는 등록된 패키지 파일이 포함하는 파일들 중 적어도 하나의 파일에서 API를 검색하는 패턴을 포함할 수 있다. 이러한 패턴들에 대해서는 패턴 13 및 패턴 15를 통해 자세히 설명한 바 있다.In addition, the detection pattern may include a pattern for searching a child class of a designated class and / or a pattern for searching an API in at least one of the files included in the registered package file. These patterns have been described in detail through Patterns 13 and 15.
이상에서와 같이, 본 발명의 실시예들에 따르면, 어플리케이션의 취약점(vulnerability)을 진단하기 위한 탐색 패턴을 미리 설정하고, 설정된 탐지 패턴에 기반하여 배포를 위해 등록되는 어플리케이션의 패키지 파일에 대한 취약점을 탐지할 수 있다.As described above, according to the embodiments of the present invention, a search pattern for diagnosing the vulnerability of an application is set in advance, and a vulnerability of a package file of an application registered for distribution based on a set detection pattern It can detect.
이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 소프트웨어 구성요소 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, 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 apparatus and components described in the embodiments may be implemented within a computer system, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA) , 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 execution of the software. For ease of understanding, the processing apparatus may be described as being used singly, but those skilled in the art will recognize that the processing apparatus may have a plurality of processing elements and / As shown in FIG. For example, the processing unit may comprise a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as a parallel processor.
소프트웨어는 컴퓨터 프로그램(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 foregoing, and may be configured to configure the processing device to operate as desired or to process it collectively or collectively Device can be commanded. The software and / or data may be in the form of any type of machine, component, physical device, virtual equipment, computer storage media, or device As shown in FIG. The software may be distributed over a networked computer system and stored or executed in a distributed manner. The software and data may be stored on one or more computer readable recording media.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 이러한 기록매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있으며, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to an embodiment may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions to be recorded on the medium may be those specially designed and configured for the embodiments or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media 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 a variety of recording means or storage means in the form of a single or a plurality of hardware combined and is not limited to a medium directly connected to any computer system but may be dispersed on a network. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. For example, it is to be understood that the techniques described may be performed in a different order than the described methods, and / or that components of the described systems, structures, devices, circuits, Lt; / RTI &gt; or equivalents, even if it is replaced or replaced.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

Claims (19)

  1. 어플리케이션의 취약점을 탐지하는 방법에 있어서,In a method for detecting an application vulnerability,
    어플리케이션의 설치 및 구동을 위한 패키지 파일이 포함하는 파일들 및 상기 파일들이 포함하는 코드들 중 적어도 하나와 관련하여, 상기 어플리케이션의 취약점 진단을 위한 기 설정된 탐지 패턴들을 관리하는 단계;Managing predetermined detection patterns for diagnosing a vulnerability of the application with respect to at least one of files included in a package file for installing and running an application and codes included in the files;
    어플리케이션의 설치 및 구동을 위해 이용자들에게 배포하기 위한 패키지 파일을 등록하는 단계; 및Registering a package file for distribution to users for installation and operation of an application; And
    상기 탐지 패턴들 중 적어도 하나의 탐지 패턴에 따라 상기 등록된 패키지 파일을 분석하여 상기 적어도 하나의 탐지 패턴별로 취약점 정보를 탐지하는 단계Analyzing the registered package file according to at least one detection pattern of the detection patterns and detecting the vulnerability information according to the at least one detection pattern
    를 포함하는 것을 특징으로 하는 취약점 탐지 방법.The vulnerability detection method comprising the steps of:
  2. 제1항에 있어서,The method according to claim 1,
    상기 기 설정된 탐지 패턴들을 관리하는 단계는,Wherein the managing of the predetermined detection patterns comprises:
    새로운 탐지 패턴을 등록받거나 또는 등록된 탐지 패턴을 편집하기 위한 에디터 기능을 제공하고, 상기 제공된 에디터 기능을 통해 등록 또는 편집된 탐지 패턴에 대한 정보를 저장 및 관리하는 것을 특징으로 하는 취약점 탐지 방법.An editor function for registering a new detection pattern or editing a registered detection pattern, and storing and managing information about a detection pattern registered or edited through the provided editor function.
  3. 제1항에 있어서,The method according to claim 1,
    상기 적어도 하나의 탐지 패턴별로 취약점 정보를 탐지하는 단계는,The step of detecting vulnerability information for each of the at least one detection pattern comprises:
    복수의 탐지 패턴을 결합(join)하여 제1 탐지 패턴에 따라 상기 등록된 패키지 파일에서 탐지된 제1 정보를 제2 탐지 패턴이 포함하는 팩터의 파라미터로 동적으로 설정하고, 상기 탐지된 제1 정보가 파라미터로 설정된 팩터를 포함하는 상기 제2 탐지 패턴에 따라 상기 등록된 패키지 파일에서 취약점 정보를 탐지하는 것을 특징으로 하는 취약점 탐지 방법.The method comprising: combining a plurality of detection patterns to dynamically set first information detected in the registered package file according to a first detection pattern as a parameter of a factor including a second detection pattern; Detecting vulnerability information in the registered package file according to the second detection pattern including a factor set as a parameter.
  4. 제1항에 있어서,The method according to claim 1,
    상기 탐지 패턴은 상기 등록된 패키지 파일이 포함하는 파일들 중 적어도 하나의 파일로부터 특정 문자열을 검색하는 패턴을 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the detection pattern includes a pattern for searching for a specific character string from at least one file among the files included in the registered package file.
  5. 제4항에 있어서,5. The method of claim 4,
    상기 특정 문자열을 검색하기 위한 패턴은 상기 등록된 패키지 파일이 포함하는 파일들 중 특정 타입의 파일을 지정하기 위한 팩터를 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the pattern for searching the specific character string includes a factor for specifying a specific type of file among the files included in the registered package file.
  6. 제1항에 있어서,The method according to claim 1,
    상기 탐지 패턴은 상기 등록된 패키지 파일이 포함하는 파일들 중 지정된 타입의 파일 및 지정된 파일 이름의 파일 중 적어도 하나를 검색하기 위한 패턴을 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the detection pattern includes a pattern for searching at least one of a file of a specified type and a file of a specified file name among the files included in the registered package file.
  7. 제1항에 있어서,The method according to claim 1,
    상기 탐지 패턴은 APK(Android application package)가 포함하는 안드로이드 매니페스트 파일에서 퍼미션(permission)을 검색하기 위한 패턴, 액티비티(activity)를 검색하기 위한 패턴, SDK(Software Development Kit) API(Application Programming Interface) 버전을 검색하기 위한 패턴, 메인 어플리케이션(main application)을 검색하기 위한 패턴, 서비스를 검색하기 위한 패턴, 리시버(receiver)를 검색하기 위한 패턴 및 프로바이더(provider)를 검색하기 위한 패턴 중 적어도 하나의 패턴을 포함하는 것을 특징으로 하는 취약점 탐지 방법.The detection pattern includes a pattern for searching permission in an Android manifest file included in an APK (Android application package), a pattern for searching for an activity, a SDK (Software Development Kit) API (Application Programming Interface) version At least one of a pattern for searching a main application, a pattern for searching a main application, a pattern for searching for a service, a pattern for searching for a receiver, and a pattern for searching for a provider And detecting a vulnerability of the vulnerability.
  8. 제1항에 있어서,The method according to claim 1,
    상기 탐지 패턴은 지정된 클래스 및 지정된 메서드 중 적어도 하나에서 호출된 API를 검색하는 패턴을 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the detection pattern includes a pattern for searching an API called in at least one of a specified class and a specified method.
  9. 제8항에 있어서,9. The method of claim 8,
    상기 호출된 API를 검색하기 위한 패턴은 클래스 및 메서드 중 적어도 하나를 지정하는 팩터를 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the pattern for searching the called API includes a factor for specifying at least one of a class and a method.
  10. 제8항에 있어서,9. The method of claim 8,
    상기 호출된 API를 검색하기 위한 패턴은 상기 지정된 메서드의 인수(argument)를 추적하기 위해 상기 인수의 인덱스 및 타입 중 적어도 하나를 지정하는 팩터를 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the pattern for searching the called API includes a factor for specifying at least one of an index and a type of the argument in order to track an argument of the specified method.
  11. 제8항에 있어서,9. The method of claim 8,
    상기 호출된 API를 검색하기 위한 패턴은 상기 지정된 메서드의 인수에 대해 지정된 API, 지정된 필드 및 널(null) 중 적어도 하나로부터 전달된 인수를 탐지하기 위해, API, 필드 및 널(null) 중 적어도 하나를 지정하는 팩터를 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the pattern for retrieving the called API includes at least one of an API, a field, and a null to detect an argument passed from at least one of an API specified for the argument of the specified method, The vulnerability detection method comprising the steps of:
  12. 제1항에 있어서,The method according to claim 1,
    상기 탐지 패턴은 지정된 메서드로부터 지정된 인스트럭션을 검색하는 패턴을 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the detection pattern includes a pattern for searching for a specified instruction from a specified method.
  13. 제12항에 있어서,13. The method of claim 12,
    상기 특정 인스트럭션을 검색하기 위한 패턴은 검색할 인스트럭션을 지정하는 팩터, 검색할 인스트럭션의 타입을 지정하는 팩터 및 검색할 인스트럭션이 호출하는 클래스와 메서드를 지정하는 팩터 중 적어도 하나의 팩터를 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the pattern for searching for the specific instruction includes at least one of a factor designating an instruction to be searched, a factor specifying a type of instruction to be searched, a class called by an instruction to be searched, and a factor specifying a method Vulnerability detection method.
  14. 제1항에 있어서,The method according to claim 1,
    상기 탐지 패턴은 지정된 클래스의 자식 클래스를 검색하는 패턴을 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the detection pattern includes a pattern for searching a child class of a designated class.
  15. 제1항에 있어서,The method according to claim 1,
    상기 탐지 패턴은 상기 등록된 패키지 파일이 포함하는 파일들 중 적어도 하나의 파일에서 API를 검색하는 패턴을 포함하는 것을 특징으로 하는 취약점 탐지 방법.Wherein the detection pattern includes a pattern for searching an API in at least one file among the files included in the registered package file.
  16. 제1항 내지 제15항 중 어느 한 항의 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터 판독 가능한 기록매체.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 15.
  17. 어플리케이션의 취약점을 탐지하는 시스템에 있어서,A system for detecting an application vulnerability,
    컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서At least one processor configured to execute computer readable instructions,
    를 포함하고,Lt; / RTI &gt;
    상기 적어도 하나의 프로세서는,Wherein the at least one processor comprises:
    어플리케이션의 설치 및 구동을 위한 패키지 파일이 포함하는 파일들 및 상기 파일들이 포함하는 코드들 중 적어도 하나와 관련하여, 상기 어플리케이션의 취약점 진단을 위한 기 설정된 탐지 패턴들을 관리하고,Managing preset detection patterns for diagnosing a vulnerability of the application in association with at least one of files included in a package file for installing and running an application and codes included in the files,
    어플리케이션의 설치 및 구동을 위해 이용자들에게 배포하기 위한 패키지 파일을 등록하고,A package file to be distributed to users is registered for installing and running the application,
    상기 탐지 패턴들 중 적어도 하나의 탐지 패턴에 따라 상기 등록된 패키지 파일을 분석하여 상기 적어도 하나의 탐지 패턴별로 취약점 정보를 탐지하는 것And analyzing the registered package file according to at least one detection pattern of the detection patterns to detect vulnerability information for each of the at least one detection pattern
    을 특징으로 하는 취약점 탐지 시스템.A vulnerability detection system.
  18. 제17항에 있어서,18. The method of claim 17,
    상기 적어도 하나의 프로세서는, 상기 기 설정된 탐지 패턴들을 관리하기 위해,Wherein the at least one processor is further configured to:
    새로운 탐지 패턴을 등록받거나 또는 등록된 탐지 패턴을 편집하기 위한 에디터 기능을 제공하고, 상기 제공된 에디터 기능을 통해 등록 또는 편집된 탐지 패턴에 대한 정보를 저장 및 관리하는 것Providing an editor function for registering a new detection pattern or editing a registered detection pattern, and storing and managing information about a detection pattern registered or edited through the provided editor function
    을 특징으로 하는 취약점 탐지 시스템.A vulnerability detection system.
  19. 제17항에 있어서,18. The method of claim 17,
    상기 적어도 하나의 프로세서는, 상기 적어도 하나의 탐지 패턴별로 취약점 정보를 탐지하기 위해,Wherein the at least one processor is configured to detect vulnerability information for each of the at least one detection pattern,
    복수의 탐지 패턴을 결합(join)하여 제1 탐지 패턴에 따라 상기 등록된 패키지 파일에서 탐지된 제1 정보를 제2 탐지 패턴이 포함하는 팩터의 파라미터로 동적으로 설정하고, 상기 탐지된 제1 정보가 파라미터로 설정된 팩터를 포함하는 상기 제2 탐지 패턴에 따라 상기 등록된 패키지 파일에서 취약점 정보를 탐지하는 것The method comprising: combining a plurality of detection patterns to dynamically set first information detected in the registered package file according to a first detection pattern as a parameter of a factor including a second detection pattern; Detecting vulnerability information in the registered package file according to the second detection pattern including a factor set as a parameter
    을 특징으로 하는 취약점 탐지 시스템.A vulnerability detection system.
PCT/KR2017/006913 2017-06-29 2017-06-29 Application vulnerability detection method and system WO2019004503A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/KR2017/006913 WO2019004503A1 (en) 2017-06-29 2017-06-29 Application vulnerability detection method and system
JP2019569960A JP2020531936A (en) 2017-06-29 2017-06-29 How and systems to detect application vulnerabilities

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/KR2017/006913 WO2019004503A1 (en) 2017-06-29 2017-06-29 Application vulnerability detection method and system

Publications (1)

Publication Number Publication Date
WO2019004503A1 true WO2019004503A1 (en) 2019-01-03

Family

ID=64741748

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/006913 WO2019004503A1 (en) 2017-06-29 2017-06-29 Application vulnerability detection method and system

Country Status (2)

Country Link
JP (1) JP2020531936A (en)
WO (1) WO2019004503A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632553A (en) * 2019-10-09 2021-04-09 Oppo(重庆)智能科技有限公司 Vulnerability processing method and related product
CN112765611A (en) * 2021-01-19 2021-05-07 上海微盟企业发展有限公司 Unauthorized vulnerability detection method, device, equipment and storage medium
US11356470B2 (en) * 2019-12-19 2022-06-07 Group IB TDS, Ltd Method and system for determining network vulnerabilities

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101324691B1 (en) * 2011-12-08 2013-11-04 한국인터넷진흥원 System and method for detecting malicious mobile applications
KR101402057B1 (en) * 2012-09-19 2014-06-03 주식회사 이스트시큐리티 Analyzing system of repackage application through calculation of risk and method thereof
JP5654944B2 (en) * 2011-05-02 2015-01-14 Kddi株式会社 Application analysis apparatus and program
KR20150044490A (en) * 2013-10-16 2015-04-27 (주)이스트소프트 A detecting device for android malignant application and a detecting method therefor
KR20160099159A (en) * 2015-02-11 2016-08-22 한국전자통신연구원 Electronic system and method for detecting malicious code

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5077455B2 (en) * 2011-03-07 2012-11-21 富士通株式会社 Vulnerability audit program, vulnerability audit device, vulnerability audit method
JP5651065B2 (en) * 2011-04-08 2015-01-07 Kddi株式会社 Application evaluation apparatus and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5654944B2 (en) * 2011-05-02 2015-01-14 Kddi株式会社 Application analysis apparatus and program
KR101324691B1 (en) * 2011-12-08 2013-11-04 한국인터넷진흥원 System and method for detecting malicious mobile applications
KR101402057B1 (en) * 2012-09-19 2014-06-03 주식회사 이스트시큐리티 Analyzing system of repackage application through calculation of risk and method thereof
KR20150044490A (en) * 2013-10-16 2015-04-27 (주)이스트소프트 A detecting device for android malignant application and a detecting method therefor
KR20160099159A (en) * 2015-02-11 2016-08-22 한국전자통신연구원 Electronic system and method for detecting malicious code

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632553A (en) * 2019-10-09 2021-04-09 Oppo(重庆)智能科技有限公司 Vulnerability processing method and related product
US11356470B2 (en) * 2019-12-19 2022-06-07 Group IB TDS, Ltd Method and system for determining network vulnerabilities
CN112765611A (en) * 2021-01-19 2021-05-07 上海微盟企业发展有限公司 Unauthorized vulnerability detection method, device, equipment and storage medium

Also Published As

Publication number Publication date
JP2020531936A (en) 2020-11-05

Similar Documents

Publication Publication Date Title
WO2018159997A1 (en) Method and apparatus for performing test by using test case
WO2011122724A1 (en) Code inspection executing system for performing a code inspection of abap source codes
WO2010062063A2 (en) Method and system for preventing browser-based abuse
WO2019004503A1 (en) Application vulnerability detection method and system
WO2020233077A1 (en) System service monitoring method, device, and apparatus, and storage medium
WO2017213400A1 (en) Malware detection by exploiting malware re-composition variations
WO2017213304A1 (en) Integrated vessel data system and vessel comprising same
CA3002605C (en) System and methods for detecting domain generation algorithm (dga) malware
WO2022114689A1 (en) Method and device for image-based malware detection, and artificial intelligence-based endpoint detection and response system using same
WO2010087635A2 (en) Method and apparatus for processing user interface composed of component objects
WO2017126786A1 (en) Electronic device for analyzing malicious code and method therefor
EP3241102A1 (en) Electronic system with access management mechanism and method of operation thereof
WO2017052053A1 (en) Apparatus and method for protecting information in communication system
WO2019054613A1 (en) Method and system for identifying open source software package on basis of binary file
WO2018194196A1 (en) Method and system for detecting application of obfuscation to and evaluating security of elf file
WO2023171887A1 (en) Apparatus and method for activating invisible sealing-type nft image transaction
WO2020022819A1 (en) Communication via simulated user
WO2018188342A1 (en) Method, apparatus and device for generating script file, and computer-readable storage medium
WO2022108318A1 (en) Apparatus and method for analyzing smart contract code vulnerabilities
WO2018080272A1 (en) Method, server, system and computer program for providing real-time personalised information to game user
WO2018199366A1 (en) Method and system for detecting whether obfuscation has been applied to dex file and evaluating security
WO2017094967A1 (en) Natural language processing schema and method and system for establishing knowledge database therefor
WO2023017931A1 (en) Cyber threat information processing device, cyber threat information processing method, and storage medium storing cyber threat information processing program
WO2018043861A1 (en) Device for recommending rental item by means of user&#39;s schedule and method using same
WO2014168453A1 (en) Apparatus, user terminal and method for checking message

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019569960

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17915886

Country of ref document: EP

Kind code of ref document: A1