KR101421630B1 - system and method for detecting code-injected malicious code - Google Patents

system and method for detecting code-injected malicious code Download PDF

Info

Publication number
KR101421630B1
KR101421630B1 KR1020130009219A KR20130009219A KR101421630B1 KR 101421630 B1 KR101421630 B1 KR 101421630B1 KR 1020130009219 A KR1020130009219 A KR 1020130009219A KR 20130009219 A KR20130009219 A KR 20130009219A KR 101421630 B1 KR101421630 B1 KR 101421630B1
Authority
KR
South Korea
Prior art keywords
code
malicious
malicious code
code injection
injection area
Prior art date
Application number
KR1020130009219A
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 KR1020130009219A priority Critical patent/KR101421630B1/en
Application granted granted Critical
Publication of KR101421630B1 publication Critical patent/KR101421630B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • G06F21/563Static detection by source code analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information

Abstract

The present invention relates to a system and a method for detecting a code-injected malicious code by extracting code-injected areas from memory areas of a plurality of executing processes and comparing the extracted code-injected areas with each other. The system for detecting the code-injected malicious code according to the present invention comprises: a process information collecting unit for collecting information on processes in execution in a computer system; a code injection area collecting unit for extracting executable code-injected areas per process from the process information collected in the process information collecting unit; and a code injection area comparison unit for comparing code injection areas collected per process with each other and determining the same code injection areas extracted from at least two or more processes as a suspicious malicious code.

Description

코드 인젝션된 악성코드 탐지 시스템 및 방법 {system and method for detecting code-injected malicious code}TECHNICAL FIELD The present invention relates to a malicious code detection system,

이 발명은 프로세스에 코드 인젝션된 악성코드를 탐지하는 시스템 및 방법에 관한 것으로서, 보다 상세하게는 다수의 실행 프로세스들의 메모리 영역에서 코드 인젝션 영역을 추출하고 추출된 코드 인젝션 영역들의 코드를 상호 비교하여 코드 인젝션된 악성코드를 탐지하는 시스템 및 방법에 관한 것이다.
The present invention relates to a system and a method for detecting a malicious code injected into a process, and more particularly, to a system and a method for detecting a malicious code injected into a process by extracting a code injection area from a memory area of a plurality of execution processes, And a system and method for detecting injected malicious code.

트로이 목마(trojan)나 제우스(Zeus)와 같은 악성 프로그램은 프로세스에 코드 인젝션(code injection)을 하여 악성 코드를 삽입하고, 그 코드 인젝션된 메모리 영역을 시작주소로 사용하는 스레드를 생성하며, 그 스레드가 구동하여 악성 코드에 대응하는 악의적인 행위를 수행한다. 최근 제우스 프로그램에 의해 사용자 컴퓨터에 삽입된 악성 코드가 컴퓨터에 저장된 은행 거래 계좌와 비밀번호 등의 금융 정보를 해커에게 유출시켜, 해커가 그 금융 정보를 이용하여 중소기업이나 지방자치단체 은행 계정에 접근, 현금을 인출하는 금융 사고가 발생한 바 있다. 이에 이러한 코드 인젝션 기반 악성 코드에 대응하기 위한 방안이 요구되고 있다.A malicious program such as a trojan or Zeus injects malicious code by code injection into the process and creates a thread that uses the code injected memory area as a start address, And executes a malicious action corresponding to the malicious code. Recently, the malicious code inserted into the user's computer by the Zeus program leaked the financial information such as the bank transaction account and the password stored in the computer to the hacker so that the hacker can access the bank account of the SME or the local government using the financial information, A financial crisis has occurred. Therefore, there is a demand for measures against malicious code based on code injection.

이러한 악성 프로그램은 끊임없이 스스로를 전파하기 위해 주기적으로 컴퓨터시스템의 신규 생성 프로세스에 악성코드를 인젝션하여 신규 생성 프로세스들이 끊임없이 감염된다. 또한, 해커들이 제우스 소스코드를 응용하여 다양한 신종 또는 변종의 악성 코드를 개발하여 유출시키고 있는 바, 다양한 신종 또는 변종의 악성 코드에 대한 시그니처를 모두 수집하기는 불가능하다.These malicious programs periodically inject malicious code into the computer system's new creation process in order to constantly propagate themselves, and new generation processes are constantly infected. In addition, it is impossible for hackers to collect all the signatures for various new or variant malicious codes because they are developing and releasing various new or variant malicious codes by applying Zeus source code.

일반적인 안티 바이러스 프로그램은 임의의 검사대상 프로그램의 시그니처와 악성 프로그램의 시그니처를 비교하여, 검사대상 프로그램이 악성인지를 결정한다. 그러나, 이러한 안티 바이러스 기술은 시그니처가 확보되지 않은 신종 또는 변종의 악성 코드를 검출할 수 없는 문제점이 있다. 특히, 트로이 목마나 제우스 같은 악성 프로그램은 변종들이 무수히 많기 때문에 시그니처 방식으로 검출하기는 매우 어렵다.A typical anti-virus program compares the signature of an arbitrary object program with the signature of a malicious program to determine whether the object program is malicious. However, such antivirus technology has a problem that it can not detect new or variant malicious codes for which a signature is not secured. In particular, malicious programs such as Trojan horses and Zeus are very difficult to detect using signature methods because of the myriad of variants.

