KR101444141B1 - Malicious Thread Handling System and Method - Google Patents

Malicious Thread Handling System and Method Download PDF

Info

Publication number
KR101444141B1
KR101444141B1 KR1020130050035A KR20130050035A KR101444141B1 KR 101444141 B1 KR101444141 B1 KR 101444141B1 KR 1020130050035 A KR1020130050035 A KR 1020130050035A KR 20130050035 A KR20130050035 A KR 20130050035A KR 101444141 B1 KR101444141 B1 KR 101444141B1
Authority
KR
South Korea
Prior art keywords
thread
malicious
information
module
linkage
Prior art date
Application number
KR1020130050035A
Other languages
Korean (ko)
Inventor
박종혁
고보승
Original Assignee
주식회사 잉카인터넷
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 잉카인터넷 filed Critical 주식회사 잉카인터넷
Priority to KR1020130050035A priority Critical patent/KR101444141B1/en
Application granted granted Critical
Publication of KR101444141B1 publication Critical patent/KR101444141B1/en

Links

Images

Classifications

    • 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
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0721Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment within a central processing unit [CPU]
    • 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/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to a malicious thread handling system without stopping a process which is executed and a method thereof. The malicious thread handling system according to the present invention includes a real-time file monitoring unit which monitors the input and output of a module in a computer system, a malicious code inspecting unit which extracts a malicious module by inspecting whether the malicious code is included in the module, and a malicious file-connected malicious thread inactivating unit which collects and stores information which is connected to the module, the thread, and the process executed in the computer system, extracts the malicious thread information connected to the malicious module which is extracted in the malicious code inspecting unit, and inactivates the malicious thread information.

Description

악성스레드 처리 시스템 및 방법 {Malicious Thread Handling System and Method}{Malicious Thread Handling System and Method}

이 발명은 악성스레드 처리 시스템 및 방법에 관한 것으로서, 보다 상세하게는 실행중인 프로세스의 일시중지없이 악성스레드를 처리하는 시스템 및 방법에 관한 것이다.
The present invention relates to a malicious thread processing system and method, and more particularly, to a system and method for processing a malicious thread without suspending a running process.

악성모듈이란 컴퓨터 시스템에 피해를 주고자 의도적으로 제작된 프로그램을 통칭하며 바이러스, 웜, 트로이목마 또는 해킹프로그램 등을 포함한다. 일반적으로 악성모듈은 실행중인 프로세스에 별도의 스레드를 생성하여 악의적 행동을 수행하지만, 악성모듈에 의해 생성된 스레드는 프로세스가 포함하는 다양한 모듈을 사용하기 때문에 악성스레드만을 검출하기는 매우 어렵다.A malicious module refers to a program that is intentionally created to harm a computer system and includes viruses, worms, Trojans, or hacking programs. Generally, a malicious module creates a separate thread in a running process to perform a malicious action. However, since a thread generated by a malicious module uses various modules included in the process, it is very difficult to detect only a malicious thread.

따라서, 악성모듈이 검출되었을 때 악성모듈에 의해 생성된 스레드만을 종료시키는 것이 아니라 악성모듈을 포함하는 전체 프로세스를 종료하고 악성모듈을 제거한 후에 컴퓨터 시스템을 재부팅하거나 프로세스를 재실행해야만 했다.Therefore, when a malicious module is detected, the entire process including the malicious module should be terminated, not only the thread generated by the malicious module should be terminated, the malicious module must be removed, and then the computer system must be rebooted or the process must be re-executed.

하지만, 이와 같이 프로세스 전체를 종료하여 프로세스 실행이 종료되는 경우 컴퓨터 사용자는 많은 피해를 입을 수 있다. 특히, 악성모듈이 서버 시스템에 존재하는 경우 서버 시스템이 제공하는 서비스를 중단해야 되기 때문에 서버시스템 운영자는 금전적 손해를 입을 수 있고, 클라이언트는 많은 불편을 겪을 수 있다.However, a computer user can suffer a great deal of damage if the process execution is ended by ending the entire process. In particular, when a malicious module exists in a server system, a service provided by the server system must be interrupted, so that a server system operator can suffer financial damages, and a client may experience a lot of inconvenience.

이러한 문제점을 해결하기 위해, 대한민국 공개특허 제2004-0104112호, "악성스레드 검출기 및 그 방법"은 스레드의 실행코드를 역추적하여 악성모듈에 의해 생성된 스레드를 검출하는 방법이 제안되었다. 이 선행발명에 따른 악성스레드 검출기는, 실행중인 프로세스가 갖는 모듈 중 악성모듈의 존재 여부를 확인하고 상기 악성모듈의 메모리 주소를 추출하는 악성모듈 검사수단, 상기 프로세스에 속한 스레드의 IP(Instruction Pointer)가 상기 악성모듈의 메모리 주소를 지시하는지 확인하여 악성스레드를 검출하는 IP확인수단, 상기 IP가 상기 악성모듈의 메모리 주소를 지시하지 않는 경우 상기 스레드의 스택 영역에 저장된 데이터를 스택저장단위로 추출하는 스택데이터추출수단, 및 상기 추출된 스택데이터 중 상기 악성모듈의 메모리 주소와 일치하는 스택데이터에 대해서 리턴어드레스인지 여부를 확인함으로써 악성스레드를 검출하는 리턴어드레스 확인수단을 포함한다.To solve such a problem, Korean Patent Publication No. 2004-0104112, "malicious thread detector and method" proposed a method of detecting a thread generated by a malicious module by tracing execution code of a thread. The malicious thread detector according to the present invention includes malicious module checking means for checking whether a malicious module exists in a module of a running process and for extracting a memory address of the malicious module, an IP (Instruction Pointer) If the IP address does not indicate the memory address of the malicious module, extracts the data stored in the stack area of the thread in a stack storage unit And return address checking means for detecting a malicious thread by checking whether the stack data corresponding to the memory address of the malicious module among the extracted stack data is a return address.

