WO2016108521A1 - 익스플로잇 탐지 방법 및 장치 - Google Patents

익스플로잇 탐지 방법 및 장치 Download PDF

Info

Publication number
WO2016108521A1
WO2016108521A1 PCT/KR2015/014268 KR2015014268W WO2016108521A1 WO 2016108521 A1 WO2016108521 A1 WO 2016108521A1 KR 2015014268 W KR2015014268 W KR 2015014268W WO 2016108521 A1 WO2016108521 A1 WO 2016108521A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
script
exploit
code
input data
Prior art date
Application number
PCT/KR2015/014268
Other languages
English (en)
French (fr)
Inventor
최현상
Original Assignee
주식회사 시큐아이
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 시큐아이 filed Critical 주식회사 시큐아이
Publication of WO2016108521A1 publication Critical patent/WO2016108521A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • G06F21/563Static detection by source code analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements

Definitions

  • the present invention relates to an exploit detection method and apparatus, and more particularly, to a method and apparatus for detecting exploits based on code emulation.
  • An exploit is a process or sequence of instructions, scripts, programs, pieces of data, or a specific piece of data designed to perform an attacker's intended behavior using a design flaw, such as a bug in a computer's software or hardware, or a security vulnerability. it means.
  • the exploit consists of three parts: a trigger code for generating a security vulnerability, a code for avoiding a security technology, and a shell code for performing an actual attack.
  • trigger code and shellcode are common to all exploits, and security technology evasion code is separately used to evade them depending on the security technology used by the target.
  • security technology evasion code the recent heap spray, ROP, or a combination of both is mainly used.
  • Heap spraying is a technique to evade security techniques, such as techniques such as Address Space Layout Randomization (ASLR), which allows stack guards to protect the stack or memory areas to be randomly set at each run, so that exploit attacks are not executed normally. It was designed to neutralize them.
  • ASLR Address Space Layout Randomization
  • HeapSpray uses security techniques such as ASLR by spraying large amounts of Nop sled (ie, code that is continuously running 0x90 or similar instructions) and shellcode in the heap area of memory. It is a technique to avoid.
  • ROP Return Oriented Programming
  • Shellcode is a small piece of code that is used to exploit software vulnerabilities. Also called payload, it is traditionally used to launch a command shell when shellcode is executed, from which an attacker can take control of the target computer.
  • Shellcode consists of machine code that can be executed on a specific system and is loaded directly into memory and executed when an attack is executed. Shellcode is usually written in assembly language and changed to machine language.
  • Dynamic detection is a way to detect exploits by actually running them in a virtualized space (or virtual machine) to monitor whether a malicious attack is being performed. Since it is executed only when a possible system architecture, operating system, software version, or language) is satisfied, the detection fails if the exploit is not normally executed on the detection system because such conditions are not met.
  • An object of the present invention is to provide an exploit detection method and apparatus capable of detecting an exploit regardless of an operating system architecture, an operating system, software, or language by supplementing the conventional dynamic detection method.
  • Another object of the present invention is to provide an exploit detection method and apparatus configured to detect a polymorphic shellcode or script obfuscated shellcode by supplementing a conventional static detection method.
  • An exploit detection apparatus for processing the input data into a form that can be analyzed;
  • a data analyzer which emulates the data processed by the preprocessor or analyzes the input data by using a pattern analysis algorithm;
  • an exploit detection unit detecting an exploit in the data based on the data analyzed by the data analysis unit.
  • the preprocessor classifies the input data according to a data format or form, and then processes the input data into a form that can read a script code using a parser corresponding to the classified result.
  • the preprocessing unit may include: a decompression unit for decompressing the input data; And a decoder to decode the input data.
  • the data analysis unit may include: a script manipulation unit configured to change a script of the processed data into a script emulated form; And a script emulator for emulating a script changed into the script emulated form.
  • the script operation unit changes the script of the processed data to be emulated by a single script engine.
  • the script operation unit finds and deletes a security risky code from a script of the processed data or changes it into a safe form.
  • the script operation unit may include script code for searching for a name and a valid region of variables in the script, storing the names of the variables in a list, and storing the values of the variables according to the result of the script emulation. Insert into the script code of the input data.
  • the script operation unit inserts an error processing code for error processing into a script code of the data.
  • the data analyzing unit may further include a pattern analyzing unit that searches for patterns that appear periodically or frequently in the input data when the input data is script-free data.
  • the pattern analyzer may be configured to (a) repeat a particular ASCII code value, (b) have a unicode pattern, or (c) repeat an escape code or character pattern such as 0x, ⁇ x, or% u. Or (d) use pattern analysis algorithms to detect phenomena in which fpu-related instructions (eg, fnstenv) are abnormally used.
  • fpu-related instructions eg, fnstenv
  • the exploit detection unit detects an exploit included in the input data by detecting a heap spray, a ROP, or a shellcode based on the analyzed data.
  • the emulation monitor may further include an emulation monitor configured to detect a timeout of the emulation performed by the data analyzer or the exploit detection unit and to terminate the timed emulation.
  • An exploit detection method includes a preprocessing step of processing input data into an analysis-like form; A data analysis step of emulating data processed in the preprocessing step or analyzing the input data using a pattern analysis algorithm; And an exploit detection step of detecting an exploit in the data based on the data analyzed in the data analysis step.
  • the preprocessing step may include: classifying the input data according to a data format or form; And processing the input data into a form that can read a script code using a parser corresponding to the classified result.
  • the data analyzing step may include: finding names and valid regions of variables in a script of the input data; Storing the names of the variables in a list; And inserting script code for storing values of the variables according to the result of the script emulation into script code of the input data.
  • the exploits are statically analyzed to read scripts or major malicious patterns within the exploits, detection is possible regardless of operating system architecture, operating system, language, or software.
  • the present invention is a technique that overcomes the limitations of the conventional dynamic detection method and the static detection method.
  • it is possible to detect an unknown exploit quickly and effectively, thereby effectively defending the APT attack using the exploit. can do.
  • FIG. 1 is a block diagram showing a schematic configuration of a typical exploit.
  • FIG. 2 is a block diagram illustrating an exploit detection apparatus according to an embodiment of the present invention.
  • FIG. 3 is a flowchart illustrating an exploit detection method according to the exploit detection apparatus shown in FIG. 2.
  • FIG. 4 is a block diagram illustrating a detailed configuration of a preprocessor illustrated in FIG. 2.
  • FIG. 5 is a flowchart illustrating an operating method of the preprocessor illustrated in FIG. 4.
  • FIG. 6 is a block diagram illustrating a detailed configuration of the data analyzer illustrated in FIG. 2.
  • FIG. 7 is a flowchart illustrating an operating method of the data analyzer illustrated in FIG. 6.
  • FIG. 8 is a block diagram illustrating a detailed configuration of an exploit detection unit illustrated in FIG. 2.
  • FIG. 9 is a flowchart illustrating a method of operating an exploit detection unit illustrated in FIG. 8.
  • the exploit detection apparatus 100 may include a preprocessor 110, a data analyzer 120, and an exploit detector 130.
  • the preprocessing unit 110 is a module for processing the input data (1) in the form that can be analyzed.
  • the preprocessing unit 110 classifies the input data 1 according to its format, and processes the data 1 into a form in which a script code can be read using a parser or the like.
  • the processed data PD is provided to the data analyzer 120.
  • the data analyzer 120 analyzes and detects data generated or manipulated by the script by executing the script. Alternatively, when the data PD processed by the preprocessor 110 does not include a script, the data analyzer 120 searches for and analyzes a pattern appearing in the data PD. The analyzed data AD is provided to the exploit detection unit 130.
  • the exploit detection unit 130 actually detects the exploit based on the analyzed data AD.
  • the exploit detection unit 130 mainly detects exploits by detecting security technology avoidance codes and shell codes among the three parts constituting the exploit.
  • the exploit detection unit 130 detects the heap spray through the final value analysis after executing the script on the data, detects the ROP through the continuous pattern analysis of the gadgets and address values stored in the database, or the heap memory area. Detect shellcode by analyzing the state of API calls by executing the data loaded line by line.
  • the detected result 3 may be output to the user and provided so that the user knows whether an exploit exists.
  • the emulation monitor (2) which will be described later, is used to handle unexpected errors that may occur during script emulation and shell code emulation. For example, if an excessive amount of time is taken while executing a particular script, the emulation monitor can detect this and kill the emulation process.
  • the exploit detection device 100 while analyzing the exploit statically to read the script or the main pattern inside the exploit, while processing the read script in the form that can be analyzed and emulates the final value change
  • it can be detected regardless of the operating system architecture, operating system, language, or software.
  • polymorphic shellcode or script obfuscated shellcode can be detected.
  • the exploit detection apparatus 100 of the present invention can overcome the limitations of the conventional static detection method and the dynamic detection method, and can effectively detect the exploit and defend against the attack by it.
  • the preprocessor 110 the data analyzer 120, and the exploit detector 130 will be described in more detail below with reference to FIG. 4.
  • the exploit detection method includes steps S110 to S130.
  • step S110 the exploit detection method processes the input data into a form that can read the script code.
  • the data processing is performed by the preprocessor 110 (see FIG. 2).
  • the processed data PD is provided to the data analyzer 120 (see FIG. 2).
  • the exploit detection method analyzes the processed data PD using a script emulation or a pattern analysis algorithm (eg, heuristic algorithm).
  • a script emulation or a pattern analysis algorithm eg, heuristic algorithm
  • the analysis through script emulation means that the processed data is emulated in a virtualized environment to analyze the change of variables and result values, and the analysis using the heuristic algorithm appears periodically or frequently in the processed data PD. Analyze data patterns.
  • the data analysis is performed by the data analyzer 120, and the analyzed data AD is provided to the exploit detector 130 (see FIG. 2).
  • the exploit detection method detects exploits based on the analyzed data AD.
  • the exploit detection method detects the heap spray through the analysis of the final value after executing the script on the data, detects the ROP through the continuous pattern analysis of the gadgets and address values stored in the database, or binary data loaded in the heap memory area.
  • the exploit is detected by detecting shellcode by reading the code in machine code and executing it sequentially to check if the shellcode calls the API that is used.
  • the exploit detection operation is performed by the exploit detection unit 130.
  • the preprocessor 110 includes a decompressor 111, a decoder 112, and a file parser 113.
  • the preprocessor may receive embedded data (ED) from the data analyzer and provide processed data (PD) to the data analyzer.
  • ED embedded data
  • PD processed data
  • the preprocessor 110 is a module that processes the input data 1 into a form that can be analyzed (that is, in a form that can read the script code). To this end, the preprocessor 110 classifies the input data 1 according to its format or form. For example, generally inputtable data can be largely divided into network traffic, binary files, document files, PE files, and the like, and the preprocessing unit 110 stores the input data 1 according to the divided form or form. Classify
  • the preprocessor 110 may use the extension of the data file and the data classification signature DB when classifying the data.
  • the decompression unit 111 is a module that decompresses the input data 1 and performs a corresponding function when the data 1 is input in a compressed state.
  • the decoder 112 is a module for decoding the input data 1 and performs a corresponding function when the data 1 is input in an encoded state.
  • the file parsing unit 113 parses the classified data (data after being decompressed or decoded if it is compressed or encoded) and processes the data into a form that can read the script.
  • the file parsing unit 113 includes at least one parser according to a file format or form, and processes the corresponding data into a form in which a script can be read using a parser corresponding to the classified data format or form.
  • the file parser 113 may include a PDF parser, a Flash parser, an Hwp parser, an MS Office parser (OLE parser or XML parser), or an HTML parser.
  • the file parser 113 may include a Jar, apk, image, and multimedia file parser, and may process a Java file, an Android file, an image file, or a multimedia file using the file parser.
  • the processed data PD is provided to the data analyzer 120.
  • the input data is processed into a form that can read the script.
  • FIG. 5 is a flowchart illustrating an operating method of the preprocessor illustrated in FIG. 4.
  • the operation method of the preprocessor 110 includes steps S111 to S114.
  • operation S111 the operation method of the preprocessor 110 first classifies the input data 1 according to its format and form.
  • the operation method of the preprocessor 110 determines whether the classified data is compressed or encoded data. If the data is compressed or encoded, the operation method of the preprocessor 110 proceeds to step S113. Otherwise, the operation method of the preprocessor 110 proceeds to step S114.
  • operation S113 the operation method of the preprocessor 110 decompresses the data using the decompression unit 111 or decodes the data using the decoder 112.
  • operation S114 the operation method of the preprocessor 110 processes the classified data into a form that can read the script code using a parser suitable for the classified data.
  • the parser used may include at least some of a PDF parser, a Flash parser, an Hwp parser, an MS Office parser, an HTML parser, an OLE parser, an XML parser, a Jar parser, an apk parser, an image parser, and a multimedia file parser. have.
  • FIG. 6 is a block diagram illustrating a detailed configuration of the data analyzer illustrated in FIG. 2.
  • the data analyzer 120 may include a script operator 121, a script emulator 122, and a pattern analyzer 123.
  • the data PD processed by the preprocessor 110 contains a script (for example, JavaScript, Visual Basic or ActionScript), run the script to obfuscate the exploit or create a new file (for example, For example, you create a PE or embedded file, etc., so you must analyze the scripts included in the exploit to detect the exploit correctly.
  • a script for example, JavaScript, Visual Basic or ActionScript
  • run the script to obfuscate the exploit or create a new file (for example, For example, you create a PE or embedded file, etc., so you must analyze the scripts included in the exploit to detect the exploit correctly.
  • JavaScript is often inserted into pdf files, MS Office files (eg doc, xls or ppt), hwp files, html files, etc.
  • MS Office files eg doc, xls or ppt
  • hwp files e.g. doc, xls or ppt
  • the script manipulation unit 121 manipulates a script included in the exploit and executes the script with the script emulator 122 to find out data generated or manipulated by the script. Adopt the method.
  • the script operation unit 121 changes the script to be emulated by a single script engine (for example, SpiderMonkey JavaScript engine).
  • a single script engine for example, SpiderMonkey JavaScript engine.
  • Hangul JavaScript contains its own JavaScript code, so it works fine in a Korean word processor, but not in a standalone script engine. Therefore, even in this case, the script operation unit 121 changes the script to be operable in the single script engine.
  • the script operation unit 121 finds and deletes codes that may be a security risk when the script is executed or changes them to a safe form.
  • the codes that may be a security risk may include a script code for storing a file in a system folder or executing a generated exe file.
  • the script operation unit 121 parses the script, finds the names of the variables and the valid regions of the variables, and stores the names of the found variables in a separate list. This is what the script does to determine the final value of each variable in its valid range.
  • the script operation unit 121 inserts a script code capable of storing the value of the stored variable list in a file so as to analyze the final value of the items in the stored variable list after the script emulation.
  • the script operation unit 121 may insert a module call script for storing a file, and process the code for storing each value in the file by inserting the code into an error process.
  • the script operation unit 121 may handle an error to find an error code (for example, an ActiveXObject-related script function, etc.) that may cause an error when executed in a single script emulation engine within an existing script. ) Insert the code.
  • an error code for example, an ActiveXObject-related script function, etc.
  • the variables declared in the script can be changed by the script to know the final values in its own area.
  • these values can be loaded into memory and used for exploits in the form of heap sprays, ROPs, or shellcode, or they can be imaged and stored in a file in PE, so that these final values can be analyzed and detected.
  • the script manipulation unit 121 may also apply to the cases described above. To be treated accordingly.
  • the script emulator 122 performs a function of emulating a virtual space by configuring a script such as JavaScript, Visual Basic, and ActionScript.
  • a script such as JavaScript, Visual Basic, and ActionScript.
  • SpiderMonkey of Mozilla may be used as a JavaScript engine
  • cscript included in Windows may be used as a Visual Basic engine.
  • the script emulation is completed, the final values of each variable in the script are stored in the file. In an embodiment, the variable or its final values may be sorted in ascending or descending order according to the data length.
  • the pattern analysis unit 123 functions to detect an exploit for data without a script (for example, a PE file or a binary file). Specifically, the pattern analyzer 123 searches for patterns that appear periodically or frequently in the data in order to extract suspicious parts of the data without the script. Heuristic algorithms looking for such patterns include: (a) repeating certain ASCII code values, (b) partial Unicode patterns, (c) repeated escape codes or character patterns such as 0x, ⁇ x,% u, etc. (d) Analyze patterns in such a way as to find suspicious parts by detecting abnormal use of fpu-related instructions (eg, fnstenv).
  • fpu-related instructions eg, fnstenv
  • the data AD analyzed by the data analyzer 120 is provided to the exploit detector 130.
  • the execution result of the data analyzer 120 may be used to derive the exploit detection result 3 together with or in parallel with the execution result of the exploit detection unit 130.
  • the data analysis unit 120 by analyzing the processed data (PD) by emulation or pattern analysis method it can obtain the analysis data (AD) that can detect the exploit.
  • the emulation monitor 2 functions to solve a case where an unexpected error occurs during script emulation and shellcode emulation, or excessive data processing while processing the heap spray code takes a long time to detect. .
  • the emulation monitor 2 checks whether or not the timeout has occurred in each emulation through the timeout monitor 2a, and if so, the process emulation process using the process termination section 2b. (For example, you can use CreateRemoteThread to inject and execute code that calls the ExitProcess function). By adding an emulation monitor (2), you can detect exploits faster and more effectively.
  • FIG. 7 is a flowchart illustrating an operating method of the data analyzer illustrated in FIG. 6.
  • the operation method of the data analyzer 120 includes steps S121 to S127.
  • the operation method of the data analyzer 120 changes the script of the processed data PD to be emulated by a single script engine.
  • step S122 the operation method of the data analysis unit 120 deletes a security risky code from a script or changes it to a safe form.
  • step S123 the operation method of the data analysis unit 120 finds the names and valid areas of the necessary variables in the script and stores the names of the variables.
  • operation S124 the operation method of the data analyzer 120 inserts a script code for storing the changed final values of the variables into the original script code.
  • operation S125 the operation method of the data analyzer 120 inserts an error processing code for error processing into the original script code.
  • operation S126 the operation method of the data analyzer 120 performs script emulation.
  • operation S127 the operation method of the data analyzer 120 stores data values of variables of the emulated script.
  • the operation method of steps S121 to S127 describes the operation method when the processed data PD includes a script. If the processed data PD does not include a script, the data may be analyzed through a parum analysis method through a heuristic algorithm as described above with reference to FIG. 6.
  • the exploit detector 130 includes a shellcode detector 131, a heap spray detector 132, and an ROP detector 133.
  • the exploit detection unit 130 detects an exploit based on the analyzed data AD.
  • the exploit usually consists of three parts: (a) vulnerability trigger code, (b) security technology evasion code, and (c) shellcode.
  • the vulnerability trigger code is almost impossible to detect.
  • Exploits are usually detected by detecting security technology evasion code (eg, heapspray and ROP) and shellcode.
  • the shellcode detector 131 detects the shellcode.
  • Shellcode is composed of machine code, so it can be executed by loading it into memory.
  • the LoadLibrary family of APIs is called to load the libraries requiring shellcode into memory and to get the address of the required function using the GetProcAddress API.
  • the attack is then executed by calling functions.
  • shellcodes that call APIs that handle files and VirtualProtect and VirtualAlloc family of APIs that change memory attributes.
  • the shellcode detector 131 In order to detect the shellcode, the shellcode detector 131 first loads (executes) data into a heap memory area arbitrarily, and loadLibrary-based APIs (for example, LoadLibraryA, LoadLibraryEx, etc.), and handles files and APIs and memory attributes. Hook all APIs that change.
  • loadLibrary-based APIs for example, LoadLibraryA, LoadLibraryEx, etc.
  • the hooked API when the hooked API is called, it may be determined that the shellcode is detected.
  • the heap spray detector 132 detects the heap spray. Heap spraying is usually performed by scripts embedded in documents or web pages. Since variable data in a script goes up the heap memory area, it is usually possible to loop through a while or for statement in a script, storing data (such as Nop sled and shellcode) in a variable (for example, concatenating a string). Perform a heap spray.
  • the heap spray detector 132 detects the exploit in consideration of the characteristics of the heap spray. For example, when the heap spray detector 132 refers to the data AD analyzed by the data analyzer 120, the heap spray detector 132 may know the final value after executing the script of each variable. You can easily detect the heap spray by finding it. For simplicity, the heap spray detector 132 checks the case where the ratio of Nop Sled (for example, 0x0C, 0xD, or 0x90, etc.) is greater than or equal to a certain value, so that Nop Sled and shellcode are chunked. You can detect the heap spray by detecting patterns that appear repeatedly in the form of.
  • Nop Sled for example, 0x0C, 0xD, or 0x90, etc.
  • the ROP detector 133 detects the ROP. Specifically, the ROP detector 133 stores all the gadgets and address values available in each software in the database, and checks the case where they are found in the data in a continuous pattern together with the values to be used as arguments of the API function. Detect ROP For example, referring to the data AD analyzed by the data analyzer 120, it is possible to check a case where the address value of the gadgets and the value to be used as an argument of the API function are continuously displayed in the variable value. In this case, the ROP code Detect exploits as if they were
  • the execution result of the exploit detection unit 130 described above may be provided as the detection result (3).
  • the provided detection result 3 may include a detection type 3a and a script pattern 3b of the exploit.
  • FIG. 9 is a flowchart illustrating a method of operating an exploit detection unit illustrated in FIG. 8. 9 specifically describes a shellcode detection method during the operation of the exploit detection unit 130 in detail. 9, the operation method of the exploit detection unit 130 includes steps S131 to S139.
  • the exploit detector 130 loads data into the heap memory.
  • step S132 the exploit detection unit 130 hooks all the APIs of the LoadLibrary series, the file processing series memory attribute manipulation series.
  • step S133 the exploit detection unit 130 adds an exception processing routine for exception processing.
  • the exploit detection unit 130 sequentially executes at least some of the data loaded in the heap memory.
  • the exploit detection unit 130 determines whether the hooked API is called as a result of executing the data loaded in the heap memory. If the hooked API is called, the operation of the exploit detection unit 130 proceeds to step S136. Otherwise, the operation method of the exploit detection unit 130 proceeds to step S137a.
  • step S136 the exploit detection unit 130 is considered to have detected the shell code, to derive the exploit detection results.
  • the derived result may be provided as the detection result 3, and the operation method of the exploit detection unit 130 ends after completion of step S136.
  • step S137a the exploit detection unit 130 determines whether exception processing has occurred. If exception processing has occurred, the operation of the exploit detection unit 130 proceeds to step S137b. Otherwise, the operation method of the exploit detection unit 130 proceeds directly to step S138.
  • step S137b the exploit detection unit 130 performs exception processing. After the exception processing is completed, the process proceeds to step S138.
  • step S138 the exploit detection unit 130 determines whether all the data loaded in the heap memory has been executed. If all the data has been executed, the operation method of the exploit detection unit 130 ends. Otherwise, the operation method of the exploit detection unit 130 proceeds directly to step S139.
  • step S139 the exploit detector 130 executes the next data area loaded in the heap memory. The process then returns to step S135.
  • the static detection method does not detect the case where the exploit is obfuscated by the script inside the exploit.
  • the exploit detection apparatus and method according to the present invention can detect an obfuscated exploit because it processes a script and emulates it using a single script engine to track changes in internal data.
  • the execution of the dynamic detection of the exploit method does not work properly when the operating system architecture, operating system, software version or language does not match. You have to build and run each environment, but these are hard to develop with automated systems, and manual analysis can be time-consuming.
  • the exploit detection apparatus and method according to the present invention has higher utility since the exploit can be detected only by adding a module that parses the data to be analyzed regardless of the architecture, operating system, software version or language in which the exploit operates. .
  • the exploit detection apparatus and method according to the present invention has the advantage of preventing the unnecessarily long analysis time because it terminates the emulation process when monitoring the script emulation takes a long time to process the data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Virology (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

본 발명은 코드 에뮬레이션에 기반하여 익스플로잇을 탐지하는 방법 및 장치를 개시한다. 본 발명에 따른 익스플로잇 탐지 장치는 입력된 데이터를 분석 가능한 형태로 가공하는 전처리부, 전처리부에서 가공된 데이터를 스크립트 에뮬레이션하거나 또는 입력된 데이터를 패턴분석 알고리즘을 이용하여 분석하는 데이터 분석부, 및 데이터 분석부에서 분석된 데이터에 기반하여 데이터 내의 익스플로잇을 탐지하는 익스플로잇 탐지부를 포함한다.

Description

익스플로잇 탐지 방법 및 장치
본 발명은 익스플로잇 탐지 방법 및 장치에 관한 것으로서, 더욱 상세하게는 코드 에뮬레이션에 기반하여 익스플로잇을 탐지하는 방법 및 장치에 관한 것이다.
익스플로잇(exploit)은 컴퓨터의 소프트웨어나 하드웨어의 버그, 보안 취약점 등 설계상 결함을 이용해 공격자의 의도된 동작을 수행하도록 만들어진 절차나 일련의 명령, 스크립트, 프로그램, 특정한 데이터 조각 또는 그것들을 이용한 공격 행위를 의미한다.
익스플로잇의 목적은 주로 대상 시스템의 제어 권한 획득으로서, 도 1에는 일반적인 익스플로잇의 개략적인 구성이 도시되어 있다. 도 1을 참조하면, 익스플로잇은 보안취약점을 발생시키는 트리거 코드, 보안기술을 회피하는 코드, 실제 공격을 수행하는 쉘코드의 세 부분으로 구성된다.
이 중 트리거 코드와 쉘코드는 모든 익스플로잇에 공통적으로 존재하며, 공격 대상이 사용하고 있는 보안 기술에 따라 그것을 회피하기 위한 보안기술 회피 코드가 별도로 사용된다. 보안기술 회피코드로는 최근 힙스프레이, ROP 또는 그 둘을 조합한 것이 주로 사용된다.
힙스프레이(heap spraying)는 보안기술 회피용 코드로서, 예를 들어 스택을 보호하는 스택가드나 메모리 영역을 매 실행 시 무작위로 정해 익스플로잇 공격들이 정상으로 실행되지 않게 하는 ASLR(Address Space Layout Randomization) 같은 기법들을 무력화하기 위해 고안되었다. 힙스프레이는 메모리의 힙(heap) 영역에 Nop sled(즉, 아무런 동작을 하지 않는 0x90 혹은 이와 유사한 인스트럭션이 연속적으로 나오는 코드)와 쉘코드의 조합을 대규모로 뿌려(spraying) ASLR등의 보안기술을 회피하는 기법이다.
ROP(Return Oriented Programming)는 DEP (Data Execution Prevention, 데이터 실행 방지) 기술을 회피하기 위한 코드로서, 코드영역에 return으로 끝나는 코드 조각(gadget)들을 모아서 실제 공격이 수행되도록 하는 기법이다.
쉘코드는 작은 크기의 코드로 소프트웨어 취약점을 이용하기 위해 사용된다. 페이로드(payload)라고 불리기도 하며, 전통적으로 쉘코드가 수행이 되었을 때 명령 쉘을 시작시켜 그로부터 공격자가 공격 대상 컴퓨터를 제어하는 방식으로 이용된다. 쉘코드는 특정 시스템에서 실행 가능한 형태의 기계어 코드로 구성이 되어 있고 공격 수행 시 메모리에 직접 적재되어 실행된다. 쉘코드는 일반적으로 어셈블리어로 작성되고 기계어로 변경된다.
기존의 익스플로잇 탐지 방법은 크게 정적 탐지 방법 및 동적 탐지 방법으로 구분된다. 동적 탐지 방법은 익스플로잇을 가상화 공간(또는, 가상 머신)에서 실제로 실행시켜 악성공격이 수행되는지 여부를 모니터링을 함으로써 익스플로잇을 탐지하는 방법인데, 익스플로잇을 실행하기 위한 제반 조건(예를 들어, 익스플로잇이 동작될 수 있는 시스템 아키텍쳐, 운영체제, 소프트웨어 버전, 또는 언어 등)이 충족되었을 때에만 실행이 되기 때문에, 그러한 조건이 맞지 않아 익스플로잇이 탐지 시스템에서 정상적으로 실행되지 않는 경우 탐지에 실패하는 문제점이 있다.
정적 탐지 방법의 경우 최근의 익스플로잇들은 대부분 폴리몰픽 기법을 사용하거나 난독화되어 있는 경우가 많아 일반적인 정적 탐지 방법으로는 익스플로잇을 탐지하기 어려워진 문제점이 있다.
본 발명의 목적은 종전 동적 탐지 방법을 보완하여, 동작 시스템 아키텍쳐, 운영체제, 소프트웨어 또는 언어와 상관없이 익스플로잇을 탐지할 수 있는 익스플로잇 탐지 방법 및 장치를 제공하는 데 있다.
본 발명의 다른 목적은 종전 정적 탐지 방법을 보완하여, 폴리몰픽 쉘코드나 스크립트로 난독화된 쉘코드도 탐지 가능하도록 구성된 익스플로잇 탐지 방법 및 장치를 제공하는 데 있다.
본 발명의 실시 예들에 따른 익스플로잇 탐지 장치는, 입력된 데이터를 분석 가능한 형태로 가공하는 전처리부; 상기 전처리부에서 가공된 데이터를 에뮬레이션하거나 또는 상기 입력된 데이터를 패턴분석 알고리즘을 이용하여 분석하는 데이터 분석부; 및 상기 데이터 분석부에서 분석된 데이터에 기반하여 상기 데이터 내의 익스플로잇을 탐지하는 익스플로잇 탐지부를 포함한다.
실시 예로서, 상기 전처리부는, 상기 입력된 데이터를 데이터 형식 또는 형태에 따라 분류한 후, 상기 분류된 결과에 대응되는 파서를 이용하여 상기 입력된 데이터를 스크립트 코드를 읽을 수 있는 형태로 가공한다.
실시 예로서, 상기 전처리부는, 상기 입력된 데이터의 압축을 풀기 위한 압축 해제부; 및 상기 입력되 데이터의 인코딩을 풀기 위한 디코더를 포함한다.
실시 예로서, 상기 데이터 분석부는, 상기 가공된 데이터의 스크립트를 스크립트 에뮬레이션 가능한 형태로 변경하는 스크립트 조작부; 및 상기 스크립트 에뮬레이션 가능한 형태로 변경된 스크립트를 에뮬레이션하는 스크립트 에뮬레이터를 포함한다.
실시 예로서, 상기 스크립트 조작부는, 상기 가공된 데이터의 스크립트를 단독 스크립트 엔진으로 에뮬레이션 가능하도록 변경한다.
실시 예로서, 상기 스크립트 조작부는, 상기 가공된 데이터의 스크립트에서 보안상 위험한 코드를 찾아내어 삭제하거나 안전한 형태로 변경한다.
실시 예로서, 상기 스크립트 조작부는, 상기 스크립트 내의 변수들의 이름과 유효 영역을 찾고, 상기 변수들의 이름을 리스트에 저장하고, 상기 스크립트 에뮬레이션의 결과에 따른 상기 변수들의 값을 저장하기 위한 스크립트 코드를 상기 입력된 데이터의 스크립트 코드에 삽입한다.
실시 예로서, 상기 스크립트 조작부는, 에러처리를 위한 에러 처리 코드를 상기 데이터의 스크립트 코드에 삽입한다.
실시 예로서, 상기 데이터 분석부는, 상기 입력된 데이터가 스크립트가 없는 데이터인 경우, 상기 입력된 데이터 내에서 주기적으로 또는 빈번하게 나타나는 패턴들을 찾아내는 패턴 분석부를 더 포함한다.
실시 예로서, 상기 패턴 분석부는 (a) 특정 아스키 코드 값이 반복되거나, (b) 일부분만 유니코드 패턴이 존재하거나, (c) 이스케이프 코드나 0x, \x, %u 등의 문자 패턴이 반복되거나, (d) fpu관련 인스트럭션(예를 들어, fnstenv)이 비정상적으로 사용되는 현상을 탐지하기 위한 패턴 분석 알고리즘을 사용한다.
실시 예로서, 상기 익스플로잇 탐지부는 상기 분석된 데이터를 기반으로 힙스프레이, ROP, 또는 쉘코드를 탐지함으로써 상기 입력된 데이터에 포함된 익스플로잇을 탐지한다.
실시 예로서, 상기 데이터 분석부 또는 상기 익스플로잇 탐지부에서 수행되는 에뮬레이션의 시간초과를 감지하여, 상기 시간초과된 에뮬레이션을 종료시키는 에뮬레이션 모니터를 더 포함한다.
본 발명의 실시 예들에 따른 익스플로잇 탐지 방법은, 입력된 데이터를 분석 가느한 형태로 가공하는 전처리 단계; 상기 전처리 단계에서 가공된 데이터를 에뮬레이션하거나 또는 상기 입력된 데이터를 패턴분석 알고리즘을 이용하여 분석하는 데이터 분석 단계; 및 상기 데이터 분석 단계에서 분석된 데이터에 기반하여 상기 데이터 내의 익스플로잇을 탐지하는 익스플로잇 탐지 단계를 포함한다.
실시 예로서, 상기 전처리 단계는, 상기 입력된 데이터를 데이터 형식 또는 형태에 따라 분류하는 단계; 및 상기 분류된 결과에 대응되는 파서를 이용하여 상기 입력된 데이터를 스크립트 코드를 읽을 수 있는 형태로 가공하는 단계를 포함한다.
실시 예로서, 상기 데이터 분석 단계는, 상기 입력된 데이터의 스크립트 내 변수들의 이름과 유효 영역을 찾는 단계; 상기 변수들의 이름을 리스트에 저장하는 단계; 및 상기 스크립트 에뮬레이션의 결과에 따른 상기 변수들의 값을 저장하기 위한 스크립트 코드를 상기 입력된 데이터의 스크립트 코드에 삽입하는 단계를 포함한다.
본 발명의 실시 예들에 따르면, 익스플로잇을 정적으로 분석하여 익스플로잇 내부의 스크립트나 주요 악성 패턴을 읽어내므로 동작 시스템 아키텍쳐, 운영체제나 언어, 소프트웨어와 상관없이 탐지가 가능하며,
또한, 읽어 낸 스크립트에서 위험 요소를 제거한 뒤 분석이 가능한 형태로 가공하고 이를 단독(standalone) 스크립트 엔진을 이용하여 에뮬레이션하여 내부 데이터의 변화를 추적하고 추출된 분석 데이터를 메모리에 적재하여 실행하므로 폴리몰픽 쉘코드나 스크립트로 난독화된 쉘코드도 탐지 가능하다.
따라서, 결과적으로 본 발명은 종전 동적 탐지 방법 및 정적 탐지 방법들의 한계점들을 극복하는 기술로서, 본 발명을 이용하면 빠르고 효과적으로 알려지지 않은 익스플로잇을 탐지하는 것이 가능하고, 이를 통해 익스플로잇을 이용한 APT 공격을 효과적으로 방어할 수 있다.
도 1은 일반적인 익스플로잇의 개략적인 구성을 나타내는 블록도이다.
도 2는 본 발명의 일 실시 예에 따른 익스플로잇 탐지 장치를 나타내는 블록도이다.
도 3은 도 2에 도시된 익스플로잇 탐지 장치에 따른 익스플로잇 탐지 방법을 나타내는 순서도이다.
도 4는 도 2에 도시된 전처리부의 상세 구성을 나타내는 블록도이다.
도 5는 도 4에 도시된 전처리부의 동작 방법을 나타내는 순서도이다.
도 6은 도 2에 도시된 데이터 분석부의 상세 구성을 나타내는 블록도이다.
도 7은 도 6에 도시된 데이터 분석부의 동작 방법을 나타내는 순서도이다.
도 8은 도 2에 도시된 익스플로잇 탐지부의 상세 구성을 나타내는 블록도이다.
도 9는 도 8에 도시된 익스플로잇 탐지부의 동작 방법을 나타내는 순서도이다.
본 명세서는 본 발명이 실시될 수 있는 특정 실시예를 도시하는 첨부 도면을 참조한다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없다. 예를 들어, 여기서 어떤 실시예에 관련하여 기재된 특정 형상, 구조 및 특성들은 본 발명의 사상 및 범위를 벗어나지 않으면서 다른 실시예에서도 동일하게 구현될 수 있다.
본 명세서에서 사용된 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로서, 본 발명을 한정하려는 의도를 내포하지 않는다. 사용된 용어들에서 단수의 표현은 문맥상 명백하게 다르게 지칭되지 않는 한, 복수의 표현을 포함한다.
각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 사상 및 범위를 벗어나지 않는 범위 내에서 다양하게 변경될 수 있다. 나아가, 도면에서의 각 구성요소들의 크기는 설명을 위하여 과장될 수 있으며, 실제로 적용되는 크기를 의미하는 것은 아니다. 유사한 참조부호가 도면들에서 사용되는 경우, 유사한 참조부호는 여러 실시예들에 대해서 동일하거나 유사한 기능을 지칭한다.
이하에서는, 첨부한 도면들을 참조하여, 구체적인 실시예를 통해 본 발명의 내용 및 사상을 설명한다.
도 2는 본 발명의 일 실시 예에 따른 익스플로잇 탐지 장치를 나타내는 블록도이다. 도 2를 참조하면, 익스플로잇 탐지 장치(100)는 전처리부(110), 데이터 분석부(120), 익스플로잇 탐지부(130)를 포함한다.
전처리부(110)는 입력된 데이터(1)를 분석 가능한 형태로 가공해주는 모듈이다. 전처리부(110)는 입력된 데이터(1)를 그 형식에 따라 분류하고, 파서(parser) 등을 이용해서 스크립트 코드를 읽을 수 있는 형태로 데이터(1)를 가공한다. 가공된 데이터(PD)는 데이터 분석부(120)로 제공된다.
데이터 분석부(120)는 전처리부(110)에서 가공된 데이터(PD)가 스크립트를 포함하고 있는 경우, 해당 스크립트를 실행하여 스크립트에 의해 생성되거나 조작되는 데이터를 분석 및 탐지한다. 또는 데이터 분석부(120)는 전처리부(110)에서 가공된 데이터(PD)가 스크립트를 포함하지 않는 경우, 데이터(PD) 내에 나타나는 패턴을 탐색 및 분석한다. 분석된 데이터(AD)는 익스플로잇 탐지부(130)로 제공된다.
익스플로잇 탐지부(130)는 분석된 데이터(AD)에 기반하여, 실제로 익스플로잇을 탐지한다. 익스플로잇 탐지부(130)는 주로 익스플로잇을 구성하는 세 부분 중 보안기술 회피 코드 및 쉘코드를 탐지하는 방식을 통해 익스플로잇을 탐지한다.
예를 들어, 익스플로잇 탐지부(130)는 데이터에 대한 스크립트 수행 후의 최종값 분석을 통해 힙스프레이를 탐지하거나, 데이터베이스에 저장된 가젯과 주소값들의 연속적인 패턴 분석을 통해 ROP를 탐지하거나, 힙 메모리 영역에 적재된 데이터를 한 줄씩 실행하여 API 호출 상태를 분석함으로써 쉘코드를 탐지한다.
탐지된 결과(3)는 사용자에게 출력되어, 사용자가 익스플로잇 존재 여부를 알 수 있도록 제공될 수 있다.
한편, 에뮬레이션 모니터(2)는 후술하겠지만, 스크립트 에뮬레이션과 쉘코드 에뮬레이션 과정에서 발생할 수 있는 예기치 못한 오류 등을 처리하기 위해 사용된다. 예를 들어, 특정 스크립트를 실행하면서 과도하게 많은 시간이 걸리는 경우, 에뮬레이션 모니터는 이를 감지하여 해당 에뮬레이션 프로세스를 강제 종료시킬 수 있다.
상기와 같은 익스플로잇 탐지 장치(100)의 구성에 따르면, 익스플로잇을 정적으로 분석하여 익스플로잇 내부의 스크립트나 주요 패턴을 읽어내는 한편으로, 읽어 낸 스크립트를 분석이 가능한 형태로 가공하고 이를 에뮬레이션하여 최종값 변화를 추적하는 방법을 사용하므로, 동작 시스템 아키텍쳐, 운영체제나 언어, 소프트웨어와 상관없이 탐지가 가능하며, 동시에 폴리몰픽 쉘코드나 스크립트로 난독화된 쉘코드도 탐지가 가능하다.
따라서, 본 발명의 익스플로잇 탐지 장치(100)는 종래의 정적 탐지 방법 및 동적 탐지 방법의 한계를 극복할 수 있어, 효과적으로 익스플로잇을 탐지하고 그것에 의한 공격을 방어할 수 있다.
전처리부(110), 데이터 분석부(120) 및 익스플로잇 탐지부(130)에 대해서는 도 4이하에서 더욱 상세히 후술된다.
도 3은 도 2에 도시된 익스플로잇 탐지 장치에 따른 익스플로잇 탐지 방법을 나타내는 순서도이다. 도 3을 참조하면, 익스플로잇 탐지 방법은 S110 단계 내지 S130 단계를 포함한다.
S110 단계에서, 익스플로잇 탐지 방법은 입력된 데이터를 스크립트 코드를 읽을 수 있는 형태로 가공한다. 이때, 데이터 가공은 전처리부(110, 도 2 참조)에 의해 수행된다. 가공된 데이터(PD)는 데이터 분석부(120, 도 2 참조)로 제공된다.
S120 단계에서, 익스플로잇 탐지 방법은 가공된 데이터(PD)를 스크립트 에뮬레이션 또는 패턴분석 알고리즘(가령, 휴리스틱 알고리즘)을 이용하여 분석한다. 이때, 스크립트 에뮬레이션을 통한 분석은 가공된 데이터를 가상화 환경에서 에뮬레이션 구동하여 변수 및 결과값의 변화를 분석하는 것을 의미하고, 휴리스틱 알고리즘을 이용한 분석은 가공된 데이터(PD) 내에 주기적으로 또는 빈번하게 나타나는 데이터 패턴을 분석하는 것을 의미한다. 데이터 분석은 데이터 분석부(120)에 의해 수행되며, 분석된 데이터(AD)는 익스플로잇 탐지부(130, 도 2 참조)로 제공된다.
S130 단계에서, 익스플로잇 탐지 방법은 분석된 데이터(AD)에 기반하여 익스플로잇을 탐지한다. 이때, 익스플로잇 탐지 방법은 데이터에 대한 스크립트 수행 후의 최종값 분석을 통해 힙스프레이를 탐지하거나, 데이터베이스에 저장된 가젯과 주소값들의 연속적인 패턴 분석을 통해 ROP를 탐지하거나, 힙 메모리 영역에 적재된 바이너리 데이터를 기계어 코드로 읽어 순차적으로 실행하여 쉘코드가 주로 사용하는 API를 호출하는지 검사함으로써 쉘코드를 탐지하는 방법을 통해 익스플로잇을 탐지 한다. 익스플로잇 탐지 동작은 익스플로잇 탐지부(130)에 의해 수행된다.
도 4는 도 2에 도시된 전처리부의 상세 구성을 나타내는 블록도이다. 도 4를 참조하면, 전처리부(110)는 압축 해제부(111), 디코더(112), 및 파일 파싱부(113)를 포함한다.
전처리부는 데이터 분석부로부터 임베디드 데이터(Embedded Data, ED)를 수신하고 데이터 분석부로 가공된 데이터(Processed Data, PD)를 제공할 수 있다.
전처리부(110)는 입력된 데이터(1)를 분석 가능한 형태로(즉, 스크립트 코드를 읽을 수 있는 형태로) 가공해 주는 모듈이다. 이를 위해 전처리부(110)는 입력된 데이터(1)를 그 형식 또는 형태에 따라 분류한다. 예를 들어, 일반적으로 입력 가능한 데이터는 크게 네트워크 트래픽, 바이너리파일, 문서파일, PE 파일 등으로 구분 가능하고, 전처리부(110)는 이와 같이 구분되는 형식 또는 형태에 따라 입력된 데이터(1)를 분류한다.
한편, 실시 예로서 전처리부(110)는 데이터 분류 시에 데이터 파일의 확장자 및 데이터 분류 시그너쳐 DB를 이용할 수 있다.
압축 해제부(111)는 입력된 데이터(1)의 압축을 해제하는 모듈로서, 데이터(1)가 압축된 상태로 입력된 경우에 해당 기능을 수행한다.
디코더(112)는 입력된 데이터(1)를 디코딩하는 모듈로서, 데이터(1)가 인코딩된 상태로 입력된 경우에 해당 기능을 수행한다.
파일 파싱부(113)는 분류된 데이터(압축 또는 인코딩되어 있었다면, 압축 해제 또는 디코딩까지 완료된 후의 데이터)를 파싱하여, 해당 데이터를 스크립트를 읽을 수 있는 형태로 가공한다. 구체적으로, 파일 파싱부(113)는 파일 형식 또는 형태에 따른 적어도 하나의 파서를 구비하고, 분류된 데이터 형식 또는 형태에 대응되는 파서를 이용하여 해당 데이터를 스크립트를 읽을 수 있는 형태로 가공한다.
실시 예로서, 파일 파싱부(113)는 PDF 파서, Flash 파서, Hwp 파서, MS Office 파서(OLE 파서 또는 XML 파서) 또는 HTML 파서를 포함할 수 있다.
실시 예로서, 파일 파싱부(113)는 Jar, apk, 이미지 및 멀티미디어 파일 파서를 구비하고, 이를 이용하여 자바 파일, 안드로이드 파일, 이미지 파일 또는 멀티미디어 파일 등을 가공할 수 있다.
가공된 데이터(PD)는 데이터 분석부(120)에 제공된다.
상기와 같은 전처리부(110)의 구성에 따르면, 입력된 데이터가 스크립트를 읽을 수 있는 형태로 가공된다.
도 5는 도 4에 도시된 전처리부의 동작 방법을 나타내는 순서도이다. 도 5를 참조하면, 전처리부(110)의 동작 방법은 S111 단계 내지 S114 단계를 포함한다.
S111 단계에서, 전처리부(110)의 동작 방법은 먼저 입력된 데이터(1)를 그 형식 및 형태에 따라 분류한다.
S112 단계에서, 전처리부(110)의 동작 방법은 분류된 데이터가 압축 또는 인코딩된 데이터인지 판단한다. 압축 또는 인코딩된 데이터이면, 전처리부(110)의 동작 방법은 S113 단계로 진행한다. 그렇지 않으면, 전처리부(110)의 동작 방법은 S114 단계로 진행한다.
S113 단계에서, 전처리부(110)의 동작 방법은 압축해제부(111)를 이용하여 데이터의 압축을 해제하거나 디코더(112)를 이용하여 데이터를 디코딩한다.
S114 단계에서, 전처리부(110)의 동작 방법은 분류된 데이터에 적합한 파서를 이용하여, 분류된 데이터를 스크립트 코드를 읽을 수 있는 형태로 가공한다.
실시 예로서, 이떄 사용되는 파서는 PDF 파서, Flash 파서, Hwp 파서, MS Office 파서, HTML 파서, OLE 파서, XML 파서, Jar 파서, apk 파서, 이미지 파서 및 멀티미디어 파일 파서 중 적어도 일부를 포함할 수 있다.
도 6은 도 2에 도시된 데이터 분석부의 상세 구성을 나타내는 블록도이다. 도 6을 참조하면, 데이터 분석부(120)는 스크립트 조작부(121), 스크립트 에뮬레이터(122) 및 패턴 분석부(123)를 포함한다.
전처리부(110)에서 가공된 데이터(PD)가 스크립트를 포함하고 있는 경우(예를 들어, 자바스크립트, 비주얼베이직 또는 액션스크립트 등), 해당 스크립트를 실행하여 익스플로잇을 난독화 하거나 새로운 파일을(예를 들어, PE 또는 embedded file 등) 생성하기 때문에 익스플로잇에 포함 되어 있는 스크립트를 분석해야 익스플로잇을 정확히 탐지 할 수 있다.
pdf 파일이나 MS Office 파일(예를 들어, doc, xls 또는 ppt 등), hwp파일, html 파일 등에는 Javascript가 삽입이 된 경우가 많다. 실제로 특정 익스플로잇은 hwp파일 내에 삽입되어 있는 자바스크립트를 실행시켜 exe 파일을 생성하고 생성된 파일을 실행시켜 악성행위를 수행하기도 한다. 다른 익스플로잇은 pdf 내에 삽입되어 있는 자바스크립트를 실행시켜 익스플로잇 실행시 난독화 된 쉘코드를 원상복구 하여 메모리에 적재하는 방식으로 스크립트를 이용하기도 한다.
따라서, 본 발명에 따른 익스플로잇 탐지 장치(100)에서는 먼저 스크립트 조작부(121)로 익스플로잇에 포함되어 있는 스크립트를 조작 하고 스크립트 에뮬레이터(122)로 스크립트를 실행하여 스크립트에 의해 생성되거나 조작되는 데이터를 알아내는 방법을 채택한다.
스크립트 조작부(121)는 스크립트를 단독 스크립트 엔진(예를 들어, SpiderMonkey 자바스크립트 엔진 등)으로 에뮬레이션이 가능하도록 변경한다. 가령, 한글의 자바스크립트는 고유의 자바스크립트 코드를 포함하고 있기 때문에 한글 워드프로세서에서는 정상 동작하나 단독 스크립트 엔진에서는 정상 동작 하지 않는다. 따라서, 스크립트 조작부(121)는 이러한 경우에도 단독 스크립트 엔진에서 동작가능하도록 해당 스크립트를 변경한다.
그리고, 스크립트 조작부(121)는 스크립트가 실행될 때 보안상 위험 할 수 있는 코드들을 찾아 삭제하거나 안전한 형태로 변경시킨다. 이때, 보안상 위험할 수 있는 코드들에는 시스템 폴더에 파일을 저장하거나 생성된 exe 파일을 실행하는 스크립트 코드 등이 있을 수 있다.
그리고, 스크립트 조작부(121)는 스크립트를 파싱하여 선언되어 있는 변수들의 이름과 변수들의 유효 영역을 찾은 후, 찾은 변수들의 이름을 별도의 리스트에 저장한다. 이는 스크립트가 실행될 때 각 변수들의 자신의 유효 영역에서 갖는 최종 값을 알기 위해서 수행하는 작업이다.
이때, 변수로 선언된 형태가 아닌 경우, 즉 함수의 결과 값 형태로 이용되는 경우와 선언된 변수들이 배열의 형태로 이용되는 경우에도, 이러한 코드를 찾아 앞서 선언된 변수의 경우에서와 마찬가지로 유효 영역의 최종 값을 알 수 있도록 해당 변수들의 이름을 리스트에 저장한다.
그리고, 스크립트 조작부(121)는 저장된 변수 리스트에 있는 항목들이 스크립트 에뮬레이션 후에 갖는 최종 값을 분석할 수 있도록, 저장된 변수 리스트의 값을 파일에 저장할 수 있는 스크립트 코드를 원본 스크립트 코드에 삽입한다. 이때, 스크립트 조작부(121)는 파일 저장을 위한 모듈 호출 스크립트를 삽입하고, 파일에 각각의 값을 저장하는 코드를 에러 처리하여 스크립트에 삽입할 수 있다.
그리고, 스크립트 조작부(121)는 기존의 스크립트 내에서 단독 스크립트 에뮬레이션 엔진에서 실행 시 에러 발생 가능성이 있는 코드(예를 들어, ActiveXObject 관련 스크립트 함수 등)를 찾아 에러를 처리할 수 있도록 에러 처리 (exception handling) 코드를 삽입한다.
스크립트 조작부(121)의 이와 같은 동작들을 통해서, 스크립트에 선언되어 있는 변수들이 스크립트에 의해 변경되면서 자신의 영역 내에서 갖는 최종 값들을 알 수 있게 된다. 결과적으로 이러한 값들은 메모리에 적재되어 힙스프레이나 ROP, 쉘코드의 형태로 익스플로잇에 사용되거나 PE의 이미지를 만들어 파일에 저장하게 되기 때문에, 이러한 최종값들을 분석하여 익스플로잇을 탐지할 수 있게 된다.
한편, 변수들을 이용하는 경우 외에, 특정 익스플로잇은 스크립트에 선언된 함수들을 이용해 조작된 값들을 파일에 쓰거나 메모리에 적재하는 경우도 있기 때문에, 스크립트 조작부(121)에서 여기에 해당되는 경우들도 앞서 설명한 방법과 상응하게 처리해 준다.
스크립트 에뮬레이터(122)는 자바스크립트, 비주얼베이직, 액션스크립트 등 스크립트를 가상화 공간을 구성하여 에뮬레이션하는 기능을 수행 한다. 실시 예로서, 자바스크립트 엔진으로는 모질라의 SpiderMonkey를 이용할 수 있고, 비주얼베이직 엔진으로는 윈도 내에 포함되어 있는 cscript를 이용할 수 있다. 스크립트 에뮬레이션이 완료되면, 스크립트 내의 각 변수 등이 갖는 최종 값들이 파일에 저장되게 된다. 실시 예로서, 이때 변수 또는 그것의 최종 값들은 데이터 길이에 따라 오름차순 또는 내림차순으로 정렬될 수 있다.
패턴 분석부(123)는 스크립트가 없는 데이터(예를 들어, PE 파일이나 바이너리 파일 등)에 대해 익스플로잇을 탐지할 수 있도록 기능한다. 구체적으로, 패턴 분석부(123)는 스크립트가 없는 데이터 중 의심스러운 부분을 추출하기 위해서 데이터 내에 주기적으로 혹은 자주 나타나 있는 패턴들을 찾아낸다. 이러한 패턴을 찾는 휴리스틱 알고리즘은 (a) 특정 아스키 코드 값이 반복되거나, (b) 일부분만 유니코드 패턴이 존재하거나, (c) 이스케이프 코드나 0x, \x, %u 등의 문자 패턴이 반복되거나, (d) fpu관련 인스트럭션(예를 들어, fnstenv)이 비정상적으로 사용된 현상을 탐지함으로써 의심스로운 부분을 찾아내는 방식으로 패턴을 분석한다.
데이터 분석부(120)에서 분석된 데이터(AD)는 익스플로잇 탐지부(130)에 제공된다. 또는, 데이터 분석부(120)의 수행 결과는 익스플로잇 탐지부(130)의 수행 결과와 함께 또는 병행하여 익스플로잇 탐지 결과(3)를 도출하는 데 활용될 수도 있다.
상기와 같은 데이터 분석부(120)의 구성에 따르면, 가공된 데이터(PD)를 에뮬레이션 또는 패턴 분석 방식으로 분석하여 익스플로잇을 탐지할 수 있는 분석 데이터(AD)를 얻어낼 수 있다.
한편, 에뮬레이션 모니터(2)는 스크립트 에뮬레이션과 쉘코드 에뮬레이션 과정에서 예기치 않은 오류가 발생하거나, 힙스프레이 코드를 처리하면서 과도하게 많은 데이터를 처리하게 되어 탐지에 많은 시간이 걸리는 경우를 해결하기 위해 기능한다. 이러한 경우를 해결 하기 위해, 에뮬레이션 모니터(2)는 타임아웃 모니터(2a)를 통해 각 에뮬레이션에서 시간 초과가 되었는지 여부를 체크하고, 시간 초과가 된 경우 프로세스 종료부(2b)를 이용하여 해당 에뮬레이션 프로세스를 강제 종료시킨다(예를 들어, CreateRemoteThread를 이용해 ExitProcess 함수를 호출하는 코드를 인젝션하여 실행하는 방식으로 종료시킬 수 있다). 이처럼 에뮬레이션 모니터(2)를 추가함으로써 더욱 빠르고 효과적으로 익스플로잇을 탐지 할 수 있다.
도 7은 도 6에 도시된 데이터 분석부의 동작 방법을 나타내는 순서도이다. 도 7을 참조하면 데이터 분석부(120)의 동작 방법은 S121 단계 내지 S127 단계를 포함한다.
S121 단계에서, 데이터 분석부(120)의 동작 방법은 가공된 데이터(PD)의 스크립트를 단독 스크립트 엔진으로 에뮬레이션 가능하도록 변경한다.
S122 단계에서, 데이터 분석부(120)의 동작 방법은 스크립트에서 보안상 위험한 코드를 삭제하거나 안전한 형태로 변경한다.
S123 단계에서, 데이터 분석부(120)의 동작 방법은 스크립트 내의 필요한 변수들의 이름과 유효 영역을 찾은 후 변수들의 이름을 저장한다.
S124 단계에서, 데이터 분석부(120)의 동작 방법은 변수들의 변경된 최종 값 저장을 위한 스크립트 코드를 원본 스크립트 코드에 삽입한다.
S125 단계에서, 데이터 분석부(120)의 동작 방법은 원본 스크립트 코드에 에러 처리를 위한 에러 처리 코드를 삽입한다.
S126 단계에서, 데이터 분석부(120)의 동작 방법은 스크립트 에뮬레이션을 수행한다.
S127 단계에서, 데이터 분석부(120)의 동작 방법은 에뮬레이션 완료된 스크립트의 변수들의 데이터 값을 저장한다.
다만, S121 내지 S127 단계의 동작 방법은 가공된 데이터(PD)가 스크립트를 포함하는 경우의 동작 방법을 설명한 것이다. 만일, 가공된 데이터(PD)가 스크립트를 포함하지 않는다면, 앞서 도 6에서 설명한 대로 휴리스틱 알고리즘을 통한 패텀 분석 방법을 통해 데이터를 분석하게 된다.
도 8은 도 2에 도시된 익스플로잇 탐지부의 상세 구성을 나타내는 블록도이다. 도 8을 참조하면, 익스플로잇 탐지부(130)는 쉘코드 탐지부(131), 힙스프레이 탐지부(132), ROP 탐지부(133)를 포함한다.
익스플로잇 탐지부(130)는 분석된 데이터(AD)를 바탕으로 익스플로잇을 탐지하는 역할을 한다. 익스플로잇은 보통 (a) 취약점 트리거 코드, (b) 보안기술 회피 코드, (c) 쉘코드 세 부분으로 구성이 되어 있는데 이것들 중 취약점 트리거 코드는 탐색이 거의 불가능 하기 때문에, 익스플로잇 탐지부(130)는 주로 보안기술 회피 코드(예를 들어, 힙스프레이와 ROP)와 쉘코드를 탐지 함으로써 익스플로잇을 탐지하게 된다.
쉘코드 탐지부(131)는 쉘코드를 탐지한다. 쉘코드는 기계어 코드로 구성이 되어 있으므로 이를 메모리에 올리면 실행이 가능하다. 대부분의 경우 기계어 코드가 실행이 되면서 LoadLibrary 계열의 API들이 호출이 되면서 쉘코드가 필요한 라이브러리를 메모리에 적재하고 GetProcAddress API를 이용해서 필요한 함수의 주소를 가져온다. 이후 함수들을 호출하면서 공격을 수행하게 된다. 혹은 파일을 다루는 API나 메모리 속성을 변경하는 VirtualProtect, VirtualAlloc 계열의 API를 호출하는 쉘코드도 존재한다.
쉘코드 탐지부(131)는 쉘코드 탐지를 위해서 먼저 데이터를 임의로 힙 메모리 영역에 적재하고(실행 가능), LoadLibrary 계열 API(예를 들어, LoadLibraryA, LoadLibraryEx 등), 파일을 다루는 API, 메모리 속성을 변경하는 API 들을 모두 후킹한다(API hooking).
그리고, 예외처리 루틴을 추가하고, 힙 메모리 영역에 적재된 바이너리 데이터를 기계어 코드로 인식하고 순차적으로 코드를 실행한다.
이때, 후킹된 API가 호출되는 경우, 쉘코드가 탐지된 것으로 판단할 수 있다.
한편, 쉘코드 탐지 과정에서 실행이 되지 않는 데이터가 실행된 경우 예외가 발생한 것으로 간주하여, 예외처리 루틴을 수행하고, 이어서 힙 메모리 영역에 적재된 다음 데이터 영역부터 실행을 재개한다.
힙스프레이 탐지부(132)는 힙스프레이를 탐지한다. 힙스프레이는 주로 문서나 웹페이지에 삽입된 스크립트에 의해 수행이 된다. 스크립트의 변수 데이터는 힙 메모리 영역에 올라가기 때문에, 보통 스크립트 내의 while이나 for의 반복문을 돌면서 변수에 데이터(예를 들어, Nop sled 및 쉘코드로 구성됨)를 저장하여(가령, string을 concatenating 함) 힙스프레이를 수행한다.
힙스프레이 탐지부(132)는 이러한 힙스프레이의 특성을 고려하여 익스플로잇을 탐지한다. 예를 들어, 힙스프레이 탐지부(132)는 데이터 분석부(120)에서 분석된 데이터(AD)를 참조하면 각 변수의 스크립트 수행 후의 최종 값을 알 수 있기 때문에, 이들 변수 중에서 스프레이 코드 형태인 것을 찾음으로써 쉽게 힙스프레이를 탐지할 수 있다. 간단하게는, 힙스프레이 탐지부(132)는 변수의 값에서 Nop Sled(예를 들어, 0x0C, 0xD 또는 0x90 등)의 비율이 일정 값 이상을 갖는 경우를 체크하여, Nop Sled와 쉘코드가 Chunk의 형태로 반복적으로 등장하는 패턴을 탐지하는 방법으로 힙스프레이를 탐지할 수 있다.
ROP 탐지부(133)는 ROP를 탐지한다. 구체적으로, ROP 탐지부(133)는 각 소프트웨어에서 사용 가능한 가젯들과 주소값을 모두 데이터베이스에 저장하고, 이들이 API 함수의 argument로 사용될 값들과 함께 연속적인 패턴으로 데이터에서 발견이 되는 경우를 체크하여 ROP를 탐지한다. 예를 들어 데이터 분석부(120)에서 분석된 데이터(AD)를 참조하면, 변수 값에서 가젯들의 주소값과 API 함수의 argument로 사용될 값이 연속적으로 나타나는 경우를 체크할 수 있고, 이 경우 ROP 코드로 간주하여 익스플로잇을 탐지한다.
이상에서 설명한 익스플로잇 탐지부(130)의 수행 결과는 탐지 결과(3)로서 제공될 수 있다. 이때, 제공되는 탐지 결과(3)에는 해당 익스플로잇의 탐지 유형(3a) 및 스크립트 패턴(3b)이 포함될 수 있다.
상기와 같은 익스플로잇 탐지부(130)의 구성에 따른 데이터 분석부(120)의 분석 결과(AD)에 기초하여 데이터에 익스플로잇이 존재하는지 여부를 탐지할 수 있다.
한편, 에뮬레이터 모니터(2)에 대한 설명은 앞서 도 6에서 설명한 바와 동일하므로, 여기서는 그에 대한 설명을 생략한다.
도 9는 도 8에 도시된 익스플로잇 탐지부의 동작 방법을 나타내는 순서도이다. 도 9에서는 특히 익스플로잇 탐지부(130)의 동작 중 쉘코드 탐지 방법에 대해 구체적으로 설명한다. 도 9를 참조하면, 익스플로잇 탐지부(130)의 동작 방법은 S131 단계 내지 S139 단계를 포함한다.
S131 단계에서, 익스플로잇 탐지부(130)는 데이터를 힙 메모리에 적재한다.
S132 단계에서, 익스플로잇 탐지부(130)는 LoadLibrary 계열, 파일 처리 계열 메모리 속성 조작 계열의 API를 모두 후킹한다.
S133 단계에서, 익스플로잇 탐지부(130)는 예외처리를 위한 예외 처리 루틴을 추가한다.
S134 단계에서, 익스플로잇 탐지부(130)는 힙 메모리에 적재된 데이터 중 적어도 일부를 순차적으로 실행한다.
S135 단계에서, 익스플로잇 탐지부(130)는 힙 메모리에 적재된 데이터 실행 결과 후킹된 API가 호출되었는지 판단한다. 후킹된 API가 호출되었으면, 익스플로잇 탐지부(130)의 동작 방법은 S136 단계로 진행한다. 그렇지 않으면 익스플로잇 탐지부(130)의 동작 방법은 S137a 단계로 진행한다.
S136 단계에서, 익스플로잇 탐지부(130)는 쉘코드를 탐지한 것으로 간주하여, 익스플로잇 탐지 결과를 도출한다. 도출된 결과는 탐지 결과(3)로서 제공될 수 있으며 S136 단계 완료 후 익스플로잇 탐지부(130)의 동작 방법은 종료한다.
S137a 단계에서, 익스플로잇 탐지부(130)는 예외처리가 발생하였는지 판단한다. 예외처리가 발생하였으면, 익스플로잇 탐지부(130)의 동작 방법은 S137b 단계로 진행한다. 그렇지 않으면, 익스플로잇 탐지부(130)의 동작 방법은 S138 단계로 곧바로 진행한다.
S137b 단계에서, 익스플로잇 탐지부(130)는 예외처리를 수행한다. 그리고, 예외처리 완료후 S138 단계로 진행한다.
S138 단계에서, 익스플로잇 탐지부(130)는 힙 메모리에 적재된 모든 데이터가 실행되었는지 판단한다. 모든 데이터가 실행되었으면 익스플로잇 탐지부(130)의 동작 방법은 종료한다. 그렇지 않으면, 익스플로잇 탐지부(130)의 동작 방법은 S139 단계로 곧바로 진행한다.
S139 단계에서, 익스플로잇 탐지부(130)는 힙 메모리에 적재된 다음 데이터 영역을 실행한다. 그리고 S135 단계로 복귀한다.
종래의 익스플로잇 탐지 방법 중에서 익스플로잇을 정적으로 탐지하는 방법의 경우 익스플로잇 내부의 스크립트에 의해 난독화 되어 있는 경우를 탐지하지 못한다. 그러나 본 발명에 따른 익스플로잇 탐지 장치 및 방법은 스크립트를 가공하고 이를 단독 스크립트 엔진을 이용하여 에뮬레이션하여 내부 데이터의 변화를 추적하기 때문에 난독화 되어있는 익스플로잇도 탐지를 할 수 있다.
또한, 종래의 익스플로잇 탐지 방법들 중에서 익스플로잇을 실행하여 동적으로 탐지하는 방법의 경우 동작 시스템 아키텍쳐, 운영체제, 소프트웨어 버전 또는 언어 등이 맞지 않는 경우 익스플로잇이 정상적으로 실행되지 않기 때문에 이를 극복하기 위해서는 모든 경우에 맞춰 환경을 각각 구축한 뒤 실행해 보아야 하지만, 이러한 것들은 자동화된 시스템으로 개발을 하기 어렵고 수동으로 분석하는 것 또한 많이 시간이 소요되게 된다. 그러나 본 발명에 따른 익스플로잇 탐지 장치 및 방법은 익스플로잇이 동작하는 아키텍쳐, 운영체제, 소프트웨어 버전 또는 언어와는 무관하게 분석을 원하는 데이터를 파싱하는 모듈만 추가하면 익스플로잇을 탐지할 수 있으므로, 더욱 높은 효용성을 갖는다.
나아가, 본 발명에 따른 익스플로잇 탐지 장치 및 방법은 스크립트 에뮬레이션을 모니터링하여 데이터 처리에 시간이 많이 걸리는 경우 에뮬레이션 프로세스를 종료시키므로, 불필요하게 분석 시간이 길어지는 것을 막을 수 있는 장점이 있다.
본 명세서의 상세한 설명에서는 구체적인 실시예를 들어 설명하였으나, 본 명세서의 범위에서 벗어나지 않는 한 각 실시예는 여러 가지 형태로 변형될 수 있다.
또한, 여기서 특정한 용어들이 사용되었으나, 이는 단지 본 발명을 예시하기 위한 목적에서 사용된 것일 뿐, 의미 한정이나 본 발명의 범위를 제한하도록 의도된 것이 아니다. 그러므로 본 명세서의 범위는 상술한 실시예에 국한되어 정해져서는 안되며 후술하는 특허청구범위 및 그 균등물에 의해 정해져야 한다.

Claims (15)

  1. 입력된 데이터를 분석 가능한 형태로 가공하는 전처리부;
    상기 전처리부에서 가공된 데이터를 에뮬레이션하거나 또는 상기 입력된 데이터를 패턴분석 알고리즘을 이용하여 분석하는 데이터 분석부; 및
    상기 데이터 분석부에서 분석된 데이터에 기반하여 상기 데이터 내의 익스플로잇을 탐지하는 익스플로잇 탐지부를 포함하는, 익스플로잇 탐지 장치.
  2. 제 1 항에 있어서,
    상기 전처리부는,
    상기 입력된 데이터를 데이터 형식 또는 형태에 따라 분류한 후, 상기 분류된 결과에 대응되는 파서를 이용하여 상기 입력된 데이터를 스크립트 코드를 읽을 수 있는 형태로 가공하는, 익스플로잇 탐지 장치.
  3. 제 2 항에 있어서,
    상기 전처리부는,
    상기 입력된 데이터의 압축을 풀기 위한 압축 해제부; 및
    상기 입력된 데이터의 인코딩을 풀기 위한 디코더를 포함하는, 익스플로잇 탐지 장치.
  4. 제 1 항에 있어서,
    상기 데이터 분석부는,
    상기 가공된 데이터의 스크립트를 스크립트 에뮬레이션 가능한 형태로 변경하는 스크립트 조작부; 및
    상기 스크립트 에뮬레이션 가능한 형태로 변경된 스크립트를 에뮬레이션하는 스크립트 에뮬레이터를 포함하는, 익스플로잇 탐지 장치.
  5. 제 4 항에 있어서,
    상기 스크립트 조작부는,
    상기 가공된 데이터의 스크립트를 단독 스크립트 엔진으로 에뮬레이션 가능하도록 변경하는, 익스플로잇 탐지 장치.
  6. 제 4 항에 있어서,
    상기 스크립트 조작부는,
    상기 가공된 데이터의 스크립트에서 보안상 위험한 코드를 찾아내어 삭제하거나 안전한 형태로 변경하는, 익스플로잇 탐지 장치.
  7. 제 4 항에 있어서,
    상기 스크립트 조작부는,
    상기 스크립트 내의 변수들의 이름과 유효 영역을 찾고, 상기 변수들의 이름을 리스트에 저장하고, 상기 스크립트 에뮬레이션의 결과에 따른 상기 변수들의 값을 저장하기 위한 스크립트 코드를 상기 입력된 데이터의 스크립트 코드에 삽입하는, 익스플로잇 탐지 장치.
  8. 제 4 항에 있어서,
    상기 스크립트 조작부는,
    에러처리를 위한 에러 처리 코드를 상기 데이터의 스크립트 코드에 삽입하는, 익스플로잇 탐지 장치.
  9. 제 4 항에 있어서,
    상기 데이터 분석부는,
    상기 입력된 데이터가 스크립트가 없는 데이터인 경우, 상기 입력된 데이터 내에서 주기적으로 또는 빈번하게 나타나는 패턴들을 찾아내는 패턴 분석부를 더 포함하는, 익스플로잇 탐지 장치.
  10. 제 9 항에 있어서,
    상기 패턴 분석부는 (a) 특정 아스키 코드 값이 반복되거나, (b) 일부분만 유니코드 패턴이 존재하거나, (c) 이스케이프 코드나 0x, \x, %u 등의 문자 패턴이 반복되거나, (d) fpu관련 인스트럭션(예를 들어, fnstenv)이 비정상적으로 사용되는 현상을 탐지하기 위한 패턴 분석 알고리즘을 사용하는, 익스플로잇 탐지 장치.
  11. 제 1 항에 있어서,
    상기 익스플로잇 탐지부는 상기 분석된 데이터를 기반으로 힙스프레이, ROP, 또는 쉘코드를 탐지함으로써 상기 입력된 데이터에 포함된 익스플로잇을 탐지하는, 익스플로잇 탐지 장치.
  12. 제 1 항에 있어서,
    상기 데이터 분석부 또는 상기 익스플로잇 탐지부에서 수행되는 에뮬레이션의 시간초과를 감지하여, 상기 시간초과된 에뮬레이션을 종료시키는 에뮬레이션 모니터를 더 포함하는, 익스플로잇 탐지 장치.
  13. 입력된 데이터를 분석 가능한 형태로 가공하는 전처리 단계;
    상기 전처리 단계에서 가공된 데이터를 에뮬레이션하거나 또는 상기 입력된 데이터를 패턴분석 알고리즘을 이용하여 분석하는 데이터 분석 단계; 및
    상기 데이터 분석 단계에서 분석된 데이터에 기반하여 상기 데이터 내의 익스플로잇을 탐지하는 익스플로잇 탐지 단계를 포함하는, 익스플로잇 탐지 방법.
  14. 제 13 항에 있어서,
    상기 전처리 단계는,
    상기 입력된 데이터를 데이터 형식 또는 형태에 따라 분류하는 단계; 및
    상기 분류된 결과에 대응되는 파서를 이용하여 상기 입력된 데이터를 스크립트 코드를 읽을 수 있는 형태로 가공하는 단계를 포함하는, 익스플로잇 탐지 방법.
  15. 제 13 항에 있어서,
    상기 데이터 분석 단계는,
    상기 입력된 데이터의 스크립트 내 변수들의 이름과 유효 영역을 찾는 단계;
    상기 변수들의 이름을 리스트에 저장하는 단계; 및
    상기 스크립트 에뮬레이션의 결과에 따른 상기 변수들의 값을 저장하기 위한 스크립트 코드를 상기 입력된 데이터의 스크립트 코드에 삽입하는 단계를 포함하는, 익스플로잇 탐지 방법.
PCT/KR2015/014268 2014-12-31 2015-12-24 익스플로잇 탐지 방법 및 장치 WO2016108521A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2014-0195611 2014-12-31
KR1020140195611A KR101731022B1 (ko) 2014-12-31 2014-12-31 익스플로잇 탐지 방법 및 장치

Publications (1)

Publication Number Publication Date
WO2016108521A1 true WO2016108521A1 (ko) 2016-07-07

Family

ID=56284600

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2015/014268 WO2016108521A1 (ko) 2014-12-31 2015-12-24 익스플로잇 탐지 방법 및 장치

Country Status (2)

Country Link
KR (1) KR101731022B1 (ko)
WO (1) WO2016108521A1 (ko)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102079377B1 (ko) 2018-06-04 2020-02-19 고려대학교 산학협력단 문서 파일의 악성 코드 무력화 서비스 제공 방법 및 장치
WO2024071461A1 (ko) * 2022-09-27 2024-04-04 시큐레터 주식회사 난독화 된 자바스크립트를 탐지하고 복호화하기 위한 방법 및 이를 위한 장치

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040080844A (ko) * 2003-03-14 2004-09-20 주식회사 안철수연구소 정적 분석을 이용한 악성 스크립트 감지 방법
KR20060067784A (ko) * 2004-12-15 2006-06-20 한국전자통신연구원 유니코드를 이용한 침입 탐지 시스템 우회 공격 대응 장치및 방법
US20110197272A1 (en) * 2010-02-09 2011-08-11 Webroot Software, Inc. Low-Latency Detection of Scripting-Language-Based Exploits
KR20110108491A (ko) * 2010-03-29 2011-10-06 한국전자통신연구원 악성 스크립트 분석 시스템 및 그를 이용한 악성 스크립트 분석 방법
KR20140004248A (ko) * 2011-05-11 2014-01-10 다이슨 테크놀러지 리미티드 표면 처리 기기

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007001439A2 (en) 2004-11-04 2007-01-04 Telcordia Technologies, Inc. Detecting exploit code in network flows

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040080844A (ko) * 2003-03-14 2004-09-20 주식회사 안철수연구소 정적 분석을 이용한 악성 스크립트 감지 방법
KR20060067784A (ko) * 2004-12-15 2006-06-20 한국전자통신연구원 유니코드를 이용한 침입 탐지 시스템 우회 공격 대응 장치및 방법
US20110197272A1 (en) * 2010-02-09 2011-08-11 Webroot Software, Inc. Low-Latency Detection of Scripting-Language-Based Exploits
KR20110108491A (ko) * 2010-03-29 2011-10-06 한국전자통신연구원 악성 스크립트 분석 시스템 및 그를 이용한 악성 스크립트 분석 방법
KR20140004248A (ko) * 2011-05-11 2014-01-10 다이슨 테크놀러지 리미티드 표면 처리 기기

Also Published As

Publication number Publication date
KR101731022B1 (ko) 2017-04-27
KR20160081584A (ko) 2016-07-08

Similar Documents

Publication Publication Date Title
JP4950902B2 (ja) ダイナミックトランスレーションによる先取りコンピュータマルウェアの保護
Moser et al. Exploring multiple execution paths for malware analysis
Christodorescu et al. Mining specifications of malicious behavior
US8627478B2 (en) Method and apparatus for inspecting non-portable executable files
JP4676499B2 (ja) ネットワークフロー内のエクスプロイトコードの検出
WO2013168951A1 (ko) 악성 파일 검사 장치 및 방법
JP6700351B2 (ja) プロセスのアドレス空間内の悪意のあるコードの検出のためのシステムおよび方法
US20170372068A1 (en) Method to identify known compilers functions, libraries and objects inside files and data items containing an executable code
US20100011441A1 (en) System for malware normalization and detection
KR20040080843A (ko) 악성 암호화 스크립트에 대한 분석 및 해독 방법
EP3238121A1 (en) Execution profiling detection of malicious objects
JP6000465B2 (ja) プロセス検査装置、プロセス検査プログラムおよびプロセス検査方法
US8646076B1 (en) Method and apparatus for detecting malicious shell codes using debugging events
Selçuk et al. Undecidable problems in malware analysis
Copty et al. Accurate malware detection by extreme abstraction
WO2016108521A1 (ko) 익스플로잇 탐지 방법 및 장치
Wang et al. {MetaSymploit}:{Day-One} Defense against Script-based Attacks with {Security-Enhanced} Symbolic Analysis
KR101754720B1 (ko) 비 실행 파일 내의 악성코드 검출 장치 및 방법
CN111291377A (zh) 一种应用漏洞的检测方法及系统
KR101908517B1 (ko) 스트링과 코드 시그니처를 이용한 악성코드 탐지 및 패커 해제 방법
US20240061931A1 (en) Executable file unpacking system and method for static analysis of malicious code
Masabo et al. A state of the art survey on polymorphic malware analysis and detection techniques
Isawa et al. Comparing malware samples for unpacking: A feasibility study
Starink Analysis and automated detection of host-based code injection techniques in malware
Rashmitha et al. Malware analysis and detection using reverse Engineering

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

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

Country of ref document: EP

Kind code of ref document: A1