KR20040098902A - Device and Method for Detecting Malicious Code of Process Memory - Google Patents

Device and Method for Detecting Malicious Code of Process Memory Download PDF

Info

Publication number
KR20040098902A
KR20040098902A KR1020030031220A KR20030031220A KR20040098902A KR 20040098902 A KR20040098902 A KR 20040098902A KR 1020030031220 A KR1020030031220 A KR 1020030031220A KR 20030031220 A KR20030031220 A KR 20030031220A KR 20040098902 A KR20040098902 A KR 20040098902A
Authority
KR
South Korea
Prior art keywords
code
data
area
malicious code
process memory
Prior art date
Application number
KR1020030031220A
Other languages
Korean (ko)
Other versions
KR100516304B1 (en
Inventor
유병인
임일명
Original Assignee
주식회사 안철수연구소
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 안철수연구소 filed Critical 주식회사 안철수연구소
Priority to KR10-2003-0031220A priority Critical patent/KR100516304B1/en
Publication of KR20040098902A publication Critical patent/KR20040098902A/en
Application granted granted Critical
Publication of KR100516304B1 publication Critical patent/KR100516304B1/en

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D83/00Containers or packages with special means for dispensing contents
    • B65D83/08Containers or packages with special means for dispensing contents for dispensing thin flat articles in succession
    • B65D83/0805Containers or packages with special means for dispensing contents for dispensing thin flat articles in succession through an aperture in a wall
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D5/00Rigid or semi-rigid containers of polygonal cross-section, e.g. boxes, cartons or trays, formed by folding or erecting one or more blanks made of paper
    • B65D5/02Rigid or semi-rigid containers of polygonal cross-section, e.g. boxes, cartons or trays, formed by folding or erecting one or more blanks made of paper by folding or erecting a single blank to form a tubular body with or without subsequent folding operations, or the addition of separate elements, to close the ends of the body
    • B65D5/0227Rigid or semi-rigid containers of polygonal cross-section, e.g. boxes, cartons or trays, formed by folding or erecting one or more blanks made of paper by folding or erecting a single blank to form a tubular body with or without subsequent folding operations, or the addition of separate elements, to close the ends of the body with end closures formed by inward folding of flaps and securing them by heat-sealing, by applying adhesive to the flaps or by staples
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D5/00Rigid or semi-rigid containers of polygonal cross-section, e.g. boxes, cartons or trays, formed by folding or erecting one or more blanks made of paper
    • B65D5/20Rigid or semi-rigid containers of polygonal cross-section, e.g. boxes, cartons or trays, formed by folding or erecting one or more blanks made of paper by folding-up portions connected to a central panel from all sides to form a container body, e.g. of tray-like form
    • B65D5/24Rigid or semi-rigid containers of polygonal cross-section, e.g. boxes, cartons or trays, formed by folding or erecting one or more blanks made of paper by folding-up portions connected to a central panel from all sides to form a container body, e.g. of tray-like form with adjacent sides interconnected by gusset folds
    • B65D5/241Rigid or semi-rigid containers of polygonal cross-section, e.g. boxes, cartons or trays, formed by folding or erecting one or more blanks made of paper by folding-up portions connected to a central panel from all sides to form a container body, e.g. of tray-like form with adjacent sides interconnected by gusset folds and the gussets folds connected to the inside of the container body
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B65CONVEYING; PACKING; STORING; HANDLING THIN OR FILAMENTARY MATERIAL
    • B65DCONTAINERS FOR STORAGE OR TRANSPORT OF ARTICLES OR MATERIALS, e.g. BAGS, BARRELS, BOTTLES, BOXES, CANS, CARTONS, CRATES, DRUMS, JARS, TANKS, HOPPERS, FORWARDING CONTAINERS; ACCESSORIES, CLOSURES, OR FITTINGS THEREFOR; PACKAGING ELEMENTS; PACKAGES
    • B65D5/00Rigid or semi-rigid containers of polygonal cross-section, e.g. boxes, cartons or trays, formed by folding or erecting one or more blanks made of paper
    • B65D5/42Details of containers or of foldable or erectable container blanks
    • B65D5/70Break-in flaps, or members adapted to be torn-off, to provide pouring openings

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE: A device and a method for detecting a malicious code of a process memory are provided to detect existence of the malicious code based on confirmable information if the malicious code is present in the process memory. CONSTITUTION: A data storage(170) stores integrity data of an original file instruction code for executing a process and pattern data of a general instruction code. A code area monitor(140) judges that the malicious code is present in a code area of the process memory(100) based on the integrity data. A variable data area(150) monitor judges that the malicious code is present in a variable data area of the process memory based on the pattern data. A warning tool(160) outputs warning information if the malicious code is present.

Description

프로세스메모리의 악성코드 검출기 및 그 방법 { Device and Method for Detecting Malicious Code of Process Memory }Malware detector in process memory and its method {Device and Method for Detecting Malicious Code of Process Memory}

본 발명은 프로세스메모리의 악성 코드 검출기 및 그 방법에 관한 것으로서 보다 상세하게는 컴퓨터 시스템에서 실행중인 프로세스의 프로세스메모리를 감시하여 프로세스메모리에 악성코드가 존재하는지 여부를 검사하는 악성 코드 검출기 및 그 방법에 관한 것이다.The present invention relates to a malicious code detector and a method of the process memory, and more particularly, to a malicious code detector and method for monitoring whether or not the malicious code is present in the process memory by monitoring the process memory of the process running in the computer system It is about.

프로세스메모리란 컴퓨터 시스템에서 프로세스가 실행되기 위하여 프로세스 실행코드와 실행에 필요한 데이터가 로드되는 기억 장소를 지칭한다.Process memory refers to a memory location in which a process executable code and data necessary for execution are loaded in order to execute a process in a computer system.

악성코드는 컴퓨터 시스템에 피해를 주고자 의도적으로 제작된 프로그램 코드를 통칭하며 바이러스, 웜, 트로이목마 또는 해킹프로그램 등을 포함한다.Malware refers to program codes that are intentionally designed to damage computer systems and include viruses, worms, Trojan horses or hacking programs.

현재의 컴퓨터 시스템은 네트워크 기술의 발달로 다양한 네트워크 노드 시스템에 접속하는 것이 가능해졌다. 그러나 네트워크 접속이 가능하다는 의미는 컴퓨터 시스템이 악성코드에 더욱 많이 노출될 수 있다는 것을 뜻한다.Current computer systems have made it possible to access various network node systems with the development of network technology. But network access means that computer systems can be more vulnerable to malware.

즉, 악성코드 소스 시스템은 네트워크를 통해 악성코드를 빠른 속도로 유포시키고, 네트워크에 접속된 컴퓨터 시스템은 유포된 악성코드에 의해 치명적인 손상을 입게 된다.In other words, the malware source system rapidly distributes malware through the network, and computer systems connected to the network are fatally damaged by the distributed malware.

종래 기술에 따르면, 악성코드의 유포를 인식하고 당해 악성코드에 대한 바이너리 패턴을 분석하여 백신 프로그램을 개발함으로써 악성 코드 감염 경로를 차단하거나 악성 코드에 감염된 컴퓨터 시스템을 복구하는 프로세스로 진행된다.According to the prior art, by recognizing the distribution of malicious code and analyzing the binary pattern for the malicious code to develop a vaccine program to proceed to the process of blocking the malicious code infection path or repairing the computer system infected with the malicious code.

이러한 종래기술의 문제점은 당해 악성코드에 대한 백신 프로그램이 컴퓨터 시스템에서 실행되기 전까지 컴퓨터 시스템은 악성코드에 전혀 무방비 상태로 노출된다는 것이다. 이러한 문제의 심각성은 시간에 비례하게 된다. 즉, 백신 프로그램에 의해 컴퓨터 시스템이 보호되는 시점까지의 시간이 길수록 네트워크 노드 시스템은 악성 코드에 감염될 가능성이 높아지고, 악성코드로 인해 정상 기능을 수행할 수 없게 되는 컴퓨터 시스템은 그 수가 증가하게 되는 것이다.The problem with this prior art is that the computer system is completely unprotected by the malware until the vaccine program against the malware is executed on the computer system. The severity of this problem is proportional to time. That is, the longer the time until the computer system is protected by the antivirus program, the more likely the network node system is infected with malicious code, and the number of computer systems that cannot function normally due to the malicious code increases. will be.

본 발명은 상기 문제점을 해결하기 위해 제안된 것으로서 프로세스메모리에악성코드가 존재할 경우 확인 가능한 정보를 기초로 악성코드의 존재를 검출하는 프로세스메모리의 악성코드 검출기 및 그 방법과 상기 방법을 실현하기 위한 컴퓨터로 판독가능한 기록매체를 제공하는데 그 목적이 있다.The present invention has been proposed to solve the above problems, and a malicious code detector of a process memory for detecting the presence of malicious codes based on information that can be identified when malicious code exists in the process memory, and a method thereof and a computer for realizing the method. It is an object of the present invention to provide a recording medium which can be read.

본 발명의 다른 목적 및 장점들은 하기에 설명될 것이며, 본 발명의 실시에 의해 알게 될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 조합에 의해 실현될 수 있다.Other objects and advantages of the invention will be described below and will be appreciated by the practice of the invention. In addition, the objects and advantages of the present invention can be realized by means and combinations indicated in the claims.

도 1은 본 발명의 바람직한 실시예에 따라 악성코드 검출기가 장착된 컴퓨터 시스템의 전체 구성도,1 is an overall configuration diagram of a computer system equipped with a malware detector according to a preferred embodiment of the present invention;

도 2는 본 발명의 바람직한 실시예에 따라 악성코드 검출과정을 도시한 흐름도,2 is a flow chart showing a malicious code detection process according to a preferred embodiment of the present invention;

도 3은 도 2의 코드영역 검사과정을 설명하기 위한 도면,3 is a view for explaining a code region inspection process of FIG.

도 4는 도 2의 힙영역 검사과정을 설명하기 위한 도면,4 is a view for explaining a heap region inspection process of FIG.

도 5는 도 2의 스택영역 검사과정을 설명하기 위한 도면이다.FIG. 5 is a diagram for describing a stack area inspection process of FIG. 2.

<도면의 주요 참조부호에 대한 설명><Description of main reference numerals in the drawings>

100 : 프로세스메모리 101 : 코드영역100: process memory 101: code area

103 : 데이터영역 105 : 힙영역103: data area 105: heap area

107 : 스택영역107: stack area

110 : CPU 111 : DR(Debug Register)110: CPU 111: DR (Debug Register)

113 : IP(Instruction Pointer)113: IP (Instruction Pointer)

130 : 악성코드 검출기130: malware detector

140 : 코드영역 감시수단140: code area monitoring means

141 : 무결성검사부 143 : 무결성비교부141: integrity inspection unit 143: integrity comparison unit

150 : 가변데이터영역 감시수단150: variable data area monitoring means

151 : 코드검출부 153 : BP 설정부151: code detection unit 153: BP setting unit

155 : 컨텍스트 검사부155: context check unit

160 : 경고수단160: warning means

170 : 데이터 저장수단170: data storage means

171 : 무결성 데이터 173 : 제외프로세스 식별자171: Integrity data 173: Excluded process identifier

175 : 명령코드 패턴데이터175: command code pattern data

상기 목적을 달성하기 위한 본 발명은 컴퓨터 시스템에 장착되어 프로세스메모리에 악성코드가 존재하는지 여부를 검출하는 장치로서, 상기 프로세스를 실행시키기 위한 원본파일 명령코드의 무결성 데이터 및 일반적인 명령코드의 패턴데이터가 저장된 데이터 저장수단, 상기 원본파일 명령코드의 무결성 데이터를 기초로 프로세스메모리의 코드영역에 악성코드가 존재하는지 여부를 판단하는 코드영역 감시수단, 상기 일반적인 명령코드의 패턴데이터를 기초로 프로세스메모리의 가변데이터 영역에 악성코드가 존재하는지 여부를 판단하는 가변데이터영역 감시수단 및 악성코드가 존재하는 것으로 판단된 경우 경고 정보를 출력하는 경고수단을 포함한다.The present invention for achieving the above object is a device mounted on a computer system for detecting whether or not malicious code exists in the process memory, the integrity data of the original file command code and pattern data of the general command code for executing the process Stored data storage means, code area monitoring means for determining whether malicious code exists in the code area of the process memory based on the integrity data of the original file command code, variable process memory based on the pattern data of the general command code Variable data area monitoring means for determining whether or not malicious code is present in the data area and warning means for outputting warning information when it is determined that the malicious code is present.

또한, 상기 목적을 달성하기 위한 본 발명은 컴퓨터 시스템에서 실행되어 프로세스메모리에 악성코드가 존재하는지 여부를 검출하는 방법으로서, 상기 프로세스를 실행시키기 위한 원본파일 명령코드의 무결성 데이터 및 일반적인 명령코드의 패턴데이터를 생성 저장하는 제1단계, 상기 원본파일 명령코드의 무결성 데이터를 기초로 프로세스메모리의 코드영역에 악성코드가 존재하는지 여부를 판단하는 제2단계 및 상기 일반적인 명령코드의 패턴데이터를 기초로 프로세스메모리의 가변데이터 영역에 악성코드가 존재하는지 여부를 판단하는 제3단계를 포함한다.In addition, the present invention for achieving the above object is executed in a computer system to detect whether or not malicious code exists in the process memory, the integrity of the original file command code for executing the process and the pattern of the general command code A first step of generating and storing data, a second step of determining whether malicious code exists in a code region of the process memory based on the integrity data of the original file command code, and a process based on the pattern data of the general command code And a third step of determining whether malicious code exists in the variable data area of the memory.

이하 첨부된 도면을 참조로 본 발명의 바람직한 실시예를 상세히 설명하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

이에 앞서, 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다.Prior to this, terms or words used in the specification and claims should not be construed as having a conventional or dictionary meaning, and the inventors should properly explain the concept of terms in order to best explain their own invention. Based on the principle that can be defined, it should be interpreted as meaning and concept corresponding to the technical idea of the present invention.

따라서, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시예에 불과할 뿐이고 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형예들이 있을 수 있음을 이해하여야 한다.Therefore, the embodiments described in the specification and the drawings shown in the drawings are only the most preferred embodiment of the present invention and do not represent all of the technical idea of the present invention, various modifications that can be replaced at the time of the present application It should be understood that there may be equivalents and variations.

도 1은 본 발명의 바람직한 실시예에 따라 악성코드 검출기가 장착된 컴퓨터 시스템의 전체 구성도이다. 도면을 참조하면, 본 발명에 따른 컴퓨터 시스템은 프로세스의 명령코드와 데이터가 로드되어 실행되는 프로세스메모리(100), 프로세스메모리(100)의 명령코드를 순차적으로 실행하며 전체 컴퓨터 시스템을 제어하는 CPU(110) 및 프로세스메모리(100)에 악성코드가 존재하는지 여부를 검사하는 악성코드 검출기(130)를 포함한다.1 is an overall configuration diagram of a computer system equipped with a malware detector according to a preferred embodiment of the present invention. Referring to the drawings, the computer system according to the present invention executes the command code of the process and the data is loaded and executed in the process memory 100, the process code of the process memory 100 in order to control the CPU ( 110) and a malicious code detector 130 that checks whether or not the malicious code exists in the process memory (100).

프로세스메모리(100)는 컴퓨터 운영체제(OS)에 의해 할당되며 일반적으로 코드영역(101), 데이터영역(103) 및 가변 데이터영역으로 구분된다.The process memory 100 is allocated by a computer operating system (OS) and is generally divided into a code area 101, a data area 103, and a variable data area.

코드영역(101)은 프로세스를 수행하는 명령코드가 원본파일로부터 로드되어 실행되는 부분으로서 함수의 호출, 분기 등의 프로세스 주기능을 달성하기 위한 영역이다.The code area 101 is an area in which command code for executing a process is loaded and executed from the original file to achieve the main function of a process such as a function call or a branch.

데이터영역(103)은 코드영역(101)의 명령코드 실행시 필요한 데이터가 저장되는 부분으로 소스 코드로부터 이미 예상되어 할당되어진 데이터가 저장되는 영역이다.The data area 103 is a portion in which data necessary for executing the command code of the code area 101 is stored. The data area 103 is an area in which data already estimated and allocated from the source code is stored.

가변 데이터영역은 힙영역(105)과 스택영역(107)을 지칭한다. 힙영역(105)은 프로세스가 실행될 때까지는 알 수 없는 가변적인 양의 데이터를 저장하여 사용하는 메모리 영역이다. 컴퓨터 운영체제(OS)로부터 이미 확보된 일정량의 힙영역(105)을 가지고 있으면, 저장과 관련된 처리를 보다 쉽게 할 수 있으며, 일반적으로 필요할 때마다 컴퓨터 운영체제(OS)에 저장공간을 요청하는 것보다 프로세스 처리 속도가 빠르기 때문에 많은 프로그램에 이용된다.The variable data area refers to the heap area 105 and the stack area 107. The heap region 105 is a memory region that stores and uses a variable amount of data that is not known until a process is executed. Having a certain amount of heap area 105 already available from a computer operating system (OS) can make storage-related processing easier, and is generally a process rather than requesting storage space from the computer operating system (OS) whenever needed. It is used for many programs because of its fast processing speed.

스택영역(107)은 힙영역(105)과 마찬가지로 프로세스의 저장과 관련된 처리를 하기 위해 요구되는 데이터 저장소로서 데이터가 특정순서에 따라 기록되고, 같은 방법으로 독출되는 특징이 있다.Similar to the heap area 105, the stack area 107 is a data store required for processing related to the storage of a process, in which data is recorded in a specific order and read out in the same manner.

힙영역(105)은 프로세스 실행에 있어서 프로세스 전체가 공유하는 데이터를 저장하는 장소임에 반해 스택영역(107)은 프로세스가 갖는 쓰레드의 실행과 관련된 데이터를 저장한다. 따라서 스택영역(107)은 프로세스가 갖는 쓰레드 수에 따라 여러 개의 스택영역(107)을 가질 수 있다.The heap region 105 is a place for storing data shared by the whole process in the process execution, whereas the stack region 107 stores data related to the execution of the thread of the process. Therefore, the stack region 107 may have several stack regions 107 according to the number of threads of the process.

악성코드 검출기(130)는 실행중인 프로세스의 프로세스메모리(100)를 감시하여 악성코드가 존재하는지 여부를 검사한다. 악성코드는 일반적으로 프로세스메모리의 코드영역(101)에 삽입되어 코드영역(101)을 변경시키거나, 가변 데이터영역에 저장된 데이터를 고의로 오버런 하는 방법으로 삽입되어 명령코드를 실행한다.The malware detector 130 monitors the process memory 100 of the running process to check whether or not the malware exists. The malicious code is generally inserted into the code area 101 of the process memory to change the code area 101 or to intentionally overrun the data stored in the variable data area to execute the command code.

일반적인 프로세스는 실행중에 코드영역이 변경되거나, 가변 데이터영역에서 명령코드가 실행되는 경우는 극히 드물기 때문에 이러한 변화를 감지하여 악성코드 존재 여부를 확인할 수 있다.In general process, the code area is changed during execution or the command code is rarely executed in the variable data area. Therefore, it is possible to detect such a change and confirm the existence of malicious code.

따라서, 악성코드 검출기(130)는 프로세스메모리의 코드영역(101)이 변경되었는지 여부를 감시하는 코드영역 감시수단(140)과 프로세스메모리의 가변 데이터영역에 악성코드가 존재하는지 여부를 감시하는 가변데이터영역 감시수단(150)을 포함한다.Accordingly, the malicious code detector 130 monitors whether the code area monitoring unit 140 monitors whether the code area 101 of the process memory has been changed and whether the malicious code exists in the variable data area of the process memory. Area monitoring means (150).

또한, 악성코드 검출기는 악성코드 감시를 위해 필요한 데이터를 저장하는 데이터 저장수단(170)과 악성코드가 존재하는 것으로 판단된 경우 컴퓨터 사용자에게 경고정보를 출력하는 경고수단(160)을 포함한다.In addition, the malware detector includes a data storage unit 170 for storing data necessary for monitoring the malicious code, and a warning means 160 for outputting warning information to the computer user when it is determined that the malicious code exists.

데이터 저장수단(170)은 프로세스 원본파일의 명령코드에 대한 무결성 데이터(171)와 일반적인 명령코드 패턴데이터(175)가 저장되어 있다.The data storage unit 170 stores integrity data 171 and general command code pattern data 175 of the command code of the process original file.

무결성 데이터는 무결성이 보장된 명령코드가 이후에 변경되었는지 여부를 확인하게 위해 사용되는 값으로서 CRC(Cyclic Redundancy Check) 또는 체크섬 등의 알고리즘에 의해 계산되는 것이 바람직하다.Integrity data is a value used to confirm whether the integrity of the command code is guaranteed later, it is preferably calculated by an algorithm such as a cyclic redundancy check (CRC) or a checksum.

프로세스 원본파일의 명령코드에 대한 무결성 데이터(171)는 원본파일 명령코드의 무결성이 보장되는 시점(악성코드가 존재하지 않는 시점)에 계산되어 저장되는 것이 바람직하다.Integrity data 171 of the command code of the process source file is preferably calculated and stored at a point in time when the integrity of the source file command code is guaranteed (when no malicious code exists).

또한, 데이터 저장수단(170)은 제외프로세스 식별자(173)를 더 저장하고 제외프로세스 식별자(173)에 대응하는 프로세스메모리(100)는 검사대상에서 제외시키도록 하는 것이 바람직하다. 일반적인 프로세스는 실행 중에 프로세스메모리(100)의 코드영역(101)을 변경하지 않으나 방화벽 프로그램과 같이 예외적으로 코드영역(101)을 변경하는 프로세스가 존재할 수 있다. 따라서 이러한 프로세스를 구별하기 위한 제외프로세스 식별자(173)를 데이터 저장수단(170)에 미리 등록시킴으로써 해당 프로세스에 대하여 악성코드 검사를 제외시킬 수 있다.In addition, the data storage unit 170 may further store the exclusion process identifier 173 and exclude the process memory 100 corresponding to the exclusion process identifier 173 from being inspected. The general process does not change the code area 101 of the process memory 100 during execution, but there may be a process of changing the code area 101 such as a firewall program. Therefore, by registering the exclusion process identifier 173 to distinguish the process into the data storage means 170 in advance, it is possible to exclude the malicious code check for the process.

또한, 제외프로세스 식별자(173)는 컴퓨터 시스템 사용자에 의해서 언제든지 추가 등록되어 악성코드 검사를 제외시킬 수 있다.In addition, the exclusion process identifier 173 may be additionally registered at any time by the computer system user to exclude the malicious code scan.

코드영역 감시수단(140)은 코드영역(101)의 무결성 데이터를 생성하는 무결성검사부(141) 및 무결성검사부(141)에 의해 계산된 무결성 데이터와 데이터 저장수단(170)에 저장된 원본파일 무결성 데이터(171)를 비교하여 일치하지 않는 경우 악성코드가 존재하는 것으로 판단하는 무결성비교부(143)를 포함한다.The code area monitoring unit 140 includes the integrity data calculated by the integrity checking unit 141 and the integrity checking unit 141 which generate the integrity data of the code area 101 and the original file integrity data stored in the data storing unit 170. 171) compares and includes an integrity comparison unit 143 that determines that the malicious code exists if there is no match.