이러한 선행발명은 검사대상 스레드의 IP(Instruction Pointer)가 악성모듈의 메모리 주소를 지시하는지 확인하거나, 스레드의 스택데이터 중 리턴어드레스가 악성모듈의 메모리 주소와 일치하는 지를 확인하여, 악성스레드를 검출하기 때문에 은닉된 악성스레드를 검출할 수 없는 문제점이 있다. 또한, 선행발명은 실행중인 모든 스레드에 대해 검사대상 스레드를 일시중지시킨 후 해당 스레드의 IP를 기반으로 악성스레드 여부를 검출하기 때문에 실행 프로세스가 지연되는 문제점이 있다.
In this prior art, it is checked whether an IP (Instruction Pointer) of a thread to be tested indicates a memory address of a malicious module, whether a return address of the thread's stack data matches a memory address of the malicious module, Therefore, there is a problem that the hidden malicious thread can not be detected. In addition, the prior art has a problem that the execution process is delayed because the thread to be inspected is paused for all threads in execution and the malicious thread is detected based on the IP of the thread.

상술한 종래기술의 문제점을 해결하기 위해 안출된 이 발명의 목적은 실행 프로세스와 스레드의 일시중지없이 악성모듈에 의해 생성된 모든 악성스레드를 검출하여 처리할 수 있는 악성스레드 처리 시스템 및 방법을 제공하기 위한 것이다. 또한, 이 발명의 다른 목적은 은닉된 악성스레드를 검출하여 처리할 수 있는 악성스레드 처리 시스템 및 방법을 제공하기 위한 것이다.
SUMMARY OF THE INVENTION It is an object of the present invention to solve the above-mentioned problems of the prior art and to provide a malicious thread processing system and method capable of detecting and processing all malicious threads generated by a malicious module without suspending execution processes and threads . Another object of the present invention is to provide a malicious thread processing system and method capable of detecting and processing a concealed malicious thread.

상기한 목적을 달성하기 위한 이 발명에 따른 악성스레드 처리 시스템은, 컴퓨터시스템에서의 모듈의 입출력을 감시하는 실시간파일감시부와; 상기 모듈에 대해 악성코드 포함 여부를 검사하여 악성모듈을 추출하는 악성코드검사부와; 상기 컴퓨터시스템에서 실행되는 프로세스와 스레드와 모듈 연계 정보를 수집하여 저장하고, 상기 연계 정보를 기반으로 상기 악성코드검사부에서 추출된 악성모듈과 연계된 악성스레드 정보를 추출하여 비활성화하는 악성파일 연계 악성스레드 무력화부를 포함한 것을 특징으로 한다.According to an aspect of the present invention, there is provided a malicious thread processing system comprising: a real-time file monitoring unit for monitoring input / output of a module in a computer system; A malicious code checking unit for checking whether the malicious code is included in the module and extracting the malicious module; A malicious file-linked malicious thread for collecting and storing processes, threads and module linkage information executed in the computer system, extracting malicious thread information associated with the malicious module extracted from the malicious code checking unit based on the linkage information, And a neutralizing part.

또한, 이 발명에 따른 악성스레드 처리 방법은, 악성스레드 처리 시스템이 컴퓨터시스템에서 실행되는 프로세스 정보와 스레드 정보를 수집하고 상기 수집된 프로세스 정보 및 스레드 정보를 기반으로 프로세스와 스레드와 모듈간 연계 정보를 수집하는 제1단계와; 상기 악성스레드 처리 시스템이 상기 컴퓨터시스템에서의 모듈의 입출력을 감시하고 상기 모듈에 대해 악성코드 포함 여부를 검사하여 악성모듈을 추출하는 제2단계와; 상기 악성스레드 처리 시스템이 상기 연계 정보를 기반으로 상기 악성모듈과 연계된 악성스레드 정보를 추출하는 제3단계와; 상기 악성스레드 처리 시스템이 상기 악성스레드를 비활성화하는 제4단계를 포함한 것을 특징으로 한다.
The malicious thread processing method according to the present invention collects process information and thread information executed by a malicious thread processing system in a computer system, and associates the process, the thread, and the module with each other based on the collected process information and thread information A first step of collecting; A second step of the malicious thread processing system monitoring input / output of a module in the computer system and checking whether the malicious code is included in the module to extract a malicious module; A third step of the malicious thread processing system extracting malicious thread information associated with the malicious module based on the association information; And a fourth step of the malicious thread processing system deactivating the malicious thread.

이상과 같이 이 발명에 따르면 적어도 둘 이상의 스레드 탐지방법에 의해 컴퓨터시스템에서 실행되는 프로세스 정보와 스레드 정보를 수집하기 때문에 다양한 방법으로 은닉된 프로세스와 스레드를 검출할 수 있고, 상호 연계된 프로세스와 스레드와 모듈 정보를 테이블로 저장하고 악성모듈이 검출되면 상기 테이블을 기반으로 해당 악성모듈과 연계된 악성스레드를 비활성화하여 일시정지없이도 악성스레드의 검출 및 처리가 가능한 효과가 있다.
As described above, according to the present invention, since at least two thread detection methods collect process information and thread information to be executed in a computer system, it is possible to detect hidden processes and threads in various ways, Module information is stored as a table, and when a malicious module is detected, the malicious thread associated with the malicious module is disabled based on the table, thereby detecting and processing the malicious thread without pausing.

