WO2018194196A1 - Method and system for detecting application of obfuscation to and evaluating security of elf file - Google Patents

Method and system for detecting application of obfuscation to and evaluating security of elf file Download PDF

Info

Publication number
WO2018194196A1
WO2018194196A1 PCT/KR2017/004236 KR2017004236W WO2018194196A1 WO 2018194196 A1 WO2018194196 A1 WO 2018194196A1 KR 2017004236 W KR2017004236 W KR 2017004236W WO 2018194196 A1 WO2018194196 A1 WO 2018194196A1
Authority
WO
WIPO (PCT)
Prior art keywords
obfuscation
section
header
code
elf
Prior art date
Application number
PCT/KR2017/004236
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/004236 priority Critical patent/WO2018194196A1/en
Priority to JP2018080912A priority patent/JP7131946B2/en
Priority to US15/958,115 priority patent/US10963563B2/en
Publication of WO2018194196A1 publication Critical patent/WO2018194196A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities

Definitions

  • the following description relates to a method and system for detecting and evaluating the application of obfuscation of an ELF file and to a computer program stored in a computer readable recording medium in combination with a computer for executing the security evaluation method on a computer. .
  • the App store is an online content marketplace that sells various applications that can be mounted on a terminal such as a smartphone.
  • a terminal such as a smartphone.
  • the developer of an application registers a file (for example, an Android Application Package (Apk)) for installing a developed application on a terminal in an app store, and users of the application are required through the app store.
  • By downloading a file for the application it is possible to install and run the application on their terminal.
  • various game applications such as game publishers are distributed to users.
  • the first risk of an application is that the application contains information developed by malicious intentions, such as malicious code, to perform malicious functions on the terminal of the application publisher or the user on which the application is installed and run.
  • Korean Patent Laid-Open No. 10-2014-0098025 relates to a system and method for security evaluation of an application uploaded to an app store, and when an application to be registered in an app store detects a malicious function, the application Disclosed is a technique for rejecting entry into an app store.
  • the second risk of an application is the risk to the security of the application itself.
  • the application performs a function other than the function originally intended by the developer, thereby reducing the reliability of the service to be provided through the application. This exists. Therefore, there is a need for application publishers to provide a certain level of security for applications in distributing various applications (installation files of applications) that they did not develop directly.
  • each application may be equipped with security solutions of different security levels and may not include any security measures.
  • security solutions of different security levels and may not include any security measures.
  • security levels provided by the security solutions mounted in each application.
  • Java-level vulnerability check can be performed at the programming language level (for example, Android Application Package (Apk)), and from the application publisher's point of view, each of the numerous registered applications There is a problem that it is difficult to provide security that is maintained above a certain level.
  • programming language level for example, Android Application Package (Apk)
  • the level of security applied to the registered application is analyzed and identified in an objective manner in terms of obfuscation, vulnerability, and / or security solution, and the analyzed information is provided to provide security for the application. It provides a method and system for evaluating security that can be used to improve gender.
  • a method of evaluating security of an application comprising: registering a package file for installing and running an application; Identifying an executable and linkable format (ELF) file included in the registered package file; Determining whether to apply obfuscation to at least one of an ELF header, a section header, a section, and a segment included in the ELF file; And determining a security grade of the ELF file based on whether the obfuscation is applied.
  • ELF executable and linkable format
  • a computer program for recording a computer program for executing the security evaluation method is provided.
  • a computer program stored in a computer readable recording medium for executing the security evaluation method in a computer in combination with a computer is provided.
  • a system for evaluating the security of an application comprising: at least one processor implemented to execute computer readable instructions, the at least one processor registering a package file for installation and running of the application, Identify an executable and linkable format (ELF) file included in a registered package file, determine whether to apply obfuscation to at least one of an ELF header, a section header, a section, and a segment included in the ELF file.
  • ELF executable and linkable format
  • the level of security applied to the registered application is analyzed and identified in an objective manner in terms of obfuscation, vulnerability, and / or security solution, and the analyzed information is provided to provide security for the application. Can be used to improve sex.
  • FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention.
  • FIG. 3 is a block diagram of a security evaluation system according to an embodiment of the present invention.
  • 4 and 5 illustrate a first example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to an embodiment of the present invention.
  • FIG. 6 is a diagram illustrating a second example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to one embodiment of the present invention.
  • FIG. 7 illustrates a third example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to an embodiment of the present invention.
  • FIG. 8 illustrates an example of detecting obfuscation of an ELF header of an ELF file according to an embodiment of the present invention.
  • FIG. 9 is a diagram for one example of determining whether to apply obfuscation to a header of a section including executable code according to an embodiment of the present invention.
  • FIG. 10 illustrates an example of detecting obfuscation of a code according to an embodiment of the present invention.
  • FIG. 11 illustrates an example of code conformance according to an embodiment of the present invention.
  • FIG. 12 is a diagram for one example of determining whether to apply obfuscation to a code based on information on a branch position according to an embodiment of the present invention.
  • FIG. 13 is a diagram for one example of adding a dummy code to source code according to one embodiment of the present invention.
  • FIG. 14 is a block diagram illustrating an example of components that may be included in a processor of a server according to an embodiment of the present invention.
  • 15 is a flowchart illustrating an example of a security evaluation method that can be performed by a server according to an embodiment of the present invention.
  • 16 is a flowchart illustrating a method of determining whether obfuscation is applied to an ELF header according to an embodiment of the present invention.
  • 17 is a flowchart illustrating a method of determining whether obfuscation is applied to a header of a dynamic linking symbol table section (.dynsym section) according to an embodiment of the present invention.
  • FIG. 18 is a flowchart illustrating a method of determining whether obfuscation is applied to a header of a section including executable code according to an embodiment of the present invention.
  • 19 is a flowchart illustrating a method of determining whether obfuscation is applied to a dynamic linking symbol table section according to an embodiment of the present invention.
  • 20 is a flowchart illustrating a method of determining whether to apply obfuscation to a read-only section according to an embodiment of the present invention.
  • 21 is a flowchart illustrating a first example of a method of determining whether obfuscation is applied to a code according to an embodiment of the present invention.
  • 22 is a flowchart illustrating a second example of a method of determining whether obfuscation is applied to a code according to an embodiment of the present invention.
  • 23 is a flowchart illustrating a third example of a method of determining whether obfuscation is applied to a code according to an embodiment of the present invention.
  • 24 is a flowchart illustrating a method of analyzing an instruction to determine whether obfuscation is applied to a code according to an embodiment of the present invention.
  • the security evaluation system may be implemented through a server to be described later, and the security evaluation method according to the embodiments of the present invention may be performed through the server described above.
  • a computer program according to an embodiment of the present invention may be installed and run on a server, and the server may perform a security evaluation method according to an embodiment of the present invention under control of the driven computer program.
  • the computer program described above may be stored in a computer-readable recording medium in combination with a computer-implemented server to execute a security evaluation method on a computer.
  • FIG. 1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention.
  • the network environment of FIG. 1 illustrates an example including a plurality of electronic devices 110, 120, 130, and 140, a plurality of servers 150 and 160, and a network 170.
  • 1 is an example for describing the present invention, and the number of electronic devices or the number of servers is not limited as shown in FIG. 1.
  • the plurality of electronic devices 110, 120, 130, and 140 may be fixed terminals or mobile terminals implemented as computer devices.
  • Examples of the plurality of electronic devices 110, 120, 130, and 140 include a smart phone, a mobile phone, a navigation device, a computer, a notebook computer, a digital broadcasting terminal, a personal digital assistant (PDA), and a portable multimedia player (PMP). Tablet PC).
  • FIG. 1 illustrates the shape of a smart phone as an example of the electronic device 1 110, in the embodiments of the present invention, the electronic device 1 110 may use a wireless or wired communication method to substantially connect the network 170. It may mean one of various physical devices that can communicate with other electronic devices 120, 130, 140 and / or servers 150, 160.
  • the communication method is not limited, and may include not only a communication method using a communication network (for example, a mobile communication network, a wired internet, a wireless internet, a broadcasting network) that the network 170 may include, but also a short range wireless communication between devices.
  • the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). And one or more of networks such as the Internet.
  • the network 170 may also include any one or more of network topologies, including bus networks, star networks, ring networks, mesh networks, star-bus networks, trees, or hierarchical networks, but It is not limited.
  • Each of the servers 150 and 160 communicates with the plurality of electronic devices 110, 120, 130, and 140 through the network 170 to provide a command, code, file, content, service, or the like. It may be implemented in devices.
  • the server 150 may be a system that provides a first service to a plurality of electronic devices 110, 120, 130, and 140 connected through the network 170, and the server 160 may also have a network ( It may be a system that provides a second service to the plurality of electronic devices 110, 120, 130, and 140 connected through the 170.
  • the server 150 may be at least some of the devices constituting the system of the application publisher, and receives a package file of an application installed and operated on the plurality of electronic devices 110, 120, 130, and 140.
  • the service to be distributed can be provided as the first service.
  • the server 160 may provide a service associated with the application as the second service to a plurality of electronic devices 110, 120, 130, and 140 that install and run the application through the distributed package file.
  • the server 150 may be implemented as a dedicated system for evaluating the security of a package file to be registered to provide information about the evaluated security for the package file to be registered.
  • 2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention. 2 illustrates an internal configuration of the electronic device 1 110 and the server 150 as an example of the electronic device. In addition, the other electronic devices 120, 130, 140, or the server 160 may also have the same or similar internal configuration as the aforementioned electronic device 1 110 or the server 150.
  • the electronic device 1 110 and the server 150 may include memories 211 and 221, processors 212 and 222, communication modules 213 and 223, and input / output interfaces 214 and 224.
  • the memories 211 and 221 may be computer-readable recording media, and may include a permanent mass storage device such as random access memory (RAM), read only memory (ROM), and a disk drive.
  • RAM random access memory
  • ROM read only memory
  • the non-volatile mass storage device such as a ROM and a disk drive may be included in the electronic device 1 110 or the server 150 as a separate permanent storage device that is separated from the memories 211 and 221.
  • the memory 211, 221 includes an operating system and at least one program code (for example, a browser installed and driven in the electronic device 1 110 or an application installed in the electronic device 1 110 to provide a specific service). Code) can be stored.
  • These software components may be loaded from a computer readable recording medium separate from the memories 211 and 221.
  • Such a separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, disk, tape, DVD / CD-ROM drive, memory card, and the like.
  • software components may be loaded into the memory 211, 221 through a communication module 213, 223 that is not a computer readable recording medium.
  • At least one program is a computer program that is installed by files provided by a file distribution system (for example, the server 160 described above) through the network 170 to distribute installation files of developers or applications. It may be loaded into the memories 211 and 221 based on (for example, the above-described application).
  • a file distribution system for example, the server 160 described above
  • the network 170 to distribute installation files of developers or applications. It may be loaded into the memories 211 and 221 based on (for example, the above-described application).
  • Processors 212 and 222 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations. Instructions may be provided to the processors 212, 222 by the memory 211, 221 or the communication modules 213, 223. For example, the processors 212 and 222 may be configured to execute a command received according to a program code stored in a recording device such as the memory 211 and 221.
  • the communication modules 213 and 223 may provide a function for the electronic device 1 110 and the server 150 to communicate with each other through the network 170, and the electronic device 1 110 and / or the server 150 may communicate with each other. May provide a function for communicating with another electronic device (eg, electronic device 2 120) or another server (eg, server 160). For example, a request generated by the processor 212 of the electronic device 1 110 according to a program code stored in a recording device such as the memory 211 may be controlled by the server 170 through the network 170 under the control of the communication module 213. 150).
  • control signals, commands, contents, files, and the like provided according to the control of the processor 222 of the server 150 are transmitted to the communication module of the electronic device 1 110 via the communication module 223 and the network 170 ( It may be received by the electronic device 1110 through 213.
  • the control signal, command, content, file, etc. of the server 150 received through the communication module 213 may be transmitted to the processor 212 or the memory 211, and the content, file, etc. may be transferred to the electronic device 1.
  • 110 may be stored as a storage medium (permanent storage described above) that may further include.
  • the input / output interface 214 may be a means for interfacing with the input / output device 215.
  • the input device may include a device such as a keyboard or a mouse, and the output device may include a device such as a display or a speaker.
  • the input / output interface 214 may be a means for interfacing with a device in which functions for input and output are integrated into one, such as a touch screen.
  • the input / output device 215 may be configured as one device with the electronic device 1110.
  • the input / output interface 224 of the server 150 may be a means for interfacing with an apparatus (not shown) for input or output that may be connected to or included in the server 150.
  • the processor 212 of the electronic device 1110 uses data provided by the server 150 or the electronic device 2 120 in processing a command of a computer program loaded in the memory 211.
  • the service screen or the content may be displayed on the display through the input / output interface 214.
  • the electronic device 1 110 and the server 150 may include more components than those of FIG. 2. However, it is not necessary to clearly show most of the prior art components.
  • the electronic device 1 110 may be implemented to include at least some of the above-described input / output devices 215 or other components such as a transceiver, a global positioning system (GPS) module, a camera, various sensors, a database, and the like. It may further include elements.
  • GPS global positioning system
  • an acceleration sensor when the electronic device 1 110 is a smartphone, an acceleration sensor, a gyro sensor, a camera module, various physical buttons, a button using a touch panel, an input / output port, and vibration for a smartphone generally include Various components such as a vibrator may be implemented to be further included in the electronic device 1 110.
  • FIG. 3 is a block diagram of a security evaluation system according to an embodiment of the present invention.
  • the security evaluation system 300 of FIG. 3 may be implemented through the server 150 described above.
  • the server 150 includes the package decomposition module 310, the file identification module 320, the parsing module 330, the analysis module 340, and the report module 350 included in the security evaluation system 300. May be representations of the different functions of the processor 222.
  • the package disassembly module 310 may be used as a function of the processor 222 in which the processor 222 of the server 150 disassembles a package file according to a control command included in a computer program.
  • the vulnerability detection module 342 included in the analysis module 340 may be implemented as a core module for vulnerability detection.
  • the server 150 may provide a service for distributing package files of applications registered by developers to users.
  • the package disassembly module 310 may disassemble the registered package files.
  • an Android application package (Apk) is a file format of a package file used for distributing software and middleware of Android, which is a mobile operating system, and has a '.apk' extension.
  • APK Android application package
  • embodiments of the present invention will be described based on a package file such as an APK, but it will be readily understood by those skilled in the art that the same or similar features may be applied to other kinds of package files through this description. .
  • the file identification module 320 may identify files included in the disassembled package file.
  • the extensions shown in Figure 3 ('dex', 'so', 'dll', 'json', 'ini', 'apk', 'xml', 'cert') as described previously, It will be readily understood by those skilled in the art.
  • the parsing module 330 may parse the identified files.
  • the parser 331 may parse files of a specific extension (eg, 'dex', 'so', 'dll') among the identified files, and the collector 332 may parse a specific extension (eg, You can collect the necessary information from the files of 'json', 'ini', 'apk', 'xml', and 'cert').
  • the parsing module 330 may identify each of the classes and methods included in the 'dex' file, and track a number of masses by instructing the instructions contained in the method. Can be identified by separating. The mass of instructions can be divided based on branch instructions such as the 'goto' statement, the 'switch' statement, or the 'if' statement.
  • the parsing module 330 may generate and manage information on call relationships between these instruction masses. For example, the call relations between the instruction masses may be managed in a tree structure, and the information on the call relations may include information on a method called by a specific instruction mass. The generation and management of such information may be processed for each of files included in a package file such as an APK file, and the parsing method may vary according to the characteristics of the file.
  • the parsed information and the collected information may be passed to the analysis module 340.
  • the analysis module 340 obfuscates a corresponding package file (or an application installed and driven in a user terminal such as the electronic device 1 110 through the package file) based on the information transmitted from the parsing module 330. It can generate and provide analysis information from an obfuscation point of view, a vulnerability point of view, and a security solution point of view.
  • the obfuscation detection module 341 may generate analysis information on the level of obfuscation applied to files of a specific extension (eg, 'dex', 'so', 'dll'). Can be. To this end, the obfuscation detection module 341 may determine whether obfuscation is applied for each preset item according to the type of file.
  • a specific extension eg, 'dex', 'so', 'dll'.
  • the vulnerability detection module 342 generates analysis information on whether there are any vulnerabilities in files of a specific extension (for example, 'dex', 'so', or 'config' which is a configuration file extension). can do.
  • the security evaluation system 300 may manage information about known vulnerabilities, and the vulnerability detection module 342 uses information about these vulnerabilities to determine which vulnerabilities exist in which files. Analyze information can be generated.
  • the platform detection module 343 may extract information about the platform on which the corresponding application is developed and / or the platform on which the corresponding application operates.
  • the security evaluation system 300 may use different analysis methods depending on which platform the application is developed on, for example, a development tool such as Unity or Cocos.
  • the security evaluation system 300 may use a different analysis method for each platform because the file format included in the package file may vary for each platform on which the application operates.
  • the security evaluation system 300 may extract information about the platform for the package file, and may analyze the package file or provide information about the extracted platform to the outside based on such information.
  • the security tool detection module 344 can detect the security solution that the developer of the package file has inserted into the package file. For example, a first security tool provided in a library form by a third party may be added to a corresponding package file by a developer. As another example, a second security tool developed by the developer may be added to the package file by the developer. In other words, the security tool detection module 344 may generate analysis information about whether the security tool is applied to the package file.
  • the relationship analysis module 345 may generate analysis information about a reference relationship between files included in the package file. For example, when the first file includes code for calling the second file, the analysis information may be generated such that the information about the reference relationship between the first file and the second file is included in the analysis information.
  • the report module 350 collects the analysis information generated by the analysis module 340 and provides a report for the person of the security evaluation system 300 (for example, an administrator of the server 150 or a security inspection team of an application publisher). Can be generated. Such a report may be provided to terminals of related parties using Hypertext Markup Language (HTML) or eXtensible Markup Language (XML) as in the example of FIG. 3.
  • HTML Hypertext Markup Language
  • XML eXtensible Markup Language
  • the Executable and Linkable Format (ELF), which will be described later, is a standard file format for executable files, object files, shared libraries, and core dumps.
  • Obfuscation for such ELF files can be broadly classified into header obfuscation and code obfuscation.
  • 4 and 5 illustrate a first example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to an embodiment of the present invention.
  • FIG. 4 illustrates a section header table 410 included in an ELF file and a header 411 of a dynamic linking symbol table section (.dynsym section) included in the section header table 410.
  • 4 further shows a symbol entry table 420 of the dynamic linking symbol table section (.dynsym section) included in the ELF file, and the symbol entry table in the header 411 of the dynamic linking symbol table section. 420 is indicated.
  • the symbol entry table 420 may be a table listing names and addresses of an import function and an export function.
  • the section header table 410 defines information such as a name, a memory, a start address, a file offset, a size, a sorting method, and a presentation method for each section included in the ELF file.
  • the sections include a dynamic linking information section (.dynamic section), a read-only data section (.rodata section or a .rdata section), and a section (.init section or .init_array section) containing code to be used at process initialization. It contains various sections such as) and is well known.
  • information about a .dynsym section may be defined via the header of the .dynsym section in the section header table 410, where the header of the .dynsym section may contain at least some of these defined values (e.g., the .dynsym section You can point to the .dynsym section by its starting address, file offset and size).
  • FIG. 5 illustrates an example of obfuscating values defined in the header 411 of the dynamic linking symbol table section of FIG. 4, and replacing the defined values with nulls 510.
  • the header 411 of the dynamic linking symbol table section cannot point to the symbol entry table 420, so that the section header of the ELF file may be obfuscated.
  • the values defined in the header 411 of the dynamic linking symbol table section may be obfuscated by changing to null 510 or other information to obfuscate the symbols used in the ELF file.
  • the security evaluation system 300 may detect obfuscation of the section header by analyzing values defined in the header 411 of the dynamic linking symbol table section.
  • the security assessment system 300 may include a first condition in which the header 411 of the dynamic linking symbol table section includes a null 510, and the header 411 of the dynamic linking symbol table section is parsed. If the condition of any one of the second condition that is impossible and the information contained in the header 411 of the dynamic linking symbol table section is not present in the dynamic linking information section (.dynamic section) among the sections is satisfied, It can be determined that obfuscation is applied to the header.
  • the first condition may refer to a condition in which a value defined in the header 411 of the dynamic linking symbol table section is replaced with a null 510.
  • the header 411 of the dynamic linking symbol table section has a predefined structure, and there is an existing scheme for parsing the header 411 of the dynamic linking symbol table section according to the predefined structure.
  • the second condition may mean a condition in which the header 411 of the dynamic linking symbol table section is attempted to be parsed through such a conventional parsing scheme, and the header 411 of the dynamic linking symbol table section is not normally parsed. .
  • the security evaluation system 300 cannot parse the header 411 of the dynamic linking symbol table section, and thus the second condition is satisfied. can confirm.
  • the security evaluation system 300 checks whether the information included in the header 411 of the dynamic linking symbol table section exists in the dynamic linking information section (.dynamic section), and if it does not exist, It can be confirmed that the value included in the header 411 has been changed. In other words, the security evaluation system 300 may confirm that the third condition is satisfied.
  • the security evaluation system 300 may determine that obfuscation is applied to the header 411 of the dynamic linking symbol table section.
  • FIG. 6 is a diagram illustrating a second example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to one embodiment of the present invention.
  • the name of the import function 610 and the name of the export function 620 are nulled. null) shows an example.
  • the security assessment system 300 finds the symbol entry table 420 pointed to by the header 411 of the dynamic linking symbol table section and analyzes the values of the import and export functions to analyze the dynamic linking symbol table section. It can be determined whether or not obfuscation is applied. For example, the security assessment system 300 may determine a section (dynamic linking) if the values of the import and export functions contain nulls or are not represented in American Standard Code for Information Interchange (ASCII) code. It can be determined that obfuscation is applied to the symbol table section).
  • ASCII American Standard Code for Information Interchange
  • FIG. 7 illustrates a third example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to an embodiment of the present invention.
  • ELF files can contain read-only sections (.rdata section 710 or .rodata sections), and the section header table 410 contains headers for these read-only sections. (.rdata section header 720 or .rodata section header).
  • Obfuscation for such a read-only section may be achieved by encrypting or encoding the texts contained in the read-only section. Therefore, the security evaluation system 300 obfuscates the read-only section by checking the read-only section through the header for the read-only section and analyzing the read-only values included in the identified read-only section. Can be detected.
  • the security assessment system 300 identifies the .rdata section header 720 in the section header table 410 of the ELF file, and the identified .rdata section header 720 is pointing. Find the .rdata section 730 to analyze the values contained in the .rdata section 730.
  • the .rdata section 730 may be a section that obfuscates the texts included in the .rdata section 710, and the security evaluation system 300 determines that values included in the .rdata section 730 are null. ), Or not represented in ASCII code, it can be seen that obfuscation is applied to the .rdata section 730, unlike the .rdata section 710.
  • the first ELF header 810 is an unobfuscated header and shows an example including information such as the size of the section header 811, the number of section headers 812, and the size of the section 813.
  • the second ELF header 820 is a header to which obfuscation is applied, and shows an example in which original values are changed to manipulated values 821.
  • the security evaluation system 300 may determine whether to apply obfuscation to the ELF header by detecting an abnormal value of the ELF header.
  • normal values of the ELF header may have a range of values, but may be out of this range when obfuscation is applied.
  • the security assessment system 300 may set a range of normal values for at least one item of the size of the section header included in the ELF header, the number of section headers, and the size of the section, and in the ELF header, the at least A value of one item may be extracted, and if the extracted value is out of a set range of normal values, it may be determined that obfuscation is applied to the ELF header.
  • values extracted from the first ELF header 810 will be included in the range of normal values, and values extracted from the second ELF header 820 will be out of the range of normal values. .
  • the security evaluation system 300 may detect that obfuscation is applied to the ELF header.
  • FIG. 9 is a diagram for one example of determining whether to apply obfuscation to a header of a section including executable code according to an embodiment of the present invention.
  • the section header table 410 described above may include a header of a section (.text section) including executable code.
  • the header 910 of the normal .text section may include a size 911 of the executable code, and the size of the executable code 911 included in the header 910 of the normal .text section as one of the obfuscation schemes. There is a way to manipulate.
  • FIG. 9 illustrates an example in which the obfuscation is applied to the header 910 of the normal .text section, and the header 920 of the obfuscated .text section including the manipulated value 921.
  • the security evaluation system 300 exports an export symbol entry (Export function of FIG. 9) from the symbol entry table 420 included in the dynamic linking symbol table section (.dynsym section). Function)) can be used to collect the address of functions.
  • the security evaluation system 300 may repeatedly collect the addresses of the functions through the addresses of these export functions, and calculate the size of the executable code using the collected addresses.
  • the security evaluation system 300 may extract the size of the executable code 911 from the header 910 of the normal .text section, and extract the size of the extracted executable code 911 and the calculated size of the executable code. By comparing, it may be determined that obfuscation has not been applied to the header 910 of the normal .text section.
  • the manipulated value 921 is extracted from the obfuscated .text section header 920, as in the embodiment of FIG. 9, the manipulated value 921 is the size of the original executable code 911. Since it is different from the calculated execution code size, the security evaluation system 300 may detect that the obfuscation is applied to the header 920 of the obfuscated .text section. .
  • FIG. 10 illustrates an example of detecting obfuscation of a code according to an embodiment of the present invention.
  • the section header table 410 may include a header of a section (.init section and / or .init_array section) that contains code for process initialization.
  • 10 shows a header 1010 of the .init section and a header 1020 of the .init_array section, respectively.
  • 10 also shows a segment 1030. Segment 1030 is created as the linker merges the sections that the ELF file contains.
  • the header 1010 of the .init section and / or the header 1020 of the .init_array section are executed first at run time so that the segment 1030 ) May be implemented to execute codes of a code segment 1031.
  • the code segment 1031 may have a read-write-execute (RWE) right
  • the data segment 1032 may have a read-write (RW) right.
  • RWE read-write-execute
  • This code segment 1031 contains actual executable code for driving an application. However, when obfuscation is performed on executable codes (for example, when at least some of the executable code is encrypted), and when the codes of the code segment 1031 are executed in a normal manner, the executable code is executed normally due to the encrypted code. Can't.
  • a new segment having read-write-execute (RWE) rights is added to restore the obfuscated code.
  • 10 illustrates an example in which an instruction for restoring obfuscated code is added to an added segment 1033.
  • the header 1010 of the .init section and / or the header 1020 of the .init_array section that are executed first at runtime may be changed to point to the added segment 1033 instead of the code segment 1031.
  • security assessment system 300 may detect the presence of added segment 1033. In this case, the security evaluation system 300 may determine that obfuscation is applied to the code segment 1031 when an added segment 1033 having a read-write-execute (RWE) right exists. have.
  • RWE read-write-execute
  • the security assessment system 300 may detect whether there is a pointing to the segment 1033 added to the header 1010 of the .init section and / or the header 1020 of the .init_array section. . At this time, the security evaluation system 300 obfuscates the code segment 1031 when there is a pointing to the segment 1033 added to the header 1010 of the .init section and / or the header 1020 of the .init_array section. You can decide that the paint is applied.
  • security assessment system 300 analyzes (eg, disassembles) the added segment 1032 to restore obfuscated code contained in code segment 1031 (eg, encrypted). When the code for decoding the code is present in the added segment 1033, it may be determined that obfuscation is applied to the code segment 1031.
  • the security evaluation system 300 may detect whether the code is obfuscated by analyzing the code itself.
  • FIG. 11 illustrates an example of code conformance according to an embodiment of the present invention.
  • the security evaluation system 300 may export an export symbol entry (the export function of FIG. 9) from a symbol entry table 420 included in a dynamic linking symbol table section (.dynsym section). Function)) can be used to collect the address of functions.
  • the security evaluation system 300 may analyze the instructions included in each function through the collected address.
  • the instructions Push and Pop are the most commonly used instructions in assembly language, and push a and b 1110 are instructions for storing the values of operands a and b in a stack (register).
  • Pop a, b (1120) is an instruction for the operation of taking out the value of the top of the stack and storing it in the operands a, b.
  • the security evaluation system 300 may analyze whether the code is pushed by searching whether the value of the pushed register is Pop. If the value of the pushed register is not Pop, it may be determined that obfuscation is applied to at least some code.
  • Such matching is required between a pair of instructions stmfd and ldmfd and a pair of instructions stmdb and pop.w.
  • the security evaluation system 300 may further analyze the consistency of such pairs of instructions stmfd and ldmfd and pairs of instructions stmdb and pop.w, and if there is no consistency between the instructions, at least some of the code may be obfuscated. You can judge.
  • the security evaluation system 300 may determine whether to apply obfuscation to at least some of the codes depending on the existence of an operation code (opcode) combination that does not exist (not predefined). In other words, in the case where an obfuscation code is formed according to obfuscation, the security evaluation system 300 may detect obfuscation of the code.
  • opcode operation code
  • the security evaluation system 300 may determine whether to apply obfuscation to the code based on the information on the branch position of the branch (branch) code. For example, as described above, the security evaluation system 300 has information about all functions through information about addresses of functions. At this time, if the position of the instruction to be performed next through the branch code is not the position to these functions, the security evaluation system 300 may detect obfuscation of the code.
  • FIG. 12 is a diagram for one example of determining whether to apply obfuscation to a code based on information on a branch position according to an embodiment of the present invention.
  • FIG. 12 illustrates an example of branching to an added segment 1033 through the branch code 1210 included in the function A 1200, rather than the code segment 1031 of the segment 1030 described with reference to FIG. 10. have.
  • the security evaluation system 300 may detect that obfuscation is applied to at least some code.
  • the security evaluation system 300 may determine whether to apply obfuscation to the binary code based on the presence of a dummy code of a predefined pattern.
  • Dummy code is code that is added to make code analysis difficult without affecting registers. Therefore, the security evaluation system 300 may predefine and manage information on patterns of these dummy codes, and if there are codes of a managed pattern, it may be determined as dummy codes, and code obfuscation may be performed. To detect that a dummy code has been added.
  • Table 1 below shows an example of a dummy code.
  • the security evaluation system 300 may be obfuscated by adding dummy code to the source code. Such dummy code may be converted into junk code through compilation.
  • FIG. 13 is a diagram for one example of adding a dummy code to source code according to one embodiment of the present invention.
  • FIG. 13 illustrates that the dummy code 1321 is added to the source code 1310 including the operation code 1311 to generate the obfuscated source code 1320, and the obfuscated source code 1320 is compiled to the junk code.
  • An example of generating a binary code 1330 including a 1133 and a compiled operation code 1332 is shown.
  • the security evaluation system 300 may pre-set and manage the patterns for the dummy code 1321 and / or the junk code 1331, and if a predefined pattern is found in the source code or the binary code. For example, it can detect the application of obfuscation to the code. For example, successive use of instruction ldr and / or instruction lsls in binary code may be set as a pattern for junk code 1331. In this case, the security evaluation system 300 may detect the application of obfuscation to the code by analyzing a binary code and detecting a pattern in which the instruction ldr and / or the instruction lsls are repeatedly used.
  • FIG. 14 is a block diagram illustrating an example of a component that may be included in a processor of a server according to an embodiment of the present invention
  • FIG. 15 is a security evaluation that may be performed by a server according to an embodiment of the present invention.
  • the security evaluation system 300 may be implemented in the form of a computer device such as the server 150 described above.
  • the processor 222 of the server 150 is a package file register 1410, an ELF file identifier 1420, and obfuscation as components for implementing the security evaluation system 300.
  • the determiner 1430, the security grade determiner 1440, and the reporter 1450 may be included.
  • the processor 222 and the components of the processor 222 may perform steps 1510 to 1550 included in the security evaluation method of FIG. 15.
  • the processor 222 and the components of the processor 222 may be implemented to execute a control instruction according to a code of an operating system included in the memory 221 or a code of at least one program.
  • the components of the processor 222 may be representations of different functions of the processor 222 performed by the processor 222 according to a control command provided by a code stored in the server 150.
  • the package file register 1410 may be used as a functional representation of the processor 222 in which the processor 222 registers a package file according to the above-described control command.
  • the package file registration unit 1410 may register a package file for installing and driving the application.
  • the package file can be registered with the application publisher for distribution to users of the application.
  • the security evaluation system 300 may be implemented in a device that provides a service for distributing package files of applications for which an application publisher is registered, or as a separate system that communicates with the aforementioned device through the network 170. Can be implemented.
  • the security evaluation system 300 may receive and register a package file registered with an application publisher through the network 170.
  • a package file may include an Android application package (Apk) as described above.
  • the ELF file identification unit 1420 may identify an executable and linkable format (ELF) file included in the registered package file.
  • ELF executable and linkable format
  • the PE file may be a so file.
  • the ELF file to be identified may be identified through an extension of the file among the files identified through the package decomposition module 310 and the file identification module 320.
  • the obfuscation determiner 1430 may determine whether to apply obfuscation to at least one of an ELF header, a section header, a section, and a segment included in the ELF file.
  • Various embodiments for determining whether to apply obfuscation have already been described in detail, and more detailed operations of the obfuscation determiner 1430 according to these embodiments will be described in more detail with reference to the following drawings.
  • the security rating determiner 1440 may determine a security rating for the ELF file based on whether obfuscation is applied.
  • the security level of the ELF file may be determined according to whether obfuscation is applied to the ELF file, the type or degree of obfuscation applied to the ELF file, and the like.
  • the type of obfuscation has been described in detail through various embodiments described above, and the degree of obfuscation may be determined based on, for example, the number of types of obfuscation applied, the degree of conformity of codes, and the like.
  • the reporting unit 1450 may report information on whether obfuscation is applied and information on a security level determined for the ELF file. For example, for an identified ELF file, whether the section header is obfuscated, whether obfuscation is applied to strings and / or string tables, whether obfuscation is applied to symbol tables, whether obfuscation is applied to code, and so on. Information may be provided to an administrator or user of the security evaluation system 300.
  • Steps 1610 through 1630 of FIG. 16 may be included in step 1530 of FIG. 15. In this case, step 1610 may be included in step 1530 but may be performed before step 1530.
  • the obfuscation determiner 1430 may set a range of normal values for at least one item of the size of the section header included in the ELF header, the number of section headers, and the size of the section.
  • the obfuscation determiner 1430 may extract a value of at least one item from the ELF header. If the ELF header is not obfuscated, a value included in the range of normal values will be extracted, and if the ELF header is obfuscated, a value outside the range of normal values will be extracted.
  • the obfuscation determination unit 1430 may determine that the obfuscation is applied to the ELF header when the extracted value is out of the set range of the normal value. In other words, the obfuscation determiner 1430 sets a range of normal values for at least one of the size of the section header, the number of section headers, and the size of the section in advance, and then obfuscates the ELF header of the ELF file. This can be used to determine whether or not the application is applied. Obfuscation detection for such an ELF header has already been described in detail with reference to FIG. 8.
  • Steps 1710 and 1720 of FIG. 16 may be included in step 1530 of FIG. 15.
  • the obfuscation determiner 1430 may extract a header of the dynamic linking symbol table section (.dynsym section) from the section header table included in the ELF file.
  • the obfuscation determiner 1430 may determine whether to apply obfuscation to the section header by analyzing the header of the extracted dynamic linking symbol table section.
  • the obfuscation determination unit 1430 may include a first condition in which the header of the extracted dynamic linking symbol table section includes null, and a header in which the header of the extracted dynamic linking symbol table section cannot be parsed. If the condition included in the condition 2 and the third condition in which the information included in the header of the extracted dynamic linking symbol table section does not exist in the dynamic linking information section (.dynamic section) of the sections is satisfied, the section It can be determined that obfuscation is applied to the header. Obfuscation detection for the header of this dynamic linking symbol table section (.dynsym section) has already been described in detail with reference to FIGS. 4 and 5.
  • FIG. 18 is a flowchart illustrating a method of determining whether obfuscation is applied to a header of a section including executable code according to an embodiment of the present invention. Steps 1810 through 1830 of FIG. 18 may be included in step 1530 of FIG. 15.
  • the obfuscation determiner 1430 may collect addresses of functions through an export symbol entry included in a dynamic linking symbol table section (.dynsym section) among sections included in the ELF file. .
  • the obfuscation determiner 1430 may disassemble the address of an export symbol entry to track the entire functions and collect the address.
  • the obfuscation determination unit 1430 may extract a value for the size of the executable code from the header of the section (.text section) including the executable code in the section header table included in the ELF file. If the header of the section containing the executable code (.text section) has been manipulated (obfuscated), the value extracted will be different from the value computed through the collected addresses.
  • the obfuscation determination unit 1430 may determine whether to apply obfuscation to the header of the section including the execution code by comparing the extracted value with the size of the execution code calculated through the collected addresses. In other words, if the calculated value and the extracted value are different, the obfuscation of the header of the section including the executable code is detected. Obfuscation detection for the header of the section containing such executable code has already been described in detail with reference to FIG. 9.
  • Step 1910 of FIG. 19 may be included in step 1530 of FIG. 15.
  • the obfuscation determiner 1430 analyzes the symbol entry included in the dynamic linking symbol table section (.dynsym section) among the sections included in the ELF file, and includes at least one of a name and an address included in the symbol entry. If one contains null or is not represented in American Standard Code for Information Interchange (ASCII) code, it can be determined that obfuscation has been applied to the dynamic linking symbol table section. This obfuscation detection process has already been described in detail with reference to FIG. 6.
  • ASCII American Standard Code for Information Interchange
  • Step 2010 of FIG. 20 may be included in step 1530 of FIG. 15.
  • the obfuscation determination unit 1430 analyzes the information included in the read-only section among the sections included in the ELF file, so that the included information includes null or If not expressed in ASCII code, you can determine that obfuscation is applied to the read-only section.
  • This read-only section may include a .rdata section or a .rodata section, and the obfuscation detection for these sections has already been described in detail with reference to FIG. 7.
  • Step 21 is a flowchart illustrating a first example of a method of determining whether obfuscation is applied to a code according to an embodiment of the present invention. Step 2110 of FIG. 21 may be included in step 1530 of FIG. 15.
  • the obfuscation determiner 1430 may have other read-write-execute privileges in addition to the segments in which sections included in the ELF file are integrated and created through the linker. Depending on whether the segment is added, it is possible to determine whether or not to obfuscate the code included in the predefined segment. In FIG. 10, the added segment 1033 has been described, and the addition of the segment itself may mean that obfuscation is applied to the code. Accordingly, the obfuscation determiner 1430 may interpret that obfuscation is applied to the code that another segment having a read-write-execute right is added.
  • Steps 2210 through 2230 of FIG. 22 may be included in step 1530 of FIG. 15.
  • the obfuscation determiner 1430 may identify a header of a section (.init section or .init_array section) including code for process initialization in the section header table included in the ELF file.
  • the obfuscation determiner 1430 may determine that obfuscation is applied to a code included in a predefined segment when a pointer to another segment identified in the header of the identified section exists.
  • the obfuscation determiner 1430 detects that the .init section or the .init_array section points to the segment to which it is added, and includes the code included in the predefined segment (for example, the code segment 1031 of FIG. 10). Can be detected as obfuscation for.
  • Steps 2310 and 2320 of FIG. 23 may be included in step 1530 of FIG. 15.
  • the obfuscation determination unit 1430 analyzes another identified segment, and when there is a code for restoring the encrypted code at runtime of the application, the obfuscation is included in the code included in the predefined segment. It can be determined that it has been applied.
  • the obfuscation determination unit 1430 analyzes the added segment to determine whether there is a code for restoring the encrypted code, and determines the existence of the code (eg, the code segment of FIG. 10). 1031) can be detected as obfuscation of the code included in).
  • Steps 2410 and 2420 of FIG. 24 may be included in step 1530 of FIG. 15.
  • the obfuscation determiner 1430 may collect addresses of functions through an export symbol entry included in a dynamic linking symbol table section (.dynsym section) among sections included in the ELF file. .
  • the obfuscation determination unit 1430 may determine whether to apply obfuscation to the code by analyzing the instructions included in the functions by using the collected address.
  • the obfuscation determiner 1430 may determine the consistency between the instructions included in the functions, whether there is an undefined operation code (opcode) combination, information on the branch position of the branch code, and the predefined location. It may be determined whether obfuscation is applied to the code based on at least one of whether a dummy code of the pattern exists.
  • opcode undefined operation code
  • the obfuscation determiner 1430 may read-write-execute, in addition to the segment in which the sections included in the ELF file are integrated and generated through the linker. RWE) confirm the addition of another segment with authority, and if the instructions included by the functions branch to code included in the other segment, it may be determined that obfuscation is applied to the code.
  • 16 to 24 may be performed in parallel with each other in step 1530.
  • the steps of performing the same operation may not be performed in duplicate, but may be performed only once. For example, collecting the addresses of the functions 1810 and 2410 may be performed only one of the two.
  • the security level applied to the registered application is determined in an objective manner in accordance with obfuscation, vulnerability, and / or security solution. It can be used to improve the security of the application by analyzing and understanding and providing the analyzed information. In addition, it is possible to detect whether obfuscation is applied to an Executable and Linkable Format (ELF) file.
  • ELF Executable and Linkable Format
  • the system or apparatus described above may be implemented as a hardware component, a software component or a combination of hardware components and software components.
  • the devices and components described in the embodiments are, for example, processors, controllers, arithmetic logic units (ALUs), digital signal processors, microcomputers, field programmable gate arrays (FPGAs).
  • ALUs arithmetic logic units
  • FPGAs field programmable gate arrays
  • PLU programmable logic unit
  • the processing device may execute an operating system (OS) and one or more software applications running on the operating system.
  • the processing device may also access, store, manipulate, process, and generate data in response to the execution of the software.
  • processing device includes a plurality of processing elements and / or a plurality of types of processing elements. It can be seen that it may include.
  • the processing device may include a plurality of processors or one processor and one controller.
  • other processing configurations are possible, such as parallel processors.
  • the software may include a computer program, code, instructions, or a combination of one or more of the above, and configure the processing device to operate as desired, or process it independently or collectively. You can command the device.
  • Software and / or data may be any type of machine, component, physical device, virtual equipment, computer storage medium or device in order to be interpreted by or to provide instructions or data to the processing device. It can be embodied in.
  • the software may be distributed over networked computer systems so that they may be stored or executed in a distributed manner.
  • Software and data may be stored on one or more computer readable media.
  • the method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium.
  • the computer readable medium may include program instructions, data files, data structures, etc. alone or in combination.
  • the program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks, such as floppy disks.
  • Such a recording medium may be various recording means or storage means in the form of a single or several hardware combined, and is not limited to a medium directly connected to any computer system, but may be distributed on a network.
  • Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.