가변데이터영역 감시수단(150)은 데이터 저장수단(170)에 저장된 일반적인 명령코드 패턴데이터(175)와 일치하는 명령코드가 가변 데이터영역에 존재하는지 여부를 검사하는 코드검출부(151) 및 일치하는 코드 패턴이 존재하는 경우 해당 주소에 브레이크 포인트(Break Point)를 설정하는 BP 설정부(153)를 포함한다.The variable data area monitoring unit 150 includes a code detection unit 151 and a matching code for checking whether or not a command code corresponding to the general command code pattern data 175 stored in the data storage unit 170 exists in the variable data area. If a pattern exists, the BP setting unit 153 sets a break point at a corresponding address.

브레이크 포인트가 설정된 프로세스메모리의 주소는 CPU(110)의 DR(Debug Register, 111)에 저장되고, 프로세스 실행 중 실행되는 명령코드 주소를 가리키는 IP(Instruction Pointer, 113)가 DR(111)에 저장된 주소와 일치하게 되면, CPU(110)는 인터럽트를 발생시킨다.The address of the process memory where the break point is set is stored in the DR (Debug Register, 111) of the CPU 110, and the IP (Instruction Pointer, 113) indicating the instruction code address executed during process execution is stored in the DR (111). If matched with the CPU 110 generates an interrupt.