도 1은 이 발명에 따른 악성스레드 처리 시스템을 도시한 구성도이다.
도 2는 이 발명에 따른 프로세스와 스레드와 모듈간 연계 정보를 저장한 테이블의 일 예를 도시한 도면이다.
도 3은 이 발명에 따른 악성스레드 처리 방법을 도시한 동작 흐름도이다.
1 is a block diagram showing a malicious thread processing system according to the present invention.
FIG. 2 is a diagram illustrating an example of a table storing association information between a process and a thread according to the present invention.
3 is a flowchart illustrating a malicious thread processing method according to the present invention.

이하, 첨부된 도면을 참조하여 이 발명에 따른 악성스레드 처리 시스템 및 방법을 보다 상세하게 설명한다.The malicious thread processing system and method according to the present invention will now be described in more detail with reference to the accompanying drawings.

도 1은 이 발명에 따른 악성스레드 처리 시스템을 도시한 구성도이다.1 is a block diagram showing a malicious thread processing system according to the present invention.

이 발명에 따른 악성스레드 처리 시스템은 실시간파일감시부(110)와, 악성코드검사부(120)와, 악성파일 연계 악성스레드 무력화부(130)를 포함한다. 실시간파일감시부(110)는 컴퓨터시스템에서 파일 또는 레지스트리의 입출력을 감시한다. 악성코드검사부(120)는 신규 파일 또는 레지스트리에 대해 악성코드 포함여부를 검사한다.The malicious thread processing system according to the present invention includes a real-time file monitoring unit 110, a malicious code checking unit 120, and a malicious file-related malicious thread disabling unit 130. The real-time file monitoring unit 110 monitors input / output of a file or a registry in a computer system. The malicious code checking unit 120 checks whether a malicious code is included in a new file or registry.

악성파일 연계 악성스레드 무력화부(130)는 컴퓨터시스템에서 실행되는 프로세스 정보 및 스레드 정보를 수집하는 프로세스스레드정보수집부(131)와, 상기 프로세스스레드정보수집부(131)에서 수집된 프로세스 정보 및 스레드 정보를 기반으로 프로세스와 스레드와 모듈(DLL) 연계 정보를 수집하는 연계정보수집부(132)와, 상기 연계정보수집부(132)에서 수집된 연계 정보를 기반으로 상기 악성코드검사부(120)에서 검출된 악성모듈과 연계된 악성스레드 정보를 추출하는 악성스레드추출부(133)와, 상기 악성스레드를 비활성화하는 악성스레드비활성화부(134)를 포함한다.The malicious file-related malicious thread disabling unit 130 includes a process thread information collecting unit 131 for collecting process information and thread information executed in a computer system, a process information collecting unit 131 for collecting process information and threads collected by the process thread information collecting unit 131, A linkage information collecting unit 132 for collecting linkage information of a process, a thread and a module (DLL) on the basis of the information, a malicious code checking unit 120 A malicious thread extracting unit 133 for extracting malicious thread information associated with the detected malicious module, and a malicious thread deactivating unit 134 for deactivating the malicious thread.

악성파일 연계 악성스레드 무력화부(130)는 악성 모듈에 의해 실행된 악성스레드를 검출하여 그 악성스레드를 무력화해야 한다. 이때, 악성스레드가 은닉되어 있는 경우, 악성 모듈을 검출하더라도 그 악성 모듈에 의해 실행된 악성스레드를 검출하지 못하고 이로 인해 그 악성스레드를 종료하거나 중지시키지 못하게 된다. 따라서, 이 발명에서는 은닉된 스레드를 포함하여 컴퓨터시스템에서 실행되는 모든 스레드를 검출하는 방법을 제안한다.The malicious file linked malicious thread disabling unit 130 detects a malicious thread executed by the malicious module and disables the malicious thread. At this time, if the malicious thread is hidden, even if the malicious module is detected, the malicious thread executed by the malicious module is not detected, thereby preventing the malicious thread from being terminated or stopped. Accordingly, the present invention proposes a method for detecting all threads executed in a computer system including a hidden thread.

이 발명의 프로세스스레드정보수집부(131)는 PspCidTable 조사를 통한 탐지방법, ObjectTable 조사를 통한 탐지방법, 메모리 스캔을 통한 탐지방법, SwapContext함수후킹을 통한 탐지방법을 이용하여 프로세스 정보와 스레드 정보를 수집한다. 이러한 탐지방법들은 각각 해당 탐지방법을 역이용하는 악성프로그램에 의해 무력화되어 은닉된 일부 프로세스나 스레드를 탐지하지 못할 수도 있다. 따라서, 이 발명에서는 상술한 다양한 탐지방법들 중 적어도 둘 이상의 탐지방법들을 이용하여 각각 프로세스 정보와 스레드 정보를 수집하고 중복제거하여 유니크한 프로세스 정보와 스레드 정보를 획득한다.The process thread information collector 131 of the present invention collects process information and thread information by using a detection method based on PspCidTable investigation, a detection method based on ObjectTable investigation, a detection method based on memory scan, and a detection method based on SwapContext function hooking do. Each of these detection methods may not be able to detect some hidden processes or threads that are disabled by a malicious program that uses the corresponding detection method. Accordingly, in the present invention, process information and thread information are collected and duplicated by using at least two detection methods among the various detection methods described above to obtain unique process information and thread information.

각각의 탐지방법들에 대해 상세하게 설명한다.Each of the detection methods will be described in detail.