이러한 문제점을 해결하기 위해, 선행특허 대한민국 공개특허 제2011-0119918호 "정상 프로세스에 위장 삽입된 악성코드 탐지 장치, 시스템 및 방법"에서는, 컴퓨터 시스템 상에서 실행중인 프로세스로부터 생성된 쓰레드 정보를 추출하여 상기 쓰레드와 연관된 코드를 식별하고, 상기 식별된 코드의 악성 여부를 추정하여 상기 악성으로 추정된 코드를 추출하는 악성코드 탐지모듈과, 상기 추출된 코드를 가상 환경에서 실행하여 행위를 분석한 결과에 기반하여 상기 코드를 악성코드로 최종 판단하고 상기 코드의 실행을 강제 종료하는 악성코드 강제 종료모듈을 포함한 악성코드 탐지 시스템이 제안되었다.In order to solve such a problem, in prior art Korean Patent Laid-Open Publication No. 2011-0119918 entitled " Apparatus, system and method for detecting malicious code embedded in a normal process, the thread information generated from a process running on the computer system is extracted, A malicious code detection module that identifies a code associated with a thread and extracts the malicious code estimated by estimating malicious code of the identified code; and a malicious code detection module based on a result of analyzing the malicious code by executing the extracted code in a virtual environment And a malicious code forcibly terminating module for finally determining the code as a malicious code and forcibly terminating the execution of the code.

이러한 선행특허는 모든 프로세스에 코드 인젝션된 모든 코드에 의해 생성된 쓰레드에 대해 가상 환경에서 실행하여 행위 기반 분석을 하기 때문에 검출하기까지 시간이 오래 걸리는 문제점이 있다. 또한, 코드 인젝션된 정상적인 코드까지도 모두 악성으로 추정하기 때문에 불필요한 검사에 의해 컴퓨터 자원이 낭비되는 문제점이 있다.These prior patents have a problem that it takes a long time to detect a thread generated by all the code-injected codes in all processes because it is executed in a virtual environment to perform behavior-based analysis. In addition, since the normal code injected with code is also assumed to be malicious, computer resources are wasted due to unnecessary testing.

다른 선행특허로서, 본 출원의 출원인은 코드 인젝션 기반으로 동작하는 악성 프로그램에 대응하는 방법으로서, 대한민국 등록특허 제1206853호 "네트워크 접근 제어시스템 및 방법"에서, 프로세스의 메모리를 검사하여 코드 인젝션 영역을 기반으로 하는 스레드를 찾고, 네트워크 필터링을 수행하여 네트워크에 접근하는 네트워크 패킷을 탐지하며, 탐지된 네트워크 패킷의 통신 주체가 코드 인젝션 기반 스레드이면 탐지된 네트워크 패킷의 트래픽이 차단되도록 하는 기술을 제안하였다.As another prior patent, the applicant of the present application has proposed a method for responding to a malicious program operating on a code injection basis in Korean Patent Registration No. 1206853 entitled " Network Access Control System and Method " Based network, detecting network packets accessing the network by performing network filtering, and blocking traffic of detected network packets if the communication subject of the detected network packet is a code injection based thread.

그러나, 이 선행특허는 코드 인젝션된 악성 코드가 악의적인 행위를 하는 것을 검출하여 차단하는 것일 뿐, 코드 인젝션된 악성 코드를 찾아낼 수 없는 문제점이 있다.
However, this prior patent has a problem in that malicious code injected with code can be detected and blocked by malicious action, and malicious code injected with code can not be detected.

종래기술의 문제점을 해결하기 위하여 안출된 이 발명의 목적은, 트로이목마나 제우스와 같이 코드 인젝션 기반으로 감염되는 악성 코드를 간단하게 검출하여 수집하는 코드 인젝션된 악성코드 탐지 시스템 및 방법을 제공하기 위한 것이다.
SUMMARY OF THE INVENTION It is an object of the present invention, which has been devised to solve the problems of the prior art, to provide a code injected malicious code detection system and method for simply detecting and collecting malicious code infected with a code injection based on a Trojan horse or a Zeus will be.

상술한 목적을 달성하기 위한 이 발명에 따른 코드 인젝션된 악성코드 탐지 시스템은, 컴퓨터 시스템에서 실행중인 프로세스 정보를 수집하는 프로세스정보수집부와, 상기 프로세스정보수집부에서 수집된 프로세스 정보로부터 프로세스별로 실행 가능한 코드 인젝션 영역을 추출하는 코드인젝션영역수집부와, 상기 프로세스별로 수집된 코드 인젝션 영역을 상호 비교하여 적어도 둘 이상의 프로세스에서 추출된 동일한 코드 인젝션 영역을 의심악성코드로 판단하는 코드인젝션영역비교부를 포함한 것을 특징으로 한다.According to another aspect of the present invention, there is provided a code injection system for detecting a malicious code, comprising: a process information collection unit for collecting process information of a computer system, the process information being collected from the process information collection unit; A code injection area collecting unit for extracting a possible code injection area and a code injection area comparing unit for comparing the code injection areas collected for each process to determine a same code injection area extracted from at least two processes as a suspicious malicious code .