또한, 가변데이터영역 감시수단(150)은 컴퓨터 운영체제(OS)로부터 쓰레드 컨텍스트(context)를 추출하고, 상기 쓰레드 컨텍스트의 IP(Instruction Pointer)가 가변 데이터영역을 가리키고 있는 경우 악성코드가 존재하는 것으로 판단하는 컨텍스트검사부(155)를 더 포함할 수 있다.In addition, the variable data area monitoring unit 150 extracts a thread context from a computer operating system (OS), and determines that a malicious code exists when the IP (Instruction Pointer) of the thread context points to the variable data area. It may further include a context inspection unit 155 to.

컨텍스트란 실행되는 쓰레드의 실행정보로서 특정 시점의 CPU 레지스터 정보를 포함한다. 따라서 실행되는 쓰레드의 컨텍스트로부터 IP를 확인하여 가변데이터영역에서 명령코드가 실행되는지 여부를 확인할 수 있다.The context is the execution information of a running thread and includes CPU register information at a specific point in time. Therefore, you can check whether the command code is executed in the variable data area by checking the IP from the context of the running thread.

경고수단은 코드영역 감시수단(140)과 가변 데이터영역 감시수단(150)에 의해 악성코드가 존재하는 것으로 판단된 경우 경고정보를 출력하여 컴퓨터 시스템사용자로 하여금 적절한 방어대책을 수립하게 한다.The warning means outputs the warning information when it is determined that the malicious code exists by the code area monitoring means 140 and the variable data area monitoring means 150 so that the computer system user can establish an appropriate defensive measure.