Abstract

Provided are a method and a system for detecting application of obfuscation to and evaluating the security of an executable and linking format (ELF) file. A method for evaluating security may comprise the steps of: registering a package file for installing and running an application; identifying an executable and linkable format (ELF) file included in the registered package file; determining whether obfuscation has been applied to at least one of an ELF header, a section header, a section, or a segment included in the ELF file; and determining a security level for the ELF file on the basis of whether the obfuscation has been applied.

Description

ELF 파일의 난독화 적용 여부의 탐지 및 보안성 평가를 위한 방법 및 시스템Method and system for detection and security evaluation of ELF file obfuscation
아래의 설명은 ELF 파일의 난독화 적용 여부의 탐지 및 보안성 평가를 위한 방법 및 시스템, 그리고 컴퓨터와 결합되어 보안성 평가 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램에 관한 것이다.The following description relates to a method and system for detecting and evaluating the application of obfuscation of an ELF file and to a computer program stored in a computer readable recording medium in combination with a computer for executing the security evaluation method on a computer. .
앱스토어(App store)는 스마트폰과 같은 단말에 탑재할 수 있는 다양한 어플리케이션을 판매하는 온라인상의 콘텐츠 장터이다. 예를 들어, 어플리케이션의 개발자들은 개발된 어플리케이션을 단말에 설치하기 위한 파일(일례로, 안드로이드 응용 프로그램 패키지(Android Application Package, APK))를 앱스토어에 등록하고, 어플리케이션의 이용자들은 앱스토어를 통해 필요한 어플리케이션을 위한 파일을 다운로드받아 자신의 단말에 어플리케이션을 설치 및 구동할 수 있게 된다. 또한, 게임 퍼블리셔와 같이 다양한 게임 어플리케이션을 이용자들에게 배포하는 경우도 존재한다. 이처럼, 자신들이 직접 개발하지 않은 다양한 어플리케이션들을 개발자들로부터 등록받고, 등록받은 어플리케이션들을 이용자들에게 배포하는 어플리케이션 퍼블리셔들이 존재한다.The App store is an online content marketplace that sells various applications that can be mounted on a terminal such as a smartphone. For example, the developer of an application registers a file (for example, an Android Application Package (Apk)) for installing a developed application on a terminal in an app store, and users of the application are required through the app store. By downloading a file for the application it is possible to install and run the application on their terminal. In addition, there are cases where various game applications such as game publishers are distributed to users. As such, there are application publishers that register various applications that are not developed by themselves, and distribute the registered applications to users.
이때, 어플리케이션의 위험성은 다양한 관점에서 설명될 수 있다.At this time, the risk of the application can be described from various viewpoints.
일례로, 어플리케이션의 첫 번째 위험성은 어플리케이션이 악성 코드와 같이 악의적인 의도로 개발된 정보를 포함함으로써, 어플리케이션이 등록되는 어플리케이션 퍼블리셔나 또는 어플리케이션이 설치 및 구동되는 이용자들의 단말에서 악의적인 기능을 수행하는 경우의 위험성을 들 수 있다. 한국공개특허 제10-2014-0098025호는 앱 스토어로 업로드 된 어플리케이션의 보안 평가를 위한 시스템 및 그 방법에 관한 것으로, 앱스토어에 등록될 어플리케이션이 악의적인 기능을 수행하는 것으로 탐지되는 경우, 해당 어플리케이션의 진입(앱스토어로의 등록)을 거절하는 기술에 대해 개시하고 있다.For example, the first risk of an application is that the application contains information developed by malicious intentions, such as malicious code, to perform malicious functions on the terminal of the application publisher or the user on which the application is installed and run. There is a risk in the case. Korean Patent Laid-Open No. 10-2014-0098025 relates to a system and method for security evaluation of an application uploaded to an app store, and when an application to be registered in an app store detects a malicious function, the application Disclosed is a technique for rejecting entry into an app store.
다른 예로, 어플리케이션의 두 번째 위험성은 어플리케이션 자체의 보안성에 대한 위험성을 들 수 있다. 배포된 어플리케이션에 대한 분석을 통해 어플리케이션의 소스 코드가 변경 또는 수정됨에 따라 어플리케이션이 개발자에 의해 원래 의도된 기능이 아닌 다른 기능을 수행하게 됨으로써, 해당 어플리케이션을 통해 제공하고자 하는 서비스의 신뢰도가 감소하는 문제점이 존재한다. 따라서, 어플리케이션 퍼블리셔들은, 자신들이 직접 개발하지 않은 다양한 어플리케이션들(어플리케이션들의 설치 파일들)을 배포함에 있어서, 어플리케이션들에 대해 일정 수준 이상의 보안성을 제공할 필요성이 존재한다.As another example, the second risk of an application is the risk to the security of the application itself. As the source code of the application is changed or modified through analysis of the deployed application, the application performs a function other than the function originally intended by the developer, thereby reducing the reliability of the service to be provided through the application. This exists. Therefore, there is a need for application publishers to provide a certain level of security for applications in distributing various applications (installation files of applications) that they did not develop directly.
그러나, 이러한 어플리케이션의 두 번째 위험성과 관련하여, 등록되는 어플리케이션마다 제공하는 보안 수준은 차이가 있다. 예를 들어, 각 어플리케이션들에는 서로 다른 보안 수준의 보안 솔루션들이 탑재되어 있을 수 있고, 아무런 보안수단도 포함되어 있지 않을 수 있다. 또한, 각 어플리케이션들에 탑재된 보안 솔루션들마다 제공하는 보안 수준에도 차이가 존재한다.However, with respect to the second risk of such applications, there is a difference in the level of security provided for each registered application. For example, each application may be equipped with security solutions of different security levels and may not include any security measures. In addition, there are differences in the security levels provided by the security solutions mounted in each application.
종래기술에서는 단순히 프로그래밍 언어 수준(일례로, 안드로이드 응용 프로그램 패키지(Android Application Package, APK)에 대해 자바(java) 단의 취약점 점검만을 진행할 수 있을 뿐, 어플리케이션 퍼블리셔의 관점에서는, 등록되는 수많은 어플리케이션들 각각에 대해 일정한 수준 이상으로 유지되는 보안성을 제공하기 어렵다는 문제점이 있다.In the prior art, only a Java-level vulnerability check can be performed at the programming language level (for example, Android Application Package (Apk)), and from the application publisher's point of view, each of the numerous registered applications There is a problem that it is difficult to provide security that is maintained above a certain level.
어플리케이션 퍼블리셔의 관점에서, 등록되는 어플리케이션에 적용된 보안 수준을 난독화(obfuscation), 취약점(vulnerability) 및/또는 보안솔루션의 관점에 따라 객관적인 방법으로 분석 및 파악하고, 분석된 정보를 제공하여 어플리케이션의 보안성 향상을 위해 활용할 수 있는 보안성 평가 방법 및 시스템을 제공한다.From the point of view of the application publisher, the level of security applied to the registered application is analyzed and identified in an objective manner in terms of obfuscation, vulnerability, and / or security solution, and the analyzed information is provided to provide security for the application. It provides a method and system for evaluating security that can be used to improve gender.
ELF(Executable and Linkable Format) 파일에 대한 난독화 적용 여부를 탐지할 수 있는 보안성 평가 방법 및 시스템을 제공한다.Provides a security evaluation method and system that can detect whether obfuscation is applied to Executable and Linkable Format (ELF) files.
어플리케이션의 보안성을 평가하는 방법에 있어서, 어플리케이션의 설치 및 구동을 위한 패키지 파일을 등록하는 단계; 상기 등록된 패키지 파일이 포함하는 ELF(Executable and Linkable Format) 파일을 식별하는 단계; 상기 ELF 파일이 포함하는 ELF 헤더, 섹션 헤더(Section Header), 섹션 및 세그먼트 중 적어도 하나에 대한 난독화 적용 여부를 결정하는 단계; 및 상기 난독화 적용 여부에 기반하여 상기 ELF 파일에 대한 보안성 등급을 결정하는 단계를 포함하는 것을 특징으로 하는 보안성 평가 방법을 제공한다.A method of evaluating security of an application, the method comprising: registering a package file for installing and running an application; Identifying an executable and linkable format (ELF) file included in the registered package file; Determining whether to apply obfuscation to at least one of an ELF header, a section header, a section, and a segment included in the ELF file; And determining a security grade of the ELF file based on whether the obfuscation is applied.
상기 보안성 평가 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터 판독 가능한 기록매체를 제공한다.A computer program for recording a computer program for executing the security evaluation method is provided.
컴퓨터와 결합하여 상기 보안성 평가 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장된 컴퓨터 프로그램을 제공한다.A computer program stored in a computer readable recording medium for executing the security evaluation method in a computer in combination with a computer is provided.
어플리케이션의 보안성을 평가하는 시스템에 있어서, 컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는, 어플리케이션의 설치 및 구동을 위한 패키지 파일을 등록하고, 상기 등록된 패키지 파일이 포함하는 ELF(Executable and Linkable Format) 파일을 식별하고, 상기 ELF 파일이 포함하는 ELF 헤더, 섹션 헤더(Section Header), 섹션 및 세그먼트 중 적어도 하나에 대한 난독화 적용 여부를 결정하고, 상기 난독화 적용 여부에 기반하여 상기 ELF 파일에 대한 보안성 등급을 결정하는 것을 특징으로 하는 보안성 평가 시스템을 제공한다.A system for evaluating the security of an application, comprising: at least one processor implemented to execute computer readable instructions, the at least one processor registering a package file for installation and running of the application, Identify an executable and linkable format (ELF) file included in a registered package file, determine whether to apply obfuscation to at least one of an ELF header, a section header, a section, and a segment included in the ELF file. It provides a security evaluation system, characterized in that for determining the security level for the ELF file based on whether obfuscation is applied.
어플리케이션 퍼블리셔의 관점에서, 등록되는 어플리케이션에 적용된 보안 수준을 난독화(obfuscation), 취약점(vulnerability) 및/또는 보안솔루션의 관점에 따라 객관적인 방법으로 분석 및 파악하고, 분석된 정보를 제공하여 어플리케이션의 보안성 향상을 위해 활용할 수 있다.From the point of view of the application publisher, the level of security applied to the registered application is analyzed and identified in an objective manner in terms of obfuscation, vulnerability, and / or security solution, and the analyzed information is provided to provide security for the application. Can be used to improve sex.
ELF(Executable and Linkable Format) 파일에 대한 난독화 적용 여부를 탐지할 수 있다.It can detect whether obfuscation is applied to Executable and Linkable Format (ELF) files.
도 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 및 도 5는 본 발명의 일실시예에 있어서, 등록된 패키지 파일이 포함하는 ELF 파일에서 심볼에 대한 난독화를 탐지하는 제1 예를 도시한 도면이다.4 and 5 illustrate a first example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to an embodiment of the present invention.
도 6은 본 발명의 일실시예에 있어서, 등록된 패키지 파일이 포함하는 ELF 파일에서 심볼에 대한 난독화를 탐지하는 제2 예를 도시한 도면이다.FIG. 6 is a diagram illustrating a second example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to one embodiment of the present invention.
도 7은 본 발명의 일실시예에 있어서, 등록된 패키지 파일이 포함하는 ELF 파일에서 심볼에 대한 난독화를 탐지하는 제3 예를 도시한 도면이다.FIG. 7 illustrates a third example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to an embodiment of the present invention.
도 8은 본 발명의 일실시예에 있어서, ELF 파일의 ELF 헤더에 대한 난독화를 탐지하는 예를 도시한 도면이다.8 illustrates an example of detecting obfuscation of an ELF header of an ELF file according to an embodiment of the present invention.
도 9는 본 발명의 일실시예에 있어서, 실행코드를 포함하는 섹션의 헤더에 대한 난독화 적용 여부를 결정하는 예를 도시한 도면이다.9 is a diagram for one example of determining whether to apply obfuscation to a header of a section including executable code according to an embodiment of the present invention.
도 10은 본 발명의 일실시예에 있어서, 코드에 대한 난독화를 탐지하는 예를 도시한 도면이다.FIG. 10 illustrates an example of detecting obfuscation of a code according to an embodiment of the present invention.
도 11은 본 발명의 일실시예에 있어서, 코드의 정합성을 설명하기 위한 예이다.FIG. 11 illustrates an example of code conformance according to an embodiment of the present invention. FIG.
도 12는 본 발명의 일실시예에 있어서, 분기 위치에 대한 정보에 기반하여 코드에 대한 난독화 적용 여부를 결정하는 예를 도시한 도면이다.12 is a diagram for one example of determining whether to apply obfuscation to a code based on information on a branch position according to an embodiment of the present invention.
도 13은 본 발명의 일실시예에 있어서, 소스 코드에 더미코드를 추가하는 예를 도시한 도면이다.FIG. 13 is a diagram for one example of adding a dummy code to source code according to one embodiment of the present invention.
도 14는 본 발명의 일실시예에 따른 서버의 프로세서가 포함할 수 있는 구성요소의 예를 도시한 블록도이다.14 is a block diagram illustrating an example of components that may be included in a processor of a server according to an embodiment of the present invention.
도 15는 본 발명의 일실시예에 따른 서버가 수행할 수 있는 보안성 평가 방법의 예를 도시한 흐름도이다.15 is a flowchart illustrating an example of a security evaluation method that can be performed by a server according to an embodiment of the present invention.
도 16은 본 발명의 일실시예에 있어서, ELF 헤더에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다.16 is a flowchart illustrating a method of determining whether obfuscation is applied to an ELF header according to an embodiment of the present invention.
도 17은 본 발명의 일실시예에 있어서, 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)의 헤더에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다.17 is a flowchart illustrating a method of determining whether obfuscation is applied to a header of a dynamic linking symbol table section (.dynsym section) according to an embodiment of the present invention.
도 18은 본 발명의 일실시예에 있어서, 실행코드를 포함하는 섹션의 헤더에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다.18 is a flowchart illustrating a method of determining whether obfuscation is applied to a header of a section including executable code according to an embodiment of the present invention.
도 19는 본 발명의 일실시예에 있어서, 동적 링킹 심볼 테이블 섹션에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다.19 is a flowchart illustrating a method of determining whether obfuscation is applied to a dynamic linking symbol table section according to an embodiment of the present invention.
도 20은 본 발명의 일실시예에 있어서, 읽기-전용(read-only) 섹션 에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다.20 is a flowchart illustrating a method of determining whether to apply obfuscation to a read-only section according to an embodiment of the present invention.
도 21은 본 발명의 일실시예에 있어서, 코드에 대한 난독화 적용 여부를 결정하는 방법의 제1 예를 도시한 흐름도이다.21 is a flowchart illustrating a first example of a method of determining whether obfuscation is applied to a code according to an embodiment of the present invention.
도 22는 본 발명의 일실시예에 있어서, 코드에 대한 난독화 적용 여부를 결정하는 방법의 제2 예를 도시한 흐름도이다.22 is a flowchart illustrating a second example of a method of determining whether obfuscation is applied to a code according to an embodiment of the present invention.
도 23은 본 발명의 일실시예에 있어서, 코드에 대한 난독화 적용 여부를 결정하는 방법의 제3 예를 도시한 흐름도이다.23 is a flowchart illustrating a third example of a method of determining whether obfuscation is applied to a code according to an embodiment of the present invention.
도 24는 본 발명의 일실시예에 있어서, 인스트럭션을 분석하여 코드에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다.24 is a flowchart illustrating a method of analyzing an instruction to determine whether obfuscation is applied to a code according to an embodiment of the present invention.
이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings.
본 발명의 실시예들에 따른 보안성 평가 시스템은 이후 설명될 서버를 통해 구현될 수 있으며, 본 발명의 실시예들에 따른 보안성 평가 방법은 상술한 서버를 통해 수행될 수 있다. 예를 들어, 서버에는 본 발명의 일실시예에 따른 컴퓨터 프로그램이 설치 및 구동될 수 있고, 서버는 구동된 컴퓨터 프로그램의 제어에 따라 본 발명의 일실시예에 따른 보안성 평가 방법을 수행할 수 있다. 상술한 컴퓨터 프로그램은 컴퓨터로 구현되는 서버와 결합되어 보안성 평가 방법을 컴퓨터에 실행시키기 위해 컴퓨터 판독 가능한 기록매체에 저장될 수 있다.The security evaluation system according to the embodiments of the present invention may be implemented through a server to be described later, and the security evaluation method according to the embodiments of the present invention may be performed through the server described above. For example, a computer program according to an embodiment of the present invention may be installed and run on a server, and the server may perform a security evaluation method according to an embodiment of the present invention under control of the driven computer program. have. The computer program described above may be stored in a computer-readable recording medium in combination with a computer-implemented server to execute a security evaluation method on a computer.
도 1은 본 발명의 일실시예에 따른 네트워크 환경의 예를 도시한 도면이다. 도 1의 네트워크 환경은 복수의 전자 기기들(110, 120, 130, 140), 복수의 서버들(150, 160) 및 네트워크(170)를 포함하는 예를 나타내고 있다. 이러한 도 1은 발명의 설명을 위한 일례로 전자 기기의 수나 서버의 수가 도 1과 같이 한정되는 것은 아니다.1 is a diagram illustrating an example of a network environment according to an embodiment of the present invention. The network environment of FIG. 1 illustrates an example including a plurality of electronic devices 110, 120, 130, and 140, a plurality of servers 150 and 160, and a network 170. 1 is an example for describing the present invention, and the number of electronic devices or the number of servers is not limited as shown in FIG. 1.
복수의 전자 기기들(110, 120, 130, 140)은 컴퓨터 장치로 구현되는 고정형 단말이거나 이동형 단말일 수 있다. 복수의 전자 기기들(110, 120, 130, 140)의 예를 들면, 스마트폰(smart phone), 휴대폰, 네비게이션, 컴퓨터, 노트북, 디지털방송용 단말, PDA(Personal Digital Assistants), PMP(Portable Multimedia Player), 태블릿 PC 등이 있다. 일례로 도 1에서는 전자 기기 1(110)의 예로 스마트폰의 형상을 나타내고 있으나, 본 발명의 실시예들에서 전자 기기 1(110)은 실질적으로 무선 또는 유선 통신 방식을 이용하여 네트워크(170)를 통해 다른 전자 기기들(120, 130, 140) 및/또는 서버(150, 160)와 통신할 수 있는 다양한 물리적인 장치들 중 하나를 의미할 수 있다.The plurality of electronic devices 110, 120, 130, and 140 may be fixed terminals or mobile terminals implemented as computer devices. Examples of the plurality of electronic devices 110, 120, 130, and 140 include a smart phone, a mobile phone, a navigation device, a computer, a notebook computer, a digital broadcasting terminal, a personal digital assistant (PDA), and a portable multimedia player (PMP). Tablet PC). For example, although FIG. 1 illustrates the shape of a smart phone as an example of the electronic device 1 110, in the embodiments of the present invention, the electronic device 1 110 may use a wireless or wired communication method to substantially connect the network 170. It may mean one of various physical devices that can communicate with other electronic devices 120, 130, 140 and / or servers 150, 160.
통신 방식은 제한되지 않으며, 네트워크(170)가 포함할 수 있는 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망)을 활용하는 통신 방식뿐만 아니라 기기들간의 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크(170)는, PAN(personal area network), LAN(local area network), CAN(campus area network), MAN(metropolitan area network), WAN(wide area network), BBN(broadband network), 인터넷 등의 네트워크 중 하나 이상의 임의의 네트워크를 포함할 수 있다. 또한, 네트워크(170)는 버스 네트워크, 스타 네트워크, 링 네트워크, 메쉬 네트워크, 스타-버스 네트워크, 트리 또는 계층적(hierarchical) 네트워크 등을 포함하는 네트워크 토폴로지 중 임의의 하나 이상을 포함할 수 있으나, 이에 제한되지 않는다.The communication method is not limited, and may include not only a communication method using a communication network (for example, a mobile communication network, a wired internet, a wireless internet, a broadcasting network) that the network 170 may include, but also a short range wireless communication between devices. For example, the network 170 may include a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), and a broadband network (BBN). And one or more of networks such as the Internet. The network 170 may also include any one or more of network topologies, including bus networks, star networks, ring networks, mesh networks, star-bus networks, trees, or hierarchical networks, but It is not limited.
서버(150, 160) 각각은 복수의 전자 기기들(110, 120, 130, 140)과 네트워크(170)를 통해 통신하여 명령, 코드, 파일, 컨텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다. 예를 들어, 서버(150)는 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 제1 서비스를 제공하는 시스템일 수 있으며, 서버(160) 역시 네트워크(170)를 통해 접속한 복수의 전자 기기들(110, 120, 130, 140)로 제2 서비스를 제공하는 시스템일 수 있다. 보다 구체적인 예로, 서버(150)는 어플리케이션 퍼블리셔의 시스템을 구성하는 장치들 중 적어도 일부일 수 있으며, 복수의 전자 기기들(110, 120, 130, 140)에 설치되어 동작되는 어플리케이션의 패키지 파일을 등록받아 배포하는 서비스를 상기 제1 서비스로서 제공할 수 있다. 다른 예로, 서버(160)는 배포된 패키지 파일을 통해 어플리케이션을 설치 및 구동하는 복수의 전자 기기들(110, 120, 130, 140)로 상기 어플리케이션과 연관된 서비스를 상기 제2 서비스로서 제공할 수 있다. 실시예에 따라 서버(150)는 등록되는 패키지 파일의 보안성 평가를 위한 전용 시스템으로서 등록되는 패키지 파일에 대해 평가된 보안성에 대한 정보를 제공하도록 구현될 수도 있다.Each of the servers 150 and 160 communicates with the plurality of electronic devices 110, 120, 130, and 140 through the network 170 to provide a command, code, file, content, service, or the like. It may be implemented in devices. For example, the server 150 may be a system that provides a first service to a plurality of electronic devices 110, 120, 130, and 140 connected through the network 170, and the server 160 may also have a network ( It may be a system that provides a second service to the plurality of electronic devices 110, 120, 130, and 140 connected through the 170. As a more specific example, the server 150 may be at least some of the devices constituting the system of the application publisher, and receives a package file of an application installed and operated on the plurality of electronic devices 110, 120, 130, and 140. The service to be distributed can be provided as the first service. As another example, the server 160 may provide a service associated with the application as the second service to a plurality of electronic devices 110, 120, 130, and 140 that install and run the application through the distributed package file. . According to an embodiment, the server 150 may be implemented as a dedicated system for evaluating the security of a package file to be registered to provide information about the evaluated security for the package file to be registered.
도 2는 본 발명의 일실시예에 있어서, 전자 기기 및 서버의 내부 구성을 설명하기 위한 블록도이다. 도 2에서는 전자 기기에 대한 예로서 전자 기기 1(110), 그리고 서버(150)의 내부 구성을 설명한다. 또한, 다른 전자 기기들(120, 130, 140)이나 서버(160) 역시 상술한 전자 기기 1(110) 또는 서버(150)와 동일한 또는 유사한 내부 구성을 가질 수 있다.2 is a block diagram illustrating an internal configuration of an electronic device and a server according to an embodiment of the present invention. 2 illustrates an internal configuration of the electronic device 1 110 and the server 150 as an example of the electronic device. In addition, the other electronic devices 120, 130, 140, or the server 160 may also have the same or similar internal configuration as the aforementioned electronic device 1 110 or the server 150.
전자 기기 1(110)과 서버(150)는 메모리(211, 221), 프로세서(212, 222), 통신 모듈(213, 223) 그리고 입출력 인터페이스(214, 224)를 포함할 수 있다. 메모리(211, 221)는 컴퓨터에서 판독 가능한 기록매체로서, RAM(random access memory), ROM(read only memory) 및 디스크 드라이브와 같은 비소멸성 대용량 기록장치(permanent mass storage device)를 포함할 수 있다. 여기서 ROM과 디스크 드라이브와 같은 비소멸성 대용량 기록장치는 메모리(211, 221)와는 구분되는 별도의 영구 저장 장치로서 전자 기기 1(110)나 서버(150)에 포함될 수도 있다. 또한, 메모리(211, 221)에는 운영체제와 적어도 하나의 프로그램 코드(일례로 전자 기기 1(110)에 설치되어 구동되는 브라우저나 특정 서비스의 제공을 위해 전자 기기 1(110)에 설치된 어플리케이션 등을 위한 코드)가 저장될 수 있다. 이러한 소프트웨어 구성요소들은 메모리(211, 221)와는 별도의 컴퓨터에서 판독 가능한 기록매체로부터 로딩될 수 있다. 이러한 별도의 컴퓨터에서 판독 가능한 기록매체는 플로피 드라이브, 디스크, 테이프, DVD/CD-ROM 드라이브, 메모리 카드 등의 컴퓨터에서 판독 가능한 기록매체를 포함할 수 있다. 다른 실시예에서 소프트웨어 구성요소들은 컴퓨터에서 판독 가능한 기록매체가 아닌 통신 모듈(213, 223)을 통해 메모리(211, 221)에 로딩될 수도 있다. 예를 들어, 적어도 하나의 프로그램은 개발자들 또는 어플리케이션의 설치 파일을 배포하는 파일 배포 시스템(일례로, 상술한 서버(160))이 네트워크(170)를 통해 제공하는 파일들에 의해 설치되는 컴퓨터 프로그램(일례로 상술한 어플리케이션)에 기반하여 메모리(211, 221)에 로딩될 수 있다.The electronic device 1 110 and the server 150 may include memories 211 and 221, processors 212 and 222, communication modules 213 and 223, and input / output interfaces 214 and 224. The memories 211 and 221 may be computer-readable recording media, and may include a permanent mass storage device such as random access memory (RAM), read only memory (ROM), and a disk drive. In this case, the non-volatile mass storage device such as a ROM and a disk drive may be included in the electronic device 1 110 or the server 150 as a separate permanent storage device that is separated from the memories 211 and 221. In addition, the memory 211, 221 includes an operating system and at least one program code (for example, a browser installed and driven in the electronic device 1 110 or an application installed in the electronic device 1 110 to provide a specific service). Code) can be stored. These software components may be loaded from a computer readable recording medium separate from the memories 211 and 221. Such a separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, disk, tape, DVD / CD-ROM drive, memory card, and the like. In other embodiments, software components may be loaded into the memory 211, 221 through a communication module 213, 223 that is not a computer readable recording medium. For example, at least one program is a computer program that is installed by files provided by a file distribution system (for example, the server 160 described above) through the network 170 to distribute installation files of developers or applications. It may be loaded into the memories 211 and 221 based on (for example, the above-described application).
프로세서(212, 222)는 기본적인 산술, 로직 및 입출력 연산을 수행함으로써, 컴퓨터 프로그램의 명령을 처리하도록 구성될 수 있다. 명령은 메모리(211, 221) 또는 통신 모듈(213, 223)에 의해 프로세서(212, 222)로 제공될 수 있다. 예를 들어 프로세서(212, 222)는 메모리(211, 221)와 같은 기록 장치에 저장된 프로그램 코드에 따라 수신되는 명령을 실행하도록 구성될 수 있다. Processors 212 and 222 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations. Instructions may be provided to the processors 212, 222 by the memory 211, 221 or the communication modules 213, 223. For example, the processors 212 and 222 may be configured to execute a command received according to a program code stored in a recording device such as the memory 211 and 221.
통신 모듈(213, 223)은 네트워크(170)를 통해 전자 기기 1(110)과 서버(150)가 서로 통신하기 위한 기능을 제공할 수 있으며, 전자 기기 1(110) 및/또는 서버(150)가 다른 전자 기기(일례로 전자 기기 2(120)) 또는 다른 서버(일례로 서버(160))와 통신하기 위한 기능을 제공할 수 있다. 일례로, 전자 기기 1(110)의 프로세서(212)가 메모리(211)와 같은 기록 장치에 저장된 프로그램 코드에 따라 생성한 요청이 통신 모듈(213)의 제어에 따라 네트워크(170)를 통해 서버(150)로 전달될 수 있다. 역으로, 서버(150)의 프로세서(222)의 제어에 따라 제공되는 제어 신호나 명령, 컨텐츠, 파일 등이 통신 모듈(223)과 네트워크(170)를 거쳐 전자 기기 1(110)의 통신 모듈(213)을 통해 전자 기기 1(110)로 수신될 수 있다. 예를 들어 통신 모듈(213)을 통해 수신된 서버(150)의 제어 신호나 명령, 컨텐츠, 파일 등은 프로세서(212)나 메모리(211)로 전달될 수 있고, 컨텐츠나 파일 등은 전자 기기 1(110)가 더 포함할 수 있는 저장 매체(상술한 영구 저장 장치)로 저장될 수 있다.The communication modules 213 and 223 may provide a function for the electronic device 1 110 and the server 150 to communicate with each other through the network 170, and the electronic device 1 110 and / or the server 150 may communicate with each other. May provide a function for communicating with another electronic device (eg, electronic device 2 120) or another server (eg, server 160). For example, a request generated by the processor 212 of the electronic device 1 110 according to a program code stored in a recording device such as the memory 211 may be controlled by the server 170 through the network 170 under the control of the communication module 213. 150). Conversely, control signals, commands, contents, files, and the like provided according to the control of the processor 222 of the server 150 are transmitted to the communication module of the electronic device 1 110 via the communication module 223 and the network 170 ( It may be received by the electronic device 1110 through 213. For example, the control signal, command, content, file, etc. of the server 150 received through the communication module 213 may be transmitted to the processor 212 or the memory 211, and the content, file, etc. may be transferred to the electronic device 1. 110 may be stored as a storage medium (permanent storage described above) that may further include.
입출력 인터페이스(214)는 입출력 장치(215)와의 인터페이스를 위한 수단일 수 있다. 예를 들어, 입력 장치는 키보드 또는 마우스 등의 장치를, 그리고 출력 장치는 디스플레이, 스피커와 같은 장치를 포함할 수 있다. 다른 예로 입출력 인터페이스(214)는 터치스크린과 같이 입력과 출력을 위한 기능이 하나로 통합된 장치와의 인터페이스를 위한 수단일 수도 있다. 입출력 장치(215)는 전자 기기 1(110)과 하나의 장치로 구성될 수도 있다. 또한, 서버(150)의 입출력 인터페이스(224)는 서버(150)와 연결되거나 서버(150)가 포함할 수 있는 입력 또는 출력을 위한 장치(미도시)와의 인터페이스를 위한 수단일 수 있다. 보다 구체적인 예로, 전자 기기 1(110)의 프로세서(212)가 메모리(211)에 로딩된 컴퓨터 프로그램의 명령을 처리함에 있어서 서버(150)나 전자 기기 2(120)가 제공하는 데이터를 이용하여 구성되는 서비스 화면이나 컨텐츠가 입출력 인터페이스(214)를 통해 디스플레이에 표시될 수 있다.The input / output interface 214 may be a means for interfacing with the input / output device 215. For example, the input device may include a device such as a keyboard or a mouse, and the output device may include a device such as a display or a speaker. As another example, the input / output interface 214 may be a means for interfacing with a device in which functions for input and output are integrated into one, such as a touch screen. The input / output device 215 may be configured as one device with the electronic device 1110. In addition, the input / output interface 224 of the server 150 may be a means for interfacing with an apparatus (not shown) for input or output that may be connected to or included in the server 150. As a more specific example, the processor 212 of the electronic device 1110 uses data provided by the server 150 or the electronic device 2 120 in processing a command of a computer program loaded in the memory 211. The service screen or the content may be displayed on the display through the input / output interface 214.
또한, 다른 실시예들에서 전자 기기 1(110) 및 서버(150)는 도 2의 구성요소들보다 더 많은 구성요소들을 포함할 수도 있다. 그러나, 대부분의 종래기술적 구성요소들을 명확하게 도시할 필요성은 없다. 예를 들어, 전자 기기 1(110)은 상술한 입출력 장치(215) 중 적어도 일부를 포함하도록 구현되거나 또는 트랜시버(transceiver), GPS(Global Positioning System) 모듈, 카메라, 각종 센서, 데이터베이스 등과 같은 다른 구성요소들을 더 포함할 수도 있다. 보다 구체적인 예로, 전자 기기 1(110)이 스마트폰인 경우, 일반적으로 스마트폰이 포함하고 있는 가속도 센서나 자이로 센서, 카메라 모듈, 각종 물리적인 버튼, 터치패널을 이용한 버튼, 입출력 포트, 진동을 위한 진동기 등의 다양한 구성요소들이 전자 기기 1(110)에 더 포함되도록 구현될 수 있다.Also, in other embodiments, the electronic device 1 110 and the server 150 may include more components than those of FIG. 2. However, it is not necessary to clearly show most of the prior art components. For example, the electronic device 1 110 may be implemented to include at least some of the above-described input / output devices 215 or other components such as a transceiver, a global positioning system (GPS) module, a camera, various sensors, a database, and the like. It may further include elements. More specifically, when the electronic device 1 110 is a smartphone, an acceleration sensor, a gyro sensor, a camera module, various physical buttons, a button using a touch panel, an input / output port, and vibration for a smartphone generally include Various components such as a vibrator may be implemented to be further included in the electronic device 1 110.
도 3은 본 발명의 일실시예에 따른 보안성 평가 시스템의 블록 다이어그램이다. 도 3의 보안성 평가 시스템(300)은 앞서 설명한 서버(150)를 통해 구현될 수 있다. 이때, 보안성 평가 시스템(300)이 포함하는 패키지 분해 모듈(310), 파일 식별 모듈(320), 파싱 모듈(330), 분석 모듈(340) 및 리포트 모듈(350)은 서버(150)가 포함하는 프로세서(222)의 서로 다른 기능들(different functions)의 표현들일 수 있다. 예를 들어, 서버(150)의 프로세서(222)가 컴퓨터 프로그램이 포함하는 제어 명령에 따라 패키지 파일을 분해하는 프로세서(222)의 기능으로서 패키지 분해 모듈(310)이 이용될 수 있다. 이때, 분석 모듈(340)이 포함하는 취약점 탐지 모듈(342)이 취약점 탐지를 위한 핵심 모듈로서 구현될 수 있다.3 is a block diagram of a security evaluation system according to an embodiment of the present invention. The security evaluation system 300 of FIG. 3 may be implemented through the server 150 described above. In this case, the server 150 includes the package decomposition module 310, the file identification module 320, the parsing module 330, the analysis module 340, and the report module 350 included in the security evaluation system 300. May be representations of the different functions of the processor 222. For example, the package disassembly module 310 may be used as a function of the processor 222 in which the processor 222 of the server 150 disassembles a package file according to a control command included in a computer program. In this case, the vulnerability detection module 342 included in the analysis module 340 may be implemented as a core module for vulnerability detection.
앞서 설명한 바와 같이, 서버(150)는 개발자들이 등록하는 어플리케이션의 패키지 파일들을 이용자들에게 배포하는 서비스를 제공할 수 있다.As described above, the server 150 may provide a service for distributing package files of applications registered by developers to users.
이때, 패키지 분해 모듈(310)은 등록된 패키지 파일들을 분해할 수 있다. 예를 들어, 안드로이드 응용 프로그램 패키지(Android Application Package, APK)는 모바일 운영체제인 안드로이드의 소프트웨어와 미들웨어 배포에 사용되는 패키지 파일의 파일 포맷으로서 '.apk' 확장자를 갖는다. 이하의 실시예들에서는 이러한 APK와 같은 패키지 파일을 기반으로 본 발명의 실시예들을 설명하나, 이러한 설명을 통해 다른 종류의 패키지 파일에도 동일 또는 유사한 특징이 적용될 수 있음을 당업자라면 쉽게 이해할 수 있을 것이다.In this case, the package disassembly module 310 may disassemble the registered package files. For example, an Android application package (Apk) is a file format of a package file used for distributing software and middleware of Android, which is a mobile operating system, and has a '.apk' extension. In the following embodiments, embodiments of the present invention will be described based on a package file such as an APK, but it will be readily understood by those skilled in the art that the same or similar features may be applied to other kinds of package files through this description. .
또한, APK는 이미 잘 알려져 있기 때문에 APK 파일 또는 APK 파일이 포함하는 파일들 자체에 대한 설명 역시 당업자가 이미 잘려진 종래기술들을 통해 쉽게 이해할 수 있을 것이며, 따라서 APK 파일 또는 APK 파일이 포함하는 파일들 자체에 대한 자세한 설명은 생략한다.In addition, since the APK is already well known, the description of the APK file or the files themselves included in the APK file will be easily understood by those skilled in the art through the conventional arts, and thus, the APK file or the files included in the APK file itself. Detailed descriptions thereof will be omitted.
파일 식별 모듈(320)은 분해된 패키지 파일에 포함된 파일들을 식별할 수 있다. 도 3에서 나타난 확장자들('dex', 'so', 'dll', 'json', 'ini', 'apk', 'xml', 'cert')은 이미 설명한 바와 같이 APK와 관련된 종래기술들을 통해 당업자가 쉽게 이해할 수 있을 것이다.The file identification module 320 may identify files included in the disassembled package file. The extensions shown in Figure 3 ('dex', 'so', 'dll', 'json', 'ini', 'apk', 'xml', 'cert') as described previously, It will be readily understood by those skilled in the art.
파싱 모듈(330)은 식별된 파일들을 파싱할 수 있다. 이를 위해, 파서(331)는 식별된 파일들 중 특정 확장자(일례로, 'dex', 'so', 'dll')의 파일들을 파싱할 수 있으며, 콜렉터(332)는 특정 확장자(일례로, 'json', 'ini', 'apk', 'xml', 'cert')의 파일들로부터 필요한 정보를 수집할 수 있다.The parsing module 330 may parse the identified files. To this end, the parser 331 may parse files of a specific extension (eg, 'dex', 'so', 'dll') among the identified files, and the collector 332 may parse a specific extension (eg, You can collect the necessary information from the files of 'json', 'ini', 'apk', 'xml', and 'cert').
예를 들어, 파싱 모듈(330)은 'dex' 파일이 포함하는 클래스(class)들과 메서드(method)들 각각을 식별할 수 있으며, 메서드가 포함하는 인스트럭션들을 추적하여 다수의 매스(mass)들로 구분하여 식별할 수 있다. 인스트럭션들의 매스는 'goto' 문이나, 'switch' 문 또는 'if' 문 등과 같은 분기명령을 기준으로 구분될 수 있다. 또한, 파싱 모듈(330)은 이러한 인스트럭션 매스들간의 호출 관계에 대한 정보를 생성하여 관리할 수 있다. 일례로, 인스트럭션 매스들간의 호출 관계는 트리 구조로 관리될 수 있으며, 호출 관계에 대한 정보는 특정 인스트럭션 매스가 호출하는 메서드에 대한 정보를 포함할 수 있다. 이러한 정보의 생성 및 관리는 APK 파일과 같은 패키지 파일이 포함하는 파일들 각각에 대해 처리될 수 있으며, 파일의 특성에 따라 파싱 방식은 달라질 수 있다.For example, the parsing module 330 may identify each of the classes and methods included in the 'dex' file, and track a number of masses by instructing the instructions contained in the method. Can be identified by separating. The mass of instructions can be divided based on branch instructions such as the 'goto' statement, the 'switch' statement, or the 'if' statement. In addition, the parsing module 330 may generate and manage information on call relationships between these instruction masses. For example, the call relations between the instruction masses may be managed in a tree structure, and the information on the call relations may include information on a method called by a specific instruction mass. The generation and management of such information may be processed for each of files included in a package file such as an APK file, and the parsing method may vary according to the characteristics of the file.
파싱된 정보들과 수집된 정보들은 분석 모듈(340)로 전달될 수 있다.The parsed information and the collected information may be passed to the analysis module 340.
분석 모듈(340)은 파싱 모듈(330)로부터 전달되는 정보들에 기반하여 해당 패키지 파일(또는 해당 패키지 파일을 통해 전자 기기 1(110)과 같은 이용자 단말에서 설치 및 구동되는 어플리케이션)에 대한 난독화(obfuscation) 관점, 취약점(vulnerability) 관점 및 보안솔루션 관점의 분석정보를 생성 및 제공할 수 있다.The analysis module 340 obfuscates a corresponding package file (or an application installed and driven in a user terminal such as the electronic device 1 110 through the package file) based on the information transmitted from the parsing module 330. It can generate and provide analysis information from an obfuscation point of view, a vulnerability point of view, and a security solution point of view.
예를 들어, 난독화 탐지 모듈(341)은 특정 확장자(일례로, 'dex', 'so', 'dll')의 파일들에 어느 정도 수준의 난독화가 적용되어 있는가에 대한 분석정보를 생성할 수 있다. 이를 위해, 난독화 탐지 모듈(341)은 파일의 종류에 따라 미리 설정되는 항목별로 난독화가 적용되어 있는지 여부 등을 판단할 수 있다.For example, the obfuscation detection module 341 may generate analysis information on the level of obfuscation applied to files of a specific extension (eg, 'dex', 'so', 'dll'). Can be. To this end, the obfuscation detection module 341 may determine whether obfuscation is applied for each preset item according to the type of file.
또한, 취약점 탐지 모듈(342)은 특정 확장자(일례로, 'dex', 'so', 또는 설정(configuration) 파일의 확장자인 'config')의 파일들에 어떠한 취약점이 있는가에 대한 분석정보를 생성할 수 있다. 이를 위해, 보안성 평가 시스템(300)은 이미 알려진 취약점들에 대한 정보를 관리할 수 있으며, 취약점 탐지 모듈(342)은 이러한 취약점들에 대한 정보를 이용하여 어떠한 파일들에 어떠한 취약점이 존재하는가에 대한 분석정보를 생성할 수 있다.In addition, the vulnerability detection module 342 generates analysis information on whether there are any vulnerabilities in files of a specific extension (for example, 'dex', 'so', or 'config' which is a configuration file extension). can do. To this end, the security evaluation system 300 may manage information about known vulnerabilities, and the vulnerability detection module 342 uses information about these vulnerabilities to determine which vulnerabilities exist in which files. Analyze information can be generated.
또한, 플랫폼 탐지 모듈(343)은 해당 어플리케이션이 개발된 플랫폼 및/또는 해당 어플리케이션이 동작하는 플랫폼에 대한 정보를 추출할 수 있다. 예를 들어, 보안성 평가 시스템(300)은 해당 어플리케이션이 어떠한 플랫폼(일례로, 유니티(Unity)나 코코스(Cocos)와 같은 개발 툴)에서 개발되었는가에 따라 서로 다른 분석 방식을 활용할 수 있다.In addition, the platform detection module 343 may extract information about the platform on which the corresponding application is developed and / or the platform on which the corresponding application operates. For example, the security evaluation system 300 may use different analysis methods depending on which platform the application is developed on, for example, a development tool such as Unity or Cocos.
또는, 보안성 평가 시스템(300)은 어플리케이션이 동작하는 플랫폼마다 패키지 파일이 포함하는 파일 포맷이 달라질 수 있기 때문에, 이러한 플랫폼마다 서로 다른 분석 방식을 활용할 수도 있다.Alternatively, the security evaluation system 300 may use a different analysis method for each platform because the file format included in the package file may vary for each platform on which the application operates.
이를 위해, 보안성 평가 시스템(300)은 패키지 파일에 대한 플랫폼에 대한 정보를 추출할 수 있으며, 이러한 정보에 기반하여 패키지 파일을 분석하거나 또는 추출된 플랫폼에 대한 정보를 외부로 제공할 수 있다.To this end, the security evaluation system 300 may extract information about the platform for the package file, and may analyze the package file or provide information about the extracted platform to the outside based on such information.
보안 툴 탐지 모듈(344)은 패키지 파일의 개발자들이 자체적으로 패키지 파일에 삽입한 보안솔루션을 탐지할 수 있다. 예를 들어, 제3자에 의해 라이브러리 형태로 제공되는 제1 보안 툴이 개발자에 의해 해당 패키지 파일에 추가되어 있을 수 있다. 다른 예로, 개발자가 자체 개발한 제2 보안 툴이 개발자에 의해 해당 패키지 파일에 추가되어 있을 수도 있다. 다시 말해, 보안 툴 탐지 모듈(344)은 이러한 보안 툴의 패키지 파일에 대한 적용 여부에 대한 분석정보를 생성할 수 있다.The security tool detection module 344 can detect the security solution that the developer of the package file has inserted into the package file. For example, a first security tool provided in a library form by a third party may be added to a corresponding package file by a developer. As another example, a second security tool developed by the developer may be added to the package file by the developer. In other words, the security tool detection module 344 may generate analysis information about whether the security tool is applied to the package file.
관계 분석 모듈(345)은 패키지 파일이 포함하는 파일들간의 참조 관계에 대한 분석정보를 생성할 수 있다. 예를 들어, 제1 파일이 제2 파일을 호출하기 위한 코드를 포함하고 있는 경우, 제1 파일과 제2 파일간의 참조 관계에 대한 정보가 분석정보에 포함되도록 분석정보가 생성될 수 있다.The relationship analysis module 345 may generate analysis information about a reference relationship between files included in the package file. For example, when the first file includes code for calling the second file, the analysis information may be generated such that the information about the reference relationship between the first file and the second file is included in the analysis information.
리포트 모듈(350)은 분석 모듈(340)에서 생성되는 분석정보들을 수집하여 보안성 평가 시스템(300)의 관계자(일례로 서버(150)의 관리자 또는 어플리케이션 퍼블리셔의 보안 검수 팀)에게 제공하기 위한 보고서를 생성할 수 있다. 이러한 보고서는 도 3의 예에서와 같이 HTML(Hypertext Markup Language)나 XML(eXtensible Markup Language)를 이용하여 관계자들의 단말로 제공될 수 있다.The report module 350 collects the analysis information generated by the analysis module 340 and provides a report for the person of the security evaluation system 300 (for example, an administrator of the server 150 or a security inspection team of an application publisher). Can be generated. Such a report may be provided to terminals of related parties using Hypertext Markup Language (HTML) or eXtensible Markup Language (XML) as in the example of FIG. 3.
이후 설명될 ELF(Executable and Linkable Format)는 실행 파일, 목적 파일, 공유 라이브러리 그리고 코어 덤프를 위한 표준 파일 형식으로, ELF의 전체 구조나 ELF 파일이 포함하는 ELF 헤더, 섹션 헤더(section header), 섹션 헤더 테이블(section header table), 섹션 및 세그먼트(segment) 등에 대해서는 이미 잘 알려져 있기 때문에 별도의 설명 없이도 당업자가 용이하게 이해할 수 있을 것이다. 이러한 ELF 파일에 대한 난독화는 크게 헤더 난독화와 코드 난독화로 분류될 수 있다.The Executable and Linkable Format (ELF), which will be described later, is a standard file format for executable files, object files, shared libraries, and core dumps.The ELF header, section header, and section that the ELF file contains Since header tables, sections, segments, and the like are already well known, those skilled in the art can easily understand them without further explanation. Obfuscation for such ELF files can be broadly classified into header obfuscation and code obfuscation.
도 4 및 도 5는 본 발명의 일실시예에 있어서, 등록된 패키지 파일이 포함하는 ELF 파일에서 심볼에 대한 난독화를 탐지하는 제1 예를 도시한 도면이다. 4 and 5 illustrate a first example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to an embodiment of the present invention.
도 4는 ELF 파일이 포함하는 섹션 헤더 테이블(Section Header Table, 410)과 섹션 헤더 테이블(410)이 포함하는 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)의 헤더(411)를 나타내고 있다. 또한, 도 4는 ELF 파일이 포함하는 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)의 심볼 엔트리 테이블(Symbol Entry Table, 420)을 더 나타내고 있으며, 동적 링킹 심볼 테이블 섹션의 헤더(411)에서 심볼 엔트리 테이블(420)을 포인팅하고 있음을 나타내고 있다. 심볼 엔트리 테이블(420)은 임포트 함수(Import Function)와 익스포트 함수(Export Function)의 이름과 주소들을 나열하고 있는 테이블일 수 있다.4 illustrates a section header table 410 included in an ELF file and a header 411 of a dynamic linking symbol table section (.dynsym section) included in the section header table 410. 4 further shows a symbol entry table 420 of the dynamic linking symbol table section (.dynsym section) included in the ELF file, and the symbol entry table in the header 411 of the dynamic linking symbol table section. 420 is indicated. The symbol entry table 420 may be a table listing names and addresses of an import function and an export function.
ELF 파일에서 섹션 헤더 테이블(410)은 ELF 파일이 포함하는 섹션들 각각에 대한 이름, 메모리, 시작주소, 파일오프셋, 크기, 정렬방식, 표현방식 등의 정보들을 정의하고 있다. 섹션들은 상술한 .dynsym 섹션 외에도, 동적 링킹 정보 섹션(.dynamic 섹션), 읽기 전용 데이터 섹션(.rodata 섹션 또는 .rdata 섹션), 프로세스 초기화시 사용될 코드를 포함하는 섹션(.init 섹션 또는 .init_array 섹션) 등과 같은 다양한 섹션들을 포함하고 있으며, 이미 잘 알려져 있다. 예를 들어, .dynsym 섹션에 대한 정보들은 섹션 헤더 테이블(410)에서 .dynsym 섹션의 헤더를 통해 정의될 수 있으며, .dynsym 섹션의 헤더는 이러한 정의된 값들 중 적어도 일부(일례로, .dynsym 섹션의 시작주소와 파일오프셋 및 크기)를 통해 .dynsym 섹션을 포인팅하고 있을 수 있다.In the ELF file, the section header table 410 defines information such as a name, a memory, a start address, a file offset, a size, a sorting method, and a presentation method for each section included in the ELF file. In addition to the .dynsym section described above, the sections include a dynamic linking information section (.dynamic section), a read-only data section (.rodata section or a .rdata section), and a section (.init section or .init_array section) containing code to be used at process initialization. It contains various sections such as) and is well known. For example, information about a .dynsym section may be defined via the header of the .dynsym section in the section header table 410, where the header of the .dynsym section may contain at least some of these defined values (e.g., the .dynsym section You can point to the .dynsym section by its starting address, file offset and size).
도 5는, 도 4의 동적 링킹 심볼 테이블 섹션의 헤더(411)에 정의된 값들을 난독화하는 예로서, 정의된 값들을 널(Null, 510)로 대체한 예를 나타내고 있다. 이 경우, 동적 링킹 심볼 테이블 섹션의 헤더(411)는 심볼 엔트리 테이블(420)을 포인팅할 수 없게 되며, 따라서 ELF 파일의 섹션 헤더가 난독화될 수 있다. FIG. 5 illustrates an example of obfuscating values defined in the header 411 of the dynamic linking symbol table section of FIG. 4, and replacing the defined values with nulls 510. In this case, the header 411 of the dynamic linking symbol table section cannot point to the symbol entry table 420, so that the section header of the ELF file may be obfuscated.
이처럼, 동적 링킹 심볼 테이블 섹션의 헤더(411)에 정의된 값들을 널(510)이나 또는 다른 정보로 변경하여 난독화함으로써 ELF 파일에서 이용되는 심볼들을 난독화할 수 있다. 이때, 보안성 평가 시스템(300)은 동적 링킹 심볼 테이블 섹션의 헤더(411)에 정의된 값들을 분석하여 이러한 섹션 헤더의 난독화를 탐지할 수 있다.As such, the values defined in the header 411 of the dynamic linking symbol table section may be obfuscated by changing to null 510 or other information to obfuscate the symbols used in the ELF file. In this case, the security evaluation system 300 may detect obfuscation of the section header by analyzing values defined in the header 411 of the dynamic linking symbol table section.
예를 들어, 보안성 평가 시스템(300)은 동적 링킹 심볼 테이블 섹션의 헤더(411)가 널(510)을 포함하는 제1 조건, 동적 링킹 심볼 테이블 섹션의 헤더(411)가 파싱(parsing)이 불가능한 제2 조건 및 동적 링킹 심볼 테이블 섹션의 헤더(411)에 포함된 정보가 섹션들 중 동적 링킹 정보 섹션(.dynamic 섹션)에 존재하지 않는 제3 조건 중 어느 하나의 조건이 만족되는 경우, 섹션 헤더에 난독화가 적용된 것으로 결정할 수 있다.For example, the security assessment system 300 may include a first condition in which the header 411 of the dynamic linking symbol table section includes a null 510, and the header 411 of the dynamic linking symbol table section is parsed. If the condition of any one of the second condition that is impossible and the information contained in the header 411 of the dynamic linking symbol table section is not present in the dynamic linking information section (.dynamic section) among the sections is satisfied, It can be determined that obfuscation is applied to the header.
제1 조건은 도 5에서 설명하고 있는 바와 같이, 동적 링킹 심볼 테이블 섹션의 헤더(411)에 정의된 값이 널(510)로 대체된 조건을 의미할 수 있다.As described in FIG. 5, the first condition may refer to a condition in which a value defined in the header 411 of the dynamic linking symbol table section is replaced with a null 510.
한편, 동적 링킹 심볼 테이블 섹션의 헤더(411)는 기 정의된 구조를 갖고 있으며, 이러한 기 정의된 구조에 따라 동적 링킹 심볼 테이블 섹션의 헤더(411)를 파싱하기 위한 기존 방식이 존재한다. 이때, 제2 조건은 이러한 기존의 파싱 방식을 통해 동적 링킹 심볼 테이블 섹션의 헤더(411)의 파싱을 시도하고, 동적 링킹 심볼 테이블 섹션의 헤더(411)가 정상적으로 파싱되지 않는 조건을 의미할 수 있다. 다시 말해, 동적 링킹 심볼 테이블 섹션의 헤더(411)가 난독화된 경우, 보안성 평가 시스템(300)은 동적 링킹 심볼 테이블 섹션의 헤더(411)를 파싱할 수 없게 되며, 따라서 제2 조건이 만족함을 확인할 수 있다.Meanwhile, the header 411 of the dynamic linking symbol table section has a predefined structure, and there is an existing scheme for parsing the header 411 of the dynamic linking symbol table section according to the predefined structure. In this case, the second condition may mean a condition in which the header 411 of the dynamic linking symbol table section is attempted to be parsed through such a conventional parsing scheme, and the header 411 of the dynamic linking symbol table section is not normally parsed. . In other words, when the header 411 of the dynamic linking symbol table section is obfuscated, the security evaluation system 300 cannot parse the header 411 of the dynamic linking symbol table section, and thus the second condition is satisfied. can confirm.
또한, 동적 링킹 심볼 테이블 섹션의 헤더(411)에 기 정의된 구조에 따라 정의되는 값들 중 적어도 일부는 동적 링킹 정보 섹션(.dynamic 섹션)에도 포함되며, 동적 링킹 정보 섹션(.dynamic 섹션)의 값은 변경되지 않는다. 따라서, 보안성 평가 시스템(300)은 동적 링킹 심볼 테이블 섹션의 헤더(411)에 포함된 정보가 동적 링킹 정보 섹션(.dynamic 섹션)에 존재하는지 확인하여, 존재하지 않는 경우 동적 링킹 심볼 테이블 섹션의 헤더(411)에 포함된 값이 변경되었음을 확인할 수 있다. 다시 말해, 보안성 평가 시스템(300)은 제3 조건이 만족함을 확인할 수 있게 된다.In addition, at least some of the values defined according to the structure defined in the header 411 of the dynamic linking symbol table section are also included in the dynamic linking information section (.dynamic section), and the value of the dynamic linking information section (.dynamic section). Does not change. Therefore, the security evaluation system 300 checks whether the information included in the header 411 of the dynamic linking symbol table section exists in the dynamic linking information section (.dynamic section), and if it does not exist, It can be confirmed that the value included in the header 411 has been changed. In other words, the security evaluation system 300 may confirm that the third condition is satisfied.
이러한 제1 조건, 제2 조건 및 제3 조건 중 어느 하나의 조건이 만족되면, 보안성 평가 시스템(300)은 동적 링킹 심볼 테이블 섹션의 헤더(411)에 난독화가 적용된 것으로 결정할 수 있게 된다.If any one of the first condition, the second condition, and the third condition is satisfied, the security evaluation system 300 may determine that obfuscation is applied to the header 411 of the dynamic linking symbol table section.
도 6은 본 발명의 일실시예에 있어서, 등록된 패키지 파일이 포함하는 ELF 파일에서 심볼에 대한 난독화를 탐지하는 제2 예를 도시한 도면이다. 도 6의 실시예에서는 동적 링킹 심볼 테이블 섹션의 헤더(411) 대신 심볼 엔트리 테이블(420)의 값에 난독화를 적용한 예로서 임포트 함수의 이름(610)과 익스포트 함수의 이름(620)을 널(null)로 변경한 예를 나타내고 있다.FIG. 6 is a diagram illustrating a second example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to one embodiment of the present invention. In the embodiment of FIG. 6, as an example of applying obfuscation to the value of the symbol entry table 420 instead of the header 411 of the dynamic linking symbol table section, the name of the import function 610 and the name of the export function 620 are nulled. null) shows an example.
이러한 경우를 위해, 보안성 평가 시스템(300)은 동적 링킹 심볼 테이블 섹션의 헤더(411)가 포인팅하고 있는 심볼 엔트리 테이블(420)을 찾아 임포트 함수와 익스포트 함수의 값들을 분석하여 동적 링킹 심볼 테이블 섹션에 난독화가 적용되어 있는지 여부를 결정할 수 있다. 예를 들어, 보안성 평가 시스템(300)은 임포트 함수와 익스포트 함수의 값들이 널(null)을 포함하거나 또는 아스키(American Standard Code for Information Interchange, ASCII) 코드로 표현되지 않은 경우, 섹션(동적 링킹 심볼 테이블 섹션)에 난독화가 적용된 것으로 결정할 수 있다.For this case, the security assessment system 300 finds the symbol entry table 420 pointed to by the header 411 of the dynamic linking symbol table section and analyzes the values of the import and export functions to analyze the dynamic linking symbol table section. It can be determined whether or not obfuscation is applied. For example, the security assessment system 300 may determine a section (dynamic linking) if the values of the import and export functions contain nulls or are not represented in American Standard Code for Information Interchange (ASCII) code. It can be determined that obfuscation is applied to the symbol table section).
도 7은 본 발명의 일실시예에 있어서, 등록된 패키지 파일이 포함하는 ELF 파일에서 심볼에 대한 난독화를 탐지하는 제3 예를 도시한 도면이다. ELF 파일은 읽기-전용(read-only) 섹션(.rdata 섹션(710) 또는 .rodata 섹션)을 포함할 수 있으며, 섹션 헤더 테이블(410)은 이러한 읽기-전용(read-only) 섹션을 위한 헤더(.rdata 섹션 헤더(720) 또는 .rodata 섹션 헤더)를 포함할 수 있다.FIG. 7 illustrates a third example of detecting obfuscation of a symbol in an ELF file included in a registered package file according to an embodiment of the present invention. ELF files can contain read-only sections (.rdata section 710 or .rodata sections), and the section header table 410 contains headers for these read-only sections. (.rdata section header 720 or .rodata section header).
이러한 읽기-전용 섹션에 대한 난독화는 읽기-전용 섹션이 포함하는 텍스트들을 암호화 또는 부호화함으로서 이루어질 수 있다. 따라서 보안성 평가 시스템(300)은 읽기-전용 섹션을 위한 헤더를 통해 읽기-전용 섹션을 확인하고, 확인된 읽기-전용 섹션이 포함하는 읽기-전용 값들을 분석함으로써 읽기-전용 섹션에 대한 난독화를 탐지할 수 있다.Obfuscation for such a read-only section may be achieved by encrypting or encoding the texts contained in the read-only section. Therefore, the security evaluation system 300 obfuscates the read-only section by checking the read-only section through the header for the read-only section and analyzing the read-only values included in the identified read-only section. Can be detected.
예를 들어, 도 7의 실시예에서 보안성 평가 시스템(300)은 ELF 파일의 섹션 헤더 테이블(410)에서 .rdata 섹션 헤더(720)를 식별하고, 식별된 .rdata 섹션 헤더(720)가 포인팅하는 .rdata 섹션(730)을 찾아 .rdata 섹션(730)에 포함된 값들을 분석할 수 있다. 이때, .rdata 섹션(730)은 .rdata 섹션(710)이 포함하는 텍스트들을 난독화한 섹션일 수 있으며, 보안성 평가 시스템(300)은 .rdata 섹션(730)에 포함된 값들이 널(null)을 포함하거나, 또는 아스키 코드로 표현되지 않은 경우, .rdata 섹션(710)과 달리 .rdata 섹션(730)에 대해 난독화가 적용된 것을 확인할 수 있다.For example, in the embodiment of FIG. 7, the security assessment system 300 identifies the .rdata section header 720 in the section header table 410 of the ELF file, and the identified .rdata section header 720 is pointing. Find the .rdata section 730 to analyze the values contained in the .rdata section 730. In this case, the .rdata section 730 may be a section that obfuscates the texts included in the .rdata section 710, and the security evaluation system 300 determines that values included in the .rdata section 730 are null. ), Or not represented in ASCII code, it can be seen that obfuscation is applied to the .rdata section 730, unlike the .rdata section 710.
도 8은 본 발명의 일실시예에 있어서, ELF 파일의 ELF 헤더에 대한 난독화를 탐지하는 예를 도시한 도면이다. 도 8에서 제1 ELF 헤더(810)는 난독화가 적용되지 않은 헤더로서 섹션 헤더의 크기(811), 섹션 헤더의 수(812) 및 섹션의 크기(813)와 같은 정보들을 포함하고 있는 예를 나타내고 있다. 한편, 제2 ELF 헤더(820)는 난독화가 적용된 헤더로서 원래의 값들이 조작된 값들(821)로 변경된 예를 나타내고 있다.8 illustrates an example of detecting obfuscation of an ELF header of an ELF file according to an embodiment of the present invention. In FIG. 8, the first ELF header 810 is an unobfuscated header and shows an example including information such as the size of the section header 811, the number of section headers 812, and the size of the section 813. have. Meanwhile, the second ELF header 820 is a header to which obfuscation is applied, and shows an example in which original values are changed to manipulated values 821.
이러한 난독화의 탐지를 위해, 보안성 평가 시스템(300)은 ELF 헤더의 비정상 값을 탐지함에 따라 ELF 헤더에 대한 난독화 적용 여부를 결정할 수 있다. 예를 들어, ELF 헤더의 정상적인 값들은 일정한 범위의 값을 가질 수 있으나, 난독화가 적용되는 경우 이러한 값의 범위를 벗어나게 될 수 있다.In order to detect such obfuscation, the security evaluation system 300 may determine whether to apply obfuscation to the ELF header by detecting an abnormal value of the ELF header. For example, normal values of the ELF header may have a range of values, but may be out of this range when obfuscation is applied.
이를 위해, 보안성 평가 시스템(300)은 ELF 헤더가 포함하는 섹션 헤더의 크기, 섹션 헤더의 수 및 섹션의 크기 중 적어도 하나의 항목에 대한 정상값의 범위를 설정할 수 있으며, ELF 헤더에서 이러한 적어도 하나의 항목의 값을 추출할 수 있으며, 추출된 값이 설정된 정상값의 범위를 벗어나는 경우, ELF 헤더에 난독화가 적용된 것으로 결정할 수 있다.To this end, the security assessment system 300 may set a range of normal values for at least one item of the size of the section header included in the ELF header, the number of section headers, and the size of the section, and in the ELF header, the at least A value of one item may be extracted, and if the extracted value is out of a set range of normal values, it may be determined that obfuscation is applied to the ELF header.
예를 들어, 도 7의 실시예에서 제1 ELF 헤더(810)에서 추출되는 값들은 정상값의 범위에 포함될 것이며, 제2 ELF 헤더(820)에서 추출되는 값들은 정상값의 범위를 벗어나게 될 것이다. 이처럼, 보안성 평가 시스템(300)은 이러한 추출되는 값들의 비정상값이 감지되는 경우, ELF 헤더에 대해 난독화가 적용되었음을 탐지할 수 있게 된다.For example, in the embodiment of FIG. 7, values extracted from the first ELF header 810 will be included in the range of normal values, and values extracted from the second ELF header 820 will be out of the range of normal values. . As such, when the security evaluation system 300 detects an abnormal value of the extracted values, the security evaluation system 300 may detect that obfuscation is applied to the ELF header.
도 9는 본 발명의 일실시예에 있어서, 실행코드를 포함하는 섹션의 헤더에 대한 난독화 적용 여부를 결정하는 예를 도시한 도면이다.9 is a diagram for one example of determining whether to apply obfuscation to a header of a section including executable code according to an embodiment of the present invention.
앞서 설명한 섹션 헤더 테이블(410)은 실행코드를 포함하는 섹션(.text 섹션)의 헤더를 포함할 수 있다. 이때, 정상적이 .text 섹션의 헤더(910)는 실행코드의 크기(911)를 포함할 수 있으며, 난독화 방식 중 하나로 정상적인 .text 섹션의 헤더(910)가 포함하는 실행코드의 크기(911)를 조작하는 방식이 존재한다. 도 9는 정상적인 .text 섹션의 헤더(910)에 난독화가 적용됨에 따라 조작된 값(921)을 포함하는 난독화된 .text 섹션의 헤더(920)로 변경된 예를 나타내고 있다.The section header table 410 described above may include a header of a section (.text section) including executable code. In this case, the header 910 of the normal .text section may include a size 911 of the executable code, and the size of the executable code 911 included in the header 910 of the normal .text section as one of the obfuscation schemes. There is a way to manipulate. FIG. 9 illustrates an example in which the obfuscation is applied to the header 910 of the normal .text section, and the header 920 of the obfuscated .text section including the manipulated value 921.
이러한 난독화의 탐지를 위해, 보안성 평가 시스템(300)은 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)에 포함된 심볼 엔트리 테이블(420)에서 익스포트(export) 심볼 엔트리(도 9의 익스포트 함수(Export Function))를 통해 함수들의 주소를 수집할 수 있다. 예를 들어, 보안성 평가 시스템(300)은 이러한 익스포트 함수의 주소를 통해 함수들의 주소를 반복적으로 수집할 수 있으며, 수집된 주소를 이용하여 실행코드의 크기를 계산할 수 있다. 이때, 보안성 평가 시스템(300)은 정상적인 .text 섹션의 헤더(910)로부터 실행코드의 크기(911)를 추출할 수 있고, 추출된 실행코드의 크기(911)와 계산된 실행코드의 크기를 비교함으로써, 정상적인 .text 섹션의 헤더(910)에 난독화가 적용되지 않았음을 결정할 수 있다.In order to detect such obfuscation, the security evaluation system 300 exports an export symbol entry (Export function of FIG. 9) from the symbol entry table 420 included in the dynamic linking symbol table section (.dynsym section). Function)) can be used to collect the address of functions. For example, the security evaluation system 300 may repeatedly collect the addresses of the functions through the addresses of these export functions, and calculate the size of the executable code using the collected addresses. In this case, the security evaluation system 300 may extract the size of the executable code 911 from the header 910 of the normal .text section, and extract the size of the extracted executable code 911 and the calculated size of the executable code. By comparing, it may be determined that obfuscation has not been applied to the header 910 of the normal .text section.
만약, 도 9의 실시예에서와 같이, 난독화된 .text 섹션의 헤더(920)로부터 조작된 값(921)이 추출되는 경우에는, 조작된 값(921)이 원래의 실행코드의 크기(911)와 차이가 있기 때문에, 계산된 실행코드의 크기와 달라지게 되고, 이러한 비교를 통해 보안성 평가 시스템(300)은 난독화된 .text 섹션의 헤더(920)에 난독화가 적용되었음을 탐지할 수 있다.If the manipulated value 921 is extracted from the obfuscated .text section header 920, as in the embodiment of FIG. 9, the manipulated value 921 is the size of the original executable code 911. Since it is different from the calculated execution code size, the security evaluation system 300 may detect that the obfuscation is applied to the header 920 of the obfuscated .text section. .
도 10은 본 발명의 일실시예에 있어서, 코드에 대한 난독화를 탐지하는 예를 도시한 도면이다. 섹션 헤더 테이블(410)은 프로세스 초기화를 위한 코드를 포함하는 섹션(.init 섹션 및/또는 .init_array 섹션)의 헤더를 포함할 수 있다. 도 10에서는 .init 섹션의 헤더(1010)와 .init_array 섹션의 헤더(1020)를 각각 나타내고 있다. 또한, 도 10은 세그먼트(1030)를 나타내고 있다. 세그먼트(1030)는 ELF 파일이 포함하는 섹션들을 링커가 통합함에 따라 생성되는 것으로, .init 섹션의 헤더(1010) 및/또는 .init_array 섹션의 헤더(1020)는 런타임시 가장 먼저 실행되어 세그먼트(1030)가 포함하는 코드 세그먼트(Code segment, 1031)의 코드들을 실행하도록 구현될 수 있다. 여기서, 코드 세그먼트(1031)는 읽기-쓰기-실행(Read-Write-Execute, RWE) 권한을 가지며, 데이터 세그먼트(1032)는 읽기-쓰기(Read-Write, RW) 권한을 가질 수 있다.FIG. 10 illustrates an example of detecting obfuscation of a code according to an embodiment of the present invention. The section header table 410 may include a header of a section (.init section and / or .init_array section) that contains code for process initialization. 10 shows a header 1010 of the .init section and a header 1020 of the .init_array section, respectively. 10 also shows a segment 1030. Segment 1030 is created as the linker merges the sections that the ELF file contains. The header 1010 of the .init section and / or the header 1020 of the .init_array section are executed first at run time so that the segment 1030 ) May be implemented to execute codes of a code segment 1031. Here, the code segment 1031 may have a read-write-execute (RWE) right, and the data segment 1032 may have a read-write (RW) right.
이러한 코드 세그먼트(1031)는 어플리케이션의 구동을 위한 실제 실행코드들을 포함하고 있다. 그러나 실행코드들에 대해 난독화가 이루어진 경우(일례로, 실행코드 중 적어도 일부가 암호화된 경우), 정상적인 방법으로 코드 세그먼트(1031)의 코드들이 실행되는 경우에는 암호화된 코드로 인해 실행코드들이 정상적으로 실행될 수 없다.This code segment 1031 contains actual executable code for driving an application. However, when obfuscation is performed on executable codes (for example, when at least some of the executable code is encrypted), and when the codes of the code segment 1031 are executed in a normal manner, the executable code is executed normally due to the encrypted code. Can't.
따라서, 이러한 코드 난독화의 경우에는 난독화된 코드를 복원하기 위해 읽기-쓰기-실행(Read-Write-Execute, RWE) 권한을 갖는 새로운 세그먼트가 추가되게 된다. 도 10의 실시예에서는 추가된 세그먼트(Inserted segment, 1033)에 난독화된 코드를 복원하기 위한 인스트럭션이 추가되는 예를 나타내고 있다. 이때, 런타임시 가장 먼저 실행되는 .init 섹션의 헤더(1010) 및/또는 .init_array 섹션의 헤더(1020)는 코드 세그먼트(1031)가 아닌 추가된 세그먼트(1033)를 포인팅하도록 변경될 수 있다.Therefore, in the case of such code obfuscation, a new segment having read-write-execute (RWE) rights is added to restore the obfuscated code. 10 illustrates an example in which an instruction for restoring obfuscated code is added to an added segment 1033. In this case, the header 1010 of the .init section and / or the header 1020 of the .init_array section that are executed first at runtime may be changed to point to the added segment 1033 instead of the code segment 1031.
이러한 난독화를 탐지하기 위한 일실시예에서, 보안성 평가 시스템(300)은 추가된 세그먼트(1033)의 존재를 탐색할 수 있다. 이때, 보안성 평가 시스템(300)은 읽기-쓰기-실행(Read-Write-Execute, RWE) 권한을 갖는 추가된 세그먼트(1033)가 존재하는 경우, 코드 세그먼트(1031)에 난독화가 적용된 것으로 결정할 수 있다.In one embodiment for detecting such obfuscation, security assessment system 300 may detect the presence of added segment 1033. In this case, the security evaluation system 300 may determine that obfuscation is applied to the code segment 1031 when an added segment 1033 having a read-write-execute (RWE) right exists. have.
다른 실시예에서, 보안성 평가 시스템(300)은 .init 섹션의 헤더(1010) 및/또는 .init_array 섹션의 헤더(1020)에 추가된 세그먼트(1033)로의 포인팅이 존재하는지 여부를 탐색할 수 있다. 이때, 보안성 평가 시스템(300)은 .init 섹션의 헤더(1010) 및/또는 .init_array 섹션의 헤더(1020)에 추가된 세그먼트(1033)로의 포인팅이 존재하는 경우, 코드 세그먼트(1031)에 난독화가 적용된 것으로 결정할 수 있다. In another embodiment, the security assessment system 300 may detect whether there is a pointing to the segment 1033 added to the header 1010 of the .init section and / or the header 1020 of the .init_array section. . At this time, the security evaluation system 300 obfuscates the code segment 1031 when there is a pointing to the segment 1033 added to the header 1010 of the .init section and / or the header 1020 of the .init_array section. You can decide that the paint is applied.
또 다른 실시예에서, 보안성 평가 시스템(300)은 추가된 세그먼트(1032)를 분석(일례로, 디스어셈블)하여 코드 세그먼트(1031)에 포함된 난독화된 코드를 복원(일례로, 암호화된 코드를 복호화)하기 위한 코드가 추가된 세그먼트(1033)에 존재하는 경우, 코드 세그먼트(1031)에 난독화가 적용된 것으로 결정할 수 있다.In another embodiment, security assessment system 300 analyzes (eg, disassembles) the added segment 1032 to restore obfuscated code contained in code segment 1031 (eg, encrypted). When the code for decoding the code is present in the added segment 1033, it may be determined that obfuscation is applied to the code segment 1031.
또한, 보안성 평가 시스템(300)은 코드 자체를 분석하여 코드에 대한 난독화 여부를 탐지할 수도 있다.In addition, the security evaluation system 300 may detect whether the code is obfuscated by analyzing the code itself.
도 11은 본 발명의 일실시예에 있어서, 코드의 정합성을 설명하기 위한 예이다. 보안성 평가 시스템(300)은 도 9를 통해 설명한 바와 같이, 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)에 포함된 심볼 엔트리 테이블(420)에서 익스포트(export) 심볼 엔트리(도 9의 익스포트 함수(Export Function))를 통해 함수들의 주소를 수집할 수 있다. 이때, 보안성 평가 시스템(300)은 수집된 주소를 통해 각각의 함수들이 포함하는 인스트럭션을 분석할 수 있다.FIG. 11 illustrates an example of code conformance according to an embodiment of the present invention. FIG. As described with reference to FIG. 9, the security evaluation system 300 may export an export symbol entry (the export function of FIG. 9) from a symbol entry table 420 included in a dynamic linking symbol table section (.dynsym section). Function)) can be used to collect the address of functions. At this time, the security evaluation system 300 may analyze the instructions included in each function through the collected address.
예를 들어, 도 11에 도시된 바와 같이, 인스트럭션 Push와 Pop은 어셈블리어에서 가장 많이 쓰이는 인스트럭션들로, Push a, b(1110)는 오퍼랜드 a, b의 값을 스택(레지스터)에 저장하기 위한 인스트럭션이고, Pop a, b(1120)은 스택 최상단의 값을 꺼내서 오퍼랜드 a, b에 저장하는 동작을 위한 인스트럭션이다. 따라서 보안성 평가 시스템(300)은 도 11에 나타난 바와 같이 Push된 레지스터의 값이 Pop되고 있는지 여부를 탐색하여 코드의 정합성을 분석할 수 있다. 만약, Push된 레지스터의 값이 Pop되지 않는다면, 적어도 일부 코드에 난독화가 적용된 것으로 판단할 수 있다.For example, as shown in FIG. 11, the instructions Push and Pop are the most commonly used instructions in assembly language, and push a and b 1110 are instructions for storing the values of operands a and b in a stack (register). Pop a, b (1120) is an instruction for the operation of taking out the value of the top of the stack and storing it in the operands a, b. Accordingly, as shown in FIG. 11, the security evaluation system 300 may analyze whether the code is pushed by searching whether the value of the pushed register is Pop. If the value of the pushed register is not Pop, it may be determined that obfuscation is applied to at least some code.
도 11을 통해 설명한 Push와 Pop 외에도 인스트럭션 stmfd와 ldmfd의 쌍, 인스트럭션 stmdb와 pop.w의 쌍간에도 이러한 정합성이 요구된다. 보안성 평가 시스템(300)은 이러한 인스트럭션 stmfd와 ldmfd의 쌍과 인스트럭션 stmdb와 pop.w의 쌍에 대한 정합성을 더 분석할 수도 있고, 인스트럭션들간의 정합성이 없는 경우, 적어도 일부 코드에 난독화가 적용된 것으로 판단할 수 있다.In addition to Push and Pop described with reference to FIG. 11, such matching is required between a pair of instructions stmfd and ldmfd and a pair of instructions stmdb and pop.w. The security evaluation system 300 may further analyze the consistency of such pairs of instructions stmfd and ldmfd and pairs of instructions stmdb and pop.w, and if there is no consistency between the instructions, at least some of the code may be obfuscated. You can judge.
또한, 보안성 평가 시스템(300)은 존재하지 않는(미리 정의되어 있지 않은) 연산코드(operation code, opcode) 조합의 존재 여부에 따라 적어도 일부 코드에 대한 난독화 적용 여부를 결정할 수도 있다. 다시 말해, 난독화에 따라 연산코드가 존재하지 않는 조합을 구성하게 되는 경우, 보안성 평가 시스템(300)은 코드의 난독화를 탐지할 수 있다.In addition, the security evaluation system 300 may determine whether to apply obfuscation to at least some of the codes depending on the existence of an operation code (opcode) combination that does not exist (not predefined). In other words, in the case where an obfuscation code is formed according to obfuscation, the security evaluation system 300 may detect obfuscation of the code.
또한, 보안성 평가 시스템(300)은 분기(branch) 코드의 분기 위치에 대한 정보에 기반하여 코드에 대한 난독화 적용 여부를 결정할 수도 있다. 예를 들어, 앞서 설명한 바와 같이 보안성 평가 시스템(300)은 함수들의 주소에 대한 정보를 통해 전체 함수들에 대한 정보를 갖고 있다. 이때, 분기 코드를 통해 다음에 수행되는 인스트럭션의 위치가 이러한 함수들로의 위치가 아니라면, 보안성 평가 시스템(300)은 코드의 난독화를 탐지할 수 있다.In addition, the security evaluation system 300 may determine whether to apply obfuscation to the code based on the information on the branch position of the branch (branch) code. For example, as described above, the security evaluation system 300 has information about all functions through information about addresses of functions. At this time, if the position of the instruction to be performed next through the branch code is not the position to these functions, the security evaluation system 300 may detect obfuscation of the code.
도 12는 본 발명의 일실시예에 있어서, 분기 위치에 대한 정보에 기반하여 코드에 대한 난독화 적용 여부를 결정하는 예를 도시한 도면이다. 도 12는 함수 A(1200)가 포함하는 분기 코드(branch code, 1210)를 통해 도 10을 통해 설명한 세그먼트(1030)의 코드 세그먼트(1031)가 아닌 추가된 세그먼트(1033)로 분기하는 예를 나타내고 있다. 이 경우, 보안성 평가 시스템(300)은 적어도 일부의 코드에 난독화가 적용되어 있음을 탐지할 수 있다.12 is a diagram for one example of determining whether to apply obfuscation to a code based on information on a branch position according to an embodiment of the present invention. FIG. 12 illustrates an example of branching to an added segment 1033 through the branch code 1210 included in the function A 1200, rather than the code segment 1031 of the segment 1030 described with reference to FIG. 10. have. In this case, the security evaluation system 300 may detect that obfuscation is applied to at least some code.
또한, 보안성 평가 시스템(300)은 미리 정의된 패턴의 더미코드(dummy code)의 존재 여부에 기반하여 바이너리 코드에 대한 난독화 적용 여부를 결정할 수도 있다. 더미코드는 레지스터에 영향을 주지 않으면서도 코드 분석을 어렵게 하기 위해 추가되는 코드들로, 일정한 형식을 갖게 된다. 따라서, 보안성 평가 시스템(300)은 이러한 더미코드들의 패턴에 대한 정보를 미리 정의하여 관리할 수 있으며, 관리되는 패턴의 코드들이 존재하는 경우, 이를 더미코드로 판단할 수 있고, 코드 난독화를 위해 더미코드가 추가되었음을 탐지할 수 있다.In addition, the security evaluation system 300 may determine whether to apply obfuscation to the binary code based on the presence of a dummy code of a predefined pattern. Dummy code is code that is added to make code analysis difficult without affecting registers. Therefore, the security evaluation system 300 may predefine and manage information on patterns of these dummy codes, and if there are codes of a managed pattern, it may be determined as dummy codes, and code obfuscation may be performed. To detect that a dummy code has been added.
아래 표 1은 더미코드의 예를 나타내고 있다.Table 1 below shows an example of a dummy code.
SUBGE SP,SP,#0x84EORVS R2,R2, #0x9EMOVMI R2,R2EORVS R2,R2, #0x9EBX PCDCDSUBGE SP, SP, # 0x84EORVS R2, R2, # 0x9EMOVMI R2, R2EORVS R2, R2, # 0x9EBX PCDCD
또한, 보안성 평가 시스템(300)은 소스 코드에 더미코드를 추가하여 난독화할 수도 있다. 이러한 더미코드는 컴파일을 통해 정크코드(junc code)로 변환될 수 있다.In addition, the security evaluation system 300 may be obfuscated by adding dummy code to the source code. Such dummy code may be converted into junk code through compilation.
도 13은 본 발명의 일실시예에 있어서, 소스 코드에 더미코드를 추가하는 예를 도시한 도면이다. 도 13은 연산코드(1311)를 포함하는 소스 코드(1310)에 더미코드(1321)를 추가하여 난독화된 소스 코드(1320)를 생성하고, 난독화된 소스 코드(1320)를 컴파일하여 정크코드(1331)와 컴파일된 연산코드(1332)를 포함하는 바이너리 코드(1330)를 생성하는 예를 나타내고 있다.FIG. 13 is a diagram for one example of adding a dummy code to source code according to one embodiment of the present invention. FIG. 13 illustrates that the dummy code 1321 is added to the source code 1310 including the operation code 1311 to generate the obfuscated source code 1320, and the obfuscated source code 1320 is compiled to the junk code. An example of generating a binary code 1330 including a 1133 and a compiled operation code 1332 is shown.
이때, 더미코드(1321)와 정크코드(1331)는 일정한 패턴을 갖게 된다. 이는 더미코드(1321)가 컴파일될 수 있는 일정한 형식을 가져야 하고, 또한 원래의 연산코드(1311)나 컴파일된 연산코드(1332)에 영향을 미치지 말아야 하기 때문이다. 따라서, 보안성 평가 시스템(300)은 이러한 더미코드(1321) 및/또는 정크코드(1331)에 대한 패턴을 미리 설정하여 관리할 수 있으며, 소스 코드나 바이너리 코드에서 미리 정의된 패턴이 발견되는 경우, 코드에 대한 난독화의 적용을 탐지할 수 있다. 예를 들어, 바이너리 코드에서 인스트럭션 ldr 및/또는 인스트럭션 lsls의 연속적인 사용이 정크코드(1331)에 대한 패턴으로서 설정될 수 있다. 이 경우, 보안성 평가 시스템(300)은 바이너리 코드를 분석하여 인스트럭션 ldr 및/또는 인스트럭션 lsls가 반복적으로 사용되는 패턴을 탐지하여 코드에 대한 난독화의 적용을 탐지할 수 있다.At this time, the dummy code 1321 and the junk code 1331 have a predetermined pattern. This is because the dummy code 1321 must have a certain format that can be compiled, and must not affect the original operation code 1311 or the compiled operation code 1332. Therefore, the security evaluation system 300 may pre-set and manage the patterns for the dummy code 1321 and / or the junk code 1331, and if a predefined pattern is found in the source code or the binary code. For example, it can detect the application of obfuscation to the code. For example, successive use of instruction ldr and / or instruction lsls in binary code may be set as a pattern for junk code 1331. In this case, the security evaluation system 300 may detect the application of obfuscation to the code by analyzing a binary code and detecting a pattern in which the instruction ldr and / or the instruction lsls are repeatedly used.
도 14는 본 발명의 일실시예에 따른 서버의 프로세서가 포함할 수 있는 구성요소의 예를 도시한 블록도이고, 도 15는 본 발명의 일실시예에 따른 서버가 수행할 수 있는 보안성 평가 방법의 예를 도시한 흐름도이다.14 is a block diagram illustrating an example of a component that may be included in a processor of a server according to an embodiment of the present invention, and FIG. 15 is a security evaluation that may be performed by a server according to an embodiment of the present invention. A flowchart illustrating an example of the method.
본 발명의 실시예들에 따른 보안성 평가 시스템(300)은 앞서 설명한 서버(150)와 같은 컴퓨터 장치의 형태로 구현될 수 있다. 또한, 도 14에 도시된 바와 같이 서버(150)의 프로세서(222)는 보안성 평가 시스템(300)을 구현하기 위한 구성요소들로서 패키지 파일 등록부(1410), ELF 파일 식별부(1420), 난독화 결정부(1430), 보안성 등급 결정부(1440) 및 리포팅부(1450)를 포함할 수 있다. 이러한 프로세서(222) 및 프로세서(222)의 구성요소들은 도 15의 보안성 평가 방법이 포함하는 단계들(1510 내지 1550)을 수행할 수 있다. 이때, 프로세서(222) 및 프로세서(222)의 구성요소들은 메모리(221)가 포함하는 운영체제의 코드나 적어도 하나의 프로그램의 코드에 따른 제어 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서(222)의 구성요소들은 서버(150)에 저장된 코드가 제공하는 제어 명령에 따라 프로세서(222)에 의해 수행되는 프로세서(222)의 서로 다른 기능들(different functions)의 표현들일 수 있다. 예를 들어, 프로세서(222)가 상술한 제어 명령에 따라 패키지 파일을 등록하는 프로세서(222)의 기능적 표현으로 패키지 파일 등록부(1410)가 사용될 수 있다.The security evaluation system 300 according to the embodiments of the present invention may be implemented in the form of a computer device such as the server 150 described above. In addition, as shown in FIG. 14, the processor 222 of the server 150 is a package file register 1410, an ELF file identifier 1420, and obfuscation as components for implementing the security evaluation system 300. The determiner 1430, the security grade determiner 1440, and the reporter 1450 may be included. The processor 222 and the components of the processor 222 may perform steps 1510 to 1550 included in the security evaluation method of FIG. 15. In this case, the processor 222 and the components of the processor 222 may be implemented to execute a control instruction according to a code of an operating system included in the memory 221 or a code of at least one program. Here, the components of the processor 222 may be representations of different functions of the processor 222 performed by the processor 222 according to a control command provided by a code stored in the server 150. . For example, the package file register 1410 may be used as a functional representation of the processor 222 in which the processor 222 registers a package file according to the above-described control command.
단계(1510)에서 패키지 파일 등록부(1410) 어플리케이션의 설치 및 구동을 위한 패키지 파일을 등록할 수 있다. 패키지 파일은 어플리케이션의 이용자들에게 배포되기 위해 어플리케이션 퍼블리셔에 등록될 수 있다. 이미 설명한 바와 같이 보안성 평가 시스템(300)은 어플리케이션 퍼블리셔가 등록되는 어플리케이션들의 패키지 파일들을 배포하기 위한 서비스를 제공하는 장치에 구현되거나 또는 상술한 장치와 네트워크(170)를 통해 통신하는 별도의 시스템으로서 구현될 수 있다. 예를 들어, 보안성 평가 시스템(300)은 어플리케이션 퍼블리셔에 등록되는 패키지 파일을 네트워크(170)를 통해 수신하여 등록할 수도 있다. 이러한 패키지 파일은 앞서 설명한 바와 같이 안드로이드 응용 프로그램 패키지(Android application package, APK)를 포함할 수 있다.In operation 1510, the package file registration unit 1410 may register a package file for installing and driving the application. The package file can be registered with the application publisher for distribution to users of the application. As described above, the security evaluation system 300 may be implemented in a device that provides a service for distributing package files of applications for which an application publisher is registered, or as a separate system that communicates with the aforementioned device through the network 170. Can be implemented. For example, the security evaluation system 300 may receive and register a package file registered with an application publisher through the network 170. Such a package file may include an Android application package (Apk) as described above.
단계(1520)에서 ELF 파일 식별부(1420)는 등록된 패키지 파일이 포함하는 ELF(Executable and Linkable Format) 파일을 식별할 수 있다. 일례로, 패키지 파일이 안드로이드 응용 프로그램 패키지인 경우, PE 파일은 so 파일일 수 있다. 식별하고자 하는 ELF 파일은 도 3을 통해 설명한 바와 같이 패키지 분해 모듈(310)과 파일 식별 모듈(320)을 통해 식별되는 파일들 중에서 파일의 확장자를 통해 식별될 수 있다.In operation 1520, the ELF file identification unit 1420 may identify an executable and linkable format (ELF) file included in the registered package file. For example, if the package file is an Android application package, the PE file may be a so file. As described with reference to FIG. 3, the ELF file to be identified may be identified through an extension of the file among the files identified through the package decomposition module 310 and the file identification module 320.
단계(1530)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 ELF 헤더, 섹션 헤더(Section Header), 섹션 및 세그먼트 중 적어도 하나에 대한 난독화 적용 여부를 결정할 수 있다. 난독화 적용 여부를 결정하는 다양한 실시예들에 대해서는 이미 자세히 설명한 바 있으며, 이러한 실시예들에 따른 난독화 결정부(1430)의 보다 자세한 동작들에 대해서는 이후 도면들을 통해 더욱 자세히 설명한다.In operation 1530, the obfuscation determiner 1430 may determine whether to apply obfuscation to at least one of an ELF header, a section header, a section, and a segment included in the ELF file. Various embodiments for determining whether to apply obfuscation have already been described in detail, and more detailed operations of the obfuscation determiner 1430 according to these embodiments will be described in more detail with reference to the following drawings.
단계(1540)에서 보안성 등급 결정부(1440)는 난독화 적용 여부에 기반하여 ELF 파일에 대한 보안성 등급을 결정할 수 있다. 예를 들어, ELF 파일에 난독화가 적용되어 있는지 여부, ELF 파일에 적용된 난독화의 종류나 정도 등에 따라 ELF 파일에 대한 보안성 등급이 결정될 수 있다. 난독화의 종류는 앞서 설명한 다양한 실시예들을 통해 자세히 설명한 바 있으며, 난독화의 정도는 일례로, 적용된 난독화의 종류의 수, 코드의 정합성 정도 등을 통해 결정될 수 있다.In operation 1540, the security rating determiner 1440 may determine a security rating for the ELF file based on whether obfuscation is applied. For example, the security level of the ELF file may be determined according to whether obfuscation is applied to the ELF file, the type or degree of obfuscation applied to the ELF file, and the like. The type of obfuscation has been described in detail through various embodiments described above, and the degree of obfuscation may be determined based on, for example, the number of types of obfuscation applied, the degree of conformity of codes, and the like.
단계(1550)에서 리포팅부(1450)는 난독화 적용 여부에 대한 정보 및 ELF 파일에 대해 결정된 보안성 등급에 대한 정보를 리포팅할 수 있다. 예를 들어, 식별된 ELF 파일에 대해, 섹션 헤더의 난독화 적용 여부, 스트링 및/또는 스트링 테이블에 대한 난독화 적용 여부, 심볼 테이블에 대한 난독화 적용 여부, 코드에 대한 난독화 적용 여부 등에 대한 정보들이 보안성 평가 시스템(300)의 관리자나 이용자에게 제공될 수 있다.In operation 1550, the reporting unit 1450 may report information on whether obfuscation is applied and information on a security level determined for the ELF file. For example, for an identified ELF file, whether the section header is obfuscated, whether obfuscation is applied to strings and / or string tables, whether obfuscation is applied to symbol tables, whether obfuscation is applied to code, and so on. Information may be provided to an administrator or user of the security evaluation system 300.
도 16은 본 발명의 일실시예에 있어서, ELF 헤더에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다. 도 16의 단계들(1610 내지 1630)은 도 15의 단계(1530)에 포함될 수 있다. 이때, 단계(1610)은 단계(1530)에 포함될 수도 있으나, 단계(1530) 이전에 수행될 수도 있다.16 is a flowchart illustrating a method of determining whether obfuscation is applied to an ELF header according to an embodiment of the present invention. Steps 1610 through 1630 of FIG. 16 may be included in step 1530 of FIG. 15. In this case, step 1610 may be included in step 1530 but may be performed before step 1530.
단계(1610)에서 난독화 결정부(1430)는 ELF 헤더가 포함하는 섹션 헤더의 크기, 섹션 헤더의 수 및 섹션의 크기 중 적어도 하나의 항목에 대한 정상값의 범위를 설정할 수 있다. In operation 1610, the obfuscation determiner 1430 may set a range of normal values for at least one item of the size of the section header included in the ELF header, the number of section headers, and the size of the section.
단계(1620)에서 난독화 결정부(1430)는 ELF 헤더에서 적어도 하나의 항목의 값을 추출할 수 있다. 만약, ELF 헤더가 난독화되지 않았다면, 정상값의 범위에 포함된 값이 추출될 것이고, ELF 헤더가 난독화되어 있다면, 정상값의 범위를 벗어나는 값이 추출될 것이다.In operation 1620, the obfuscation determiner 1430 may extract a value of at least one item from the ELF header. If the ELF header is not obfuscated, a value included in the range of normal values will be extracted, and if the ELF header is obfuscated, a value outside the range of normal values will be extracted.
단계(1630)에서 난독화 결정부(1430)는 추출된 값이 설정된 정상값의 범위를 벗어나는 경우, ELF 헤더에 난독화가 적용된 것으로 결정할 수 있다. 다시 말해, 난독화 결정부(1430)는 미리 섹션 헤더의 크기, 섹션 헤더의 수 및 섹션의 크기 중 적어도 하나의 항목에 대한 정상값의 범위를 설정해두고 있다가, ELF 파일의 ELF 헤더에 대한 난독화 적용 여부를 판단하기 위해 활용할 수 있다. 이러한 ELF 헤더에 대한 난독화 탐지는 도 8을 통해 이미 자세히 설명한 바 있다.In operation 1630, the obfuscation determination unit 1430 may determine that the obfuscation is applied to the ELF header when the extracted value is out of the set range of the normal value. In other words, the obfuscation determiner 1430 sets a range of normal values for at least one of the size of the section header, the number of section headers, and the size of the section in advance, and then obfuscates the ELF header of the ELF file. This can be used to determine whether or not the application is applied. Obfuscation detection for such an ELF header has already been described in detail with reference to FIG. 8.
도 17은 본 발명의 일실시예에 있어서, 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)의 헤더에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다. 도 16의 단계들(1710 및 1720)은 도 15의 단계(1530)에 포함될 수 있다.17 is a flowchart illustrating a method of determining whether obfuscation is applied to a header of a dynamic linking symbol table section (.dynsym section) according to an embodiment of the present invention. Steps 1710 and 1720 of FIG. 16 may be included in step 1530 of FIG. 15.
단계(1710)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 섹션 헤더 테이블에서 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)의 헤더를 추출할 수 있다.In operation 1710, the obfuscation determiner 1430 may extract a header of the dynamic linking symbol table section (.dynsym section) from the section header table included in the ELF file.
단계(1720)에서 난독화 결정부(1430)는 추출된 동적 링킹 심볼 테이블 섹션의 헤더를 분석하여 섹션 헤더에 대한 난독화 적용 여부를 결정할 수 있다. 이를 위해, 난독화 결정부(1430)는 추출된 동적 링킹 심볼 테이블 섹션의 헤더가 널(null)을 포함하는 제1 조건, 상기 추출된 동적 링킹 심볼 테이블 섹션의 헤더가 파싱(parsing)이 불가능한 제2 조건 및 상기 추출된 동적 링킹 심볼 테이블 섹션의 헤더에 포함된 정보가 상기 섹션들 중 동적 링킹 정보 섹션(.dynamic 섹션)에 존재하지 않는 제3 조건 중 어느 하나의 조건이 만족되는 경우, 상기 섹션 헤더에 난독화가 적용된 것으로 결정할 수 있다. 이러한 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)의 헤더에 대한 난독화 탐지는 도 4 및 도 5를 통해 이미 자세히 설명한 바 있다.In operation 1720, the obfuscation determiner 1430 may determine whether to apply obfuscation to the section header by analyzing the header of the extracted dynamic linking symbol table section. To this end, the obfuscation determination unit 1430 may include a first condition in which the header of the extracted dynamic linking symbol table section includes null, and a header in which the header of the extracted dynamic linking symbol table section cannot be parsed. If the condition included in the condition 2 and the third condition in which the information included in the header of the extracted dynamic linking symbol table section does not exist in the dynamic linking information section (.dynamic section) of the sections is satisfied, the section It can be determined that obfuscation is applied to the header. Obfuscation detection for the header of this dynamic linking symbol table section (.dynsym section) has already been described in detail with reference to FIGS. 4 and 5.
도 18은 본 발명의 일실시예에 있어서, 실행코드를 포함하는 섹션의 헤더에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다. 도 18의 단계들(1810 내지 1830)은 도 15의 단계(1530)에 포함될 수 있다.18 is a flowchart illustrating a method of determining whether obfuscation is applied to a header of a section including executable code according to an embodiment of the present invention. Steps 1810 through 1830 of FIG. 18 may be included in step 1530 of FIG. 15.
단계(1810)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 섹션들 중 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)에 포함된 익스포트(export) 심볼 엔트리를 통해 함수들의 주소를 수집할 수 있다. 예를 들어, 난독화 결정부(1430)는 익스포트(export) 심볼 엔트리의 주소를 디스어셈블하여 전체 함수들을 추적 그 주소를 수집할 수 있다.In operation 1810, the obfuscation determiner 1430 may collect addresses of functions through an export symbol entry included in a dynamic linking symbol table section (.dynsym section) among sections included in the ELF file. . For example, the obfuscation determiner 1430 may disassemble the address of an export symbol entry to track the entire functions and collect the address.
단계(1820)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 섹션 헤더 테이블에서 실행코드를 포함하는 섹션(.text 섹션)의 헤더로부터 실행코드의 크기에 대한 값을 추출할 수 있다. 만약 실행코드를 포함하는 섹션(.text 섹션)의 헤더가 조작(난독화)되었다면 추출되는 값은 수집된 주소들을 통해 계산되는 값과 달라질 것이다.In operation 1820, the obfuscation determination unit 1430 may extract a value for the size of the executable code from the header of the section (.text section) including the executable code in the section header table included in the ELF file. If the header of the section containing the executable code (.text section) has been manipulated (obfuscated), the value extracted will be different from the value computed through the collected addresses.
단계(1830)에서 난독화 결정부(1430)는 수집된 주소들을 통해 계산되는 실행코드의 크기와 추출된 값을 비교하여 실행코드를 포함하는 섹션의 헤더에 대한 난독화 적용 여부를 결정할 수 있다. 다시 말해, 계산되는 값과 추출되는 값이 서로 다른 경우, 실행코드를 포함하는 섹션의 헤더에 대한 난독화를 탐지하게 된다. 이러한 실행코드를 포함하는 섹션의 헤더에 대한 난독화 탐지에 대해서는 도 9를 통해 이미 자세히 설명한 바 있다.In operation 1830, the obfuscation determination unit 1430 may determine whether to apply obfuscation to the header of the section including the execution code by comparing the extracted value with the size of the execution code calculated through the collected addresses. In other words, if the calculated value and the extracted value are different, the obfuscation of the header of the section including the executable code is detected. Obfuscation detection for the header of the section containing such executable code has already been described in detail with reference to FIG. 9.
도 19는 본 발명의 일실시예에 있어서, 동적 링킹 심볼 테이블 섹션에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다. 도 19의 단계(1910)는 도 15의 단계(1530)에 포함될 수 있다.19 is a flowchart illustrating a method of determining whether obfuscation is applied to a dynamic linking symbol table section according to an embodiment of the present invention. Step 1910 of FIG. 19 may be included in step 1530 of FIG. 15.
단계(1910)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 섹션들 중 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)에 포함된 심볼 엔트리를 분석하여, 심볼 엔트리가 포함하는 이름 및 주소 중 적어도 하나가 널(null)을 포함하거나 또는 아스키(American Standard Code for Information Interchange, ASCII) 코드로 표현되지 않은 경우, 동적 링킹 심볼 테이블 섹션에 난독화가 적용된 것으로 결정할 수 있다. 이러한 난독화 탐지 과정에 대해서는 도 6을 통해 이미 자세히 설명한 바 있다.In operation 1910, the obfuscation determiner 1430 analyzes the symbol entry included in the dynamic linking symbol table section (.dynsym section) among the sections included in the ELF file, and includes at least one of a name and an address included in the symbol entry. If one contains null or is not represented in American Standard Code for Information Interchange (ASCII) code, it can be determined that obfuscation has been applied to the dynamic linking symbol table section. This obfuscation detection process has already been described in detail with reference to FIG. 6.
도 20은 본 발명의 일실시예에 있어서, 읽기-전용(read-only) 섹션 에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다. 도 20의 단계(2010)는 도 15의 단계(1530)에 포함될 수 있다.20 is a flowchart illustrating a method of determining whether to apply obfuscation to a read-only section according to an embodiment of the present invention. Step 2010 of FIG. 20 may be included in step 1530 of FIG. 15.
단계(2010)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 섹션들 중 읽기-전용(read-only) 섹션에 포함된 정보를 분석하여, 포함된 정보가 널(null)을 포함하거나 또는 아스키 코드로 표현되지 않은 경우, 읽기-전용 섹션에 대해 난독화가 적용된 것으로 결정할 수 있다. 이러한 읽기-전용(read-only) 섹션은 .rdata 섹션 또는 .rodata 섹션을 포함할 수 있으며, 이러한 섹션들에 대한 난독화 탐지에 대해, 도 7을 통해 이미 자세히 설명한 바 있다.In operation 2010, the obfuscation determination unit 1430 analyzes the information included in the read-only section among the sections included in the ELF file, so that the included information includes null or If not expressed in ASCII code, you can determine that obfuscation is applied to the read-only section. This read-only section may include a .rdata section or a .rodata section, and the obfuscation detection for these sections has already been described in detail with reference to FIG. 7.
도 21은 본 발명의 일실시예에 있어서, 코드에 대한 난독화 적용 여부를 결정하는 방법의 제1 예를 도시한 흐름도이다. 도 21의 단계(2110)는 도 15의 단계(1530)에 포함될 수 있다.21 is a flowchart illustrating a first example of a method of determining whether obfuscation is applied to a code according to an embodiment of the present invention. Step 2110 of FIG. 21 may be included in step 1530 of FIG. 15.
단계(2110)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 섹션들이 링커를 통해 통합되어 생성되도록 기 정의되어 있는 세그먼트 이외에, 읽기-쓰기-실행(Read-Write-Execute) 권한을 갖는 다른 세그먼트가 추가되는지 여부에 따라 기 정의되어 있는 세그먼트에 포함된 코드에 대한 난독화 적용 여부를 결정할 수 있다. 도 10에서는 추가된 세그먼트(1033)에 대해 설명하였으며, 이러한 세그먼트의 추가 자체가 코드에 난독화가 적용되어 있음을 의미할 수 있다. 따라서, 난독화 결정부(1430)는 읽기-쓰기-실행(Read-Write-Execute) 권한을 갖는 다른 세그먼트가 추가됨을 코드에 난독화가 적용된 것으로 해석할 수 있다.In operation 2110, the obfuscation determiner 1430 may have other read-write-execute privileges in addition to the segments in which sections included in the ELF file are integrated and created through the linker. Depending on whether the segment is added, it is possible to determine whether or not to obfuscate the code included in the predefined segment. In FIG. 10, the added segment 1033 has been described, and the addition of the segment itself may mean that obfuscation is applied to the code. Accordingly, the obfuscation determiner 1430 may interpret that obfuscation is applied to the code that another segment having a read-write-execute right is added.
도 22는 본 발명의 일실시예에 있어서, 코드에 대한 난독화 적용 여부를 결정하는 방법의 제2 예를 도시한 흐름도이다. 도 22의 단계들(2210 내지 2230)은 도 15의 단계(1530)에 포함될 수 있다.22 is a flowchart illustrating a second example of a method of determining whether obfuscation is applied to a code according to an embodiment of the present invention. Steps 2210 through 2230 of FIG. 22 may be included in step 1530 of FIG. 15.
단계(2210)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 섹션들이 링커를 통해 통합되어 생성되도록 기 정의되어 있는 세그먼트 이외에, 읽기-쓰기-실행(Read-Write-Execute, RWE) 권한을 갖는 다른 세그먼트의 추가를 확인할 수 있다.In operation 2210, the obfuscation determiner 1430 may read-write-execute (RWE) permission in addition to the segment in which sections included in the ELF file are integrated and created by the linker. You can check the addition of other segments with
단계(2220)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 섹션 헤더 테이블에서 프로세스 초기화를 위한 코드를 포함하는 섹션(.init 섹션 또는 .init_array 섹션)의 헤더를 식별할 수 있다.In operation 2220, the obfuscation determiner 1430 may identify a header of a section (.init section or .init_array section) including code for process initialization in the section header table included in the ELF file.
단계(2230)에서 난독화 결정부(1430)는 식별된 섹션의 헤더에서 확인된 다른 세그먼트로의 포인팅이 존재하는 경우, 기 정의되어 있는 세그먼트에 포함된 코드에 난독화가 적용된 것으로 결정할 수 있다.In operation 2230, the obfuscation determiner 1430 may determine that obfuscation is applied to a code included in a predefined segment when a pointer to another segment identified in the header of the identified section exists.
도 10에서 설명한 바와 같이, 코드가 난독화되는 경우, 난독화된 코드를 복원하기 위한 코드가 요구되고 이러한 코드를 추가하기 위한 세그먼트가 추가될 수 있다. 또한, 런타임시 가장 먼저 실행되는 프로세스 초기화를 위한 코드를 포함하는 섹션(.init 섹션 또는 .init_array 섹션)의 헤더는 난독화된 코드를 복원하기 위해 추가된 세그먼트를 포인팅하게 된다. 따라서, 난독화 결정부(1430)는 .init 섹션 또는 .init_array 섹션이 추가된 세그먼트를 포인팅함을 탐지하여 이를 기 정의되어 있는 세그먼트(일례로, 도 10의 코드 세그먼트(1031))에 포함된 코드에 대한 난독화로서 탐지할 수 있다.As described in FIG. 10, when the code is obfuscated, a code for restoring the obfuscated code is required and a segment for adding such code may be added. In addition, the header of the section (.init section or .init_array section) containing the code for process initialization that is executed first at runtime will point to the segment added to restore the obfuscated code. Accordingly, the obfuscation determiner 1430 detects that the .init section or the .init_array section points to the segment to which it is added, and includes the code included in the predefined segment (for example, the code segment 1031 of FIG. 10). Can be detected as obfuscation for.
도 23은 본 발명의 일실시예에 있어서, 코드에 대한 난독화 적용 여부를 결정하는 방법의 제3 예를 도시한 흐름도이다. 도 23의 단계들(2310 및 2320)은 도 15의 단계(1530)에 포함될 수 있다.23 is a flowchart illustrating a third example of a method of determining whether obfuscation is applied to a code according to an embodiment of the present invention. Steps 2310 and 2320 of FIG. 23 may be included in step 1530 of FIG. 15.
단계(2310)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 섹션들이 링커를 통해 통합되어 생성되도록 기 정의되어 있는 세그먼트 이외에, 읽기-쓰기-실행(Read-Write-Execute, RWE) 권한을 갖는 다른 세그먼트의 추가를 확인할 수 있다.In operation 2310, the obfuscation determiner 1430 may read-write-execute (RWE) permission in addition to the segment in which sections included in the ELF file are integrated and created by the linker. You can check the addition of other segments with
단계(2320)에서 난독화 결정부(1430)는 확인된 다른 세그먼트를 분석하여 어플리케이션의 런타임시에 암호화된 코드를 복원하기 위한 코드가 존재하는 경우, 기 정의되어 있는 세그먼트에 포함된 코드에 난독화가 적용된 것으로 결정할 수 있다.In operation 2320, the obfuscation determination unit 1430 analyzes another identified segment, and when there is a code for restoring the encrypted code at runtime of the application, the obfuscation is included in the code included in the predefined segment. It can be determined that it has been applied.
이미 설명한 바와 같이, 코드가 난독화되는 경우, 난독화된 코드를 복원하기 위한 코드가 요구되고 이러한 코드를 추가하기 위한 세그먼트가 추가될 수 있다. 따라서 난독화 결정부(1430)는 이러한 추가된 세그먼트를 분석하여 암호화된 코드를 복원하기 위한 코드가 존재하는지 확인하고, 이러한 코드의 존재를 기 정의되어 있는 세그먼트(일례로, 도 10의 코드 세그먼트(1031))에 포함된 코드의 난독화로서 탐지할 수 있다.As already explained, if the code is obfuscated, code is required to restore the obfuscated code and segments for adding such code may be added. Accordingly, the obfuscation determination unit 1430 analyzes the added segment to determine whether there is a code for restoring the encrypted code, and determines the existence of the code (eg, the code segment of FIG. 10). 1031) can be detected as obfuscation of the code included in).
도 24는 본 발명의 일실시예에 있어서, 인스트럭션을 분석하여 코드에 대한 난독화 적용 여부를 결정하는 방법을 도시한 흐름도이다. 도 24의 단계들(2410 및 2420)은 도 15의 단계(1530)에 포함될 수 있다.24 is a flowchart illustrating a method of analyzing an instruction to determine whether obfuscation is applied to a code according to an embodiment of the present invention. Steps 2410 and 2420 of FIG. 24 may be included in step 1530 of FIG. 15.
단계(2410)에서 난독화 결정부(1430)는 ELF 파일이 포함하는 섹션들 중 동적 링킹 심볼 테이블 섹션(.dynsym 섹션)에 포함된 익스포트(export) 심볼 엔트리를 통해 함수들의 주소를 수집할 수 있다.In operation 2410, the obfuscation determiner 1430 may collect addresses of functions through an export symbol entry included in a dynamic linking symbol table section (.dynsym section) among sections included in the ELF file. .
단계(2420)에서 난독화 결정부(1430)는 수집된 주소를 이용하여 함수들이 포함하는 인스트럭션을 분석하여 코드에 대한 난독화 적용 여부를 결정할 수 있다.In operation 2420, the obfuscation determination unit 1430 may determine whether to apply obfuscation to the code by analyzing the instructions included in the functions by using the collected address.
이때, 난독화 결정부(1430)는 함수들이 포함하는 인스트럭션들간의 정합성, 정의되지 않은 연산코드(operation code, opcode) 조합의 존재 여부, 분기(branch) 코드의 분기 위치에 대한 정보 및 미리 정의된 패턴의 더미코드(dummy code)의 존재 여부 중 적어도 하나에 기반하여 코드에 대한 난독화 적용 여부를 결정할 수 있다.In this case, the obfuscation determiner 1430 may determine the consistency between the instructions included in the functions, whether there is an undefined operation code (opcode) combination, information on the branch position of the branch code, and the predefined location. It may be determined whether obfuscation is applied to the code based on at least one of whether a dummy code of the pattern exists.
예를 들어, 난독화 결정부(1430)는 단계(2420)에서 ELF 파일이 포함하는 섹션들이 링커를 통해 통합되어 생성되도록 기 정의되어 있는 세그먼트 이외에, 읽기-쓰기-실행(Read-Write-Execute, RWE) 권한을 갖는 다른 세그먼트의 추가를 확인하고, 함수들이 포함하는 인스트럭션이 다른 세그먼트가 포함하는 코드로 분기하는 경우, 코드에 난독화가 적용된 것으로 결정할 수 있다.For example, in operation 2420, the obfuscation determiner 1430 may read-write-execute, in addition to the segment in which the sections included in the ELF file are integrated and generated through the linker. RWE) confirm the addition of another segment with authority, and if the instructions included by the functions branch to code included in the other segment, it may be determined that obfuscation is applied to the code.
도 16 내지 도 24의 단계들은 단계(1530) 내에서 각각 서로 병렬적으로 수행될 수 있다. 또한, 이러한 단계들이 서로 병렬적으로 수행됨에 있어서 동일한 동작을 수행하는 단계들은 중복적으로 수행되지 않고, 한 번만 수행될 수도 있다. 예를 들어, 함수들의 주소를 수집하는 단계(1810)과 단계(2410)는 둘 중 하나의 단계만 수행될 수도 있다.16 to 24 may be performed in parallel with each other in step 1530. In addition, since these steps are performed in parallel with each other, the steps of performing the same operation may not be performed in duplicate, but may be performed only once. For example, collecting the addresses of the functions 1810 and 2410 may be performed only one of the two.
이상에서와 같이, 본 발명의 실시예들에 따르면, 어플리케이션 퍼블리셔의 관점에서, 등록되는 어플리케이션에 적용된 보안 수준을 난독화(obfuscation), 취약점(vulnerability) 및/또는 보안솔루션의 관점에 따라 객관적인 방법으로 분석 및 파악하고, 분석된 정보를 제공하여 어플리케이션의 보안성 향상을 위해 활용할 수 있다. 또한, ELF(Executable and Linkable Format) 파일에 대한 난독화 적용 여부를 탐지할 수 있다.As described above, according to embodiments of the present invention, in the objective of the application publisher, the security level applied to the registered application is determined in an objective manner in accordance with obfuscation, vulnerability, and / or security solution. It can be used to improve the security of the application by analyzing and understanding and providing the analyzed information. In addition, it is possible to detect whether obfuscation is applied to an Executable and Linkable Format (ELF) file.
이상에서 설명된 시스템 또는 장치는 하드웨어 구성요소, 소프트웨어 구성요소 또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 어플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The system or apparatus described above may be implemented as a hardware component, a software component or a combination of hardware components and software components. For example, the devices and components described in the embodiments are, for example, processors, controllers, arithmetic logic units (ALUs), digital signal processors, microcomputers, field programmable gate arrays (FPGAs). Can be implemented using one or more general purpose or special purpose computers, such as a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to the execution of the software. For convenience of explanation, one processing device may be described as being used, but one of ordinary skill in the art will appreciate that the processing device includes a plurality of processing elements and / or a plurality of types of processing elements. It can be seen that it may include. For example, the processing device may include a plurality of processors or one processor and one controller. In addition, other processing configurations are possible, such as parallel processors.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the above, and configure the processing device to operate as desired, or process it independently or collectively. You can command the device. Software and / or data may be any type of machine, component, physical device, virtual equipment, computer storage medium or device in order to be interpreted by or to provide instructions or data to the processing device. It can be embodied in. The software may be distributed over networked computer systems so that they may be stored or executed in a distributed manner. Software and data may be stored on one or more computer readable media.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 이러한 기록매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있으며, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks, such as floppy disks. Magneto-optical media, and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Such a recording medium may be various recording means or storage means in the form of a single or several hardware combined, and is not limited to a medium directly connected to any computer system, but may be distributed on a network. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described by the limited embodiments and the drawings as described above, various modifications and variations are possible to those skilled in the art from the above description. For example, the described techniques may be performed in a different order than the described method, and / or components of the described systems, structures, devices, circuits, etc. may be combined or combined in a different form than the described method, or other components. Or even if replaced or substituted by equivalents, an appropriate result can be achieved.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are within the scope of the claims that follow.