또한, 이 발명에 따른 코드 인젝션된 악성코드 탐지 방법은, 악성코드 탐지 시스템이 컴퓨터 시스템에서 실행중인 프로세스 정보를 수집하는 프로세스정보수집단계와, 상기 악성코드 탐지 시스템이 상기 프로세스정보수집단계에서 수집된 프로세스 정보로부터 프로세스별로 실행 가능한 코드 인젝션 영역을 추출하는 코드인젝션영역수집단계와, 상기 악성코드 탐지 시스템이 상기 프로세스별로 수집된 코드 인젝션 영역을 상호 비교하여 적어도 둘 이상의 프로세스에서 추출된 동일한 코드 인젝션 영역을 의심악성코드로 판단하는 코드인젝션영역비교단계를 포함한 것을 특징으로 한다.
In addition, a method of detecting a code-injected malicious code according to the present invention includes a process information collecting step of collecting process information being executed by a malicious code detection system in a computer system, a process information collection step of collecting process information collected in the process information collection step A code injection area collecting step of extracting an executable code injection area from the process information on a process-by-process basis; and a step of comparing the code injection areas collected by the malicious code detection system with the same code injection area extracted from at least two or more processes And a code injection area comparison step of determining the suspicious malicious code.

이상과 같이 이 발명에 따르면 컴퓨터 시스템에 실행중인 프로세스에 삽입된 코드 인젝션 영역의 동일 여부를 판단하여 의심악성코드를 추출하고, 해당 의심악성코드가 진짜 악성인지를 검증하기 때문에, 보다 정확하게 코드 인젝션된 악성코드를 탐지할 수 있고, 신종, 변종의 악성코드 소스를 수집할 수 있는 잇점이 있다.
As described above, according to the present invention, it is judged whether or not the code injection area inserted in the process executing in the computer system is the same or not to extract the suspicious malicious code, and it is verified whether or not the suspected malicious code is genuine malicious. It has the advantage of being able to detect malicious code and to collect new and variant malicious code sources.

도 1은 이 발명에 따른 코드 인젝션된 악성코드 탐지 시스템을 도시한 구성 블록도이다.
도 2는 이 발명에 따른 코드 인젝션된 악성코드 탐지 방법을 도시한 동작 흐름도이다.
1 is a block diagram illustrating a malicious code detection system according to the present invention.
2 is a flowchart illustrating a malicious code detection method according to the present invention.

이하, 첨부된 도면을 참조하며 이 발명에 따른 코드 인젝션된 악성코드 탐지 시스템 및 방법에 대해 보다 상세하게 설명한다.Hereinafter, a code injection malicious code detection system and method according to the present invention will be described in detail with reference to the accompanying drawings.

코드 인젝션 기반 악성 프로그램은 스스로를 전파하기 위해, 컴퓨터 시스템의 신규 생성 프로세스에 동일한 악성 코드를 인젝션한다. 즉, 악성 프로그램에 감염된 컴퓨터 시스템에는, 실행 프로세스들 중 다수의 프로세스들의 메모리 영역에 코드 인젝션 영역이 존재하며, 해당 코드 인젝션 영역에 동일한 코드가 저장된다. 이 발명은 이러한 악성 프로그램의 특징을 이용하여 프로세스에 코드 인젝션된 악성코드를 탐지하는 기술을 제안한다.Code injection-based malware injects the same malicious code into the computer system's new creation process to propagate itself. That is, in a computer system infected with a malicious program, a code injection area exists in a memory area of a plurality of processes among execution processes, and the same code is stored in the corresponding code injection area. The present invention proposes a technique for detecting malicious code that is code-injected into a process using the features of such a malicious program.

도 1은 이 발명에 따른 코드 인젝션된 악성코드 탐지 시스템을 도시한 구성 블록도이다.1 is a block diagram illustrating a malicious code detection system according to the present invention.

이 발명에 따른 코드 인젝션된 악성코드 탐지 시스템은, 컴퓨터 시스템에서 실행중인 프로세스 정보를 수집하는 프로세스정보수집부(21)와, 상기 프로세스정보수집부에서 수집된 프로세스에 코드 인젝션된 영역을 탐지하고 상기 코드 인젝션된 영역 중 코드 실행이 가능한 영역을 덤프파일로 추출하는 코드인젝션영역수집부(22)와, 상기 프로세스별로 수집된 덤프파일을 상호 비교하여 적어도 둘 이상 동일한 덤프파일을 의심악성코드로 판단하는 코드인젝션영역비교부(23)와, 상기 의심악성코드의 악성 여부를 검증하는 악성코드검증부(24)를 포함한다. 이 발명에 따른 코드 인젝션된 악성코드 탐지 시스템은, 프로세스정보수집부에서 수집된 프로세스 개수가 임계치 미만이면 페이크(fake) 프로세스를 생성하고 생성된 페이크 프로세스 정보를 상기 코드인젝션영역수집부(22)에게 제공하는 페이크프로세스생성부를 더 포함한다.The code-injected malicious code detection system according to the present invention comprises: a process information collection unit (21) for collecting process information which is being executed in a computer system; a code information detection unit A code injection area collecting unit 22 for extracting a code executionable area of the code injected area as a dump file, and a dump file collecting unit 22 for comparing the collected dump files with each other to determine at least two identical dump files as suspicious malicious codes A code injection area comparison unit 23, and a malicious code verification unit 24 for verifying whether or not the suspicious malicious code is malicious. The malicious code detection system according to the present invention generates a fake process if the number of processes collected by the process information collection unit is less than a threshold value and sends the generated fake process information to the code injection area collection unit 22 And a fake process generation unit for providing the fake process.