이하, 악성코드 검출기(130)가 악성코드를 검출하는 과정을 상세하게 설명한다. 설명에 있어서 도 1과 동일한 참조부호는 동일한 기능을 수행하는 동일한 부재를 지칭한다.Hereinafter, the process of detecting the malicious code by the malicious code detector 130 will be described in detail. In the description, the same reference numerals as in FIG. 1 refer to the same members performing the same functions.

또한, 이하에서 설명되는 악성코드 검출과정은 데이터 저장수단(170)에 제외프로세스 식별자(173)로 등록되지 않은 프로세스에 한하여 진행된다.In addition, the malicious code detection process described below is limited to a process that is not registered as the exclusion process identifier 173 in the data storage means 170.

도 2는 본 발명의 바람직한 실시예에 따라 악성코드 검출 과정을 나타낸 흐름도이다. 도면을 참조하면 악성코드 검출기(130)는 컴퓨터 운영체제(OS)로부터 실행중인 프로세스 핸들을 추출한다(S200).2 is a flowchart illustrating a malware detection process according to a preferred embodiment of the present invention. Referring to the drawing, the malware detector 130 extracts a process handle running from a computer operating system (OS) (S200).

컴퓨터 운영체제(OS)는 실행되는 모든 프로세스에 대하여 정보구조체를 가지고 있는데, 프로세스 핸들은 상기 정보구조체에 접근하여 필요한 정보를 얻기 위해 사용되는 열쇠역할을 수행한다. 따라서 프로세스 핸들을 통하여 컴퓨터 운영체제(OS)로부터 실행 중인 프로세스메모리(100)의 주소 등에 관한 정보를 추출할 수 있다.The computer operating system (OS) has an information structure for every process that runs, and the process handle serves as the key used to access the information structure and obtain the necessary information. Therefore, information about the address of the process memory 100 running from the computer operating system (OS) can be extracted through the process handle.

프로세스메모리(100)의 주소가 추출되면 악성코드 검출기(130)는 프로세스메모리의 코드영역, 힙영역 및 스택영역에 악성코드가 존재하는지 여부를 검사한다(S300, S400, S500).When the address of the process memory 100 is extracted, the malicious code detector 130 checks whether malicious code exists in the code area, the heap area, and the stack area of the process memory (S300, S400, S500).

악성코드 검출기(130)는 새로운 프로세스가 실행되는 경우 자동으로 상술한일련의 검사 과정을 수행하거나 특정시점(사용자가 원하는 시점 또는 일정 주기)에 자동으로 실행되어 현재 실행중인 프로세스메모리에 악성코드가 존재하는지 여부를 검사할 수 있다.When a new process is executed, the malicious code detector 130 automatically executes the above-described series of inspection processes or automatically executes at a specific point in time (a desired time or a certain period of time), so that malware exists in the currently running process memory. You can check whether it is.

도 3은 도 2의 코드영역을 검사하는 과정을 설명하기 위한 도면이다. 도면을 참조하면, 코드영역 감시수단(140)의 무결성검사부(141)는 실행중인 프로세스의 프로세스메모리(100) 코드영역(101)에 대한 무결성 데이터를 생성한다(S310).FIG. 3 is a diagram for describing a process of inspecting a code region of FIG. 2. Referring to the drawing, the integrity checking unit 141 of the code area monitoring unit 140 generates integrity data for the code area 101 of the process memory 100 of the running process (S310).

무결성비교부(143)는 데이터 저장수단(170)에 저장된 프로세스 원본파일 명령코드의 무결성 데이터(171)를 추출하여 무결성검사부(141)에 의해 계산된 무결성 데이터와 비교한다(S320, S330).The integrity comparing unit 143 extracts the integrity data 171 of the process original file command code stored in the data storing unit 170 and compares the integrity data calculated by the integrity checking unit 141 (S320 and S330).

비교결과, 무결성 데이터가 일치하는 경우 코드영역(101)이 악성코드에 의해 변경된 것이 아니므로 프로세스는 계속 실행된다(S340).As a result of the comparison, when the integrity data is matched, the code area 101 is not changed by the malicious code, and the process is continued (S340).

만약, 무결성 데이터가 일치하지 않는 경우 악성코드에 의해 코드영역(101)이 변경된 것으로 판단하고, 경고수단(160)은 컴퓨터 시스템 사용자에게 악성코드가 존재한다는 경고정보를 출력한다(S350).If the integrity data does not match, it is determined that the code area 101 is changed by the malicious code, and the warning means 160 outputs warning information indicating that the malicious code exists to the computer system user (S350).

한편, 코드영역(101)이 다수의 프로세스에서 공통으로 사용되는 모듈을 포함하고 있는 경우 각 모듈별로 무결성 검사를 수행하여 무결성 데이터를 비교하게 하는 것도 가능하다. 이 경우 데이터 저장수단(170)은 모듈의 원본파일 명령코드의 무결성 데이터를 저장하고 있어야 한다.On the other hand, if the code area 101 includes modules commonly used in a plurality of processes, it is also possible to compare the integrity data by performing an integrity check for each module. In this case, the data storage means 170 should store the integrity data of the original file command code of the module.

도 4는 도 2의 힙영역을 검사하는 과정을 설명하기 위한 도면이다. 도면을 참조하면, 가변데이터영역 감시수단(150)의 코드검출부(151)는 프로세스 핸들을 이용하여 힙영역(105) 주소를 추출한다(S410). 이후에 코드검출부(151)는 상기 추출한 주소를 이용하여 힙영역(105)에 접근함으로써 힙영역(105)에 데이터 저장수단(170)에 저장된 명령코드 패턴데이터(175)와 일치하는 명령코드가 존재하는지 여부를 검사한다(S430).4 is a diagram for describing a process of inspecting a heap region of FIG. 2. Referring to the figure, the code detection unit 151 of the variable data area monitoring unit 150 extracts the address of the heap area 105 using the process handle (S410). Thereafter, the code detection unit 151 accesses the heap area 105 using the extracted address, and thus there exists a command code corresponding to the command code pattern data 175 stored in the data storage means 170 in the heap area 105. It is checked whether or not (S430).

일반적인 명령코드 패턴데이터(175)는 함수의 실행, 함수의 종료, 함수의 분기 등 프로세스 실행과 관계된 것으로서 아래 표 1에 예시되어 있다.General command code pattern data 175 is illustrated in Table 1 below as related to process execution, such as execution of a function, termination of a function, branching of a function, and the like.