Claims (20)

  1. 어플리케이션의 보안성을 평가하는 방법에 있어서,In the method of evaluating the security of an application,
    어플리케이션의 설치 및 구동을 위한 패키지 파일을 등록하는 단계;Registering a package file for installing and running the application;
    상기 등록된 패키지 파일이 포함하는 ELF(Executable and Linkable Format) 파일을 식별하는 단계;Identifying an executable and linkable format (ELF) file included in the registered package file;
    상기 ELF 파일이 포함하는 ELF 헤더, 섹션 헤더(Section Header), 섹션 및 세그먼트 중 적어도 하나에 대한 난독화 적용 여부를 결정하는 단계; 및Determining whether to apply obfuscation to at least one of an ELF header, a section header, a section, and a segment included in the ELF file; And
    상기 난독화 적용 여부에 기반하여 상기 ELF 파일에 대한 보안성 등급을 결정하는 단계Determining a security level for the ELF file based on whether obfuscation is applied or not
    를 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method comprising the.
  2. 제1항에 있어서,The method of claim 1,
    상기 난독화 적용 여부에 대한 정보 및 상기 ELF 파일에 대해 결정된 보안성 등급에 대한 정보를 리포팅하는 단계Reporting information on whether obfuscation is applied and information on a security level determined for the ELF file;
    를 더 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method characterized in that it further comprises.
  3. 제1항에 있어서,The method of claim 1,
    상기 ELF 헤더가 포함하는 섹션 헤더의 크기, 섹션 헤더의 수 및 섹션의 크기 중 적어도 하나의 항목에 대한 정상값의 범위를 설정하는 단계Setting a range of normal values for at least one item of a size of a section header included in the ELF header, a number of section headers, and a size of a section;
    를 더 포함하고,More,
    상기 난독화 적용 여부를 결정하는 단계는,Determining whether or not the obfuscation is applied,
    상기 ELF 헤더에서 상기 적어도 하나의 항목의 값을 추출하는 단계; 및Extracting a value of the at least one item from the ELF header; And
    상기 추출된 값이 상기 설정된 정상값의 범위를 벗어나는 경우, 상기 ELF 헤더에 난독화가 적용된 것으로 결정하는 것을 특징으로 하는 보안성 평가 방법.And when the extracted value is out of a range of the set normal value, determining that obfuscation is applied to the ELF header.
  4. 제1항에 있어서,The method of claim 1,
    상기 난독화 적용 여부를 결정하는 단계는,Determining whether or not the obfuscation is applied,
    상기 ELF 파일이 포함하는 섹션 헤더 테이블에서 동적 링킹 심볼 테이블(.dynsym) 섹션 헤더를 추출하는 단계; 및Extracting a dynamic linking symbol table (.dynsym) section header from a section header table included in the ELF file; And
    상기 추출된 동적 링킹 심볼 테이블 섹션 헤더를 분석하여 상기 섹션 헤더에 대한 난독화 적용 여부를 결정하는 단계Analyzing the extracted dynamic linking symbol table section header to determine whether to apply obfuscation to the section header;
    를 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method comprising the.
  5. 제4항에 있어서,The method of claim 4, wherein
    상기 추출된 동적 링킹 심볼 테이블 섹션 헤더를 분석하여 상기 섹션 헤더에 대한 난독화 적용 여부를 결정하는 단계는,Determining whether to apply obfuscation to the section header by analyzing the extracted dynamic linking symbol table section header,
    상기 추출된 동적 링킹 심볼 테이블 섹션 헤더가 널(null)을 포함하는 제1 조건, 상기 추출된 동적 링킹 심볼 테이블 섹션 헤더가 파싱(parsing)이 불가능한 제2 조건 및 상기 추출된 동적 링킹 심볼 테이블 섹션 헤더가 상기 섹션들 중 동적 링킹 정보(.dynamic) 섹션에 존재하지 않는 제3 조건 중 어느 하나의 조건이 만족되는 경우, 상기 섹션 헤더에 난독화가 적용된 것으로 결정하는 것을 특징으로 하는 보안성 평가 방법.A first condition in which the extracted dynamic linking symbol table section header contains null, a second condition in which the extracted dynamic linking symbol table section header is not parseable, and the extracted dynamic linking symbol table section header Is determined that obfuscation is applied to the section header when any one of the third conditions not present in the dynamic linking information (.dynamic) section of the sections is satisfied.
  6. 제1항에 있어서,The method of claim 1,
    상기 난독화 적용 여부를 결정하는 단계는,Determining whether or not the obfuscation is applied,
    상기 ELF 파일이 포함하는 섹션들 중 동적 링킹 심볼 테이블(.dynsym) 섹션에 포함된 익스포트(export) 심볼 엔트리를 통해 함수들의 주소를 수집하는 단계;Collecting addresses of functions through an export symbol entry included in a dynamic linking symbol table (.dynsym) section among sections included in the ELF file;
    상기 ELF 파일이 포함하는 섹션 헤더 테이블에서 실행코드를 포함하는 섹션(.text)의 헤더로부터 실행코드의 크기에 대한 값을 추출하는 단계; 및Extracting a value of an executable code size from a header of a section (.text) including executable code in a section header table included in the ELF file; And
    상기 수집된 주소들을 통해 계산되는 실행코드의 크기와 상기 추출된 값을 비교하여 상기 실행코드를 포함하는 섹션(.text)의 헤더에 대한 난독화 적용 여부를 결정하는 단계Determining whether to apply obfuscation to a header of a section (.text) including the executable code by comparing the size of the executable code calculated through the collected addresses with the extracted value.
    를 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method comprising the.
  7. 제1항에 있어서,The method of claim 1,
    상기 난독화 적용 여부를 결정하는 단계는,Determining whether or not the obfuscation is applied,
    상기 ELF 파일이 포함하는 섹션들 중 동적 링킹 심볼 테이블(.dynsym) 섹션에 포함된 심볼 엔트리를 분석하여, 상기 심볼 엔트리가 포함하는 이름 및 주소 중 적어도 하나가 널(null)을 포함하거나 또는 아스키(American Standard Code for Information Interchange, ASCII) 코드로 표현되지 않은 경우, 상기 동적 링킹 심볼 테이블 섹션에 난독화가 적용된 것으로 결정하는 것을 특징으로 하는 보안성 평가 방법.Analyzing a symbol entry included in a dynamic linking symbol table (.dynsym) section among the sections included in the ELF file, at least one of a name and an address included in the symbol entry includes null or an ASCII ( And if it is not represented by an American Standard Code for Information Interchange (ASCII) code, determining that obfuscation is applied to the dynamic linking symbol table section.
  8. 제1항에 있어서,The method of claim 1,
    상기 난독화 적용 여부를 결정하는 단계는,Determining whether or not the obfuscation is applied,
    상기 ELF 파일이 포함하는 섹션들 중 읽기-전용(read-only) 섹션에 포함된 정보를 분석하여, 상기 포함된 정보가 널(null)을 포함하거나 또는 아스키 코드로 표현되지 않은 경우, 상기 읽기-전용 섹션에 대한 난독화가 적용된 것으로 결정하는 것을 특징으로 하는 보안성 평가 방법.Analyzing the information contained in the read-only section of the sections included in the ELF file, if the included information is null or not represented in ASCII code, the read- Security evaluation method characterized in that it is determined that obfuscation for the dedicated section has been applied.
  9. 제1항에 있어서,The method of claim 1,
    상기 난독화 적용 여부를 결정하는 단계는,Determining whether or not the obfuscation is applied,
    상기 ELF 파일이 포함하는 섹션들이 링커를 통해 통합되어 생성되도록 기 정의되어 있는 세그먼트 이외에, 읽기-쓰기-실행(Read-Write-Execute) 권한을 갖는 다른 세그먼트가 추가되는지 여부에 따라 상기 기 정의되어 있는 세그먼트에 포함된 코드에 대한 난독화 적용 여부를 결정하는 것을 특징으로 하는 보안성 평가 방법.In addition to the segments in which the sections included in the ELF file are integrated and created by the linker, the predefined segments are added depending on whether another segment having read-write-execute permission is added. Security evaluation method characterized in that it determines whether or not to apply obfuscation for the code included in the segment.
  10. 제1항에 있어서,The method of claim 1,
    상기 난독화 적용 여부를 결정하는 단계는,Determining whether or not the obfuscation is applied,
    상기 ELF 파일이 포함하는 섹션들이 링커를 통해 통합되어 생성되도록 기 정의되어 있는 세그먼트 이외에, 읽기-쓰기-실행(Read-Write-Execute, RWE) 권한을 갖는 다른 세그먼트의 추가를 확인하는 단계;Confirming addition of another segment having Read-Write-Execute (RWE) rights, in addition to a segment in which sections included in the ELF file are integrated and created through a linker;
    상기 ELF 파일이 포함하는 섹션 헤더 테이블에서 프로세스 초기화를 위한 코드를 포함하는 섹션(.init 섹션 또는 .init_array 섹션)의 헤더를 식별하는 단계; 및Identifying a header of a section (.init section or .init_array section) including code for process initialization in a section header table included in the ELF file; And
    상기 식별된 섹션의 헤더에서 상기 확인된 다른 세그먼트로의 포인팅이 존재하는 경우, 상기 기 정의되어 있는 세그먼트에 포함된 코드에 난독화가 적용된 것으로 결정하는 단계Determining that obfuscation has been applied to the code included in the predefined segment if a pointing from the header of the identified section to the identified other segment exists
    를 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method comprising the.
  11. 제1항에 있어서,The method of claim 1,
    상기 난독화 적용 여부를 결정하는 단계는,Determining whether or not the obfuscation is applied,
    상기 ELF 파일이 포함하는 섹션들이 링커를 통해 통합되어 생성되도록 기 정의되어 있는 세그먼트 이외에, 읽기-쓰기-실행(Read-Write-Execute, RWE) 권한을 갖는 다른 세그먼트의 추가를 확인하는 단계; 및Confirming addition of another segment having Read-Write-Execute (RWE) rights, in addition to a segment in which sections included in the ELF file are integrated and created through a linker; And
    상기 확인된 다른 세그먼트를 분석하여 어플리케이션의 런타임시에 암호화된 코드를 복원하기 위한 코드가 존재하는 경우, 상기 기 정의되어 있는 세그먼트에 포함된 코드에 난독화가 적용된 것으로 결정하는 단계Analyzing the identified other segment and determining that obfuscation is applied to the code included in the predefined segment when there is code for restoring the encrypted code at runtime of the application;
    를 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method comprising the.
  12. 제1항에 있어서,The method of claim 1,
    상기 난독화 적용 여부를 결정하는 단계는,Determining whether or not the obfuscation is applied,
    상기 ELF 파일이 포함하는 섹션들 중 동적 링킹 심볼 테이블(.dynsym) 섹션에 포함된 익스포트(export) 심볼 엔트리를 통해 함수들의 주소를 수집하는 단계; 및Collecting addresses of functions through an export symbol entry included in a dynamic linking symbol table (.dynsym) section among sections included in the ELF file; And
    상기 수집된 주소를 이용하여 함수들이 포함하는 인스트럭션을 분석하여 코드에 대한 난독화 적용 여부를 결정하는 단계Determining whether or not obfuscation is applied to the code by analyzing the instructions included in the functions using the collected address
    를 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method comprising the.
  13. 제12항에 있어서,The method of claim 12,
    상기 인스트럭션을 분석하여 코드에 대한 난독화 적용 여부를 결정하는 단계는,Determining whether to apply obfuscation to the code by analyzing the instructions,
    상기 함수들이 포함하는 인스트럭션들간의 정합성, 정의되지 않은 연산코드(operation code, opcode)의 존재 여부, 분기(branch) 코드의 분기 위치에 대한 정보 및 미리 정의된 패턴의 더미코드(dummy code)의 존재 여부 중 적어도 하나에 기반하여 코드에 대한 난독화 적용 여부를 결정하는 것을 특징으로 하는 보안성 평가 방법.The consistency between the instructions contained in the functions, the presence of undefined operation codes (opcodes), information on the branch location of branch codes, and the presence of dummy patterns of predefined patterns. And determining whether to apply obfuscation to the code based on at least one of whether or not.
  14. 제12항에 있어서,The method of claim 12,
    상기 인스트럭션을 분석하여 코드에 대한 난독화 적용 여부를 결정하는 단계는,Determining whether to apply obfuscation to the code by analyzing the instructions,
    상기 ELF 파일이 포함하는 섹션들이 링커를 통해 통합되어 생성되도록 기 정의되어 있는 세그먼트 이외에, 읽기-쓰기-실행(Read-Write-Execute, RWE) 권한을 갖는 다른 세그먼트의 추가를 확인하는 단계; 및Confirming addition of another segment having Read-Write-Execute (RWE) rights, in addition to a segment in which sections included in the ELF file are integrated and created through a linker; And
    상기 함수들이 포함하는 인스트럭션이 상기 다른 세그먼트가 포함하는 코드로 분기하는 경우, 코드에 난독화가 적용된 것으로 결정하는 단계Determining that the obfuscation is applied to the code when the instructions included by the functions branch to code included by the other segment.
    를 포함하는 것을 특징으로 하는 보안성 평가 방법.Security evaluation method comprising the.
  15. 제1항 내지 제14항 중 어느 한 항의 방법을 컴퓨터에 실행시키기 위한 컴퓨터 프로그램이 기록되어 있는 것을 특징으로 하는 컴퓨터 판독 가능한 기록매체.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 14.
  16. 어플리케이션의 보안성을 평가하는 시스템에 있어서,In the system for evaluating the security of the application,
    컴퓨터에서 판독 가능한 명령을 실행하도록 구현되는 적어도 하나의 프로세서At least one processor implemented to execute computer-readable instructions
    를 포함하고,Including,
    상기 적어도 하나의 프로세서는,The at least one processor,
    어플리케이션의 설치 및 구동을 위한 패키지 파일을 등록하고,Register the package file for installing and running the application,
    상기 등록된 패키지 파일이 포함하는 ELF(Executable and Linkable Format) 파일을 식별하고,Identify an executable and linkable format (ELF) file included in the registered package file,
    상기 ELF 파일이 포함하는 ELF 헤더, 섹션 헤더(Section Header), 섹션 및 세그먼트 중 적어도 하나에 대한 난독화 적용 여부를 결정하고,Determine whether to apply obfuscation to at least one of an ELF header, a section header, a section, and a segment included in the ELF file;
    상기 난독화 적용 여부에 기반하여 상기 ELF 파일에 대한 보안성 등급을 결정하는 것Determining a security level for the ELF file based on whether obfuscation is applied or not
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
  17. 제16항에 있어서,The method of claim 16,
    상기 적어도 하나의 프로세서는,The at least one processor,
    상기 난독화 적용 여부에 대한 정보 및 상기 ELF 파일에 대해 결정된 보안성 등급에 대한 정보를 리포팅하는 것Reporting information on whether obfuscation is applied and information on a security level determined for the ELF file.
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
  18. 제16항에 있어서,The method of claim 16,
    상기 적어도 하나의 프로세서는,The at least one processor,
    상기 ELF 헤더가 포함하는 섹션 헤더의 크기, 섹션 헤더의 수 및 섹션의 크기 중 적어도 하나의 항목에 대한 정상값의 범위를 설정하고,Setting a range of normal values for at least one item of a size of a section header, a number of section headers, and a size of a section included in the ELF header,
    상기 난독화 적용 여부를 결정하기 위해,In order to determine whether to apply the obfuscation,
    상기 ELF 헤더에서 상기 적어도 하나의 항목의 값을 추출하고,Extract a value of the at least one item from the ELF header,
    상기 추출된 값이 상기 설정된 정상값의 범위를 벗어나는 경우, 상기 ELF 헤더에 난독화가 적용된 것으로 결정하는 것Determining that the obfuscation is applied to the ELF header when the extracted value is out of a range of the set normal value.
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
  19. 제16항에 있어서,The method of claim 16,
    상기 적어도 하나의 프로세서는,The at least one processor,
    상기 난독화 적용 여부를 결정하기 위해,In order to determine whether to apply the obfuscation,
    상기 ELF 파일이 포함하는 섹션 헤더 테이블에서 동적 링킹 심볼 테이블(.dynsym) 섹션 헤더를 추출하고,Extracting a dynamic linking symbol table (.dynsym) section header from the section header table included in the ELF file,
    상기 추출된 동적 링킹 심볼 테이블 섹션 헤더를 분석하여 상기 섹션 헤더에 대한 난독화 적용 여부를 결정하는 것Analyzing the extracted dynamic linking symbol table section headers to determine whether obfuscation is applied to the section headers;
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
  20. 제16항에 있어서,The method of claim 16,
    상기 적어도 하나의 프로세서는,The at least one processor,
    상기 난독화 적용 여부를 결정하기 위해,In order to determine whether to apply the obfuscation,
    상기 ELF 파일이 포함하는 섹션들 중 동적 링킹 심볼 테이블(.dynsym) 섹션에 포함된 익스포트(export) 심볼 엔트리를 통해 함수들의 주소를 수집하고,Collecting the addresses of functions through an export symbol entry included in a dynamic linking symbol table (.dynsym) section among the sections included in the ELF file,
    상기 ELF 파일이 포함하는 섹션 헤더 테이블에서 실행코드를 포함하는 섹션(.text)의 헤더로부터 실행코드의 크기에 대한 값을 추출하고,Extracting a value for the size of the executable code from the header of the section (.text) including the executable code in the section header table included in the ELF file,
    상기 수집된 주소들을 통해 계산되는 실행코드의 크기와 상기 추출된 값을 비교하여 상기 실행코드를 포함하는 섹션(.text)의 헤더에 대한 난독화 적용 여부를 결정하는 것Determining whether to apply obfuscation to a header of a section (.text) including the executable code by comparing the size of the executable code calculated through the collected addresses with the extracted value.
    을 특징으로 하는 보안성 평가 시스템.Security evaluation system characterized in that.
PCT/KR2017/004236 2017-04-20 2017-04-20 Method and system for detecting application of obfuscation to and evaluating security of elf file WO2018194196A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/KR2017/004236 WO2018194196A1 (en) 2017-04-20 2017-04-20 Method and system for detecting application of obfuscation to and evaluating security of elf file
JP2018080912A JP7131946B2 (en) 2017-04-20 2018-04-19 Method and system for assessing application security
US15/958,115 US10963563B2 (en) 2017-04-20 2018-04-20 Method and system for evaluating security of application

Applications Claiming Priority (1)

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

Related Parent Applications (1)

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

Related Child Applications (2)

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

Publications (1)

Publication Number Publication Date
WO2018194196A1 true WO2018194196A1 (en) 2018-10-25

Family

ID=63855840

Family Applications (1)

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

Country Status (1)

Country Link
WO (1) WO2018194196A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109598107A (en) * 2018-11-20 2019-04-09 江苏通付盾信息安全技术有限公司 A kind of code conversion method and device based on application installation package file
CN109614772A (en) * 2018-11-20 2019-04-12 江苏通付盾信息安全技术有限公司 Code conversion method and device based on application installation package file
CN113742002A (en) * 2021-09-10 2021-12-03 上海达梦数据库有限公司 Method, device, equipment and storage medium for acquiring dependency relationship of dynamic library
CN114398102A (en) * 2022-01-18 2022-04-26 杭州米络星科技(集团)有限公司 Application package generation method and device, compiling server and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6668325B1 (en) * 1997-06-09 2003-12-23 Intertrust Technologies Obfuscation techniques for enhancing software security
KR20120120686A (en) * 2011-04-25 2012-11-02 삼성전자주식회사 Apparatus and method for processing application package in portable terminal
KR101490047B1 (en) * 2013-09-27 2015-02-04 숭실대학교산학협력단 Apparatus for tamper protection of application code based on self modification and method thereof
KR101700731B1 (en) * 2012-04-26 2017-01-31 텐센트 테크놀로지(센젠) 컴퍼니 리미티드 Method and apparatus for accessing application
KR20170018744A (en) * 2015-08-10 2017-02-20 라인 가부시키가이샤 System and method for protecting code of application

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6668325B1 (en) * 1997-06-09 2003-12-23 Intertrust Technologies Obfuscation techniques for enhancing software security
KR20120120686A (en) * 2011-04-25 2012-11-02 삼성전자주식회사 Apparatus and method for processing application package in portable terminal
KR101700731B1 (en) * 2012-04-26 2017-01-31 텐센트 테크놀로지(센젠) 컴퍼니 리미티드 Method and apparatus for accessing application
KR101490047B1 (en) * 2013-09-27 2015-02-04 숭실대학교산학협력단 Apparatus for tamper protection of application code based on self modification and method thereof
KR20170018744A (en) * 2015-08-10 2017-02-20 라인 가부시키가이샤 System and method for protecting code of application

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109598107A (en) * 2018-11-20 2019-04-09 江苏通付盾信息安全技术有限公司 A kind of code conversion method and device based on application installation package file
CN109614772A (en) * 2018-11-20 2019-04-12 江苏通付盾信息安全技术有限公司 Code conversion method and device based on application installation package file
CN113742002A (en) * 2021-09-10 2021-12-03 上海达梦数据库有限公司 Method, device, equipment and storage medium for acquiring dependency relationship of dynamic library
CN114398102A (en) * 2022-01-18 2022-04-26 杭州米络星科技(集团)有限公司 Application package generation method and device, compiling server and computer readable storage medium
CN114398102B (en) * 2022-01-18 2023-08-08 杭州米络星科技(集团)有限公司 Application package generation method and device, compiling server and computer readable storage medium

Similar Documents

Publication Publication Date Title
WO2018194196A1 (en) Method and system for detecting application of obfuscation to and evaluating security of elf file
US10963563B2 (en) Method and system for evaluating security of application
WO2014035043A1 (en) Apparatus and method for diagnosing malicious applications
CN104517054B (en) Method, device, client and server for detecting malicious APK
CN107408176A (en) The execution of malicious objects dissects detection
WO2017213400A1 (en) Malware detection by exploiting malware re-composition variations
WO2013089340A1 (en) Apparatus and method for detecting similarity between applications
WO2019054613A1 (en) Method and system for identifying open source software package on basis of binary file
WO2013191458A1 (en) License verification method and apparatus, and computer readable storage medium storing program therefor
WO2014088262A1 (en) Apparatus and method for detecting fraudulent/altered applications
WO2019066222A1 (en) Method and system for identifying open source software package on basis of binary file
Mao et al. Detecting malicious behaviors in javascript applications
WO2017126786A1 (en) Electronic device for analyzing malicious code and method therefor
CN113961919B (en) Malicious software detection method and device
CN108353083A (en) The system and method for algorithm (DGA) Malware is generated for detecting domains
CN109684829B (en) Service call monitoring method and system in virtualization environment
WO2019135425A1 (en) Open source software license verification method and system
WO2018199366A1 (en) Method and system for detecting whether obfuscation has been applied to dex file and evaluating security
KR102011725B1 (en) Whitelist construction method for analyzing malicious code, computer readable medium and device for performing the method
WO2016200058A1 (en) Binary merging device, method, and computer program
US11494492B2 (en) Program analysis system, program analysis method and storage medium
WO2019004503A1 (en) Application vulnerability detection method and system
WO2020111482A1 (en) Reverse engineering method and system utilizing big data based on program execution context
WO2022163908A1 (en) Method for assessing data leakage risk within application, and recording medium and device for performing same
WO2021225329A1 (en) Method and system for detecting forgery of mobile application by using user identifier and signature collection

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17906284

Country of ref document: EP

Kind code of ref document: A1