WO2014042344A1 - 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치 및 방법 - Google Patents

디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치 및 방법 Download PDF

Info

Publication number
WO2014042344A1
WO2014042344A1 PCT/KR2013/006093 KR2013006093W WO2014042344A1 WO 2014042344 A1 WO2014042344 A1 WO 2014042344A1 KR 2013006093 W KR2013006093 W KR 2013006093W WO 2014042344 A1 WO2014042344 A1 WO 2014042344A1
Authority
WO
WIPO (PCT)
Prior art keywords
malicious
address
executable file
debug
execution
Prior art date
Application number
PCT/KR2013/006093
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 WO2014042344A1 publication Critical patent/WO2014042344A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10TTECHNICAL SUBJECTS COVERED BY FORMER US CLASSIFICATION
    • Y10T24/00Buckles, buttons, clasps, etc.
    • Y10T24/14Bale and package ties, hose clamps
    • Y10T24/1457Metal bands
    • Y10T24/1459Separate connections
    • Y10T24/1476Wire

Definitions

  • the present invention relates to an apparatus and method for detecting malicious shell code using a debug event. More specifically, the present invention relates to an apparatus, method, and computer readable recording medium having recorded thereon a debug event using a debug event to check whether a non-executable file contains malicious shell code.
  • Malware is software that is intentionally designed to perform malicious activities, such as destroying the system or leaking information, contrary to the user's intentions and interests.
  • malicious code types include hacking tools such as viruses, worms, trojans, backdoors, logic bombs, and trap doors, and malicious spywares. spyware and ad-ware.
  • hacking tools such as viruses, worms, trojans, backdoors, logic bombs, and trap doors
  • malicious spywares spyware and ad-ware.
  • self-replicating or self-replicating function malicious code leaks personal information such as ID and password, control target system, delete / modify files, destroy system, denial of application / system, leak of key data, It is causing problems such as installing other hacking programs, and the damage is very diverse and serious.
  • a malicious code treatment system for detecting and treating malicious codes has been developed.
  • Most of the malware detection systems (vaccine programs) known to date use file-based diagnostics. This is due to the fact that most malicious code is in the form of a file that can be executed on a specific system in order to be executed.
  • most malicious code has the format of Portable Executable (PE) files in order to run on Windows systems (eg Win 32 operating system).
  • PE Portable Executable
  • the extension of the portable executable file is exe, cpl, ocx, dll, vxd, sys, scr, drv, or the like.
  • the malicious code cleaning system In order to diagnose the malicious code of the executable file or the executable file type, the malicious code cleaning system must also recognize the file type and have a signature of a specific type that can be determined as malicious code. These diagnostics are the same as the signature-based or string-testing methods used by most malware treatment systems. This signature-based diagnostic method targets specific or unique parts of a file classified as malicious code, enabling accurate diagnosis that minimizes false positives and false negatives. The advantage is that fast scanning can be achieved by comparing only the characteristic parts of the files. However, the signature-based diagnostic method cannot detect a new file that has been changed by only a few files since the malicious code does not diagnose even if the file itself changes only a few hundred bytes. In addition, since it can only respond to known malicious code, it cannot cope with new and unknown malicious code.
  • Advanced Persistent Threat (APT) attack which is an issue recently, utilizes various types of malware continuously by applying advanced attack techniques to target specific targets and extract targeted information.
  • advanced persistent threat attacks are often undetectable in the early stages of intrusion, often using non-executable files containing malicious code.
  • Non-PE non-portable Executable
  • Windows system e.g, a Win 32 operating system.
  • a program that runs a non-executable executable file such as a document or image program
  • it can easily be modified according to file changes. Because it can create malicious code.
  • the conventional signature-based scanning method has a problem that it cannot realistically prevent zero-day exploits using malicious non-executable files because it must have a large number of signature databases in order to detect various types of attack methods. .
  • the conventional behavior-based inspection method also needs information such as the design method because it must detect the behavior for a variety of attackers, because of this there is a problem that a lot of false positives and false positives occur.
  • An embodiment of the present invention is to solve such a problem of the prior art, to obtain the address range information of the normal module loaded as the program of the non-executable file is executed, and the address previously obtained when the debug event occurs
  • An object of the present invention is to provide a malicious shell code detection apparatus and method using a debug event that can determine whether a non-executable file is malicious using range information.
  • an alarm setting unit for setting a debug event to be generated when a mother process generated by a mother program executing a non-executable file attempts to execute code having no execution attribute, and the mother process is
  • An information storage unit for storing address range information of a memory in which normal modules are used, and a malicious determination unit for determining whether the non-executable file is malicious using the obtained address range information when the debug event occurs It is possible to provide a malicious shell code detection device using the included debug event.
  • the alert setting unit may provide a malicious shell code detection apparatus using a debug event that injects a data execution alert thread into a detection target process when the debug event occurs by the mother process.
  • the information storage unit may provide a malicious shell code detection apparatus using a debug event that stores a start address and an end address of the memory in which the normal modules are loaded.
  • the malicious determination unit may provide a malicious shell code detection apparatus using a debug event that determines that the non-executable file is malicious when the execution address of the command by the mother process deviates from the address range information.
  • the malicious determination unit when the execution address of the command belongs to the address range information, malicious using a debug event that determines whether the non-executive file is malicious according to whether or not structured exception handling (SEH) is infected. It is possible to provide a shell code detection device.
  • SEH structured exception handling
  • the malicious determination unit after obtaining the chain value of the structured exception processing, determines that the structured exception processing is infected when the current address of the chain value and the next structured exception handling chain value are the same, thereby causing the non-executable file to be malicious. It is possible to provide a malicious shell code detection apparatus using the debug event to determine.
  • the malicious determination unit may provide a malicious shell code detection apparatus using a debug event that obtains the chain value of a debugger by using an additional data segment of a central processing unit register.
  • the additional data segment may provide a malicious shell code detection apparatus using a debug event which is a data register F (FS) segment.
  • FS data register F
  • the malicious determination unit debugs the non-executable file as malicious when the current address of the chain value and the next structured exception handling chain value are not the same, when the current address of the chain value does not exist in a normally loaded module.
  • a malicious shell code detection device using an event can be provided.
  • the malicious determination unit may generate a debug event that determines that the non-executable file is malicious when the count value for the structured exception handling chain is greater than or equal to a preset value when the current address of the chain value exists in a module loaded normally. It is possible to provide a malicious shell code detection device.
  • the malicious shell using a debug event further includes a cause analyzer configured to analyze a cause of the vulnerability by comparing a module including an instruction related to an execution address outside the address range information with vulnerability information.
  • a code detection device can be provided.
  • a malicious shell code detection apparatus using a debug event may further include a malicious code extracting unit configured to extract a code in an area corresponding to an execution address that deviates from the address range information.
  • the setting may include checking whether the debug event occurs by the mother process, and injecting a data execution alert thread into a detection target process when the debug event occurs. It can provide a way to detect malicious shell code.
  • the acquiring may include providing a malicious shell code detection method using a debug event that stores a start address and an end address of the memory in which the normal modules are loaded.
  • the determining may include providing a malicious shell code detection method using a debug event that determines that the non-executable file is malicious when the execution address of the instruction by the mother process deviates from the address range information.
  • a malicious shell code detection method using a debug event that determines whether the non-executable file is malicious according to whether or not a structured exception processing is infected is provided. can do.
  • the determining may include obtaining a chain value of the structured exception processing, and if the current address of the chain value and a next structured exception handling chain value are the same, determining that the structured exception processing is infected and executing the non-executable file. It can provide a malicious shell code detection method using a debug event that determines that the malicious.
  • the obtaining of the chain value may provide a malicious shell code detection method using a debug event that obtains the chain value of a debugger by using an additional data segment of a central processing unit register.
  • the additional data segment may provide a malicious shell code detection method using a debug event which is an FS segment.
  • the determining may include determining that the non-executable file is malicious when the current address of the chain value and the next structured exception handling chain value are not the same, when the current address of the chain value does not exist in a normally loaded module. It can provide malicious shell code detection method using debug event.
  • the determining may include a debug event that determines that the non-executable file is malicious when the count value for the structured exception handling chain is greater than or equal to a preset value when the current address of the chain value exists in a module loaded normally. It can provide a malicious shell code detection method using.
  • malicious shell code using a debug event further comprising analyzing a cause of a vulnerability by comparing a module including an instruction related to an execution address outside the address range information with vulnerability information. It can provide a detection method.
  • the method may further include detecting a malicious shell code using a debug event, further comprising extracting a code in a region corresponding to an execution address that deviates from the address range information.
  • a step of setting a debug event to be generated when a mother process generated by a mother program executing a non-executable file attempts to execute code having no execution property, and the mother process is used Obtaining address range information of a memory to which normal modules are loaded; and determining whether the non-executable file is malicious by using the obtained address range information when the debug event occurs.
  • a computer readable recording medium having recorded thereon a program including instructions for performing each step according to a malicious shell code detection method can be provided.
  • the obtained address range information is used.
  • the malicious non-executable file can be detected before the malicious code is executed.
  • a debug event occurs when a mother process attempts to execute code having no execution attribute, it may determine whether the executable file is malicious or not, so that it may be faster than the inspection method using a malicious candidate address. Malicious non-executable files can be detected in time, and even if they are not included in the malicious candidate addresses, they can be determined to be malicious non-executable files, so the detection accuracy is higher. That is, the same detection performance is provided even when detecting malicious non-executable files for all suspicious addresses.
  • FIG. 1 is a block diagram of a malicious shell code detection apparatus using a debug event according to an embodiment of the present invention.
  • FIG. 2 is a flowchart illustrating a malicious shell code detection method using a debug event according to an embodiment of the present invention.
  • FIG. 3 is a flowchart illustrating a non-execution memory alert setting procedure according to an embodiment of the present invention.
  • FIG. 4 is a flowchart illustrating a malicious file determination process according to an embodiment of the present invention.
  • FIG. 5 is a flowchart illustrating a process of determining whether an structured exception is infected according to an embodiment of the present invention.
  • non-executable file refers to an executable file or a file that does not execute on its own as opposed to an executable file.
  • the non-executable file may be a document file such as a Hangul file, a word file, etc., an image file such as a JPG file, a video file, a Java script file, an HTML file, etc., but is not limited thereto.
  • Malicious non-executable files containing malicious code may be used in advanced persistent threat attacks, such as by attaching to an email or by transmitting malicious non-executable files through a network.
  • the malicious code may be a shell code, and the malicious code may be executed when executing a program corresponding to a format (format) of a non-executable file.
  • the format of the non-executable file may be, for example, a hwp file, a doc file, a pdf file, a jpg file, a js file, an html file, or the like.
  • Malicious non-executable files may contain malicious shell code, and malicious non-executable files containing malicious shell code may in some way eventually move to the malicious shell code area when executing commands.
  • the movement to the malicious shell code region can be predicted by checking the execution address.
  • a value stored in an Extended Instruction Pointer (EIP) register which is one of the registers of a central processing unit such as a CPU, may determine an execution address of a next instruction to be executed. Therefore, whether to have a command to move out of the normal address range to the malicious shell code region may be an important criterion for determining whether the non-executable file is malicious.
  • EIP Extended Instruction Pointer
  • FIG. 1 is a block diagram of a malicious shell code detection apparatus using a debug event according to an embodiment of the present invention.
  • the malicious shell code detection apparatus loads and executes a non-executable file into a mother program, and a debug event occurs when the mother process tries to execute code having no execution attribute. If the non-executable file contains malicious code, it can be analyzed and reported.
  • the malicious shell code detection apparatus includes an interface unit 110, a process execution unit 120, an alarm setting unit 130, an information storage unit 140, a malicious determination unit 150, a cause analysis unit 160, and malicious The code extractor 170 may be included.
  • the interface unit 110 may provide an interface for selecting a directory in which a non-executable file to be inspected or a non-executable file is selected.
  • the process execution unit 120 determines the format of the non-executable file selected through the interface unit 110, and executes the non-executable file using the mother program according to the determined format.
  • the process execution unit 120 may provide an execution address for an instruction using information stored in a register of a central processing unit (CPU).
  • the EIP (Extended Instruction Pointer) register of the central processing unit may store the memory address of the instruction to be executed next.
  • the alarm setting unit 130 sets a debug event to be generated when the mother process generated by the mother program attempts to execute code having no execution attribute. For example, when a debug event such as a kernel module (eg, Kernel32.DLL) load debug event occurs by the mother process, the alarm setting unit 130 may inject a data execution alert thread into a detection target process.
  • a debug event such as a kernel module (eg, Kernel32.DLL) load debug event occurs by the mother process
  • the alarm setting unit 130 may inject a data execution alert thread into a detection target process.
  • the information storage unit 140 obtains and stores address range information of a memory in which normal modules used by the mother process are loaded as the mother program is driven. For example, address range information including a start address and an end address of a memory in which normal modules are loaded may be stored.
  • the malicious determination unit 150 determines whether or not the malicious execution file is malicious by using address range information previously obtained in the information storage unit 140. do. For example, the malicious determination unit 150 may determine whether or not the malicious execution of the non-execution file is malicious based on whether the execution address of each instruction deviates from the obtained address range information when each instruction in the module of the mother program is executed. .
  • the malicious determination unit 150 may determine that the non-executable file is malicious when the execution address of the instruction by the mother process deviates from the address range information previously obtained in the information storage unit 140. In other words, when the execution address stored in the EIP register of the central processing unit is out of the normal address range information, the non-executable file is classified as malicious.
  • the malicious determination unit 150 may determine whether or not the malicious execution file is malicious according to the infection of the structured exception processing.
  • the structured exception processing may be determined to be infected and the non-executable file may be determined to be malicious.
  • an additional data segment of the central processing unit register eg, a data register F (FS) segment
  • FS data register F
  • the malicious determination unit 150 may determine the non-executable file as malicious if the current address of the chain value does not exist in the normally loaded module. Can be. When the current address of the chain value exists in a module loaded normally, the non-executable file may be determined to be malicious when the count value for the structured exception handling chain is greater than or equal to a preset value.
  • the cause analyzer 160 determines the cause of the vulnerability by comparing the module including the command related to the execution address that is outside the normal address range information with the vulnerability information.
  • the vulnerability may be analyzed and transmitted to a malicious code inspection and analysis server (not shown) connected to a communication network (not shown) or provided to a specific user or analyst.
  • the vulnerability information may be information provided by Common Vulnerabilities and Exposures (CVE), Microsoft Security Bulletin (eg, MS11-002), National Vulnerability Database (NVD), US-CERT Bulletin, but is not limited thereto.
  • the malicious code extractor 170 may extract code in an area corresponding to an execution address that deviates from the normal address range information as an executable file or an executable file.
  • the executable file or executable file type may be exe, cpl, dll, ocx, vxd, sys, scr, drv, etc., but is not limited thereto.
  • the malicious code extracting unit 170 may request analysis by transmitting the extracted code in the form of an executable file or executable file to a malicious code inspection and analysis server (not shown) connected to a communication network (not shown). .
  • the cause analysis unit 160 has been described as an example of being installed inside the malicious shell code detection apparatus 100, but may be installed in a separate analysis server (not shown) connected through a communication network. have.
  • FIG. 2 is a flowchart illustrating a malicious shell code detection method using a debug event according to an embodiment of the present invention.
  • the malicious shell code detection method is configured to generate a debug event when a mother process generated by a mother program executing a non-executable file attempts to execute code having no execution attribute. Steps S201 to S207, acquiring address range information of a memory in which normal modules used by the mother process are loaded (S209), and when a debug event occurs, the non-executable file is obtained using the previously obtained address range information.
  • Step S217 if the non-executable file is determined to be malicious, corresponds to an execution address that deviates from the address range information.
  • FIG. 3 is a flowchart illustrating a non-execution memory alert setting process according to an embodiment of the present invention
  • FIG. 4 is a flowchart illustrating a malicious file determination process according to an embodiment of the present invention
  • FIGS. 1 to 5 a malicious shell code detection method by a malicious shell code detection apparatus according to an embodiment of the present invention will be described with reference to FIGS. 1 to 5.
  • the process execution unit 120 determines the format of the non-executable file in the selected directory. That is, when the directory in which the non-executable file to be checked is stored is selected through the interface unit 110 (S201), the program execution unit 120 determines the file format based on the file type information of the non-executable file stored in the directory. For example, when a specific root folder is selected through the interface unit 110 among a plurality of root folders existing under the drive 1, the file type information of the non-executable file is checked by checking the file type information of the non-executable file stored in the specific root folder. (S203).
  • the process execution unit 120 executes the mother process in accordance with the format of the non-executable file (S205).
  • the process execution unit 120 may execute a mother process by directly executing a specific program that needs to be executed, or may request a separate system (not shown) to execute a specific program.
  • the process execution unit 120 may provide an execution address of an instruction by a module in the mother process.
  • the execution address means an address in memory when an instruction in a module is executed and is stored in an EIP register.
  • the alarm setting unit 130 sets a debug event to be generated when the mother process generated by the mother program attempts to execute code having no execution attribute (S207).
  • the non-execution memory alarm setting process by the alarm setting unit 130 is described through the example of FIG. 3, when the non-executable file mother process is executed by the process execution unit 120 (S301).
  • a kernel module eg, Kernel32.DLL module
  • the data injection alert thread is injected into the detection target process (S305).
  • the injection time point is merely an example of an embodiment.
  • injection can be performed at various points, such as being injected after ntdll.dll is loaded by the mother process.
  • the malicious determination unit 150 may determine whether the non-executable file is a malicious file including malicious shell code (S309). This malicious determination process will be described with reference to FIG. 2 again.
  • step S207 while the alarm for the execution of the non-execution memory is set, the information storage unit 140 processes the normal address range information including the start address and the end address of the normal module loaded into the memory according to the execution of the mother process. Obtained from the execution unit 120 and stored (S209).
  • the malicious determination unit 150 generates a debug event when the mother process generated by the mother program executing the non-executable file attempts to execute the code having no execution attribute (S211). Malicious shell code detection is performed using the stored address range information (S213) to determine whether the non-executable file is malicious (S215).
  • the malicious determination unit 150 is a normal address range that the execution address of the instruction by the mother process is stored in the information storage unit 140 If the information deviates, it is determined that the non-executable file is malicious (S401, S403, S409). However, if the execution address of the command belongs to the normal address range information, it is determined whether the executable file is malicious based on the infection of the structured exception processing. In other words, it is determined whether the structured exception handling chain value is malicious according to whether it is in the normal address range (S405, S407, S409).
  • the malicious determination unit 150 obtains a chain value of the structured exception processing.
  • the malicious determination unit 150 obtains a chain value of the structured exception processing.
  • the chain value of the debugger is obtained using an additional data segment (for example, a data register F (FS) segment) of the central processing unit register (S501).
  • FS data register F
  • the structured exception handling chain is counted (S503). If the current address of the chain value and the next structured exception handling chain value are the same, the structured exception handling is determined to be infected, and the non-executable file is determined to be malicious (S505, S515).
  • the malicious determination unit 150 determines that the non-executable file is malicious if the current address of the chain value does not exist in the normally loaded module. (S507, S515).
  • the malicious determination unit 150 causes the non-execution file to be malicious when the count value for the structured exception handling chain in step S503 is greater than or equal to a preset value. It determines (S509, S515).
  • the maximum value of the count for the structured exception processing chain for determining whether the non-execution file is malicious can be arbitrarily set in consideration of the time required for determining whether the malicious file is malicious.
  • step S509 when the structured exception handling count value does not exceed the preset maximum value in step S509, it is determined whether the structured exception handling address is the normal end value (S511), and the structured exception handling address is the normal end value (for example, in the case of OFFFFFFFFF, the non-executable file is determined to be normal (S511). If the structured exception handling address is not the normal end value, the process is repeated again from step S503.
  • the cause analyzer 160 may execute an instruction related to an execution address that deviates from normal address range information previously stored in the information storage unit 140. Analyze the cause of the vulnerability by comparing it with a module containing the vulnerability information. For example, the cause of the non-executable file exploit is analyzed and the analysis log is recorded in the information storage 140, for example (S217).
  • the vulnerability information may be information provided by Common Vulnerabilities and Exposures (CVE), Microsoft Security Bulletin (eg, MS11-002), National Vulnerability Database (NVD), US-CERT Bulletin, but is not limited thereto.
  • the malicious code extracting unit 170 detects code in an area corresponding to an execution address that deviates from normal address range information previously stored in the information storage unit 140. Extract. For example, malicious code decoded in a virtual memory by a non-executable file mother program is extracted in the form of an executable file or an executable file.
  • the malicious code extractor 170 may extract the decoded malicious code in the form of a file having an extension of exe, cpl, ocx, dll, vxd, sys, scr, or drv.
  • file extensions that can be extracted are not limited to these.
  • the extracted malicious code executable file can be used when analyzing the operation method of the malicious code (S219).
  • the cause analysis unit 160 may transmit the vulnerability cause analysis log to a malicious code inspection and analysis server (not shown) connected to a communication network (not shown) or provide the specific user or analyst to the malicious code.
  • the code extractor 170 may request an analysis by transmitting the code extracted in the form of an executable file or an executable file to a malicious code inspection and analysis server (not shown) connected to a communication network (not shown).
  • the malicious determination unit 150 stops execution of the non-executable file determined to be malicious (S223).
  • the execution stop procedure for the non-executable file can be performed at any time after it is determined to be malicious in step S215.
  • Combinations of each block of the block diagrams and respective steps of the flowcharts attached to the present invention may be performed by computer program instructions.
  • These computer program instructions may be mounted on a processor of a general purpose computer, special purpose computer, or other programmable data processing equipment such that instructions executed through the processor of the computer or other programmable data processing equipment may not be included in each block or flowchart of the block diagram. It will create means for performing the functions described in each step.
  • These computer program instructions may be stored in a computer usable or computer readable memory that can be directed to a computer or other programmable data processing equipment to implement functionality in a particular manner, and thus the computer usable or computer readable memory.
  • instructions stored in may produce an article of manufacture containing instruction means for performing the functions described in each block or flowchart of each step of the block diagram.
  • Computer program instructions may also be mounted on a computer or other programmable data processing equipment, such that a series of operating steps may be performed on the computer or other programmable data processing equipment to create a computer-implemented process to create a computer or other programmable data. Instructions that perform processing equipment may also provide steps for performing the functions described in each block of the block diagram and in each step of the flowchart.
  • each block or step may represent a portion of a module, segment or code that includes one or more executable instructions for executing a specified logical function (s).
  • a specified logical function s.
  • the functions noted in the blocks or steps may occur out of order.
  • the two blocks or steps shown in succession may in fact be executed substantially concurrently or the blocks or steps may sometimes be performed in the reverse order, depending on the functionality involved.

Landscapes

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

Abstract

디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치는 비실행 파일을 실행하는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되도록 설정하는 경보 설정부와, 마더 프로세스가 사용하는 정상 모듈들이 로드되는 메모리의 주소 범위 정보를 저장하는 정보 저장부와, 디버그 이벤트가 발생하면 기 획득된 주소 범위 정보를 이용하여 비실행 파일에 대한 악성 여부를 판단하는 악성 판단부를 포함한다.

Description

디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치 및 방법
본 발명은 디버그 이벤트(debug event)를 이용한 악성 쉘 코드 탐지 장치 및 방법에 관한 것이다. 보다 구체적으로, 본 발명은 디버그 이벤트를 이용하여 비실행 파일이 악성 쉘 코드(malicious shell code)를 포함하고 있는지 여부를 검사하는 장치, 방법 및 컴퓨터 프로그램이 기록된 컴퓨터 판독가능 기록매체에 관한 것이다.
광범위한 인터넷 및 무선통신 기기의 보급에 따라 악성 소프트웨어 또는 악성 코드의 전염경로가 다양해지고 있으며, 이로 인한 피해 정도가 매년 증가하고 있다. 악성 코드란 사용자의 의사와 이익에 반하여 시스템을 파괴하거나 정보를 유출하는 등의 악의적 활동을 수행하도록 의도적으로 제작된 소프트웨어를 말한다. 이러한 악성 코드의 종류로는 바이러스(virus), 웜(worm), 트로이얀(trojan), 백도어(backdoor), 논리폭탄(logic bomb), 트랩도어(trap door) 등의 해킹 툴, 악의적인 스파이웨어(spyware), 애드웨어(ad-ware) 등이 있다. 악성 코드는 자기복제나 자동번식 기능을 통하여, 사용자 식별정보(ID)와 암호 등의 개인정보 유출, 대상 시스템 통제, 파일 삭제/변경, 시스템 파괴, 응용프로그램/시스템의 서비스 거부, 핵심 자료 유출, 다른 해킹 프로그램 설치 등의 문제를 일으키고 있으며, 그 피해도 매우 다양하고 심각하다.
이러한 문제를 해결하기 위하여, 악성 코드를 탐지하고 치료하는 악성 코드 치료 시스템(백신 프로그램)이 개발되고 있다. 현재까지 알려진 악성 코드 치료 시스템(백신 프로그램) 대부분은 파일 기반 진단법을 사용하고 있다. 이는 대부분의 악성 코드가 특정 시스템에서 실행되기 위해서는 해당 시스템에서 실행이 가능한 파일 형태로 되어 있다는 점에서 기인한 것이다. 예를 들어, 악성 코드는 윈도우 시스템(예컨대, Win 32 운영체제 시스템)에서 실행되기 위해서 휴대실행가능(PE: Portable Executable) 파일의 포맷을 가지고 있는 것이 대부분이다. 예컨대, 휴대실행가능 파일의 확장자는 exe, cpl, ocx, dll, vxd, sys, scr, drv 등이 있다.
이러한 실행파일 또는 실행가능파일 형식의 악성 코드를 진단하기 위해서는 악성 코드 치료 시스템 또한 이러한 파일 형식을 인식하고 악성 코드로 판단할 수 있는 특정 형식의 시그니처(signature)를 가지고 있어야 된다. 이러한 진단법이 대부분의 악성 코드 치료 시스템이 사용하는 시그니처 기반 또는 스트링(string) 검사 방식과 같은 진단법이다. 이러한 시그니처 기반의 진단법은 악성 코드로 분류되는 파일의 특정 부분 또는 고유한 부분을 검사대상으로 하기 때문에 오탐(false positive)과 미탐(false negative)을 최소화하는 정확한 진단이 가능하다는 점과 파일 검사 시에 파일들의 특징적인 부분들만 비교함으로 빠른 스캐닝을 할 수 있다는 장점을 가진다. 그러나 이러한 시그니처 기반 진단법은 악성 코드의 파일 자체가 몇 백 바이트만 바뀌어도 진단이 되지 않는 미탐이 발생하기 때문에, 파일이 조금만 변경된 새로운 변형에 대해서는 대응을 할 수가 없게 된다. 그리고 기존에 알려진 악성 코드에 대해서만 대응을 할 수 있으므로 새로운 형태의 알려지지 않은 악성 코드에 대해서는 대응을 할 수 없다는 단점을 가지고 있다.
한편, 최근 이슈가 되고 있는 지능형 지속 위협(APT: Advanced Persistent Threat) 공격은 공격자가 특정 타깃을 정하고 목표한 정보를 빼내기 위해 고도의 공격기법을 적용하여 지속적으로 다양한 형태 악성코드를 활용한다. 특히 지능형 지속 위협 공격은 초기 침입단계에서 탐지하지 못하는 경우가 많으며, 주로 악성 코드를 포함하는 비실행 파일을 이용하는 경우가 많다. 예컨대, 윈도우 시스템(예컨대, Win 32 운영체제 시스템)의 비 휴대실행가능(Non-PE: Non-Portable Executable) 파일을 이용한다. 이는 비 휴대실행가능 파일을 실행하는 프로그램(예: 문서작성 또는 이미지 프로그램)이 기본적으로 어느 정도의 보안 취약성을 가지고 있을 뿐만 아니라, 악성 코드를 비 휴대실행가능 파일에 포함시키면 파일 변경에 따라 손쉽게 변종 악성 코드를 만들 수 있기 때문이다.
이러한 특성 때문에, 지능형 지속 위협 공격은 악성 비실행 파일 익스플로잇(exploit)을 이용하여 제로 데이(Zero Day) 공격을 하는 사례가 많다. 예를 들어, 수신인이 이메일에 첨부된 악성 비실행 파일을 무심코 오픈하는 경우, 수신인의 컴퓨터는 악성 파일에 의해 감염되어 다른 컴퓨터를 공격할 수도 있고, 시스템에 침입하여 핵심 자료를 외부로 유출할 수도 있다. 뿐만 아니라, 비실행 파일이 다양한 형식(포맷)을 가지고 있기 때문에 악성 비실행 파일을 이용한 제로 데이 익스플로잇(Zero-Day Exploit)은 분석가가 비실행 파일의 악성 여부를 판단하고 악성 행위를 분석하는데 상당한 시간과 노력이 필요하며, 분석 기간 동안에 변형되거나 새로이 생성되는 수많은 악성 비실행 파일에 대응하는 것은 종래 기술로는 거의 불가능하다고 할 수 있다.
예를 들어, 종래의 시그니처 기반의 검사 방법은 다양한 형태의 공격 방법을 탐지하기 위해서 대량의 시그니처 데이터베이스를 보유하고 있어야 하기 때문에 현실적으로는 악성 비실행 파일을 이용한 제로 데이 익스플로잇을 방어할 수 없다는 문제점이 있다.
또한, 종래의 행위 기반 검사 방법 또한 다양한 공격자에 대한 행위를 탐지하여야 하기 때문에 설계 방법 등의 정보가 필요하며 이 때문에 많은 오탐과 미탐이 발생되는 문제점이 있다.
따라서, 이러한 문제를 해결하기 위해 비실행 파일이 악성코드를 포함하고 있는지를 신속하고 정확하게 검사할 수 있는 악성 코드 치료 시스템이 개발될 필요가 있다.
본 발명의 실시예는, 이와 같은 종래 기술의 문제점을 해결하기 위한 것으로서, 비실행 파일의 프로그램이 실행됨에 따라 로드되는 정상 모듈의 주소 범위 정보를 획득하고, 디버그 이벤트의 발생 시에 기 획득된 주소 범위 정보를 이용하여 비실행 파일의 악성 여부를 판단할 수 있는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치 및 방법을 제공하는 것을 목적으로 한다.
본 발명의 일 실시예에 따르면, 비실행 파일을 실행하는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되도록 설정하는 경보 설정부와, 상기 마더 프로세스가 사용하는 정상 모듈들이 로드되는 메모리의 주소 범위 정보를 저장하는 정보 저장부와, 상기 디버그 이벤트가 발생하면 기 획득된 상기 주소 범위 정보를 이용하여 상기 비실행 파일에 대한 악성 여부를 판단하는 악성 판단부를 포함하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
여기서, 상기 경보 설정부는, 상기 마더 프로세스에 의해 상기 디버그 이벤트가 발생하면 데이터 실행 경보 쓰레드를 검출 대상 프로세스에 인젝션하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
상기 정보 저장부는, 상기 정상 모듈들이 로드되는 상기 메모리의 시작 주소와 끝 주소를 저장하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
상기 악성 판단부는, 상기 마더 프로세스에 의한 명령어의 실행 주소가 상기 주소 범위 정보를 벗어나면 상기 비실행 파일을 악성으로 판정하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
상기 악성 판단부는, 상기 명령어의 실행 주소가 상기 주소 범위 정보에 속하면 구조화된 예외 처리(SEH: Structured Exception Handling)의 감염 여부에 따라 상기 비실행 파일에 대한 악성 여부를 판단하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
상기 악성 판단부는, 상기 구조화된 예외 처리의 체인값을 구한 후에 상기 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하면 상기 구조화된 예외 처리가 감염된 것으로 판정하여 상기 비실행 파일을 악성으로 판정하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
상기 악성 판단부는, 중앙 처리 유닛 레지스터의 추가 데이터 세그먼트를 이용하여 디버기의 상기 체인값을 구하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
상기 추가 데이터 세그먼트는, FS(data register F) 세그먼트인 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
상기 악성 판단부는, 상기 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하지 않으면 상기 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하지 않는 경우에 상기 비실행 파일을 악성으로 판정하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
상기 악성 판단부는, 상기 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하는 경우에는 상기 구조화된 예외 처리 체인에 대한 카운트값이 기 설정된 값 이상일 경우에 상기 비실행 파일을 악성으로 판정하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
상기 비실행 파일이 악성으로 판정되면 상기 주소 범위 정보를 벗어나는 실행 주소와 관련된 명령어를 포함하는 모듈과 취약성 정보와의 비교를 통해 취약성 발생 원인을 분석하는 원인 분석부를 더 포함하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
또한, 상기 비실행 파일이 악성으로 판정되면 상기 주소 범위 정보를 벗어나는 실행 주소에 대응되는 영역 내 코드를 추출하는 악성 코드 추출부를 더 포함하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치를 제공할 수 있다.
본 발명의 다른 실시예에 따르면, 비실행 파일을 실행하는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되도록 설정하는 단계와, 상기 마더 프로세스가 사용하는 정상 모듈들이 로드되는 메모리의 주소 범위 정보를 획득하는 단계와, 상기 디버그 이벤트가 발생하면 기 획득된 상기 주소 범위 정보를 이용하여 상기 비실행 파일에 대한 악성 여부를 판단하는 단계를 포함하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
여기서, 상기 설정하는 단계는, 상기 마더 프로세스에 의해 상기 디버그 이벤트가 발생하는 지를 확인하는 단계와, 상기 디버그 이벤트가 발생하면 데이터 실행 경보 쓰레드를 검출 대상 프로세스에 인젝션하는 단계를 포함하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
상기 획득하는 단계는, 상기 정상 모듈들이 로드되는 상기 메모리의 시작 주소와 끝 주소를 저장하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
상기 판단하는 단계는, 상기 마더 프로세스에 의한 명령어의 실행 주소가 상기 주소 범위 정보를 벗어나면 상기 비실행 파일을 악성으로 판정하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
상기 판단하는 단계는, 상기 명령어의 실행 주소가 상기 주소 범위 정보에 속하면 구조화된 예외 처리의 감염 여부에 따라 상기 비실행 파일에 대한 악성 여부를 판단하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
상기 판단하는 단계는, 상기 구조화된 예외 처리의 체인값을 구하는 단계와, 상기 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하면 상기 구조화된 예외 처리가 감염된 것으로 판정하여 상기 비실행 파일을 악성으로 판정하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
상기 체인값을 구하는 단계는, 중앙 처리 유닛 레지스터의 추가 데이터 세그먼트를 이용하여 디버기의 상기 체인값을 구하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
상기 추가 데이터 세그먼트는, FS 세그먼트인 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
상기 판단하는 단계는, 상기 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하지 않으면 상기 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하지 않는 경우에 상기 비실행 파일을 악성으로 판정하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
상기 판단하는 단계는, 상기 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하는 경우에는 상기 구조화된 예외 처리 체인에 대한 카운트값이 기 설정된 값 이상일 경우에 상기 비실행 파일을 악성으로 판정하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
상기 비실행 파일이 악성으로 판정되면 상기 주소 범위 정보를 벗어나는 실행 주소와 관련된 명령어를 포함하는 모듈과 취약성 정보와의 비교를 통해 취약성 발생 원인을 분석하는 단계를 더 포함하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
또한, 상기 비실행 파일이 악성으로 판정되면 상기 주소 범위 정보를 벗어나는 실행 주소에 대응되는 영역 내 코드를 추출하는 단계를 더 포함하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 제공할 수 있다.
본 발명의 또 다른 실시예에 따르면, 비실행 파일을 실행하는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되도록 설정하는 단계와, 상기 마더 프로세스가 사용하는 정상 모듈들이 로드되는 메모리의 주소 범위 정보를 획득하는 단계와, 상기 디버그 이벤트가 발생하면 기 획득된 상기 주소 범위 정보를 이용하여 상기 비실행 파일에 대한 악성 여부를 판단하는 단계를 포함하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법에 따른 각각의 단계를 수행하는 명령어를 포함하는 프로그램이 기록된 컴퓨터 판독가능 기록매체를 제공할 수 있다.
본 발명의 실시예에 따르면 프로그램이 구동됨에 따라 정상적으로 로드되는 정상 모듈의 시작 주소와 끝 주소로 이루어진 주소 범위 정보를 획득한 후 마더 프로세스에 의해 디버그 이벤트가 발생하면 기 획득된 주소 범위 정보를 이용하여 비실행 파일에 대한 악성 여부를 판단함으로써, 악성 코드가 실행되기 전에 악성 비실행 파일을 탐지할 수 있는 효과가 있다.
또한, 본 발명의 실시예에 따르면 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되면 비실행 파일에 대한 악성 여부를 판단함으로써, 악성 후보 주소를 이용하는 검사 방법 등과 비교할 때에 더 빠른 시간 내에 악성 비실행 파일을 탐지할 수 있을 뿐만 아니라 악성 후보 주소에 포함되지 않는 경우에도 악성 비실행 파일로 판단할 수 있기 때문에 탐지 정확도가 더 높다. 즉 종래 모든 의심주소(suspicious address)을 대상으로 하여 악성 비실행 파일을 탐지하는 경우와 비교할 때에도 동일한 탐지 성능을 제공한다.
따라서, 악성 비실행 파일의 취약성을 이용한 지능형 지속 위협 공격 시나리오 등에 대해 효과적으로 방어할 수 있는 효과가 있다.
도 1은 본 발명의 실시예에 따른 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치의 블록 구성도이다.
도 2는 본 발명의 실시예에 따른 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 설명하기 위한 흐름도이다.
도 3은 본 발명의 실시예에 따른 비실행 메모리 경보 설정 과정을 설명하기 위한 흐름도이다.
도 4는 본 발명의 실시예에 따른 악성 파일 판단 과정을 설명하기 위한 흐름도이다.
도 5는 본 발명의 실시예에 따른 구조화된 예외 처리의 감염 여부 판단 과정을 설명하기 위한 흐름도이다.
본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다.
본 발명의 실시예들을 설명함에 있어서 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 그리고 후술되는 용어들은 본 발명의 실시예에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.
본 명세서에서 사용되는 "비실행 파일"이란 실행 파일 또는 실행 가능한 파일과 반대되는 개념으로서 자체적으로 실행되지 않는 파일을 의미한다. 예를 들어, 비실행 파일은 한글 파일, 워드 파일 등과 같은 문서 파일, JPG 파일 등과 같은 이미지 파일, 동영상 파일, 자바 스크립크 파일, HTML 파일 등이 될 수 있으나, 이에 한정되지 않는다.
악성 코드를 포함하는 악성 비실행 파일은 이메일에 첨부되는 방식 또는 네트워크를 통해 악성 비실행 파일 자체가 전송되는 방식 등을 통해 지능형 지속 위협 공격 등에서 사용될 수 있다. 이 경우 악성 코드는 쉘 코드(shell code)일 수 있고, 이러한 악성 쉘 코드는 비실행 파일의 형식(포맷)에 대응하는 프로그램을 실행하는 경우에 실행될 수 있다. 비실행 파일의 형식은 예를 들어, hwp 파일, doc 파일, pdf 파일, jpg 파일, js 파일, html 파일 등이 될 수 있다.
악성 비실행 파일들은 악성 쉘 코드를 포함할 수 있으며, 악성 쉘 코드를 포함하고 있는 악성 비실행 파일은 어떤 방식을 통해서든 결국 명령어를 실행할 때에 악성 쉘 코드 영역으로 이동한다. 이러한 악성 쉘 코드 영역으로의 이동은 실행 주소를 확인하면 미리 예측할 수 있다. 예컨대, CPU 와 같은 중앙 처리 유닛의 레지스터 중의 하나인 EIP(Extended Instruction Pointer) 레지스터에 저장된 값을 통해 다음에 실행해야 할 명령어의 실행 주소를 확인할 수 있다. 따라서, 정상적인 정상 주소 범위를 벗어나 악성 쉘 코드 영역으로 이동하는 명령어를 갖는지 여부는 비실행 파일의 악성 여부를 판단하는데 있어 중요한 기준이 될 수 있다.
도 1은 본 발명의 실시예에 따른 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치의 블록 구성도이다.
도 1에 도시된 바와 같이, 본 발명의 실시예에 따른 악성 쉘 코드 탐지 장치는 비실행 파일을 마더 프로그램에 로드하여 실행시키며, 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되면 비실행 파일 내 악성 코드 포함 여부를 분석한 후 이를 분석 및 보고할 수 있다. 이를 위하여 악성 쉘 코드 탐지 장치는 인터페이스부(110), 프로세스 실행부(120), 경보 설정부(130), 정보 저장부(140), 악성 판단부(150), 원인 분석부(160), 악성 코드 추출부(170) 등을 포함할 수 있다.
인터페이스부(110)는 검사하고자 하는 비실행 파일이 저장된 디렉토리 또는 비실행 파일을 선택하기 위한 인터페이스를 제공할 수 있다.
프로세스 실행부(120)는 인터페이스부(110)를 통해 선택된 비실행 파일의 형식을 판단하고, 판단된 형식에 따라 마더 프로그램을 이용하여 비실행 파일을 실행한다. 이러한 프로세스 실행부(120)는 중앙 처리 유닛(CPU: Central Processing Unit)의 레지스터에 저장된 정보를 이용하여 명령어에 대한 실행 주소를 제공할 수 있다. 그 예로서, 중앙 처리 장치의 EIP(Extended Instruction Pointer) 레지스터에는 다음에 실행해야 할 명령어의 메모리 주소가 저장될 수 있다.
경보 설정부(130)는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되도록 설정한다. 예컨대, 경보 설정부(130)는 마더 프로세스에 의해 커널 모듈(예컨대, Kernel32.DLL 모듈) 로드 디버그 이벤트 등과 같은 디버그 이벤트가 발생하면 데이터 실행 경보 쓰레드를 검출 대상 프로세스에 인젝션 할 수 있다.
정보 저장부(140)는 마더 프로그램이 구동됨에 따라 마더 프로세스가 사용하는 정상 모듈들이 로드되는 메모리의 주소 범위 정보를 획득하여 저장한다. 예컨대, 정상 모듈들이 로드되는 메모리의 시작 주소와 끝 주소로 이루어진 주소 범위 정보를 저장할 수 있다.
악성 판단부(150)는 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되면 정보 저장부(140)에 기 획득된 주소 범위 정보를 이용하여 비실행 파일에 대한 악성 여부를 판단한다. 예컨대, 악성 판단부(150)는 마더 프로그램의 모듈 내 각 명령어가 실행될 때 각 명령어의 실행 주소가 기 획득된 주소 범위 정보를 벗어나는지 여부를 기초로 비실행 파일에 대한 악성 여부를 판단할 수 있다.
예컨대, 악성 판단부(150)는 마더 프로세스에 의한 명령어의 실행 주소가 정보 저장부(140)에 기 획득된 주소 범위 정보를 벗어나면 해당 비실행 파일을 악성으로 판정할 수 있다. 즉 중앙 처리 유닛의 EIP 레지스터에 저장된 실행 주소가 정상적인 주소 범위 정보를 벗어나는 경우에 비실행 파일을 악성으로 분류하는 것이다.
또한, 악성 판단부(150)는 명령어의 실행 주소가 기 획득된 정상적인 주소 범위 정보에 속하면 구조화된 예외 처리의 감염 여부에 따라 비실행 파일에 대한 악성 여부를 판단할 수 있다. 여기서, 구조화된 예외 처리의 체인값을 구한 후에 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하면 구조화된 예외 처리가 감염된 것으로 판정하여 비실행 파일을 악성으로 판정할 수 있다. 이를 위해, 중앙 처리 유닛 레지스터의 추가 데이터 세그먼트(예컨대, FS(data register F) 세그먼트)를 이용하여 디버기의 체인값을 구할 수 있다.
그리고, 악성 판단부(150)는 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하지 않으면 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하지 않는 경우에 비실행 파일을 악성으로 판정할 수 있다. 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하는 경우에는 구조화된 예외 처리 체인에 대한 카운트값이 기 설정된 값 이상일 경우에 비실행 파일을 악성으로 판정할 수 있다.
원인 분석부(160)는 악성 판단부(150)에 의해 비실행 파일이 악성으로 판정되면 정상적인 주소 범위 정보를 벗어나는 실행 주소와 관련된 명령어를 포함하는 모듈과 취약성 정보와의 비교를 통해 취약성 발생 원인을 분석할 수 있으며, 분석된 취약성 발생 원인을 통신망(미도시됨)에 연결된 악성 코드 검사 및 분석 서버(미도시됨)로 전송하거나 특정된 사용자 또는 분석가에게 제공해줄 수 있다. 여기서, 취약성 정보로는 CVE(Common Vulnerabilities and Exposures), Microsoft Security Bulletin(예컨대, MS11-002), NVD(National Vulnerability Database), US-CERT Bulletin 등에서 제공한 정보일 수 있지만 이들에 한정되지는 않는다.
악성 코드 추출부(170)는 악성 판단부(150)에 의해 비실행 파일이 악성으로 판정되면 정상적인 주소 범위 정보를 벗어나는 실행 주소에 대응되는 영역 내 코드를 실행 파일 또는 실행 가능한 파일 형태로 추출할 수 있다. 여기서, 실행 파일 또는 실행 가능한 파일 형태는 exe, cpl, dll, ocx, vxd, sys, scr, drv 등이 될 수 있으나, 이에 한정하지 않는다. 또한, 악성 코드 추출부(170)는 실행 파일 또는 실행 가능한 파일 형태로 추출된 코드를 통신망(미도시됨)에 연결된 악성 코드 검사 및 분석 서버(미도시됨)에 전송하여 분석을 의뢰할 수 있다.
본 발명의 실시예에서는 원인 분석부(160)가 악성 쉘 코드 탐지 장치(100)의 내부에 설치되는 것으로 예를 들어 설명하였지만, 통신망을 통해 연결된 별도의 분석 서버(미도시됨)에 설치될 수 있다.
도 2는 본 발명의 실시예에 따른 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법을 설명하기 위한 흐름도이다.
이에 나타낸 바와 같이 본 발명의 실시예에 따른 악성 쉘 코드 탐지 방법은, 비실행 파일을 실행하는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되도록 설정하는 단계(S201 내지 S207)와, 마더 프로세스가 사용하는 정상 모듈들이 로드되는 메모리의 주소 범위 정보를 획득하는 단계(S209)와, 디버그 이벤트가 발생하면 기 획득된 주소 범위 정보를 이용하여 비실행 파일에 대한 악성 여부를 판단하는 단계(S211 내지 S215)와, 비실행 파일이 악성으로 판정되면 주소 범위 정보를 벗어나는 실행 주소와 관련된 명령어를 포함하는 모듈과 취약성 정보와의 비교를 통해 취약성 발생 원인을 분석하는 단계(S217)와, 비실행 파일이 악성으로 판정되면 주소 범위 정보를 벗어나는 실행 주소에 대응되는 영역 내 코드를 추출하는 단계(S219)와, 취약성 발생 원인 및 악성 코드 추출 결과를 리포팅하면서 해당 비실행 파일의 실행을 중지하는 단계(S221 및 S223)를 포함한다.
도 3은 본 발명의 실시예에 따른 비실행 메모리 경보 설정 과정을 설명하기 위한 흐름도이며, 도 4는 본 발명의 실시예에 따른 악성 파일 판단 과정을 설명하기 위한 흐름도이고, 도 5는 본 발명의 실시예에 따른 구조화된 예외 처리의 감염 여부 판단 과정을 설명하기 위한 흐름도이다. 이들은 아래에서 설명될 악성 쉘 코드 탐지 장치에 의한 악성 쉘 코드 탐지 방법에 대한 세부적인 설명으로부터 충분히 이해할 수 있다.
이하, 도 1 내지 도 5를 참조하여 본 발명의 실시예에 따른 악성 쉘 코드 탐지 장치에 의한 악성 쉘 코드 탐지 방법에 대해 설명하기로 한다.
먼저, 사용자가 인터페이스부(110)를 이용하여 비실행 파일이 저장된 디렉토리를 선택하면, 프로세스 실행부(120)는 선택된 디렉토리 내 비실행 파일의 형식을 파악한다. 즉, 검사 대상인 비실행 파일이 저장된 디렉토리가 인터페이스부(110)를 통해 선택(S201)되면 프로그램 실행부(120)는 해당 디렉토리에 저장된 비실행 파일의 파일 형식 정보에 의거하여 파일 형식을 판단한다. 예컨대, 드라이브1의 하위에 존재하는 다수의 루트 폴더 중에서 특정 루트 폴더가 인터페이스부(110)를 통해 선택되면 특정 루트 폴더에 저장된 비실행 파일의 파일 형식 정보를 확인하여 해당 비실행 파일의 파일 형식을 파악한다(S203).
그 다음, 프로세스 실행부(120)는 비실행 파일의 형식에 맞는 마더 프로세스를 실행한다(S205). 여기서, 프로세스 실행부(120)는 실행이 필요한 특정 프로그램을 직접 실행시켜서 마더 프로세스를 실행할 수도 있으며, 별도의 시스템(미도시됨)에게 특정 프로그램의 실행을 요청할 수도 있다. 이러한 프로세스 실행부(120)는 마더 프로세스 내 모듈에 의한 명령어의 실행 주소를 제공할 수 있다. 여기서, 실행 주소는 모듈 내 명령어가 실행될 때 메모리 상의 주소를 의미하며, EIP 레지스터에 저장되어 있다.
이처럼, 마더 프로세스가 실행되는 환경에서 경보 설정부(130)는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되도록 설정한다(S207).
이러한 경보 설정부(130)에 의한 비실행 메모리 경보 설정 과정은 도 3의 예시를 통해 살펴보면, 프로세스 실행부(120)에 의해 비실행 파일 마더 프로세스가 실행될 때(S301)에 경보 설정부(130)는 마더 프로세스에 의해 커널 모듈(예컨대, Kernel32.DLL 모듈) 로드 디버그 이벤트가 발생(S303)하면 데이터 실행 경보 쓰레드를 검출 대상 프로세스에 인젝션 한다(S305). 여기서, 인젝션 시점은 실시예를 보여준 것에 불과하다. 예컨대, 마더 프로세스에 의해 ntdll.dll이 로드된 이후에 인젝션 할 수 있는 등과 같이 여러 시점에서 인젝션을 할 수 있다. 이러한 상황에서 악성 판단부(150)는 메모리 실행 시에 디버그 이벤트가 발생(S307)하면 비실행 파일이 악성 쉘 코드를 포함하는 악성 파일인지를 판단할 수 있다(S309). 이러한 악성 판단 과정은 도 2를 다시 참조하여 설명하기로 한다.
단계 S207과 같이, 비실행 메모리의 실행에 대한 경보가 설정된 상태에서 정보 저장부(140)는 마더 프로세스의 실행에 따라 메모리에 로드되는 정상 모듈의 시작 주소와 끝 주소로 이루어진 정상 주소 범위 정보를 프로세스 실행부(120)로부터 획득하여 저장한다(S209).
이후, 악성 판단부(150)는 비실행 파일을 실행하는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생(S211)되면 정보 저장부(140)에 기 저장된 주소 범위 정보를 이용한 악성 쉘 코드 탐지를 수행(S213)하여 비실행 파일에 대한 악성 여부를 판단한다(S215).
도 4를 참조하여 악성 판단부(150)에 의한 악성 파일 판단 과정을 자세히 살펴보면, 악성 판단부(150)는 마더 프로세스에 의한 명령어의 실행 주소가 정보 저장부(140)에 저장되어 있는 정상적인 주소 범위 정보를 벗어나면 비실행 파일을 악성으로 판정한다(S401, S403, S409). 하지만, 명령어의 실행 주소가 정상적인 주소 범위 정보에 속하면 구조화된 예외 처리의 감염 여부에 따라 비실행 파일에 대한 악성 여부를 판단한다. 즉, 구조화된 예외 처리 체인값이 정상 주소 범위에 속하는지에 따라 악성 여부를 판단한다(S405, S407, S409).
도 5를 참조하여 악성 판단부(150)에 의한 구조화된 예외 처리에 대한 감염 여부 검사 과정을 자세히 살펴보면, 먼저 악성 판단부(150)는 구조화된 예외 처리의 체인값을 구한다. 예컨대, 중앙 처리 유닛 레지스터의 추가 데이터 세그먼트(예컨대, FS(data register F) 세그먼트)를 이용하여 디버기의 체인값을 구한다(S501).
이후, 구조화된 예외 처리 체인을 카운트하며(S503), 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하면 구조화된 예외 처리가 감염된 것으로 판정하여 비실행 파일을 악성으로 판정한다(S505, S515).
하지만, 악성 판단부(150)는, 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하지 않으면 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하지 않는 경우에 비실행 파일을 악성으로 판정한다(S507, S515).
또한, 악성 판단부(150)는 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하는 경우에는 단계 S503에 의한 구조화된 예외 처리 체인에 대한 카운트값이 기 설정된 값 이상일 경우에 비실행 파일을 악성으로 판정한다(S509, S515). 여기서, 단계 S509에서 비실행 파일에 대한 악성 여부를 판정하기 위한 구조화된 예외 처리 체인에 대한 카운트의 최대값은 악성 여부 판정의 소요 시간 등을 고려하여 임의로 설정할 수 있다.
다음으로, 단계 S509에서 구조화된 예외 처리 카운트값이 기 설정된 최대값 이상이 되지 않을 경우에는 구조화된 예외 처리 주소가 정상 종료값인지를 판정하며(S511), 구조화된 예외 처리 주소가 정상 종료값(예컨대, OFFFFFFFFF)일 경우에는 비실행 파일을 정상으로 판정한다(S511). 여기서, 구조화된 예외 처리 주소가 정상 종료값이 아닐 경우에는 다시 단계 S503부터 재 수행한다.
다시 도 2를 참조하면, 악성 판단부(150)가 비실행 파일을 악성 파일로 판단하면 원인 분석부(160)는 정보 저장부(140)에 기 저장된 정상적인 주소 범위 정보를 벗어나는 실행 주소와 관련된 명령어를 포함하는 모듈과 취약성 정보와의 비교를 통해 취약성 발생 원인을 분석한다. 예컨대, 비실행 파일 익스플로잇 발생 원인을 분석하며, 분석 로그를 예컨대 정보 저장부(140)에 기록한다(S217). 여기서, 취약성 정보로는 CVE(Common Vulnerabilities and Exposures), Microsoft Security Bulletin(예컨대, MS11-002), NVD(National Vulnerability Database), US-CERT Bulletin 등에서 제공한 정보일 수 있지만 이들에 한정되지는 않는다.
그리고, 악성 코드 추출부(170)는 악성 판단부(150)가 비실행 파일을 악성 파일로 판단하면 정보 저장부(140)에 기 저장된 정상적인 주소 범위 정보를 벗어나는 실행 주소에 대응되는 영역 내 코드를 추출한다. 예컨대, 비실행 파일의 마더 프로그램이 가상 메모리에 디코딩하여 둔 악성 코드를 실행 파일 형태 또는 실행 가능한 파일 형태로 추출한다. 예컨대, 악성 코드 추출부(170)는 디코딩된 악성 코드를 확장자가 exe, cpl, ocx, dll, vxd, sys, scr 또는 drv 중 어느 하나인 파일 형태로 추출할 수 있다. 하지만, 추출할 수 있는 파일 형태의 확장자는 이들로 한정되지 않는다. 이렇게 추출된 악성 코드 실행 파일은 악성 코드의 동작 방식을 분석할 때에 이용할 수 있다(S219).
끝으로, 원인 분석부(160)는 취약성 발생 원인 분석 로그를 통신망(미도시됨)에 연결된 악성 코드 검사 및 분석 서버(미도시됨)로 전송하거나 특정된 사용자 또는 분석가에게 제공해줄 수 있으며, 악성 코드 추출부(170)는 실행 파일 또는 실행 가능한 파일 형태로 추출된 코드를 통신망(미도시됨)에 연결된 악성 코드 검사 및 분석 서버(미도시됨)에 전송하여 분석을 의뢰할 수 있다. 그리고, 악성 판단부(150)는 악성으로 판정된 비실행 파일에 대한 실행을 중지한다(S223). 이러한 비실행 파일에 대한 실행 중지 절차는 단계 S215에서 악성으로 판정된 이후라면 언제든지 수행할 수 있다.
본 발명에 첨부된 블록도의 각 블록과 흐름도의 각 단계의 조합들은 컴퓨터 프로그램 인스트럭션들에 의해 수행될 수도 있다. 이들 컴퓨터 프로그램 인스트럭션들은 범용 컴퓨터, 특수용 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서에 탑재될 수 있으므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서를 통해 수행되는 그 인스트럭션들이 블록도의 각 블록 또는 흐름도의 각 단계에서 설명된 기능들을 수행하는 수단을 생성하게 된다. 이들 컴퓨터 프로그램 인스트럭션들은 특정 방식으로 기능을 구현하기 위해 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 지향할 수 있는 컴퓨터 이용 가능 또는 컴퓨터 판독 가능 메모리에 저장되는 것도 가능하므로, 그 컴퓨터 이용가능 또는 컴퓨터 판독 가능 메모리에 저장된 인스트럭션들은 블록도의 각 블록 또는 흐름도 각 단계에서 설명된 기능을 수행하는 인스트럭션 수단을 내포하는 제조 품목을 생산하는 것도 가능하다. 컴퓨터 프로그램 인스트럭션들은 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에 탑재되는 것도 가능하므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에서 일련의 동작 단계들이 수행되어 컴퓨터로 실행되는 프로세스를 생성해서 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 수행하는 인스트럭션들은 블록도의 각 블록 및 흐름도의 각 단계에서 설명된 기능들을 실행하기 위한 단계들을 제공하는 것도 가능하다.
또한, 각 블록 또는 각 단계는 특정된 논리적 기능(들)을 실행하기 위한 하나 이상의 실행 가능한 인스트럭션들을 포함하는 모듈, 세그먼트 또는 코드의 일부를 나타낼 수 있다. 또, 몇 가지 대체 실시예들에서는 블록들 또는 단계들에서 언급된 기능들이 순서를 벗어나서 발생하는 것도 가능함을 주목해야 한다. 예컨대, 잇달아 도시되어 있는 두 개의 블록들 또는 단계들은 사실 실질적으로 동시에 수행되는 것도 가능하고 또는 그 블록들 또는 단계들이 때때로 해당하는 기능에 따라 역순으로 수행되는 것도 가능하다.
이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.

Claims (25)

  1. 비실행 파일을 실행하는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되도록 설정하는 경보 설정부와,
    상기 마더 프로세스가 사용하는 정상 모듈들이 로드되는 메모리의 주소 범위 정보를 저장하는 정보 저장부와,
    상기 디버그 이벤트가 발생하면 기 획득된 상기 주소 범위 정보를 이용하여 상기 비실행 파일에 대한 악성 여부를 판단하는 악성 판단부를 포함하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  2. 제 1 항에 있어서,
    상기 경보 설정부는, 상기 마더 프로세스에 의해 상기 디버그 이벤트가 발생하면 데이터 실행 경보 쓰레드를 검출 대상 프로세스에 인젝션하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  3. 제 1 항에 있어서,
    상기 정보 저장부는, 상기 정상 모듈들이 로드되는 상기 메모리의 시작 주소와 끝 주소를 저장하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  4. 제 1 항에 있어서,
    상기 악성 판단부는, 상기 마더 프로세스에 의한 명령어의 실행 주소가 상기 주소 범위 정보를 벗어나면 상기 비실행 파일을 악성으로 판정하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  5. 제 4 항에 있어서,
    상기 악성 판단부는, 상기 명령어의 실행 주소가 상기 주소 범위 정보에 속하면 구조화된 예외 처리(SEH: Structured Exception Handling)의 감염 여부에 따라 상기 비실행 파일에 대한 악성 여부를 판단하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  6. 제 5 항에 있어서,
    상기 악성 판단부는, 상기 구조화된 예외 처리의 체인값을 구한 후에 상기 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하면 상기 구조화된 예외 처리가 감염된 것으로 판정하여 상기 비실행 파일을 악성으로 판정하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  7. 제 6 항에 있어서,
    상기 악성 판단부는, 중앙 처리 유닛 레지스터의 추가 데이터 세그먼트를 이용하여 디버기의 상기 체인값을 구하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  8. 제 7 항에 있어서,
    상기 추가 데이터 세그먼트는, FS(data register F) 세그먼트인
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  9. 제 6 항에 있어서,
    상기 악성 판단부는, 상기 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하지 않으면 상기 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하지 않는 경우에 상기 비실행 파일을 악성으로 판정하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  10. 제 9 항에 있어서,
    상기 악성 판단부는, 상기 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하는 경우에는 상기 구조화된 예외 처리 체인에 대한 카운트값이 기 설정된 값 이상일 경우에 상기 비실행 파일을 악성으로 판정하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  11. 제 1 항에 있어서,
    상기 비실행 파일이 악성으로 판정되면 상기 주소 범위 정보를 벗어나는 실행 주소와 관련된 명령어를 포함하는 모듈과 취약성 정보와의 비교를 통해 취약성 발생 원인을 분석하는 원인 분석부를 더 포함하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  12. 제 1 항에 있어서,
    상기 비실행 파일이 악성으로 판정되면 상기 주소 범위 정보를 벗어나는 실행 주소에 대응되는 영역 내 코드를 추출하는 악성 코드 추출부를 더 포함하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치.
  13. 비실행 파일을 실행하는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되도록 설정하는 단계와,
    상기 마더 프로세스가 사용하는 정상 모듈들이 로드되는 메모리의 주소 범위 정보를 획득하는 단계와,
    상기 디버그 이벤트가 발생하면 기 획득된 상기 주소 범위 정보를 이용하여 상기 비실행 파일에 대한 악성 여부를 판단하는 단계를 포함하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  14. 제 13 항에 있어서,
    상기 설정하는 단계는, 상기 마더 프로세스에 의해 상기 디버그 이벤트가 발생하는 지를 확인하는 단계와,
    상기 디버그 이벤트가 발생하면 데이터 실행 경보 쓰레드를 검출 대상 프로세스에 인젝션하는 단계를 포함하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  15. 제 13 항에 있어서,
    상기 획득하는 단계는, 상기 정상 모듈들이 로드되는 상기 메모리의 시작 주소와 끝 주소를 저장하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  16. 제 13 항에 있어서,
    상기 판단하는 단계는, 상기 마더 프로세스에 의한 명령어의 실행 주소가 상기 주소 범위 정보를 벗어나면 상기 비실행 파일을 악성으로 판정하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  17. 제 16 항에 있어서,
    상기 판단하는 단계는, 상기 명령어의 실행 주소가 상기 주소 범위 정보에 속하면 구조화된 예외 처리(SEH: Structured Exception Handling)의 감염 여부에 따라 상기 비실행 파일에 대한 악성 여부를 판단하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  18. 제 17 항에 있어서,
    상기 판단하는 단계는, 상기 구조화된 예외 처리의 체인값을 구하는 단계와,
    상기 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하면 상기 구조화된 예외 처리가 감염된 것으로 판정하여 상기 비실행 파일을 악성으로 판정하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  19. 제 18 항에 있어서,
    상기 체인값을 구하는 단계는, 중앙 처리 유닛 레지스터의 추가 데이터 세그먼트를 이용하여 디버기의 상기 체인값을 구하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  20. 제 19 항에 있어서,
    상기 추가 데이터 세그먼트는, FS(data register F) 세그먼트인
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  21. 제 18 항에 있어서,
    상기 판단하는 단계는, 상기 체인값의 현재 주소와 다음 구조화된 예외 처리 체인값이 동일하지 않으면 상기 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하지 않는 경우에 상기 비실행 파일을 악성으로 판정하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  22. 제 21 항에 있어서,
    상기 판단하는 단계는, 상기 체인값의 현재 주소가 정상적으로 로드된 모듈 내에 존재하는 경우에는 상기 구조화된 예외 처리 체인에 대한 카운트값이 기 설정된 값 이상일 경우에 상기 비실행 파일을 악성으로 판정하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  23. 제 13 항에 있어서,
    상기 비실행 파일이 악성으로 판정되면 상기 주소 범위 정보를 벗어나는 실행 주소와 관련된 명령어를 포함하는 모듈과 취약성 정보와의 비교를 통해 취약성 발생 원인을 분석하는 단계를 더 포함하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  24. 제 13 항에 있어서,
    상기 비실행 파일이 악성으로 판정되면 상기 주소 범위 정보를 벗어나는 실행 주소에 대응되는 영역 내 코드를 추출하는 단계를 더 포함하는
    디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법.
  25. 비실행 파일을 실행하는 마더 프로그램에 의해 생성된 마더 프로세스가 실행속성이 없는 코드를 실행하려고 할 때에 디버그 이벤트가 발생되도록 설정하는 단계와,
    상기 마더 프로세스가 사용하는 정상 모듈들이 로드되는 메모리의 주소 범위 정보를 획득하는 단계와,
    상기 디버그 이벤트가 발생하면 기 획득된 상기 주소 범위 정보를 이용하여 상기 비실행 파일에 대한 악성 여부를 판단하는 단계
    를 포함하는 디버그 이벤트를 이용한 악성 쉘 코드 탐지 방법에 따른 각각의 단계를 수행하는 명령어를 포함하는 프로그램이 기록된 컴퓨터 판독가능 기록매체.
PCT/KR2013/006093 2012-09-11 2013-07-09 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치 및 방법 WO2014042344A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2012-0100255 2012-09-11
KR20120100255A KR101244731B1 (ko) 2012-09-11 2012-09-11 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치 및 방법

Publications (1)

Publication Number Publication Date
WO2014042344A1 true WO2014042344A1 (ko) 2014-03-20

Family

ID=48182074

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2013/006093 WO2014042344A1 (ko) 2012-09-11 2013-07-09 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치 및 방법

Country Status (4)

Country Link
US (1) US8646076B1 (ko)
JP (1) JP5326063B1 (ko)
KR (1) KR101244731B1 (ko)
WO (1) WO2014042344A1 (ko)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101311367B1 (ko) * 2013-04-09 2013-09-25 주식회사 안랩 메모리 보호기능 우회 공격 진단 장치 및 방법
KR101621170B1 (ko) * 2014-11-03 2016-05-13 (주)스마일게이트엔터테인먼트 온라인 게임에서의 메모리 감시를 이용한 해킹 방지 방법
CN105488405A (zh) * 2014-12-25 2016-04-13 哈尔滨安天科技股份有限公司 一种基于pdb调试信息的恶意代码分析方法及系统
CN104573421B (zh) * 2014-12-30 2017-12-22 北京兆易创新科技股份有限公司 一种基于若干分区的mcu芯片信息保护方法和装置
US20220075871A1 (en) * 2020-09-09 2022-03-10 Microsoft Technology Licensing, Llc Detecting hacker tools by learning network signatures
KR102560431B1 (ko) * 2022-09-21 2023-07-27 시큐레터 주식회사 자식 프로세스의 악성 행위를 검사하기 위한 방법 및 이를 위한 장치

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10501354A (ja) * 1994-06-01 1998-02-03 クワンタム・リープ・イノヴェーションズ・インコーポレーテッド コンピュータ・ウィルス・トラップ装置
JP2004038273A (ja) * 2002-06-28 2004-02-05 Kddi Corp コンピュータウィルス検査装置及び方法、コンピュータプログラム、メールゲートウェイシステム
KR100945247B1 (ko) * 2007-10-04 2010-03-03 한국전자통신연구원 가상 환경을 이용한 비실행 파일 내의 악성 코드 분석 방법및 장치

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU1598601A (en) * 1999-11-14 2001-05-30 Clicknet Software, Inc. Method and system for intercepting an application program interface
WO2004075060A1 (ja) * 2003-02-21 2004-09-02 Tabei, Hikaru コンピュータウィルス検出装置
WO2005029328A1 (ja) * 2003-09-18 2005-03-31 Denki Hompo Ltd. オペレーティングシステム、及びそれを記録した記録媒体
US7437759B1 (en) * 2004-02-17 2008-10-14 Symantec Corporation Kernel mode overflow attack prevention system and method
KR100850361B1 (ko) 2007-03-14 2008-08-04 한국전자통신연구원 실행 가능한 코드 탐지 방법 및 장치
US8037529B1 (en) * 2008-03-19 2011-10-11 Symantec Corporation Buffer overflow vulnerability detection and patch generation system and method
KR100991807B1 (ko) * 2008-05-20 2010-11-04 주식회사 웰비아닷컴 마이크로소프트 윈도우 운영체제를 사용하는 컴퓨터시스템에서의 악성코드 탐지 및 처리 시스템 및 방법
KR100992434B1 (ko) 2008-07-07 2010-11-05 주식회사 안철수연구소 확장자를 위장한 파일을 탐지하는 방법 및 그 장치
US8136158B1 (en) * 2008-07-21 2012-03-13 Google Inc. User-level segmentation mechanism that facilitates safely executing untrusted native code
KR101056283B1 (ko) 2009-10-29 2011-08-11 주식회사 반딧불소프트웨어 악성코드 검출 장치 및 그 방법

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10501354A (ja) * 1994-06-01 1998-02-03 クワンタム・リープ・イノヴェーションズ・インコーポレーテッド コンピュータ・ウィルス・トラップ装置
JP2004038273A (ja) * 2002-06-28 2004-02-05 Kddi Corp コンピュータウィルス検査装置及び方法、コンピュータプログラム、メールゲートウェイシステム
KR100945247B1 (ko) * 2007-10-04 2010-03-03 한국전자통신연구원 가상 환경을 이용한 비실행 파일 내의 악성 코드 분석 방법및 장치

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Examples of Malware Spreading using Vulnerability of ''Hangul'' Program, KrCERT", INTERNET AND SECURITY AGENCY, June 2011 (2011-06-01), KOREA *

Also Published As

Publication number Publication date
JP5326063B1 (ja) 2013-10-30
JP2014056563A (ja) 2014-03-27
KR101244731B1 (ko) 2013-03-18
US8646076B1 (en) 2014-02-04

Similar Documents

Publication Publication Date Title
KR101265173B1 (ko) 비실행 파일 검사 장치 및 방법
WO2013168951A1 (ko) 악성 파일 검사 장치 및 방법
EP3430557B1 (en) System and method for reverse command shell detection
RU2531861C1 (ru) Система и способ оценки вредоносности кода, исполняемого в адресном пространстве доверенного процесса
US8955118B2 (en) Detecting malicious software
EP3462358B1 (en) System and method for detection of malicious code in the address space of processes
WO2014042344A1 (ko) 디버그 이벤트를 이용한 악성 쉘 코드 탐지 장치 및 방법
WO2015178578A1 (ko) 패치파일 분석시스템과 분석방법
CN101826139B (zh) 一种非可执行文件挂马检测方法及其装置
US11288362B2 (en) System and method for creating antivirus records for antivirus applications
US20140289851A1 (en) Malware Discovery Method and System
EP2808822A1 (en) Prevention of windowless screen capture
JP2010262609A (ja) 効率的なマルウェアの動的解析手法
Ramilli et al. Multi-stage delivery of malware
US20170161495A1 (en) System and method for zero-day privilege escalation malware detection
Wichmann et al. Using infection markers as a vaccine against malware attacks
WO2014168406A1 (ko) 메모리 보호기능 우회 공격 진단 장치 및 방법
WO2023027228A1 (ko) 응용프로그램의 실행 흐름 변경을 통한 비실행 파일의 악성 탐지 방법 및 장치
Li et al. A review on signature-based detection for network threats
Grill et al. A practical approach for generic bootkit detection and prevention
US10061924B1 (en) Detecting malicious code based on deviations in executable image import resolutions and load patterns
WO2024071461A1 (ko) 난독화 된 자바스크립트를 탐지하고 복호화하기 위한 방법 및 이를 위한 장치
EP3522058B1 (en) System and method of creating antivirus records
Tokhtabayev et al. Malware analysis and detection via activity trees in user-dependent environment
Behrozinia et al. KLrtD: kernel level rootkit detection

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

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

Country of ref document: EP

Kind code of ref document: A1