코드 패턴Code pattern 대표 패턴Representative pattern 함수 시작Start function push ebpmov ebp, espsub esp, 20hpush ebpmov ebp, espsub esp, 20h 함수 종료Function exit mov esp, ebppop ebpretmov esp, ebppop ebpret 조건문Conditional statement cmp dword ptr[ebp-4],1jne main+30hcmp dword ptr [ebp-4], 1jne main + 30h 반복문Loop PSEUDO_RAND_SEND:....jmp short PSEUDO_RAND_SENDPSEUDO_RAND_SEND: .... jmp short PSEUDO_RAND_SEND 함수 실행Execute function push eaxcall dword ptr[esi]push eaxcall dword ptr [esi]

힙영역(105)에 일반적인 명령코드의 패턴데이터(175)와 일치하는 명령코드가 존재하지 않으면 실행중인 프로세스는 계속 실행된다(S430, S440).If there is no command code matching the pattern data 175 of the general command code in the heap area 105, the running process continues to be executed (S430, S440).

만약, 일치하는 명령코드가 존재하면 BP 설정부(153)는 해당 주소에 브레이크 포인트를 설정한다(S450). 이후에 CPU(110)의 IP(113)가 브레이크 설정된 주소를 가리키게 되면 힙영역(105)에서 명령코드가 실행되는 것이므로 CPU(110)는 인터럽트를 발생시킨다(S460). 브레이크 포인트가 설정된 이후에 IP(113)가 브레이크 설정된 주소를 가리키지 않는 경우 힙영역(105)에서 명령코드가 실행되는 것이 아니므로 프로세스는 그대로 계속 실행된다(S440).If a matching command code exists, the BP setting unit 153 sets a break point at the corresponding address (S450). Afterwards, when the IP 113 of the CPU 110 indicates the address at which the brake is set, the instruction code is executed in the heap region 105, and the CPU 110 generates an interrupt (S460). After the break point is set, if the IP 113 does not point to the break address, the command code is not executed in the heap area 105, and the process continues to be executed (S440).

한편, CPU(110)에 의해 인터럽트가 발생하면 경고수단(160)은 컴퓨터 사용자에게 악성코드가 존재한다는 경고정보를 출력한다(S470).On the other hand, when an interrupt occurs by the CPU 110, the warning means 160 outputs warning information that a malicious code exists to the computer user (S470).

도 5는 도2의 스택영역을 검사하는 과정을 설명하기 위한 도면이다. 하나의 프로세스는 여러 쓰레드를 가질 수 있으므로, 하나의 프로세스에 대하여 스택영역(107)은 다수 존재할 수 있다. 따라서 악성코드 검출기(130)는 각 스택영역(107)에 대하여 악성코드가 존재하는지 여부를 검사해야 한다.FIG. 5 is a diagram for describing a process of inspecting a stack region of FIG. 2. Since one process may have several threads, there may be many stack regions 107 for one process. Therefore, the malicious code detector 130 should check whether or not malicious code exists for each stack region 107.

도면을 참조하면, 가변데이터영역 감시수단(150)의 컨텍스트검사부(155)는 컴퓨터 운영체제(OS)로부터 쓰레드 컨텍스트를 추출한다(S510). 하나의 프로세스에서 다수의 쓰레드가 실행중이라면 다수의 쓰레드 컨텍스트를 추출한다.Referring to the drawing, the context inspecting unit 155 of the variable data area monitoring unit 150 extracts a thread context from the computer operating system (OS) (S510). If there are multiple threads running in a process, it extracts multiple thread contexts.

컨텍스트검사부(155)는 추출된 쓰레드 컨텍스트의 IP가 스택영역을 가리키는지 여부를 확인한다(S520). 만약, 쓰레드 컨텍스트의 IP가 스택영역을 가리키고 있는 경우 가변 데이터영역에서 명령코드가 실행되는 것이므로 컨텍스트 검사부(155)는 스택영역(107)에 악성코드가 존재하는 것으로 판단한다(S530). 따라서 경고수단(160)은 컴퓨터 사용자에게 악성코드가 존재한다는 경고정보를 출력하여 적절한 방어정책을 수행하게 한다(S540).The context inspecting unit 155 checks whether the extracted thread context IP points to the stack region (S520). If the IP of the thread context points to the stack region, the command code is executed in the variable data region, so the context inspecting unit 155 determines that the malicious code exists in the stack region 107 (S530). Therefore, the warning means 160 outputs the warning information that the malicious code exists to the computer user to perform the appropriate defense policy (S540).

한편, 쓰레드 컨택스트는 실행되는 쓰레드의 순간 정보만을 가지고 있기 때문에 스택영역(107)에 악성코드가 존재함에도 불구하고 악성코드 검출기(130)가 검사하는 시점에 컨텍스트 IP는 코드영역(101)을 가리킬 수 있다.On the other hand, since the thread context contains only the instantaneous information of the running thread, the context IP points to the code region 101 at the time when the malware detector 130 inspects the malware even in the stack region 107. Can be.

따라서, 도 4의 힙영역(105) 검사와 마찬가지로 전 범위의 스택영역(107)에 대하여 명령코드가 존재하는지 여부를 검사하는 것이 바람직하다.Therefore, as in the heap region 105 inspection of FIG. 4, it is preferable to check whether the instruction code exists in the stack region 107 of the entire range.

따라서, 코드검출부(151)는 프로세스 핸들을 이용하여 스택영역(107) 주소를 추출한다(S550). 이후에 코드검출부(151)는 상기 추출한 주소를 이용하여 스택영역(107)에 접근함으로써 스택영역(107)에 데이터 저장수단(170)에 저장된 명령코드 패턴데이터(175)와 일치하는 명령코드가 존재하는지 여부를 검사한다(S560). 일반적인 명령코드 패턴데이터(175)는 상술한 바와 같다.Therefore, the code detector 151 extracts the address of the stack region 107 using the process handle (S550). Thereafter, the code detection unit 151 accesses the stack area 107 using the extracted address, and thus the command code corresponding to the command code pattern data 175 stored in the data storage means 170 exists in the stack area 107. It is checked whether or not (S560). The general command code pattern data 175 is as described above.

스택영역(105)에 일반적인 명령코드의 패턴데이터(175)와 일치하는 명령코드가 존재하지 않으면 프로세스는 그대로 계속 실행된다(S570, S580).If there is no command code in the stack area 105 that matches the pattern data 175 of the general command code, the process continues as it is (S570, S580).

만약, 일치하는 명령코드가 존재하면 BP 설정부(153)는 해당 주소에 브레이크 포인트를 설정한다(S590). 이후에 CPU(110)의 IP(113)가 브레이크 설정된 주소를 가리키게 되면 스택영역(105)에서 명령코드가 실행되는 것이므로 CPU(110)는 인터럽트를 발생시킨다(S600). 브레이크 포인트가 설정된 이후에 IP(113)가 브레이크 설정된 주소를 가리키지 않는 경우 스택영역(105)에서 명령코드가 실행되는 것이 아니므로 실행중인 프로세스는 계속 실행된다(S580).If a matching command code exists, the BP setting unit 153 sets a break point at the corresponding address (S590). Afterwards, when the IP 113 of the CPU 110 points to the address at which the brake is set, the instruction code is executed in the stack region 105, and the CPU 110 generates an interrupt (S600). If the IP 113 does not point to the break set address after the break point is set, the command code is not executed in the stack region 105, and thus the running process continues to be executed (S580).

한편, CPU(110)에 의해 인터럽트가 발생하면 경고수단(160)은 컴퓨터 사용자에게 악성코드가 존재한다는 경고정보를 출력한다(S610).On the other hand, if an interrupt occurs by the CPU 110, the warning means 160 outputs warning information that a malicious code exists to the computer user (S610).

경고수단(160)에 의해 경고정보가 출력되면, 컴퓨터 시스템 사용자는 컴퓨터 시스템에 연결된 네트워크 사용을 중지시키거나 파일의 입출력을 중지시킬수 있다. 또한, 진행중인 프로세스 또는 쓰레드의 실행을 종료시킬 수 있다. 이렇게 함으로써 악성코드가 네트워크를 이용하여 다른 컴퓨터 시스템에 전파되는 것을 방지할 수 있다.When the warning information is output by the warning means 160, the user of the computer system may stop using a network connected to the computer system or stop input / output of a file. You can also terminate the execution of an ongoing process or thread. This prevents malware from spreading to other computer systems using the network.