PspCidTable 조사를 통한 탐지방법 : PspCidTable은 프로세스와 스레드에 대한 객체 정보를 관리하기 위해 커널에서 사용하는 전역변수로서, 이 PspCidTable을 조사하면 프로세스와 스레드에 대한 객체 주소를 확인할 수 있다. 이렇게 확인한 프로세스 객체와 스레드 객체는 각각 프로세스 구조체와 스레드 구조체의 메모리 상의 로드된 주소 정보이다. 따라서, PspCidTable로부터 프로세스 구조체와 스레드 구조체 정보를 얻을 수 있다. 또한, 이렇게 얻어진 스레드 구조체의 프로세스 식별자 정보를 통하여 프로세스구조체를 추가적으로 얻을 수도 있다. 프로세스 구조체에는 프로세스 식별자와 부모 프로세스 식별자와 파일 이름 등이 포함된다. 스레드 구조체에는 프로세스 식별자와 스레드 식별자와 스레드의 시작주소 등이 포함된다. Detection via PspCidTable probe : PspCidTable is a global variable used by the kernel to manage object information about processes and threads. You can examine the PspCidTable to determine the object address for the process and the thread. The process object and the thread object thus confirmed are the loaded address information in the memory of the process structure and the thread structure, respectively. Therefore, process structure and thread structure information can be obtained from PspCidTable. Further, a process structure may be additionally obtained through the process identifier information of the obtained thread structure. A process structure contains a process identifier, a parent process identifier, and a file name. The thread structure includes the process identifier, the thread identifier, and the start address of the thread.

임의의 한 프로세스의 ObjectTable 조사를 통한 탐지방법 : 프로세스 구조체는 해당 프로세스가 사용하는 모든 객체를 ObjectTable로 관리한다. 따라서, ObjectTable은 프로세스의 개수만큼 존재하며, ObjectTable 멤버는 핸들테이블(HANDLE_TABLE) 구조체 타입으로서, 각 프로세스의 ObjectTable에는 HandleTableList 정보와 프로세스 구조체가 포함된다. HandleTableList에는 모든 ObjectTable 리스트 정보가 포함된다. 따라서, 임의의 한 프로세스(예컨대, 시스템 프로세스)의 프로세스 구조체로부터 ObjectTable을 얻고, ObjectTable의 HandleTableList를 참조하여 다른 프로세스의 ObjectTable 리스트를 얻고, 얻어진 리스트의 각 ObjectTable로부터 프로세스 구조체를 얻는다. 이로써, 실행중인 프로세스들의 프로세스 구조체를 구할 수 있다. Detecting through an ObjectTable of an arbitrary process : A process structure manages all the objects used by the process in an ObjectTable. Therefore, the ObjectTable exists as many as the number of processes. The ObjectTable member is a handle table (HANDLE_TABLE) structure type, and each process's ObjectTable includes HandleTableList information and a process structure. The HandleTableList contains all the ObjectTable list information. Thus, an ObjectTable is obtained from a process structure of any one process (e.g., a system process), the ObjectTable list of another process is obtained by referring to the HandleTableList of the ObjectTable, and a process structure is obtained from each ObjectTable of the obtained list. This allows you to obtain the process structure of running processes.

메모리 스캔을 통한 탐지방법 : 프로세스와 스레드는 실행중일 때, 메모리에 상주하게 된다. 즉, 메모리상에 존재하는 객체의 고유한 식별자만 있다면 스캐닝을 통해 찾을 수 있다. 그러나, 프로세스 구조체와 스레드 구조체라는 것을 명시하는 식별자는 존재하지 않는다. 그렇기 때문에 프로세스 구조체와 스레드 구조체 타입을 확인하여 각 구조체를 구성하는 각 인자들이 유효한 값으로 채워져 있는지를 확인해야 한다. 메모리 스캔을 통한 프로세스(또는 스레드) 구조체 탐지방법은 다음과 같다. 먼저, 커널 메모리의 스캔 범위(영역)를 결정하고, 적당히 작은 단위(예컨대, 4 바이트)로 커널 메모리를 스캔한다. 스캔중인 주소에서 프로세스(또는 스레드) 구조체의 인자들(예컨대, ObjectTable, ActiveProcessLinks, ThreadListHead 등)가 유효한 값을 갖는지 확인한다. 스캔중인 주소에서 유효한 각 구조체를 결정하기 위한 인자들이 임계치 이상 존재하면 해당 주소를 해당 구조체(프로세스 또는 스레드)의 주소로 결정하고, 유효한 인자들이 임계치 미만이면 다음 영역을 스캔한다. 프로세스와 스레드의 객체는 커널 메모리 풀에 상주하기 때문에 추가적으로 풀태그(pooltag) 정보를 확인하는 것이 프로세스 구조체와 스레드 구조체를 검출하는데 필요할 수도 있다. Detection via memory scan : When a process and a thread are running, they reside in memory. That is, if there is only a unique identifier of an object existing in memory, it can be found through scanning. However, there is no identifier that specifies a process structure and a thread structure. Therefore, you need to check the process structure and the thread structure type to make sure that each parameter that constitutes each structure is filled with valid values. Here is how to detect a process (or thread) structure through a memory scan. First, the scan range (area) of the kernel memory is determined, and the kernel memory is scanned in an appropriately small unit (e.g., 4 bytes). Verify that the arguments of the process (or thread) structure (eg, ObjectTable, ActiveProcessLinks, ThreadListHead, etc.) have valid values at the address being scanned. If the arguments for determining each valid structure in the address being scanned are greater than the threshold value, the address is determined as the address of the structure (process or thread). If the valid arguments are less than the threshold value, the next area is scanned. Because the process and thread objects reside in the kernel memory pool, additional pool tag information may be needed to detect the process and thread structures.

SwapContext함수후킹을 통한 탐지방법 : SwapContext함수는 CPU가 현재 연산중인 스레드의 컨텍스트가 바로 다음에 연산될 스레드의 컨텍스트로 스왑될 때 호출되는 함수로서, 이 SwapContext함수에는 현재 CPU에서 연산되는 스레드 정보와 다음에 연산될 스레드 정보가 레지스터에 저장된다. 따라서, SwapContext함수를 후킹하여 스레드 정보(스레드 구조체)를 수집하고, 스레드 구조체의 프로세스 식별자를 확인하여 프로세스 구조체를 탐지한다. The SwapContext function is called when the context of the thread currently being operated on by the CPU is swapped to the context of the next thread to be computed. This SwapContext function has the following information: The thread information to be operated on is stored in the register. Therefore, the SwapContext function is hooked to collect the thread information (thread structure), and the process structure of the thread structure is identified to detect the process structure.