프로세스정보수집부(21)는 컴퓨터에서 실행중인 프로세스에 대해 프로세스별로 프로세스구조체를 수집함으로써 프로세스 정보를 수집한다. 프로세스정보수집부(21)가 프로세스별 프로세스 정보를 수집하는 방법으로는, psapi.dll의 EnumProcesses 함수를 사용하여 프로세스를 열거하고 각 프로세스별 프로세스구조체를 수집하는 방법, ZwQuerySystemInformation 함수를 사용하여 프로세스 정보를 획득하여 프로세스별 프로세스구조체를 수집하는 방법, 커널 전역변수인 PspCidTable을 조사하여 프로세스별 프로세스구조체(EProcess)를 수집하는 방법, 커널 전역변수인 PspCidTable을 조사하여 스레드구조체(EThread)를 수집한 후 스레드구조체(EThread)의 프로세스 멤버를 통해서 프로세구조체(EProcess)를 수집하는 방법, 임의의 프로세스의 프로세스구조체(EProcess)의 핸들테이블(HandleTable)을 검사하여 나머지 프로세스별 프로세스구조체(EProcess)를 수집하는 방법, 실행된 프로세스를 관리하는 csrss.exe의 내부 프로세스 정보항목을 수집하는 방법, 프로세스구조체(EProcess)의 메모리 상주 패턴으로 메모리스캔을 통해 프로세스별 프로세스구조체(EProcess)를 수집하는 방법, 스레드구조체(EThread)의 메모리 상주 패턴으로 메모리스캔을 통해 스레드별 스레드구조체(EThread)를 수집한 후 수집된 스레드구조체(EThread)의 프로세스 멤버를 통해서 프로세스별 프로세스구조체(EProcess)를 수집하는 방법 등 다양한 방법이 포함된다.The process information collecting unit 21 collects process information by collecting process structures on a process-by-process basis for processes running on the computer. The process information collecting unit 21 collects process information for each process by enumerating the processes using the EnumProcesses function of psapi.dll and collecting the process structures for each process and the process information using the ZwQuerySystemInformation function (EThread) is collected by examining the kernel global variable PspCidTable, and then the thread structure (EThread) is collected. The process structure A method for collecting a process structure (EProcess) through a process member of an EThread, a method for collecting a process structure (EProcess) for the remaining processes by examining a handle table (HandleTable) of a process structure (EProcess) Internal process information of csrss.exe that manages the executed process A method for collecting process-specific process structures (EProcess) through a memory scan in a memory-resident pattern of a process structure (EProcess), a method for collecting a thread-specific thread structure (EThread), and collecting process-specific process structures (EProcess) through process members of the collected thread structure (EThread).