또한, 진행중인 프로세스를 그대로 두고 해당 프로세스의 식별자를 데이터 저장수단(170)에 추가시킴으로써 상기 프로세스를 이후 악성코드 검출 대상에서 제외시키는 것도 가능하다.In addition, by adding the identifier of the process to the data storage means 170 without leaving the process in progress, it is also possible to exclude the process from the detection of malware later.

이상과 같이, 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명은 이것에 의해 한정되지 않으며 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 본 발명의 기술 사상과 아래에 기재될 특허 청구범위의 균등 범위 내에서 다양한 수정 및 변형이 가능함은 물론이다.As mentioned above, although this invention was demonstrated by the limited embodiment and drawing, this invention is not limited by this, The person of ordinary skill in the art to which this invention belongs, Of course, various modifications and variations are possible within the scope of equivalent claims.

본 발명에 따르면, 이미 인식되어진 악성코드가 아니어도 시스템에서 수행중인 프로세스의 악성코드 감염 여부를 탐지할 수 있으므로 악성코드의 전파 및 재감염을 방지할 수 있다. 따라서, 악성코드 치료 방법이 제공되기 전이라도 컴퓨터 사용자는 적절한 방어정책을 수립하여 컴퓨터 시스템을 안전하게 보호할 수 있다.According to the present invention, even if the malicious code is not already recognized, it is possible to detect whether the malicious code is infected by the process being executed in the system, thereby preventing the spread and re-infection of the malicious code. Therefore, even before a malicious code treatment method is provided, a computer user can establish an appropriate defense policy to secure a computer system.

Claims (27)