다음, 연계정보수집부(132)는 프로세스와 스레드간 연계정보를 수집하는 프로세스-스레드연계정보수집부와, 프로세스와 모듈간 연계정보를 수집하는 프로세스-모듈연계정보수집부와, 프로세스와 스레드간 연계정보 및 프로세스와 모듈간 연계정보를 결합하여 프로세스와 스레드와 모듈간 연계정보를 수집하는 연계정보결합부를 포함한다.Next, the linkage information collection unit 132 includes a process-thread linkage information collection unit that collects linkage information between the process and the thread, a process-module linkage information collection unit that collects linkage information between the process and the module, And a linkage information combining unit for linking the linkage information between the process and the module to collect linkage information between the process and the thread and the module.

프로세스-스레드연계정보수집부는, 프로세스별로 프로세스 구조체의 ThreadListHead 정보를 이용하여 연계된 스레드 정보를 수집하거나, 메모리를 스캔하여 프로세스와 스레드간 연계정보를 수집한다. 다음, 프로세스-모듈연계정보수집부는 프로세스 구조체의 배드루트(VadRoot)를 조사하여 가상주소공간에 대한 정보를 수집한다. 이 가상주소공간에 대한 정보에는 프로세스에 할당된 메모리의 가상주소공간의 각 영역(페이지 단위)별로 속성정보와, 해당 영역에 매핑된 파일(모듈)의 경로 정보가 포함된다. 프로세스-모듈연계정보수집부는 프로세스에 연계된 모듈 파일의 경로 정보와 해당 모듈 파일에 할당된 메모리 영역 정보를 수집한다. 연계정보결합부는, 임의의 프로세스에 연계된 스레드의 시작주소가 상기 프로세스에 연계된 모듈 파일에 할당된 메모리 영역 내에 포함되어 있으면, 상기 프로세스와 스레드와 모듈을 연계된 것으로 판단한다. 연계정보결합부는 스레드의 시작주소가 가상주소공간의 속성이 실행가능(EXECUTE)인 영역에 포함되면 상기 스레드와 연계된 모듈 파일을 검출하고, 스레드의 시작주소가 가상주소공간의 속성이 실행가능(EXECUTE)인 영역에 포함되지 않으면 상기 스레드와 연계된 모듈 파일을 검출하지 않는다. 도 2는 이 발명에 따른 프로세스와 스레드와 모듈간 연계 정보를 저장한 테이블의 일 예를 도시한 도면이다.
The process-thread linkage information collection unit collects linked thread information by using ThreadListHead information of the process structure for each process or scans the memory to collect linkage information between the process and the thread. Next, the process-module linkage information collection unit examines the bad route (VadRoot) of the process structure and collects information about the virtual address space. The information on the virtual address space includes attribute information for each area (page unit) of the virtual address space of the memory allocated to the process, and path information of the file (module) mapped to the corresponding area. The process-module linkage information collection unit collects path information of a module file associated with the process and memory area information allocated to the module file. The association information combining unit determines that the process, the thread, and the module are linked if the start address of the thread associated with the arbitrary process is included in the memory area allocated to the module file associated with the process. The association information combining unit detects a module file associated with the thread if the start address of the thread is included in an area where the attribute of the virtual address space is executable, and if the start address of the thread is an executable EXECUTE), the module file associated with the thread is not detected. FIG. 2 is a diagram illustrating an example of a table storing association information between a process and a thread according to the present invention.

프로세스-스레드연계정보수집부 아래에서 각 방법을 상세하게 설명한다.Process-thread linkage information collection unit Each method will be described in detail below.

프로세스 구조체의 ThreadListHead 정보를 이용하는 방법 : 프로세스는 실질적인 실행 주체인 스레드들에 대한 정보를 관리하기 위해 연결리스트를 사용하는 프로세스 구조체의 ThreadListHead는 LIST_ENTRY 타입의 연결리스트 헤드이다. 프로세스는 프로세스 구조체의 ThreadListHead를 통해 스레드 목록을 관리한다. ThreadListHead는 스레드 구조체의 ThreadListEntry와 연결되어 있다. ThreadListHead를 조사하면서 각 엔트리를 구할 때마다 해당 엔트리 주소에서 스레드 구조체의 ThreadListEntry까지의 오프셋을 빼주면 해당 스레드 구조체의 주소를 구할 수 있다. 모든 엔트리에 대해 이를 반복하면 프로세스 구조체와 연계된 모든 스레드 구조체를 수집할 수 있다. How to use ThreadListHead information of a process structure : A process uses a linked list to manage information about threads that are the actual execution subject ThreadListHead is a linked list head of type LIST_ENTRY. A process maintains a thread list through the ThreadListHead of the process structure. ThreadListHead is associated with ThreadListEntry in the thread structure. Each time you look up ThreadListHead, you can get the address of that thread structure by subtracting the offset from the corresponding entry address to the ThreadListEntry of the thread structure. You can iterate over all the entries to collect all the thread structures associated with the process structure.

메모리를 스캔하여 프로세스와 스레드간 연계정보를 수집하는 방법 : 메모리 스캔을 통해 프로세스 구조체와 스레드 구조체를 탐지한 후, 프로세스 구조체의 프로세스 식별자와, 스레드 구조체의 프로세스 식별자와 스레드 식별자 정보를 이용하여 프로세스가 관리하는 모든 스레드 목록을 수집할 수 있다. To scan a memory and collect the linkage information between a process and a thread : After detecting a process structure and a thread structure through a memory scan, the process identifier of the process structure and the process identifier of the thread structure and the thread identifier information are used You can collect a list of all managed threads.