코드인젝션영역수집부(22)는 프로세스정보수집부(21)에서 수집된 각 프로세스에서 코드 인젝션된 영역을 탐지한다. 코드인젝션영역수집부(22)는 프로세스에 할당된 가상주소공간 정보를 수집하는 가상주소공간정보수집부(22a)와, 수집된 가상주소공간에 코드 인젝션 여부를 조사하는 가상주소공간조사부(22b)를 포함한다.The code injection area collecting unit 22 detects a code injected area in each process collected by the process information collecting unit 21. [ The code injection area collecting unit 22 includes a virtual address space information collecting unit 22a for collecting virtual address space information allocated to the process, a virtual address space examining unit 22b for examining whether the code is injected into the collected virtual address space, .

가상주소공간정보수집부(22a)가 프로세스에 할당된 가상주소공간 정보를 수집하는 방법으로는, 커널레벨(Kernel Level)에서 프로세스구조체(EProcess)의 배드루트(VadRoot) 멤버를 검사하는 방법과, 유저레벨(User Level)에서 VirtualQueryEx 함수 사용하는 방법이 있다. 가상주소공간정보수집부(22a)가 프로세스에 할당된 가상주소공간 정보를 수집하는 방법은 본 출원인의 등록특허 제10-1206853호에 상세하게 설명되어 있다.A method for collecting virtual address space information allocated to a process by the virtual address space information collecting unit 22a includes a method of inspecting a bad root member of a process structure (EProcess) at a kernel level, There is a way to use the VirtualQueryEx function at the user level. A method for collecting the virtual address space information allocated to the process by the virtual address space information collecting unit 22a is described in detail in the applicant's patent No. 10-1206853.

가상주소공간조사부(22b)는 가상주소공간정보수집부(22a)에서 수집한 각 가상주소공간의 속성 정보를 이용하여 해당 가상주소공간에 코드 인젝션(code injection)이 되어 있는지를 조사한다. 프로세스에 정상적으로 삽입되어 로드되는 DLL 파일의 경우, 그 DLL 파일에 할당된 가상주소공간의 메모리타입은 매핑 타입(Mapped Type)이고, 프로텍트 플래그값은 실행가능(executable)이다. 한편, 프로세스에 코드 인젝션된 경우, 그 코드 인젝션된 가상주소공간의 메모리타입은 프라이빗 타입(Private Type)이고 프로텍트 플래그값은 실행가능(executable)이다.The virtual address space investigation unit 22b checks whether code injection is performed in the corresponding virtual address space using the attribute information of each virtual address space collected by the virtual address space information collection unit 22a. In the case of a DLL file that is normally inserted and loaded into a process, the memory type of the virtual address space allocated to the DLL file is a mapped type, and the protection flag value is executable. On the other hand, when the code is injected into the process, the memory type of the code-injected virtual address space is a private type, and the protection flag value is executable.

따라서, 가상주소공간조사부(22b)는 프로세스에 할당된 가상주소공간들 중 메모리타입이 매핑 타입이 아니라 프라이빗 타입(Private type)이고, 프로텍트 플래그값이 실행가능(executable)이면, 해당 가상주소공간을 코드 인젝션 영역으로 판단한다. 가상주소공간조사부(22b)는 실행 가능한 코드 인젝션 영역으로 판단된 가상주소공간을 덤프파일로 저장한다.Therefore, if the memory type of the virtual address space allocated to the process is a private type, not a mapping type, and the protection flag value is executable, the virtual address space investigation unit 22b searches the corresponding virtual address space Code injection area. The virtual address space investigation unit 22b stores the virtual address space determined as the executable code injection area as a dump file.

제우스와 같은 악성 프로그램은 임의의 정상 프로세스에 둘 이상의 코드 인젝션을 수행할 수도 있다. 이중 하나는 실제 악성코드가 인젝션된 영역이고 나머지 하나는 악성코드가 인젝된 영역이 모니터링되지 않도록 하기 위한 후킹 우회 코드 영역이다. 따라서, 코드인젝션영역수집부(22)는 하나의 프로세스에 대해 둘 이상의 코드 인젝션 영역별 덤프파일을 저장할 수 있다.A malicious program such as Zeus may perform more than one code injection in any normal process. One is the area where the actual malicious code is injected, and the other is the hooking bypass code area so that the area where the malicious code is injected is not monitored. Therefore, the code injection area collecting unit 22 can store more than one code injection area specific dump file for one process.

코드인젝션영역비교부(23)는, 코드인젝션영역수집부(22)에서 수집된 덤프파일들을 비교하여 동일한 덤프파일을 찾는다. 여기서, 두 덤프파일이 동일하다 함은 모든 코드가 일치함을 의미하지는 않는다. 이 발명에서는 덤프파일에 대해, 파일 포맷 분석에 의해 모든 섹션 영역을 찾고, 찾아진 섹션(Section) 영역 중 기설정된 특정 조건을 만족하는 섹션 영역, 즉, 메모리 속성이 실행가능(execute)이면서 쓰기(write)가 가능하지 않은 섹션 영역을 찾고, 찾아진 특정 조건의 섹션 영역의 크기가 동일하고, 해당 섹션의 데이터 해쉬값이 동일하면 두 덤프파일이 일치한 것으로 판단한다.The code injection area comparison unit 23 compares the dump files collected by the code injection area collection unit 22 to find the same dump file. Here, the fact that the two dump files are the same does not mean that all the codes match. According to the present invention, in the dump file, all the section areas are searched by file format analysis, and a section area that satisfies a predetermined specific condition among the searched section areas, that is, write can not be performed, and if the size of the section area of the specific condition searched is the same and the data hash value of the section is the same, it is determined that the two dump files match.

둘 이상의 프로세스에서 동일한 덤프파일이 찾아지면, 그 찾아진 덤프파일에 대응하는 코드 인젝션 영역을 의심악성코드로 설정한다. 실행중인 프로세스에 대해 실행가능한 코드 인젝션 영역을 덤프파일로 저장하지 않고, 직접 비교하여 의심악성코드를 찾을 수도 있다.If the same dump file is found in more than one process, the code injection area corresponding to the found dump file is set to suspicious malicious code. It is possible to directly compare suspicious malicious code without directly storing the executable code injection area for a running process as a dump file.

앞서 언급하였듯이 제우스와 같은 악성 프로그램은 임의의 정상 프로세스에 둘 이상의 코드 인젝션을 수행할 수도 있는데, 이중 하나만이 실제 악성코드가 인젝션된 영역이다. 그러나, 코드인젝션영역비교부(23)에 따르면 나머지 코드 인젝션 영역도 의심악성코드로 추출된다.As mentioned earlier, a malicious program such as Zeus may execute more than one code injection in any normal process, only one of which is the area where the actual malicious code is injected. However, according to the code injection area comparison unit 23, the remaining code injection area is also extracted as a suspicious malicious code.

악성코드검증부(24)는 추출된 의심악성코드가 진짜 악성인지 검증하는 작업을 수행한다. 예컨대, 의심악성코드에 악성코드 특징 문자열이 존재하는지를 검증하여 악성인지를 검증할 수도 있고, 의심악성코드의 행위를 분석하여 악의적인 행위를 하는지를 검증할 수도 있다.The malicious code verification unit 24 performs a task of verifying whether the suspected malicious code extracted is genuine or malicious. For example, the malicious code may be verified by verifying that the malicious code character string exists in the suspicious malicious code, or the malicious code may be verified by analyzing the malicious code.

한편, 이 발명에 따라 코드 인젝션된 악성코드를 탐지하려면, 컴퓨터 시스템에서 실행중인 프로세스의 개수가 일정 개수 이상이어야 한다. 즉, 실행중인 프로세스들의 코드 인젝션 영역을 상호 비교하여 의심악성코드 영역을 찾기 때문에, 컴퓨터 시스템에서 실행중인 프로세스의 개수가 임계치 이하인 경우에는 의심악성코드 영역을 찾지 못할 수도 있다.Meanwhile, in order to detect malicious code injected according to the present invention, the number of processes executing in the computer system must be more than a certain number. That is, if the number of processes executing in the computer system is below the threshold value, the suspicious malicious code region may not be found because the code injection regions of the executing processes are compared with each other to find the suspicious malicious code region.

따라서, 페이크프로세스생성부(25)는 프로세스정보수집부(21)에서 수집된 실행 프로세스의 개수가 임계치 미만이면 페이크프로세스를 생성하고 그 생성된 페이크 프로세스 정보를 코드인젝션영역수집부(22)에게 제공한다. 페이크프로세스생성부(25)가 페이크 프로세스를 생성하면, 악성 프로그램이 그 페이크 프로세스에도 악성 코드를 코드 인젝션하기 때문에, 코드인젝션영역수집부(22)는 나머지 실행 프로세스의 코드 인젝션 영역 뿐만 아니라 페이크 프로세스의 코드 인젝션 영역도 수집한다. 이로 인해, 코드인젝션영역비교부(23)에서 상호 비교되는 코드 인젝션 영역(덤프파일)의 개수가 많아져서 보다 정확하게 의심악성코드를 찾아낼 수 있다.Accordingly, if the number of execution processes collected by the process information collection unit 21 is less than the threshold value, the fake process generation unit 25 generates a fake process and provides the generated fake process information to the code injection area collection unit 22 do. When the fake process generation unit 25 generates a fake process, the malicious program codes malicious code into the fake process. Therefore, the code injection area collection unit 22 not only detects the code injection area of the remaining execution process, Also collect code injection area. As a result, the number of code injection areas (dump files) to be compared with each other in the code injection area comparison unit 23 increases, and the suspicious malicious code can be detected more accurately.

도 2는 이 발명에 따른 코드 인젝션된 악성코드 탐지 방법을 도시한 동작 흐름도이다.2 is a flowchart illustrating a malicious code detection method according to the present invention.

악성코드 탐지 시스템은 컴퓨터 시스템에서 실행중인 프로세스의 정보를 수집한다(S21). 실행중인 프로세스의 개수가 임계치 이상이 아니면(S22), 페이크 프로세스를 생성한다(S23).The malicious code detection system collects information of a process running in the computer system (S21). If the number of executing processes is not equal to or greater than the threshold value (S22), a fake process is generated (S23).

단계 S22에서 실행중인 프로세스의 개수가 임계치 이상이거나 단계 S23에서 페이크 프로세스를 생성한 후, 페이크 프로세스를 포함하여 실행중인 프로세스로부터 실행가능한 코드 인젝션 영역을 수집한다(S24).In step S22, the number of executing processes is equal to or greater than the threshold, or after generating the fake process in step S23, the executable code injection area is collected from the executing process including the fake process (S24).

다음, 수집된 코드 인젝션 영역을 상호 비교하는데, 코드 인젝션 영역 중 실행가능하고 쓰기가 되지 않은 섹션 영역의 크기 및 데이터 해쉬값을 추출하여 상호 비교한다(S25).Next, the collected code injection areas are compared with each other, and the sizes and data hash values of executable and non-writable section areas in the code injection area are extracted and compared (S25).

단계 S25의 비교 결과, 동일한 코드 인젝션 영역이 존재하면(S26), 그 동일한 코드 인젝션 영역을 의심악성코드로 설정한다(S27). 마지막으로, 단계 S27에서 의심악성코드로 설정된 코드 인젝션 영역이 악성인지를 검증한다(S28).As a result of the comparison in step S25, if the same code injection area exists (S26), the same code injection area is set as a suspicious malicious code (S27). Finally, in step S27, it is verified whether the code injection area set as the suspicious malicious code is malicious (S28).

이상에서 본 발명에 대한 기술사상을 첨부도면과 함께 서술하였지만, 이는 본 발명의 가장 양호한 실시예를 예시적으로 설명한 것이지 본 발명을 한정하는 것은 아니다. 또한, 이 기술분야의 통상의 지식을 가진 자라면 누구나 본 발명의 기술사상의 범주를 이탈하지 않는 범위 내에서 다양한 변형 및 모방이 가능함은 명백한 사실이다.
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 a matter of course that various modifications and variations are possible without departing from the scope of the technical idea of the present invention by anyone having ordinary skill in the art.

21 : 프로세스정보수집부 22 : 코드인젝션영역수집부
22a : 가상주소공간정보수집부 22b : 가상주소공간조사부
23 : 코드인젝션영역비교부 24 : 악성코드검증부
25 : 페이크프로세스생성부
21: Process information collecting part 22: Code injection area collecting part
22a: virtual address space information collecting unit 22b: virtual address space inquiring unit
23: code injection area comparison unit 24: malicious code verification unit
25: Fake process generation unit

Claims (13)

컴퓨터 시스템에서 실행중인 적어도 둘 이상의 프로세스들에 관한 정보를 수집하는 프로세스정보수집부와,
상기 프로세스정보수집부에서 수집된 상기 적어도 둘 이상의 프로세스들에 관한 정보를 이용하여 상기 적어도 둘 이상의 프로세스들로부터 각각 실행 가능한 코드 인젝션 영역을 추출하는 코드인젝션영역수집부와,
상기 적어도 둘 이상의 프로세스들로부터 추출된 적어도 둘 이상의 코드 인젝션 영역을 상호 비교하여 동일하면 상기 코드 인젝션 영역의 코드를 의심악성코드로 판단하는 코드인젝션영역비교부를 포함한 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 시스템.
A process information collecting unit for collecting information about at least two processes executing in the computer system,
A code injection region collecting unit for extracting executable code injection regions from the at least two processes using information about the at least two processes collected by the process information collecting unit,
And a code injection area comparison unit for comparing at least two or more code injection areas extracted from the at least two processes to determine a code of the code injection area as a suspicious malicious code if they are the same, system.
제 1 항에 있어서, 상기 프로세스정보수집부에서 수집된 프로세스 개수가 임계치 미만이면 페이크 프로세스를 생성하는 페이크프로세스생성부를 더 포함한 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 시스템.The system according to claim 1, further comprising a fake process generation unit for generating a fake process when the number of processes collected by the process information collection unit is less than a threshold value. 제 1 항에 있어서, 상기 코드인젝션영역수집부는 상기 프로세스별로 할당된 가상주소공간 정보를 수집하는 가상주소공간정보수집부와, 상기 수집된 가상주소공간에 코드 인젝션 여부를 조사하는 가상주소공간조사부를 포함한 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 시스템.2. The system according to claim 1, wherein the code injection area collector comprises: a virtual address space information collection unit for collecting virtual address space information allocated for each process; and a virtual address space investigation unit for checking whether code is injected into the collected virtual address space Wherein the malicious code detection system comprises: 제 1 항에 있어서, 상기 코드인젝션영역수집부에서 추출된 코드 인젝션 영역을 덤프파일로 저장하는 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 시스템.The code injection system according to claim 1, wherein the code injection area extracted by the code injection area collecting unit is stored as a dump file. 제 1 항에 있어서, 상기 코드인젝션영역비교부는 상기 적어도 둘 이상의 코드 인젝션 영역에 대해 기설정된 조건의 섹션 영역의 크기 및 데이터 해쉬값이 같으면 상기 적어도 둘 이상의 코드 인젝션 영역이 동일하다고 판단하는 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 시스템.The code injection system according to claim 1, wherein the code injection area comparison unit determines that the at least two code injection areas are the same if the size and the data hash value of the section area of the predetermined condition are equal to the at least two code injection areas Code injection malware detection system. 제 1 항에 있어서, 상기 의심악성코드의 악성 여부를 검증하는 악성코드검증부를 더 포함한 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 시스템.The malicious code detection system according to claim 1, further comprising a malicious code verification unit for verifying whether or not the suspicious malicious code is malicious. 제 6 항에 있어서, 상기 악성코드검증부는 상기 의심악성코드에 악성코드 특징 문자열이 포함되는지를 검증하는 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 시스템.The malicious code detection system of claim 6, wherein the malicious code verification unit verifies whether the malicious code characteristic string is included in the suspected malicious code. 제 6 항에 있어서, 상기 악성코드검증부는 상기 의심악성코드의 행위가 악성인지를 검증하는 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 시스템.The malicious code detection system of claim 6, wherein the malicious code verification unit verifies whether the malicious code is malicious. 악성코드 탐지 시스템이 컴퓨터 시스템에서 실행중인 적어도 둘 이상의 프로세스들에 관한 정보를 수집하는 프로세스정보수집단계와,
상기 악성코드 탐지 시스템이 상기 프로세스정보수집단계에서 수집된 상기 적어도 둘 이상의 프로세스들에 관한 정보를 이용하여 상기 적어도 둘 이상의 프로세스들로부터 각각 실행 가능한 코드 인젝션 영역을 추출하는 코드인젝션영역수집단계와,
상기 악성코드 탐지 시스템이 상기 적어도 둘 이상의 프로세스들로부터 추출된 적어도 둘 이상의 코드 인젝션 영역을 상호 비교하여 동일하면 상기 코드 인젝션 영역의 코드를 의심악성코드로 판단하는 코드인젝션영역비교단계를 포함한 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 방법.
A malicious code detection system includes a process information collection step of collecting information on at least two processes executing in the computer system,
A code injection area collecting step of extracting an executable code injection area from each of the at least two processes using information on the at least two processes collected by the malicious code detection system in the process information collection step;
And a code injection area comparison step of comparing the code injection areas extracted from the at least two processes with each other to determine a code of the code injection area as a suspicious malicious code if the malicious code detection system is the same, Code injection malware detection.
제 9 항에 있어서, 상기 악성코드 탐지 시스템이 코드인젝션영역비교단계에서 판단된 상기 의심악성코드의 악성 여부를 검증하는 악성코드검증단계를 더 포함한 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 방법.The method of claim 9, further comprising a malicious code verification step of verifying whether the suspicious malicious code determined in the code injection area comparison step is malicious. 제 9 항에 있어서, 상기 악성코드 탐지 시스템이 상기 프로세스정보수집단계에서 수집된 프로세스 개수가 임계치 미만이면 페이크 프로세스를 생성하는 페이크프로세스생성단계를 더 포함한 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 방법.10. The method of claim 9, further comprising a fake process generation step of generating a fake process when the number of processes collected in the process information collection step of the malicious code detection system is less than a threshold value. 제 9 항에 있어서, 상기 악성코드 탐지 시스템이 상기 코드인젝션영역수집단계에서 추출된 코드 인젝션 영역을 덤프파일로 저장하는 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 방법.10. The method of claim 9, wherein the malicious code detection system stores the code injection area extracted in the code injection area collection step as a dump file. 제 9 항에 있어서, 상기 코드인젝션영역비교단계는 상기 적어도 둘 이상의 코드 인젝션 영역에 대해 기설정된 조건의 섹션 영역의 크기 및 데이터 해쉬값이 같으면, 상기 적어도 둘 이상의 코드 인젝션 영역이 동일하다고 판단하는 것을 특징으로 하는 코드 인젝션된 악성코드 탐지 방법.The method as claimed in claim 9, wherein the code injection area comparison step determines that at least two or more code injection areas are equal if the size and the data hash value of the section area of the predetermined conditions are equal to the at least two code injection areas Characterized by code-injected malicious code detection.
KR1020130009219A 2013-01-28 2013-01-28 system and method for detecting code-injected malicious code KR101421630B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130009219A KR101421630B1 (en) 2013-01-28 2013-01-28 system and method for detecting code-injected malicious code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130009219A KR101421630B1 (en) 2013-01-28 2013-01-28 system and method for detecting code-injected malicious code

Publications (1)

Publication Number Publication Date
KR101421630B1 true KR101421630B1 (en) 2014-07-22

Family

ID=51742690

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130009219A KR101421630B1 (en) 2013-01-28 2013-01-28 system and method for detecting code-injected malicious code

Country Status (1)

Country Link
KR (1) KR101421630B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101732972B1 (en) 2015-11-30 2017-05-08 인하대학교 산학협력단 Method for Detecting C and C Zeus Based on Windows API Hooking and Zeus Packet Length

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101057432B1 (en) 2010-02-23 2011-08-22 주식회사 이세정보 System, method, program and recording medium for detection and blocking the harmful program in a real-time throught behavior analysis of the process
KR101097590B1 (en) 2011-07-15 2011-12-22 오영광 Method for defending against dll injection without hooking
KR101122650B1 (en) 2010-04-28 2012-03-09 한국전자통신연구원 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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101057432B1 (en) 2010-02-23 2011-08-22 주식회사 이세정보 System, method, program and recording medium for detection and blocking the harmful program in a real-time throught behavior analysis of the process
KR101122650B1 (en) 2010-04-28 2012-03-09 한국전자통신연구원 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
KR101097590B1 (en) 2011-07-15 2011-12-22 오영광 Method for defending against dll injection without hooking

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101732972B1 (en) 2015-11-30 2017-05-08 인하대학교 산학협력단 Method for Detecting C and C Zeus Based on Windows API Hooking and Zeus Packet Length

Similar Documents

Publication Publication Date Title
US10055585B2 (en) Hardware and software execution profiling
KR101122650B1 (en) Apparatus, system and method for detecting malicious code injected with fraud into normal process
CN103886252B (en) Software Code Malicious Selection Evaluation Executed In Trusted Process Address Space
KR102160659B1 (en) Detection of anomalous program execution using hardware-based micro-architectural data
RU2522019C1 (en) System and method of detecting threat in code executed by virtual machine
KR101174751B1 (en) Malware auto-analysis system and method using kernel call-back mechanism
US8627478B2 (en) Method and apparatus for inspecting non-portable executable files
KR101720686B1 (en) Apparaus and method for detecting malcious application based on visualization similarity
JP5265061B1 (en) Malicious file inspection apparatus and method
US20130152200A1 (en) Predictive Heap Overflow Protection
US10826919B2 (en) Methods and cloud-based systems for protecting devices from malwares
Kumara et al. Automated multi-level malware detection system based on reconstructed semantic view of executables using machine learning techniques at VMM
Shan et al. Growing grapes in your computer to defend against malware
CN101964026A (en) Method and system for detecting web page horse hanging
Rhee et al. Data-centric OS kernel malware characterization
CN105760787A (en) System and method used for detecting malicious code of random access memory
Pandey et al. Performance of malware detection tools: A comparison
GB2510701A (en) Detecting malware code injection by determining whether return address on stack thread points to suspicious memory area
US11263307B2 (en) Systems and methods for detecting and mitigating code injection attacks
Reeves Autoscopy Jr.: Intrusion detection for embedded control systems
KR101421630B1 (en) system and method for detecting code-injected malicious code
KR101880689B1 (en) Apparatus and method for detecting malicious code
Garcia-Cervigon et al. Browser function calls modeling for banking malware detection
Lu et al. Kernel vulnerability analysis: A survey
Muthumanickam CoPDA: concealed process and service discovery algorithm to reveal rootkit footprints

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

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20190715

Year of fee payment: 6