컴퓨터 시스템에 장착되어 프로세스메모리에 악성코드가 존재하는지 여부를 검출하는 장치로서,A device mounted on a computer system to detect whether malicious code exists in process memory. 상기 프로세스를 실행시키기 위한 원본파일 명령코드의 무결성 데이터 및 일반적인 명령코드의 패턴데이터가 저장된 데이터 저장수단;Data storage means for storing integrity data of an original file command code and pattern data of a general command code for executing the process; 상기 원본파일 명령코드의 무결성 데이터를 기초로 프로세스메모리의 코드영역에 악성코드가 존재하는지 여부를 판단하는 코드영역 감시수단;Code area monitoring means for determining whether malicious code exists in a code area of a process memory based on integrity data of the original file command code; 상기 일반적인 명령코드의 패턴데이터를 기초로 프로세스메모리의 가변데이터 영역에 악성코드가 존재하는지 여부를 판단하는 가변데이터영역 감시수단; 및Variable data area monitoring means for determining whether malicious code exists in the variable data area of the process memory based on the pattern data of the general command code; And 악성코드가 존재하는 것으로 판단된 경우 경고 정보를 출력하는 경고수단Warning means to output warning information when it is determined that malicious code exists 을 포함하는 프로세스메모리의 악성코드 검출 장치.Malware detection apparatus of the process memory comprising a. 제 1 항에 있어서,The method of claim 1, 상기 코드영역 감시수단은The code area monitoring means 상기 프로세스메모리의 코드영역의 무결성 데이터를 생성하는 무결성검사부; 및An integrity check unit which generates integrity data of the code area of the process memory; And 상기 무결성검사부에 의해 계산된 무결성 데이터와 상기 데이터 저장수단에 저장된 원본파일 무결성 데이터를 비교하여 일치하지 않는 경우 악성코드가 존재하는 것으로 판단하는 무결성비교부Integrity comparison unit that compares the integrity data calculated by the integrity checker with the original file integrity data stored in the data storage means and judges that a malicious code exists if there is a mismatch 를 포함하는 것을 특징으로 하는 프로세스메모리의 악성코드 검출 장치.Malware detection apparatus of the process memory, characterized in that it comprises a. 제 2 항에 있어서,The method of claim 2, 상기 무결성 데이터는The integrity data is CRC(Cyclic Redundancy Check) 알고리즘에 의해 계산되는 것을 특징으로 하는 프로세스메모리의 악성코드 검출 장치.Malware detection apparatus of the process memory, characterized in that calculated by the cyclic redundancy check (CRC) algorithm. 제 1 항에 있어서,The method of claim 1, 상기 가변데이터영역 감시수단은The variable data area monitoring means 상기 데이터 저장수단에 저장된 일반적인 명령코드의 패턴데이터와 일치하는 명령코드가 존재하는지 여부를 검색하는 코드검출부; 및A code detection unit for searching whether or not a command code matching the pattern data of a general command code stored in the data storage means exists; And 일치하는 코드 패턴이 존재하는 경우 해당 주소에 브레이크 포인트(Break Point)를 설정하는 BP 설정부BP setting part that sets break point at the corresponding address when there is a matching code pattern 를 포함하고,Including, 상기 컴퓨터 시스템의 CPU의 IP(Instruction Pointer)가 브레이크 포인트 설정된 주소와 일치하여 인터럽트가 발생하는 경우 악성코드가 존재하는 것으로 판단하는 것을 특징으로 프로세스메모리의 악성코드 검출기.And detecting a malicious code when an interrupt occurs when an IP (Instruction Pointer) of the CPU of the computer system matches an address set to a break point. 제 4 항에 있어서,The method of claim 4, wherein 상기 가변데이터영역은 힙영역인 것을 특징으로 하는 프로세스메모리의 악성코드 검출기.And the variable data area is a heap area. 제 4 항에 있어서,The method of claim 4, wherein 상기 가변데이터영역은 스택영역인 것을 특징으로 하는 프로세스메모리의 악성코드 검출기.And the variable data area is a stack area. 제 6 항에 있어서,The method of claim 6, 상기 가변데이터영역 감시수단은The variable data area monitoring means 상기 컴퓨터 시스템의 운영체제(OS)로부터 쓰레드 컨텍스트를 추출하고, 상기 쓰레드 컨텍스트의 IP(Instruction Pointer)가 가변데이터영역을 가리키고 있는 경우 악성코드가 존재하는 것으로 판단하는 컨텍스트검사부A context inspector which extracts a thread context from an operating system (OS) of the computer system and determines that malicious code exists when an IP (Instruction Pointer) of the thread context indicates a variable data area. 를 더 포함하는 것을 특징으로 하는 프로세스메모리의 악성코드 검출기.Malware detector of the process memory, characterized in that it further comprises. 제 1 항 내지 제 7 항 중 어느 한 항에 있어서,The method according to any one of claims 1 to 7, 상기 데이터 저장수단은The data storage means 검사 대상에서 제외되는 프로세스의 식별자를 더 저장하고,Further stores identifiers of processes that are excluded from scanning 상기 프로세스 식별자에 대응하는 프로세스메모리는 검사대상에서 제외시키는 것을 특징으로 하는 프로세스메모리의 악성코드 검출기.And a process memory corresponding to the process identifier is excluded from the inspection object. 제 8 항에 있어서,The method of claim 8, 상기 데이터 저장수단의 제외프로세스 식별자는The exclusion process identifier of the data storage means is 상기 컴퓨터 시스템 사용자에 의하여 저장되는 것을 특징으로 하는 프로세스메모리의 악성코드 검출기.And the malware detector of the process memory, wherein the malware is stored by the computer system user. 컴퓨터 시스템에서 실행되어 프로세스메모리에 악성코드가 존재하는지 여부를 검출하는 방법으로서,A method that is executed on a computer system and detects whether malicious code exists in process memory. 상기 프로세스를 실행시키기 위한 원본파일 명령코드의 무결성 데이터 및 일반적인 명령코드의 패턴데이터를 생성 저장하는 제1단계;A first step of generating and storing integrity data of an original file command code and pattern data of a general command code for executing the process; 상기 원본파일 명령코드의 무결성 데이터를 기초로 프로세스메모리의 코드영역에 악성코드가 존재하는지 여부를 판단하는 제2단계; 및A second step of determining whether malicious code exists in a code area of a process memory based on integrity data of the original file command code; And 상기 일반적인 명령코드의 패턴데이터를 기초로 프로세스메모리의 가변데이터 영역에 악성코드가 존재하는지 여부를 판단하는 제3단계A third step of determining whether malicious code exists in the variable data area of the process memory based on the pattern data of the general command code; 를 포함하는 프로세스메모리의 악성코드 검출 방법.Malicious code detection method of the process memory comprising a. 제 10 항에 있어서,The method of claim 10, 상기 제2단계는The second step is 상기 프로세스메모리의 코드영역의 무결성 데이터를 생성하는 제4단계;A fourth step of generating integrity data of a code area of said process memory; 상기 제4단계에서 계산된 무결성 데이터와 상기 제1단계에서 저장된 원본파일 무결성 데이터를 비교하는 제5단계; 및A fifth step of comparing the integrity data calculated in the fourth step with the original file integrity data stored in the first step; And 비교 결과 무결성 데이터가 일치하지 않는 경우 악성코드가 존재하는 것으로 판단하고 경고정보를 출력하는 제6단계Step 6 in which malicious code exists and outputs warning information when the integrity data does not match as a result of the comparison 플 포함하는 것을 특징으로 하는 프로세스메모리의 악성코드 검출 방법.Malware detection method of the process memory, characterized in that it comprises a. 제 11 항에 있어서,The method of claim 11, 상기 무결성 데이터는The integrity data is CRC(Cyclic Redundancy Check) 알고리즘에 의해 계산되는 것을 특징으로 하는 프로세스메모리의 악성코드 검출 방법.Malicious code detection method of the process memory, characterized in that calculated by the CRC (Cyclic Redundancy Check) algorithm. 제 10 항에 있어서,The method of claim 10, 제3단계는The third step is 제1단계에서 저장된 일반적인 명령코드의 패턴데이터와 일치하는 명령코드가 존재하는지 여부를 검색하는 제7단계;A seventh step of searching for whether there is a command code matching the pattern data of the general command code stored in the first step; 일치하는 코드 패턴이 존재하는 경우 해당 주소에 브레이크 포인트(Break Point)를 설정하는 제8단계; 및An eighth step of setting a break point at a corresponding address when a matching code pattern exists; And 상기 컴퓨터 시스템의 CPU의 IP(Instruction Pointer)가 브레이크 포인트 설정된 주소와 일치하여 인터럽트가 발생하는 경우 악성코드가 존재하는 것으로 판단하고 경고정보를 출력하는 제9단계A ninth step of determining that a malicious code exists and outputting warning information when an interrupt occurs when an IP (Instruction Pointer) of the CPU of the computer system matches an address set to a break point; 를 포함하는 것을 특징으로 하는 프로세스메모리의 악성코드 검출 방법.Malicious code detection method of the process memory comprising a. 제 13 항에 있어서,The method of claim 13, 상기 가변데이터영역은 힙영역인 것을 특징으로 하는 프로세스메모리의 악성코드 검출 방법.And the variable data area is a heap area. 제 13 항에 있어서,The method of claim 13, 상기 가변데이터영역은 스택영역인 것을 특징으로 하는 프로세스메모리의 악성코드 검출 방법.And the variable data area is a stack area. 제 15 항에 있어서,The method of claim 15, 제 3 단계는The third step is 상기 컴퓨터 시스템의 운영체제(OS)로부터 쓰레드 컨텍스트를 추출하는 제10단계;Extracting a thread context from an operating system (OS) of the computer system; 상기 쓰레드 컨텍스트의 IP(Instruction Pointer)가 가변데이터영역을 가리키고 있는 경우 악성코드가 존재하는 것으로 판단하고 경고정보를 출력하는 제11단계;An eleventh step of determining that a malicious code exists and outputting warning information when an IP (Instruction Pointer) of the thread context indicates a variable data area; 를 더 포함하는 것을 특징으로 하는 프로세스메모리의 악성코드 검출 방법.Malicious code detection method of the process memory, characterized in that it further comprises. 제 10 항 내지 제 16 항에 있어서,The method according to claim 10 to 16, 제 1 단계는The first step is 검사대상에서 제외되는 프로세스 식별자를 저장하는 제12단계를 더 포함하고,And a twelfth step of storing the process identifier excluded from the inspection subject, 상기 프로세스 식별자에 대응되는 프로세스메모리는 검사대상에서 제외시키는 것을 특징으로 하는 프로세스메모리의 악성코드 검출 방법.And detecting a process memory corresponding to the process identifier from the inspection target. 제 17 항에 있어서,The method of claim 17, 제12단계는The 12th step is 상기 컴퓨터 시스템 사용자에 의해 저장되는 것을 특징으로 하는 프로세스메모리의 악성코드 검출 방법.Malicious code detection method of a process memory, characterized in that stored by the computer system user. 컴퓨터 시스템에서 실행되어 프로세스메모리에 악성코드가 존재하는지 여부를 검출하는 것으로서,It runs on a computer system and detects whether malicious code exists in process memory. 상기 프로세스를 실행시키기 위한 원본파일 명령코드의 무결성 데이터 및 일반적인 명령코드의 패턴데이터를 생성 저장하는 제1단계;A first step of generating and storing integrity data of an original file command code and pattern data of a general command code for executing the process; 상기 원본파일 명령코드의 무결성 데이터를 기초로 프로세스메모리의 코드영역에 악성코드가 존재하는지 여부를 판단하는 제2단계; 및A second step of determining whether malicious code exists in a code area of a process memory based on integrity data of the original file command code; And 상기 일반적인 명령코드의 패턴데이터를 기초로 프로세스메모리의 가변데이터 영역에 악성코드가 존재하는지 여부를 판단하는 제3단계A third step of determining whether malicious code exists in the variable data area of the process memory based on the pattern data of the general command code; 를 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for executing the program. 제 19 항에 있어서,The method of claim 19, 상기 제2단계는The second step is 상기 프로세스메모리의 코드영역의 무결성 데이터를 생성하는 제4단계;A fourth step of generating integrity data of a code area of said process memory; 상기 제4단계에서 계산된 무결성 데이터와 상기 제1단계에서 저장된 원본파일 무결성 데이터를 비교하는 제5단계; 및A fifth step of comparing the integrity data calculated in the fourth step with the original file integrity data stored in the first step; And 비교 결과 무결성 데이터가 일치하지 않는 경우 악성코드가 존재하는 것으로 판단하고 경고정보를 출력하는 제6단계Step 6 in which malicious code exists and outputs warning information when the integrity data does not match as a result of the comparison 를 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for executing the program. 제 20 항에 있어서,The method of claim 20, 상기 무결성 데이터는The integrity data is CRC(Cyclic Redundancy Check) 알고리즘에 의해 계산되는 것을 특징으로 하는 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having a program recorded thereon, which is calculated by a cyclic redundancy check (CRC) algorithm. 제 19 항에 있어서,The method of claim 19, 제3단계는The third step is 제1단계에서 저장된 일반적인 명령코드의 패턴데이터와 일치하는 명령코드가 존재하는지 여부를 검색하는 제7단계;A seventh step of searching for whether there is a command code matching the pattern data of the general command code stored in the first step; 일치하는 코드 패턴이 존재하는 경우 해당 주소에 브레이크 포인트(Break Point)를 설정하는 제8단계; 및An eighth step of setting a break point at a corresponding address when a matching code pattern exists; And 상기 컴퓨터 시스템의 CPU의 IP(Instruction Pointer)가 브레이크 포인트 설정된 주소와 일치하여 인터럽트가 발생하는 경우 악성코드가 존재하는 것으로 판단하고 경고정보를 출력하는 제9단계A ninth step of determining that a malicious code exists and outputting warning information when an interrupt occurs when an IP (Instruction Pointer) of the CPU of the computer system matches an address set to a break point; 를 더 포함하여 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for execution. 제 22 항에 있어서,The method of claim 22, 상기 가변데이터영역은 힙영역인 것을 특징으로 하는 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.And the variable data area is a heap area. 제 22 항에 있어서,The method of claim 22, 상기 가변데이터영역은 스택영역인 것을 특징으로 하는 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.And the variable data area is a stack area. 제 24 항에 있어서,The method of claim 24, 제 3 단계는The third step is 상기 컴퓨터 시스템의 운영체제(OS)로부터 쓰레드 컨텍스트를 추출하는 제10단계;Extracting a thread context from an operating system (OS) of the computer system; 상기 쓰레드 컨텍스트의 IP(Instruction Pointer)가 가변데이터영역을 가리키고 있는 경우 악성코드가 존재하는 것으로 판단하고 경고정보를 출력하는 제11단계;An eleventh step of determining that a malicious code exists and outputting warning information when an IP (Instruction Pointer) of the thread context indicates a variable data area; 를 더 포함하여 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for execution. 제 19 항 내지 제 25 항에 있어서,26. The method of claim 19, wherein 제 1 단계는The first step is 검사대상에서 제외되는 프로세스 식별자를 저장하는 제12단계를 더 포함하고,And a twelfth step of storing the process identifier excluded from the inspection subject, 상기 프로세스 식별자에 대응되는 프로세스메모리는 검사대상에서 제외시키는 것을 특징으로 하는 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.And a process memory corresponding to the process identifier, to be excluded from the inspection object. 제 26 항에 있어서,The method of claim 26, 제12단계는The 12th step is 상기 컴퓨터 시스템 사용자에 의해 저장되는 것을 특징으로 하는 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.And a computer readable recording medium storing a program recorded by the computer system user.
KR10-2003-0031220A 2003-05-16 2003-05-16 Device and Method for Detecting Malicious Code of Process Memory KR100516304B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2003-0031220A KR100516304B1 (en) 2003-05-16 2003-05-16 Device and Method for Detecting Malicious Code of Process Memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2003-0031220A KR100516304B1 (en) 2003-05-16 2003-05-16 Device and Method for Detecting Malicious Code of Process Memory