상술한 프로세스스레드정부수집부(131)와 연계정보수집부(132)는 컴퓨터시스템이 실행되는 동안에 구동하여 프로세스와 스레드와 모듈간 연계 정보를 최신 정보로 유지한다.The process-thread-government collecting unit 131 and the linkage-information collecting unit 132 are operated while the computer system is running, and maintain the linkage information between the process, the thread and the module as the latest information.

악성스레드추출부(133)는 악성코드검사부(120)에서 악성모듈이 검출되면, 상기 연계정보수집부(132)에서 생성된 프로세스와 스레드와 모듈간 연계 정보를 기반으로 상기 악성모듈과 연계된 악성스레드 정보를 추출하여 악성스레드비활성부(134)에 제공한다. 다음, 악성스레드비활성화부(134)는 악성스레드추출부(133)에서 추출된 악성스레드를 비활성화한다. 이때, 하나의 악성모듈에 연계된 악성스레드가 둘 이상인 경우, 모든 연계된 악성스레드들을 모두 비활성화한다.
When a malicious module is detected by the malicious code checking unit 120, the malicious thread extracting unit 133 extracts a malicious thread associated with the malicious module based on the process created in the association information collecting unit 132 and the association information between the thread and the module Extracts thread information and provides it to the malicious thread inactive section 134. Next, the malicious thread deactivation unit 134 deactivates the malicious thread extracted by the malicious thread extracting unit 133. [ At this time, if there are two or more malicious threads associated with one malicious module, all the related malicious threads are deactivated.

도 3은 이 발명에 따른 악성스레드 처리 방법을 도시한 동작 흐름도이다.3 is a flowchart illustrating a malicious thread processing method according to the present invention.

이 발명에 따른 악성스레드 처리 시스템은, 컴퓨터시스템에서 실행되는 프로세스 정보 및 스레드 정보를 수집하고, 수집된 프로세스 정보와 스레드 정보를 기반으로 프로세스와 스레드간 연계정보를 수집한다(S31). 악성스레드 처리 시스템은, 프로세스와 모듈간 연계정보를 수집하고(S32), 프로세스와 스레드간 연계정보 및 프로세스와 모듈간 연계정보를 결합하여 프로세스와 스레드와 모듈간 연계 정보를 수집한다(S33). 한편 악성스레드 처리 시스템은, 실시간 파일 입출력을 감시하고(S34) 신규 모듈에 대해 악성코드를 검사한다(S35).The malicious thread processing system according to the present invention collects process information and thread information executed in the computer system, and collects linkage information between the process and the thread based on the collected process information and thread information (S31). The malicious thread processing system collects linkage information between the process and the module (S32), and combines linkage information between the process and the thread and linkage information between the process and the module (S33). On the other hand, the malicious thread processing system monitors real-time file input / output (S34) and checks the malicious code against the new module (S35).

악성모듈이 감지되지 않으면(S36), 단계 S31 내지 단계 S33을 반복 수행하여 프로세스와 스레드와 모듈간 연계정보를 최신 정보로 유지하고, 단계 S34 및 단계 S35를 반복 수행하여 실시간 입출력 파일에 대해 악성모듈 여부를 감지한다.If the malicious module is not detected (S36), steps S31 to S33 are repeated to maintain the linkage information between the process, the thread and the module as the latest information, and the steps S34 and S35 are repeatedly performed, ≪ / RTI >

악성모듈이 감지되면(S36), 프로세스와 스레드와 모듈간 연계정보를 기반으로 악성모듈과 연계된 악성스레드 정보를 추출하고(S37), 추출된 악성스레드를 비활성화한다(S38).If the malicious module is detected (S36), the malicious thread information associated with the malicious module is extracted based on the association information between the process, the thread and the module (S37), and the extracted malicious thread is deactivated (S38).

단계 S31에서, 악성스레드 처리 시스템은, PspCidTable 조사를 통한 탐지방법, ObjectTable 조사를 통한 탐지방법, 메모리 스캔을 통한 탐지방법, 및 SwapContext함수후킹을 통한 탐지방법 중 적어도 둘 이상의 탐지방법들을 통해 각각 프로세스 정보와 스레드 정보를 수집한 후 중복제거하여 유니크한 프로세스 정보와 스레드 정보를 수집한다.
In step S31, the malicious thread processing system detects the process information through at least two detection methods among a detection method by PspCidTable investigation, a detection method by ObjectTable investigation, a detection method by memory scan, and a detection method by SwapContext function hooking, And thread information, and then duplicates and removes unique process information and thread information.

이상에서 본 발명에 대한 기술사상을 첨부도면과 함께 서술하였지만, 이는 본 발명의 가장 양호한 실시예를 예시적으로 설명한 것이지 본 발명을 한정하는 것은 아니다. 또한, 이 기술분야의 통상의 지식을 가진 자라면 누구나 본 발명의 기술사상의 범주를 이탈하지 않는 범위 하에서 다양한 변형 및 모방이 가능함은 명백한 사실이다.
While the present invention has been described in connection with what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. In addition, it is obvious that various modifications and variations can be made without departing from the scope of the technical idea of the present invention by anyone having ordinary skill in the art.

110 : 실시간파일감시부 120 : 악성코드검사부
130 : 악성파일 연계 악성스레드 무력화부
131 : 프로세스스레드정보수집부 132 : 연계정보수집부
133 : 악성스레드추출부 134 : 악성스레드비활성화부
110: real-time file monitoring unit 120: malicious code checking unit
130: malicious thread linking malicious file
131: Process thread information collecting unit 132:
133: malicious thread extraction unit 134: malicious thread deactivation unit

Claims (9)

컴퓨터시스템에 포함된 모듈에 대해 악성코드 포함 여부를 검사하여 악성모듈을 추출하는 악성코드검사부와; 상기 컴퓨터시스템에서 실행되는 프로세스와 스레드와 모듈 연계 정보를 수집하여 저장하고 상기 연계 정보를 기반으로 상기 악성코드검사부에서 추출된 악성모듈과 연계된 악성스레드 정보를 추출하여 비활성화하는 악성파일 연계 악성스레드 무력화부를 포함하고,
상기 악성파일 연계 악성스레드 무력화부는, 상기 컴퓨터시스템에서 실행되는 프로세스 정보 및 스레드 정보를 수집하는 프로세스스레드정보수집부와, 상기 프로세스스레드정보수집부에서 수집된 프로세스 정보 및 스레드 정보를 기반으로 프로세스와 스레드와 모듈간 연계 정보를 수집하는 연계정보수집부와, 상기 연계정보수집부에서 수집된 연계 정보를 기반으로 상기 악성코드검사부에서 검출된 악성모듈과 연계된 악성스레드 정보를 추출하는 악성스레드추출부와, 상기 악성스레드를 비활성화하는 악성스레드비활성화부를 포함하고,
상기 연계정보수집부는, 프로세스와 스레드간 연계정보를 수집하는 프로세스-스레드연계정보수집부와, 프로세스와 모듈간 연계정보를 수집하는 프로세스-모듈연계정보수집부와, 프로세스와 스레드간 연계정보 및 프로세스와 모듈간 연계정보를 결합하여 프로세스와 스레드와 모듈간 연계 정보를 수집하는 연계정보결합부를 포함한한 것을 특징으로 하는 악성스레드 처리 시스템.
A malicious code checking unit for checking whether malicious code is included in a module included in the computer system and extracting the malicious module; A malicious file-linked malicious thread disabling process for collecting malicious file information associated with a malicious thread extracted from the malicious code checking unit based on the association information, ≪ / RTI >
The malicious file-related malicious thread disabling unit includes a process thread information collecting unit for collecting process information and thread information executed in the computer system, and a processor and a thread based on the process information and the thread information collected by the process thread information collecting unit. A malicious thread extracting unit for extracting malicious thread information associated with the malicious module detected by the malicious code checking unit based on the linkage information collected by the linkage information collecting unit; And a malicious thread deactivation section for deactivating the malicious thread,
The linkage information collection unit includes a process-thread linkage information collection unit that collects linkage information between the process and the thread, a process-module linkage information collection unit that collects linkage information between the process and the module, And a linkage information combining unit for linking the process and the linkage information between the module and the module to collect linkage information between the process and the thread and the module.
삭제delete 제 1 항에 있어서, 상기 프로세스스레드정보수집부는, PspCidTable 조사를 통한 탐지방법, ObjectTable 조사를 통한 탐지방법, 메모리 스캔을 통한 탐지방법, 및 SwapContext함수후킹을 통한 탐지방법 중 적어도 둘 이상의 탐지방법들을 통해 각각 프로세스 정보와 스레드 정보를 수집한 후 중복제거하는 것을 특징으로 하는 악성스레드 처리 시스템.The method according to claim 1, wherein the process thread information collecting unit collects the process thread information through at least two detection methods among a detection method by PspCidTable investigation, a detection method by ObjectTable investigation, a memory scanning method, and a SwapContext function hooking detection method Wherein the process information and the thread information are collected and then duplicated. 삭제delete 제 1 항에 있어서, 상기 프로세스-스레드연계정보수집부는 프로세스별로 프로세스 구조체의 ThreadListHead 정보를 이용하여 연계된 스레드 정보를 수집하거나, 메모리를 스캔하여 프로세스와 스레드간 연계정보를 수집하는 것을 특징으로 하는 악성스레드 처리 시스템.The method according to claim 1, wherein the process-thread linkage information collector collects linked thread information by using ThreadListHead information of the process structure for each process, or collects linkage information between the process and the thread by scanning the memory. Thread processing system. 제 1 항에 있어서, 상기 프로세스-모듈연계정보수집부는 프로세스 구조체의 배드루트(VadRoot)를 조사하여 가상주소공간에 대한 정보를 수집하고, 각 프로세스에 연계된 모듈 파일의 경로 정보와 해당 모듈 파일에 할당된 메모리 영역 정보를 수집하는 것을 특징으로 하는 악성스레드 처리 시스템.2. The method according to claim 1, wherein the process-module linkage information collector collects information on the virtual address space by examining a bad route (VadRoot) of the process structure, and stores path information of the module file associated with each process, And collects the allocated memory area information. 제 1 항에 있어서, 상기 연계정보결합부는 임의의 프로세스에 연계된 스레드의 시작주소가 상기 프로세스에 연계된 모듈 파일에 할당된 메모리 영역 내에 포함되어 있으면, 상기 프로세스와 스레드와 모듈을 연계된 것으로 판단하는 것을 특징으로 하는 악성스레드 처리 시스템.The information processing apparatus according to claim 1, wherein the linkage information combining unit judges that the process, the thread, and the module are linked if the start address of the thread associated with the arbitrary process is included in the memory area allocated to the module file associated with the process The malicious thread processing system comprising: 악성스레드 처리 시스템이 컴퓨터시스템에서 실행되는 프로세스와 스레드간 연계정보를 수집하고 프로세스와 모듈간 연계정보를 수집하며 상기 수집된 프로세스와 스레드간 연계정보 및 프로세스와 모듈간 연계정보를 결합하여 프로세스와 스레드와 모듈간 연계 정보를 수집하는 제1단계와;
상기 악성스레드 처리 시스템이 상기 컴퓨터시스템에 포함된 모듈에 대해 악성코드 포함 여부를 검사하여 악성모듈을 추출하는 제2단계와;
상기 악성스레드 처리 시스템이 상기 제1단계에서 수집된 연계 정보를 기반으로 상기 악성모듈과 연계된 악성스레드 정보를 추출하는 제3단계와;
상기 악성스레드 처리 시스템이 상기 악성스레드를 비활성화하는 제4단계를 포함하는 것을 특징으로 하는 악성스레드 처리 방법.
A malicious thread processing system collects linkage information between a process and a thread executed in a computer system, collects linkage information between the process and the module, combines the linkage information between the collected process and the thread and linkage information between the process and the module, A first step of collecting linkage information between modules and a module;
A second step of the malicious thread processing system extracting a malicious module by checking whether malicious code is included in the module included in the computer system;
A third step of the malicious thread processing system extracting malicious thread information associated with the malicious module based on the association information collected in the first step;
And the malicious thread processing system includes a fourth step of deactivating the malicious thread.
제 8 항에 있어서, 상기 제1단계에서 상기 악성스레드 처리 시스템이 컴퓨터시스템에서 실행되는 프로세스 정보와 스레드 정보를 수집하는 것은, PspCidTable 조사를 통한 탐지방법, ObjectTable 조사를 통한 탐지방법, 메모리 스캔을 통한 탐지방법, 및 SwapContext함수후킹을 통한 탐지방법 중 적어도 둘 이상의 탐지방법들을 통해 각각 프로세스 정보와 스레드 정보를 수집한 후 중복제거하는 것을 특징으로 하는 악성스레드 처리 방법.

9. The method of claim 8, wherein in the first step, the malicious thread processing system collects the process information and thread information executed in the computer system by using a detection method by PspCidTable investigation, a detection method by ObjectTable investigation, Wherein the process information and the thread information are collected through at least two detection methods among the detection method by the detection method, the detection method, and the detection method by the SwapContext function hooking method, respectively.

KR1020130050035A 2013-05-03 2013-05-03 Malicious Thread Handling System and Method KR101444141B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130050035A KR101444141B1 (en) 2013-05-03 2013-05-03 Malicious Thread Handling System and Method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130050035A KR101444141B1 (en) 2013-05-03 2013-05-03 Malicious Thread Handling System and Method

Publications (1)

Publication Number Publication Date
KR101444141B1 true KR101444141B1 (en) 2014-09-26

Family

ID=51761040

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130050035A KR101444141B1 (en) 2013-05-03 2013-05-03 Malicious Thread Handling System and Method

Country Status (1)

Country Link
KR (1) KR101444141B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102170737B1 (en) 2020-03-30 2020-10-27 국방과학연구소 Apparatus and method for tracking malicious threads
US12056239B2 (en) 2020-08-18 2024-08-06 Micro Focus Llc Thread-based malware detection

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100520788B1 (en) * 2003-06-03 2005-10-17 주식회사 안철수연구소 Device and Method For Detecting Malicious Thread
KR20110119918A (en) * 2010-04-28 2011-11-03 한국전자통신연구원 Apparatus, system and method for detecting malicious code injected with fraud into normal process
KR101206853B1 (en) * 2011-06-23 2012-11-30 주식회사 잉카인터넷 System and method for controlling network access

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100520788B1 (en) * 2003-06-03 2005-10-17 주식회사 안철수연구소 Device and Method For Detecting Malicious Thread
KR20110119918A (en) * 2010-04-28 2011-11-03 한국전자통신연구원 Apparatus, system and method for detecting malicious code injected with fraud into normal process
KR101206853B1 (en) * 2011-06-23 2012-11-30 주식회사 잉카인터넷 System and method for controlling network access

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102170737B1 (en) 2020-03-30 2020-10-27 국방과학연구소 Apparatus and method for tracking malicious threads
US12056239B2 (en) 2020-08-18 2024-08-06 Micro Focus Llc Thread-based malware detection

Similar Documents

Publication Publication Date Title
US12026257B2 (en) Method of malware detection and system thereof
JP5087661B2 (en) Malignant code detection device, system and method impersonated into normal process
CN102469146B (en) A kind of cloud security downloading method
TWI396995B (en) Method and system for cleaning malicious software and computer program product and storage medium
US20150310211A1 (en) Method, apparatus and system for detecting malicious process behavior
US10121004B2 (en) Apparatus and method for monitoring virtual machine based on hypervisor
CN103778375B (en) The apparatus and method for preventing user equipment from loading illegal dynamic link library file
JP2009129451A (en) Apparatus and method for detecting dynamic link library inserted by malicious code
US20120311709A1 (en) Automatic management system for group and mutant information of malicious codes
CN113158197B (en) SQL injection vulnerability detection method and system based on active IAST
CN201477598U (en) Terminal Trojan monitoring device
US20170277887A1 (en) Information processing apparatus, information processing method, and computer readable medium
CN116842531B (en) Code vaccine-based vulnerability real-time verification method, device, equipment and medium
KR101816751B1 (en) Apparatus and method for monitoring virtual machine based on hypervisor
KR20090075861A (en) On demand virus scan
JP2019514119A (en) Hybrid Program Binary Feature Extraction and Comparison
US20170126715A1 (en) Detection device, detection method, and detection program
KR101444141B1 (en) Malicious Thread Handling System and Method
CN105791250A (en) Application detection method and device
KR101327740B1 (en) apparatus and method of collecting action pattern of malicious code
CN112087414B (en) Detection method and device for mining Trojan
KR101725404B1 (en) Method and apparatus for testing web site
KR101270497B1 (en) System for collecting and analyzing mobile malware automatically
KR20150134172A (en) Apparatus and method for detecting malicious code
CN106843919B (en) Method and device for storing dex file

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20180917

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20190916

Year of fee payment: 6