Publications (2)

Publication Number Publication Date
KR20040098902A true KR20040098902A (en) 2004-11-26
KR100516304B1 KR100516304B1 (en) 2005-09-26

Family

ID=37376596

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2003-0031220A KR100516304B1 (en) 2003-05-16 2003-05-16 Device and Method for Detecting Malicious Code of Process Memory

Country Status (1)

Country Link
KR (1) KR100516304B1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100666562B1 (en) * 2005-08-11 2007-01-09 주식회사 웨어플러스 Method for protecting kernel driver and process
KR100782614B1 (en) * 2005-07-06 2007-12-06 인피니언 테크놀로지스 아게 Detection of a change of the data of a dataset
KR100786725B1 (en) * 2005-11-08 2007-12-21 한국정보보호진흥원 Analysis system for malicious code and method thereof
KR100942795B1 (en) * 2007-11-21 2010-02-18 한국전자통신연구원 A method and a device for malware detection
WO2010036057A2 (en) * 2008-09-25 2010-04-01 주식회사 안철수연구소 A malware detector for the diagnosis of an illegal memory access and a control method thereof
WO2011055945A2 (en) * 2009-11-03 2011-05-12 주식회사 안철수연구소 Apparatus and method for detecting malicious sites
US8166545B2 (en) 2007-03-14 2012-04-24 Electronics And Telecommunications Research Institute Method and apparatus for detecting executable code
US8245299B2 (en) 2005-12-30 2012-08-14 Samsung Electronics Co., Ltd. Method of and apparatus for monitoring code to detect intrusion code
US8627478B2 (en) 2012-05-11 2014-01-07 Ahnlab, Inc. Method and apparatus for inspecting non-portable executable files
KR20160033735A (en) * 2013-07-18 2016-03-28 엠파이어 테크놀로지 디벨롭먼트 엘엘씨 Memory attack detection
WO2023027228A1 (en) * 2021-08-26 2023-03-02 시큐레터 주식회사 Method and device for detecting malignancy of non-portable executable file through execution flow change of application program
KR102549007B1 (en) * 2022-11-29 2023-06-28 시큐레터 주식회사 Methods and apparatus for detecting macro using debugging engine

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101073427B1 (en) 2007-12-06 2011-10-17 한국전자통신연구원 mobile terminal for blocking cross service attack and method thereof
KR101252185B1 (en) * 2010-08-10 2013-04-05 주식회사 잉카인터넷 method for blocking hack using thread check

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100782614B1 (en) * 2005-07-06 2007-12-06 인피니언 테크놀로지스 아게 Detection of a change of the data of a dataset
KR100666562B1 (en) * 2005-08-11 2007-01-09 주식회사 웨어플러스 Method for protecting kernel driver and process
KR100786725B1 (en) * 2005-11-08 2007-12-21 한국정보보호진흥원 Analysis system for malicious code and method thereof
US8245299B2 (en) 2005-12-30 2012-08-14 Samsung Electronics Co., Ltd. Method of and apparatus for monitoring code to detect intrusion code
US8166545B2 (en) 2007-03-14 2012-04-24 Electronics And Telecommunications Research Institute Method and apparatus for detecting executable code
KR100942795B1 (en) * 2007-11-21 2010-02-18 한국전자통신연구원 A method and a device for malware detection
WO2010036057A2 (en) * 2008-09-25 2010-04-01 주식회사 안철수연구소 A malware detector for the diagnosis of an illegal memory access and a control method thereof
WO2010036057A3 (en) * 2008-09-25 2010-07-08 주식회사 안철수연구소 A malware detector for the diagnosis of an illegal memory access and a control method thereof
KR101012669B1 (en) * 2008-09-25 2011-02-11 주식회사 안철수연구소 Malicious program detector for scanning a illegal memory access and method thereof
WO2011055945A3 (en) * 2009-11-03 2011-11-03 주식회사 안철수연구소 Apparatus and method for detecting malicious sites
WO2011055945A2 (en) * 2009-11-03 2011-05-12 주식회사 안철수연구소 Apparatus and method for detecting malicious sites
US8745740B2 (en) 2009-11-03 2014-06-03 Ahnlab., Inc. Apparatus and method for detecting malicious sites
US8627478B2 (en) 2012-05-11 2014-01-07 Ahnlab, Inc. Method and apparatus for inspecting non-portable executable files
KR20160033735A (en) * 2013-07-18 2016-03-28 엠파이어 테크놀로지 디벨롭먼트 엘엘씨 Memory attack detection
US9965626B2 (en) 2013-07-18 2018-05-08 Empire Technology Development Llc Memory attack detection
WO2023027228A1 (en) * 2021-08-26 2023-03-02 시큐레터 주식회사 Method and device for detecting malignancy of non-portable executable file through execution flow change of application program
KR102549007B1 (en) * 2022-11-29 2023-06-28 시큐레터 주식회사 Methods and apparatus for detecting macro using debugging engine

Also Published As

Publication number Publication date
KR100516304B1 (en) 2005-09-26

Similar Documents

Publication Publication Date Title
US8627478B2 (en) Method and apparatus for inspecting non-portable executable files
KR100516304B1 (en) Device and Method for Detecting Malicious Code of Process Memory
JP5265061B1 (en) Malicious file inspection apparatus and method
US9977897B2 (en) System and method for detecting stack pivot programming exploit
US10691800B2 (en) System and method for detection of malicious code in the address space of processes
KR101445634B1 (en) Device and Method for detecting vulnerability attack in any program
KR100945247B1 (en) The method and apparatus for analyzing exploit code in non-executable file using virtual environment
US20090133125A1 (en) Method and apparatus for malware detection
US20130152200A1 (en) Predictive Heap Overflow Protection
US9177149B2 (en) Method of detecting malware in an operating system kernel
US20190121976A1 (en) System and method of adapting patterns of dangerous behavior of programs to the computer systems of users
JP2013168141A (en) Method for detecting malware
US8646076B1 (en) Method and apparatus for detecting malicious shell codes using debugging events
US8595836B2 (en) Functional patching/hooking detection and prevention
KR100954356B1 (en) Detection system for malicious program considering code protection method and method thereof
US20190121975A1 (en) System and method for adapting patterns of malicious program behavior from groups of computer systems
KR101803888B1 (en) Method and apparatus for detecting malicious application based on similarity
Chen et al. Efficient detection of the return-oriented programming malicious code
CN114254314A (en) Kernel-based anti-lasso virus method under Linux
US11263307B2 (en) Systems and methods for detecting and mitigating code injection attacks
US20220138311A1 (en) Systems and methods for detecting and mitigating code injection attacks
KR100520788B1 (en) Device and Method For Detecting Malicious Thread
KR101421630B1 (en) system and method for detecting code-injected malicious code
WO2020012474A1 (en) Return-oriented programming attack protection system and method
CA3236695A1 (en) Memory hybrid-dynamic vulnerability assessment

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130131

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20130916

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20140915

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20150914

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20160919

Year of fee payment: 12

FPAY Annual fee payment

Payment date: 20190916

Year of fee payment: 15