KR101013417B1 - Method for detecting hidden malicious code by using network information - Google Patents

Method for detecting hidden malicious code by using network information Download PDF

Info

Publication number
KR101013417B1
KR101013417B1 KR1020080044516A KR20080044516A KR101013417B1 KR 101013417 B1 KR101013417 B1 KR 101013417B1 KR 1020080044516 A KR1020080044516 A KR 1020080044516A KR 20080044516 A KR20080044516 A KR 20080044516A KR 101013417 B1 KR101013417 B1 KR 101013417B1
Authority
KR
South Korea
Prior art keywords
network information
driver
function
tcpip
hooking
Prior art date
Application number
KR1020080044516A
Other languages
Korean (ko)
Other versions
KR20090118618A (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 KR1020080044516A priority Critical patent/KR101013417B1/en
Publication of KR20090118618A publication Critical patent/KR20090118618A/en
Application granted granted Critical
Publication of KR101013417B1 publication Critical patent/KR101013417B1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals

Abstract

네트워크 정보를 이용하여 은폐형 악성코드를 검출하는 방법은, 유저 레벨에서 네트워크 정보를 얻기 위한 어플리케이션을 구동시키는 단계와 커널 레벨에서 TCPIP 드라이버의 함수를 후킹하는 후킹 드라이버를 구동시키는 단계와 어플리케이션에 의해 네트워크 정보 획득 함수를 호출하고 네트워크 정보를 획득하는 단계와 TCPIP 드라이버의 함수를 후킹하여 원본 네트워크 정보를 획득하는 단계와 어플리케이션에 의해 획득한 네트워크 정보와 TCPIP 드라이버의 함수를 후킹하여 획득한 원본 네트워크 정보를 비교하는 단계와 유저 레벨에서 구동된 어플리케이션에 의해 획득한 네트워크 정보와 TCPIP 드라이버의 함수를 후킹하여 획득한 원본 네트워크 정보가 서로 다를 경우, TCPIP 드라이버의 함수를 후킹하여 획득한 원본 네트워크 정보를 통하여 은폐형 악성코드의 프로세스 및 포트를 추출하는 단계를 포함하여 구성된다.A method for detecting concealed malware using network information includes driving an application for obtaining network information at the user level, and driving a hooking driver for hooking a function of the TCPIP driver at the kernel level and the network by the application. Calling an information acquisition function and acquiring network information, acquiring the original network information by hooking a function of the TCPIP driver, and comparing the network information obtained by the application with the original network information obtained by hooking a function of the TCPIP driver. If the network information acquired by the application run at the user level and the original network information obtained by hooking the function of the TCPIP driver are different from each other, the original network information obtained by hooking the function of the TCPIP driver is concealed. It is configured to include an extracting process and the port of the infection.

은폐형 악성코드, 네트워크, TCPIP Stealth Malware, Network, TCPIP

Description

네트워크 정보를 이용한 은폐형 악성코드 검출 방법 {METHOD FOR DETECTING HIDDEN MALICIOUS CODE BY USING NETWORK INFORMATION}How to detect concealed malware using network information {METHOD FOR DETECTING HIDDEN MALICIOUS CODE BY USING NETWORK INFORMATION}

본 발명은 은폐형 악성코드를 검출하기 위한 방법에 관한 것으로서, 보다 자세하게는 유저레벨에서 얻은 네트워크 정보와 커널 레벨에서 TCPIP 드라이버를 후킹하여 얻은 네트워크 정보를 비교하여 은폐형 악성코드를 검출하는 방법에 관한 것이다.The present invention relates to a method for detecting concealed malware, and more particularly, to a method for detecting concealed malware by comparing network information obtained at the user level with network information obtained by hooking the TCPIP driver at the kernel level. will be.

컴퓨터와 인터넷의 비약적인 발달은 경제, 사회, 문화 등 거의 모든 인간의 활동에 있어서 커다란 변화와 편리함을 가져다 주었다. 인터넷의 발달로 인하여, 인간의 모든 삶의 모습은 매우 빠른 속도로 변화해 가고 있다. 이제는 은행 업무를 직접 은행을 방문하지 않더라도 볼 수 있게 되었고, 안방에서 마우스 클릭 만으로도 모든 주식 거래도 할 수 있게 되었으며, 신용카드만 있으면 인터넷 쇼핑을 컴퓨터 앞에서 자유롭게 할 수 있으며, 이메일, 메신저 등을 통하여 각종 서신 교환, 정보 전달을 할 수 있게 되었다.The rapid development of computers and the Internet has brought great change and convenience in almost all human activities, including economy, society, and culture. Due to the development of the Internet, all aspects of human life are changing at a very rapid pace. Now you can view banking business even if you do not visit the bank directly, you can trade all stocks with a click of a mouse in the room, and you can freely shop online in front of your computer with a credit card. Correspondence and information can be delivered.

하지만, 컴퓨터와 인터넷의 눈부신 발전의 이면에는 컴퓨터 바이러스, 악성 코드 등으로 인하여 피해를 입는 경우도 많이 나타나고 있다. 이러한 바이러스나 악성코드 등은 특정 서버나 컴퓨터 시스템에 침입하여 타인의 시스템을 마비시키거나 타인이 소유하고 있는 정보에 심각한 손상을 입히기도 하며, 중요한 정보 등을 빼내기도 한다. However, behind the remarkable development of computers and the Internet, there are many cases of being damaged by computer viruses and malware. These viruses or malware can invade specific servers or computer systems, paralyze others' systems, cause serious damage to information owned by others, or extract important information.

이러한 악성코드 등을 방어하기 위하여 종래에는 악성코드가 사용하는 시스템 리소스를 추적하여 악성코드의 침입을 막는 방법이 사용되었지만, 근래에는 시스템 리소스 추적만으로 검출할 수 없는 악성코드 들이 등장하고 있다. Conventionally, in order to defend against such malicious codes, a method of preventing intrusion of malicious codes by tracking system resources used by malicious codes has been used. Recently, malicious codes that cannot be detected only by tracking system resources have appeared.

여러가지 컴퓨터 관련 악성코드 중 프로세스, 레지스트리, 파일, 네트워크 등의 시스템 리소스 사용을 알 수 없도록 은닉하는 기능을 가진 악성코드를 은폐형 악성코드라고 한다. 특히, 은폐형 악성 코드는 자신의 프로세스를 숨겨서 사용자로 하여금 악성코드 감염 여부를 알 수 없도록 하여 감염된 시스템 사용자의 개인 정보를 수집하거나, 대량의 스팸 메일을 특정 서버로 보내는 등의 해악을 끼친다. Among the various computer-related malware, malicious code with the function of concealing the use of system resources such as process, registry, file, network, etc. is called concealed malware. In particular, the concealed malicious code hides its own process so that the user cannot know whether the malicious code is infected, so as to collect personal information of the infected system user or send a large amount of spam mail to a specific server.

지금까지, 파일, 레지스트리 등의 악성 코드 정보를 검출하여 악성코드에 감염된 컴퓨터를 치료하는 프로그램 등은 현재 많이 알려져 있으나, 악성코드가 자신의 프로세스 및 네트워크 사용을 은폐하는 경우 이를 발견하여 차단하는 대책은 아직까지 존재하지 않는 실정이다.Until now, programs that detect malicious code information such as files and registries and repair computers infected with malware have been widely known, but measures to detect and block malicious codes when they conceal their processes and network use are It does not exist yet.

본 발명은 상기와 같은 문제점을 해결되기 위하여 안출된 것으로서, 네트워크 정보를 원천적으로 파악하여 은폐형 악성코드를 근본적으로 검출하여 차단할 수 있도록 하는 방법을 제공하는 데에 그 목적이 있다.The present invention has been made to solve the above problems, and has an object of the present invention to provide a method for fundamentally detecting concealed malware by blocking network information.

본 발명의 목적들은 이상에서 언급한 목적들로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.The objects of the present invention are not limited to the above-mentioned objects, and other objects that are not mentioned will be clearly understood by those skilled in the art from the following description.

상기와 같은 목적을 달성하기 위하여 본 발명의 실시예에 따른 네트워크 정보를 이용하여 은폐형 악성코드를 검출하는 방법은, 유저 레벨에서 네트워크 정보를 얻기 위한 어플리케이션을 구동시키는 단계와 커널 레벨에서 TCPIP 드라이버의 함수를 후킹하는 후킹 드라이버를 구동시키는 단계와 어플리케이션에 의해 네트워크 정보 획득 함수를 호출하고 네트워크 정보를 획득하는 단계와 TCPIP 드라이버의 함수를 후킹하여 원본 네트워크 정보를 획득하는 단계와 유저 레벨에서 구동된 어플리케이션에 의해 획득한 네트워크 정보와 TCPIP 드라이버의 함수를 후킹하여 획득한 원본 네트워크 정보를 비교하는 단계와 유저 레벨에서 구동된 어플리케이션에 의해 획득한 네트워크 정보와 상기 TCPIP 드라이버의 함수를 후킹하여 획득한 원본 네트워크 정보가 서로 다를 경우, TCPIP 드라이버의 함수를 후킹하여 획득한 원본 네트워크 정보를 통하여 은폐형 악성코드의 프로세스 및 포트를 추출하는 단계를 포함하여 구성된다.In order to achieve the above object, a method of detecting concealed malware using network information according to an embodiment of the present invention includes the steps of running an application for obtaining network information at a user level and a TCPIP driver at a kernel level. Driving a hooking driver that hooks a function, calling a network information acquisition function by an application, acquiring network information, hooking a function of the TCPIP driver, acquiring the original network information, and an application driven at the user level. Comparing the network information obtained by hooking a function of the TCPIP driver with the original network information obtained by hooking a function of the TCPIP driver, and the network information obtained by hooking a function of the TCPIP driver with the network information obtained by an application driven at a user level. book If different, it is configured to include an extracting process and the port of the concealed type malicious code via the network source information obtained by the function of the hooking TCPIP driver.

바람직하게는 추출된 은폐형 악성코드의 프로세스를 차단하는 단계를 더 포함하여 구성된다.Preferably, the method further comprises blocking the process of the extracted stealth malware.

더 바람직하게는 추출된 은폐형 악성코드의 포트를 차단하는 단계를 더 포함하여 구성된다.More preferably, the method further comprises blocking the port of the extracted stealth malware.

더 바람직하게는 어플리케이션은 GetTcpTable 또는 GetExtendedTcpTable 함수를 호출하여 상기 네트워크 정보를 얻는 것을 특징으로 한다.More preferably, the application may call the GetTcpTable or GetExtendedTcpTable function to obtain the network information.

더 바람직하게는 어플리케이션은 ZwDeviceIoControlFile 함수를 호출하여 상기 네트워크 정보를 얻는 것을 특징으로 한다.More preferably, the application may call the ZwDeviceIoControlFile function to obtain the network information.

더 바람직하게는 후킹 드라이버는 TCPIP 드라이버의 IofCompleteRequest 또는 NT IofCompleteRequest 함수를 후킹하는 것을 특징으로 한다.More preferably, the hooking driver is characterized by hooking the IofCompleteRequest or NT IofCompleteRequest function of the TCPIP driver.

더 바람직하게는 후킹 드라이버는 TCPIP 드라이버의 상위 단의 TCPIP 필터 드라이버 또는 TCPIP 후크 드라이버를 후킹하는 것을 특징으로 한다.More preferably, the hooking driver is characterized by hooking a TCPIP filter driver or a TCPIP hook driver on the upper end of the TCPIP driver.

상기한 바와 같은 본 발명의 네트워크 정보를 이용하여 은폐형 악성코드를 검출하는 방법에 따르면 다음과 같은 효과가 있다.According to the method for detecting the concealed malware using the network information of the present invention as described above has the following effects.

본 발명에 따르면 시스템에 침입한 악성코드가 프로세스, 레지스트리, 파일, 네트워크 등의 시스템 리소스 사용을 알 수 없도록 은닉하는 기능을 가진 악성코드라고 할 지라도 이를 원천적으로 검출해 낼 수 있다. 또한, 은폐형 악성코드의 프로세스 ID 및 모듈 정보를 수집 분석 하여 악성코드를 진단 치료하기 때문에 악성 코드의 확산을 차단시켜 시스템의 피해를 최소화할 수 있다. According to the present invention, even if the malicious code invades the system, even if the malicious code has a function of concealing the use of system resources such as a process, a registry, a file, and a network, the malware can be detected at its source. In addition, since the malicious code is diagnosed and treated by collecting and analyzing the process ID and the module information of the concealed malicious code, the damage of the system can be minimized by blocking the spread of the malicious code.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다 Advantages and features of the present invention and methods for achieving them will be apparent with reference to the embodiments described below in detail with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but can be implemented in various different forms, and only the embodiments make the disclosure of the present invention complete, and the general knowledge in the art to which the present invention belongs. It is provided to fully inform the person having the scope of the invention, which is defined only by the scope of the claims. Like reference numerals refer to like elements throughout the specification.

첨부된 블록도의 각 블록과 흐름도의 각 단계의 조합들은 컴퓨터 프로그램 인스트럭션들에 의해 수행될 수 있음을 이해할 수 있을 것이다. 이들 컴퓨터 프로그램 인스트럭션들은 범용 컴퓨터, 특수용 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서에 탑재될 수 있으므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서를 통해 수행되는 그 인스트럭션들이 블록도의 각 블록 또는 흐름도의 각 단계에서 설명된 기능들을 수행하는 수단을 생성하게 된다. 이들 컴퓨터 프로그램 인스트럭션들은 특정 방식으로 기능을 구현하기 위해 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 지향할 수 있는 컴퓨터 이용 가능 또는 컴퓨터 판독 가능 메모리에 저장되는 것도 가능하므로, 그 컴퓨터 이용가능 또는 컴퓨터 판독 가능 메모리에 저장된 인스트럭션들은 블록도의 각 블록 또는 흐름도 각 단계에서 설명된 기능을 수행하는 인스트럭션 수단을 내포 하는 제조 품목을 생산하는 것도 가능하다. 컴퓨터 프로그램 인스트럭션들은 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에 탑재되는 것도 가능하므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에서 일련의 동작 단계들이 수행되어 컴퓨터로 실행되는 프로세스를 생성해서 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 수행하는 인스트럭션들은 블록도의 각 블록 및 흐름도의 각 단계에서 설명된 기능들을 실행하기 위한 단계들을 제공하는 것도 가능하다. It will be appreciated that the combination of each block in the accompanying block diagram and each step in the flowchart may be performed by computer program instructions. These computer program instructions may be mounted on a processor of a general purpose computer, special purpose computer, or other programmable data processing equipment such that instructions executed through the processor of the computer or other programmable data processing equipment may not be included in each block or flowchart of the block diagram. It will create means for performing the functions described in each step. These computer program instructions may be stored in a computer usable or computer readable memory that can be directed to a computer or other programmable data processing equipment to implement functionality in a particular manner, and thus the computer usable or computer readable memory. It is also possible for the instructions stored in to produce an article of manufacture containing instruction means for performing the functions described in each block or flowchart of each step of the block diagram. Computer program instructions It can also be mounted on a computer or other programmable data processing equipment, so a series of operating steps are performed on the computer or other programmable data processing equipment to create a computer-implemented process to perform the computer or other programmable data processing equipment. It is also possible for the instructions to provide steps for performing the functions described in each block of the block diagram and in each step of the flowchart.

또한, 각 블록 또는 각 단계는 특정된 논리적 기능(들)을 실행하기 위한 하나 이상의 실행 가능한 인스트럭션들을 포함하는 모듈, 세그먼트 또는 코드의 일부를 나타낼 수 있다. 또, 몇 가지 대체 실시예들에서는 블록들 또는 단계들에서 언급된 기능들이 순서를 벗어나서 발생하는 것도 가능함을 주목해야 한다. 예컨대, 잇달아 도시되어 있는 두 개의 블록들 또는 단계들은 사실 실질적으로 동시에 수행되는 것도 가능하고 또는 그 블록들 또는 단계들이 때때로 해당하는 기능에 따라 역순으로 수행되는 것도 가능하다.In addition, each block or step may represent a portion of a module, segment or code that includes one or more executable instructions for executing a specified logical function (s). It should also be noted that in some alternative embodiments, the functions noted in the blocks or steps may occur out of order. For example, the two blocks or steps shown in succession may in fact be executed substantially concurrently or the blocks or steps may sometimes be performed in the reverse order, depending on the functionality involved.

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

도1은 본 발명의 실시예에 따른 은폐형 악성코드 검출 방법을 수행하기 위한 컴퓨터 운영체제의 모습을 나타낸 개념도이다.1 is a conceptual diagram showing the appearance of a computer operating system for performing the concealed malware detection method according to an embodiment of the present invention.

컴퓨터를 운영하는 컴퓨터 운영 체제는 크게 커널 레벨과 유저 레벨로 나눌 수 있다. 커널 레벨은 컴퓨터의 주 기억 장치에 상주하는 컴퓨터 운영 체제의 핵심 적인 부분으로서, 시스템의 초기화와 인터럽트를 처리하기 위한 특별한 프로세스들, 프로세스 모니터, 프로세스들 사이의 환경 교환과 새로운 프로세스를 생성해 내는 모듈 등을 포함하고 있다. 또한, 컴퓨터가 네트워크와 접속하여 통신을 수행할 수 있도록 하는 드라이버들이 위치된다. 한편, 유저 레벨에서는 컴퓨터 운영 체제 내에서 각종 응용 프로그램이 구동되며, 커널 레벨에서 처리된 프로세스, 인터럽트들이 응용 프로그램에 전달된다. 이때, 응용 프로그램에 전달되는 프로세스, 인터럽트들은 여러 가지 형태로 처리되어 응용 프로그램에 전달될 되는데, 메시지 큐(message queue)에 의해 메시지의 형태로 전달될 수도 있고, 메시지의 형태로 가공되지 않고 그 자체로 직접 전달이 될 수도 있다. Computer operating systems running computers can be divided into kernel level and user level. The kernel level is an integral part of the computer's operating system that resides in the main memory of the computer. It is a module that creates special processes, process monitors, environment exchanges between processes, and new processes to handle system initialization and interrupts. And the like. In addition, drivers are located that enable the computer to connect to the network and perform communications. On the other hand, at the user level, various application programs are run in the computer operating system, and processes and interrupts processed at the kernel level are delivered to the application program. At this time, the processes and interrupts delivered to the application program are processed in various forms and delivered to the application program, which may be delivered in the form of a message by a message queue, or may not be processed in the form of a message. It can also be delivered directly.

만약, 은폐형 악성코드가 컴퓨터에 침입하게 되면, 은폐형 악성코드는 자신의 프로세스 및 네트워크 사용 상황을 은폐하기 위하여, 도1에 나타나 있는 것처럼 커널 레벨에서 TCPIP 드라이버(104)를 후킹하기 위한 TCPIP 후킹 드라이버 또는 TCPIP 필터 드라이버(103)를 구동시킨다. 이러한 TCPIP 후킹(필터) 드라이버(103)는 Microsoft사의 Windows 운영체제에서 TCPIP 드라이버로 전달되는 IRP_MJ_DEVICE_CONTROL 및 IRP_MJ_INTERNAL_DEVICE_CONTROL IO를 검사하기 위해서 사용되는 드라이버일 수 있다. 만약, IRP_MJ_DEVICE_CONTORL 및 IRP_MJ_INTERNAL_DEVICE_CONTROL로 발생된 IO중 TCP_MIB_ADDRTABLE_ENTRY_EX_ID및 TCP_MIB_ADDRTABLE_ENTRY_ID 를 수행하는 경우에는 TCPIP 드라이버(104)가 네트워크 정보를 전달한다. 이때, 은폐형 악성코드가 구동하고 있는 TCPIP 후킹(필터) 드라이버(103)는 위와 같은 IO요청을 식별하여 TCPIP 드라이버(104)가 IO를 완료한 후 TCPIP 드라이버(104)로부터 전달되는 네트워크 정보를 변조하여 은폐형 악성코드의 포트 및 프로세스를 은폐한다.If a stealth malware enters the computer, the stealth malware will hide TCPIP hooking for the TCPIP driver 104 at the kernel level, as shown in Figure 1, to conceal its process and network usage. The driver or the TCPIP filter driver 103 is driven. The TCPIP hooking (filter) driver 103 may be a driver used to check IRP_MJ_DEVICE_CONTROL and IRP_MJ_INTERNAL_DEVICE_CONTROL IOs transmitted from the Microsoft Windows operating system to the TCPIP driver. If the TCP_MIB_ADDRTABLE_ENTRY_EX_ID and the TCP_MIB_ADDRTABLE_ENTRY_ID are performed among IOs generated by IRP_MJ_DEVICE_CONTORL and IRP_MJ_INTERNAL_DEVICE_CONTROL, the TCPIP driver 104 delivers network information. At this time, the TCPIP hooking (filter) driver 103 running the concealed malicious code identifies the above IO request and modulates the network information transmitted from the TCPIP driver 104 after the TCPIP driver 104 completes the IO. To conceal ports and processes of concealed malware.

한편, 이러한 형태의 은폐형 악성코드를 검출하기 위하여 본 발명의 실시예에서는 유저레벨에서 네트워크 정보를 얻기 위한 어플리케이션(101)을 구동시키고, 커널 레벨에서는 TCPIP 드라이버의 함수를 후킹하는 후킹 드라이버(105)를 구동시킨다. On the other hand, in order to detect this type of concealed malicious code, in the embodiment of the present invention, the hooking driver 105 which runs an application 101 for obtaining network information at the user level and hooks a function of the TCPIP driver at the kernel level. Drive.

먼저, 유저레벨에서 네트워크 정보를 얻기 위한 어플리케이션은, 시스템에 침입한 악성코드가 자신의 네트워크 정보를 은폐하기 위하여 네트워크 정보를 변조했는지 여부를 확인하기 위하여, 네트워크 정보 획득 WIN32 함수를 호출한다. 만약 특정 악성 코드에 의해서 네트워크 정보가 변조되었을 경우에는 변조된 데이터를 얻게 된다. 변조된 데이터는 이후 변조 여부를 판단하기 위하여 사용된다.First, an application for obtaining network information at the user level calls the network information acquisition WIN32 function to check whether the malicious code invading the system has altered the network information to conceal its network information. If network information is modified by certain malicious code, the modified data is obtained. The modulated data is then used to determine whether it is modulated.

이 때, 네트워크 정보를 획득하기 위하여 사용되는 함수는 GetTcpTable 함수 또는 GetExtendedTcpTable 함수가 될 수 있다. GetTcpTable 함수는 Local / Remote의 IP / Port 네트워크 세션 정보를 얻는 함수이며, GetExtendedTcpTable 함수는 Local / Remote의 IP / Port와 그 세션을 소유한 Process ID 정보를 획득하는 함수이다. 여기에서, 네트워크 정보는 TCPIP 드라이버(104)가 제공하는 네트워크 연결에 대한 정보를 의미하는데, 예를 들면, 네트워크 프로토콜, 로컬 IP 주소 및 포트, 원격지 IP 주소 및 포트, 네트워크 상태, 네트워크 프로세스 ID 등을 포함할 수 있다.In this case, the function used to obtain network information may be a GetTcpTable function or a GetExtendedTcpTable function. GetTcpTable is a function to get IP / Port network session information of Local / Remote. GetExtendedTcpTable is a function to get IP / Port of Local / Remote and Process ID that owns the session. Here, the network information means information about the network connection provided by the TCPIP driver 104, for example, network protocol, local IP address and port, remote IP address and port, network status, network process ID, and the like. It may include.

한편, Iphlpapi.dll(102)는 Windows 운영체제에서 GetTcpTable 또는 GetExtendedTcpTable 함수를 Export하고 있는 DLL이며, 유저레벨에서 네트워크 정보에 대한 요청이 있을 경우 커널 레벨의 ZwDeviceIoControlFile 함수를 호출하게 된다. 이 때, 은폐형 악성 코드에 의해서 상기 ZwDeviceIoControlFile 함수가 후킹 될 수 있다. 은폐형 악성 코드는 ZwDeviceIoControlFile을 수행한 후 위에서 설명한 바와 같이, TCPIP 드라이버(104)로부터 전달되는 TCIP 데이터를 TCPIP 후킹 드라이버(103)에 의해 후킹하고, 변조하여 악성코드가 사용하는 포트 및 프로세스를 은폐하게 된다. On the other hand, Iphlpapi.dll 102 is a DLL that exports GetTcpTable or GetExtendedTcpTable functions in the Windows operating system. When a request for network information is made at the user level, the kernel level ZwDeviceIoControlFile function is called. At this time, the ZwDeviceIoControlFile function may be hooked by a concealed malicious code. The concealed malicious code executes ZwDeviceIoControlFile and then, as described above, hooks and modulates the TCIP data transmitted from the TCPIP driver 104 by the TCPIP hooking driver 103 to conceal the ports and processes used by the malware. do.

한편, 본 발명에 의한 실시예에서는 커널레벨에서 TCPIP 드라이버(104)의 함수를 후킹하기 위한 후킹 드라이버(105)를 구동한다. 즉, 은폐형 악성 코드가 TCPIP 후킹 드라이버(103)을 통하여 변조된 네트워크를 유저레벨로 전달하기 전 단계에서 네트워크 정보를 획득하도록 TCPIP 드라이버(104)의 함수를 후킹하는 것이다. 이 때 후킹하는 TCPIP 드라이버(104)의 함수는 TCPIP 드라이버(104)의 IofCompleteRequest 또는 NT IofCompleteRequest일 수 있다. 상기 IofCompleteRequest 함수는 TCPIP 드라이버(104)의 IO가 완료되었을 때에 가장 먼저 호출되는 NT Export 함수로서 TCPIP 드라이버(104)는 함수를 Import하고 있다. 후킹 드라이버(105)는 TCPIP 드라이버(104)로부터 얻는 원본 네트워크 정보를 보관한다.On the other hand, in the embodiment of the present invention, the hooking driver 105 for hooking a function of the TCPIP driver 104 at the kernel level is driven. In other words, the hidden malicious code hooks a function of the TCPIP driver 104 so as to obtain network information in a step before delivering the modulated network to the user level through the TCPIP hooking driver 103. The function of the TCPIP driver 104 hooking at this time may be IofCompleteRequest or NT IofCompleteRequest of the TCPIP driver 104. The IofCompleteRequest function is an NT Export function that is called first when the IO of the TCPIP driver 104 is completed, and the TCPIP driver 104 imports the function. The hooking driver 105 stores the original network information obtained from the TCPIP driver 104.

은폐형 악성코드의 침입 여부를 확인하기 위하여, 상기 후킹 드라이버(105)가 보관하고 있는 원본 네트워크 정보와 상기 어플리케이션(101)이 얻어낸 네트워크 정보를 서로 비교한다. 만약 두 네트워크 정보가 서로 다르다면 은폐형 악성코드가 침입하여 네트워크 정보를 변조한 것으로 판단하고, 상기 후킹 드라이버(105)가 획득한 원본 네트워크 정보를 통해 은폐형 악성코드의 프로세스 및 포트를 추출하게 된다. In order to check whether the concealed malicious code is invaded, the original network information stored by the hooking driver 105 and the network information obtained by the application 101 are compared with each other. If the two network information is different from each other, it is determined that the concealed malicious code intrudes and modifies the network information, and the process and port of the concealed malicious code are extracted from the original network information acquired by the hooking driver 105. .

이하에서는, 도2를 참고하여 본 발명의 실시예에 따른 은폐형 악성코드 검출 방법을 순차적으로 설명하도록 한다. Hereinafter, with reference to FIG. 2 to be described sequentially the method of detecting the concealed malware according to an embodiment of the present invention.

도2는 본 발명의 실시예에 따른 은폐형 악성코드 검출 방법을 나타내는 흐름도이다.2 is a flowchart illustrating a concealed malware detection method according to an embodiment of the present invention.

먼저 유저레벨에서 네트워크 정보를 얻기 위한 어플리케이션(101)을 구동시킨다(S201). 또한 커널 레벨에서는 TCPIP 드라이버(104)의 함수를 후킹하는 후킹 드라이버(105)를 구동시킨다(S202). First, the application 101 for obtaining network information at the user level is driven (S201). In addition, at the kernel level, the hooking driver 105 for hooking a function of the TCPIP driver 104 is driven (S202).

그 후, 유저 레벨에서 구동된 어플리케이션(101)에 의해 네트워크 정보 획득 함수를 호출하여 네트워크 정보를 획득한다(S203). 이 때, 유저 레벨에서 구동된 어플리케이션(101)은 GetTcpTable 또는 GetExtendedTcpTable 함수를 호출하여 네트워크 정보를 얻게 된다. Thereafter, the network information acquisition function is called by the application 101 driven at the user level to obtain network information (S203). At this time, the application 101 driven at the user level calls the GetTcpTable or GetExtendedTcpTable function to obtain network information.

또한, 커널 레벨에서는 상기 TCPIP 드라이버(104)의 함수를 후킹하기 위한 후킹 드라이버(105)가 TCPIP 드라이버(104)의 함수를 후킹하여 원본 네트워크 정보를 획득한다(S204). 이때, 후킹 드라이버(105)는 TCPIP 드라이버(104)의 IofCompleteRequest 또는 NT IofCompleteRequest 함수를 후킹하게 된다.In addition, at the kernel level, the hooking driver 105 for hooking the function of the TCPIP driver 104 acquires the original network information by hooking the function of the TCPIP driver 104 (S204). At this time, the hooking driver 105 hooks the IofCompleteRequest or NT IofCompleteRequest function of the TCPIP driver 104.

그 후, 유저 레벨에서 구동된 어플리케이션(101)에 의해 획득한 네트워크 정보와 TCPIP 드라이버(104)의 함수를 후킹하여 획득한 원본 네트워크 정보를 서로 비교한다(S205). Thereafter, the network information obtained by the application 101 driven at the user level and the original network information obtained by hooking a function of the TCPIP driver 104 are compared with each other (S205).

만약, 유저 레벨에서 구동된 어플리케이션(101)에 의해 획득한 네트워크 정보와 TCPIP 드라이버(104)의 함수를 후킹하여 획득한 원본 네트워크 정보가 서로 다를 경우, TCPIP 드라이버(104)의 함수를 후킹하여 획득한 원본 네트워크 정보를 통하여 은폐형 악성코드의 프로세스 및 포트를 추출하게 된다(S206).If the network information obtained by the application 101 driven at the user level and the original network information obtained by hooking the function of the TCPIP driver 104 are different from each other, the function obtained by hooking the function of the TCPIP driver 104 is obtained. The process and the port of the concealed malware are extracted through the original network information (S206).

추출한 후에는 은폐형 악성 코드의 프로세스 또는 포트를 차단하여 악성 코드에 의한 피해를 막을 수 있다. After extraction, it can block the malicious code's process or port to prevent damage by malicious code.

본 발명은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CO-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장 장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산 방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The present invention can be embodied as computer readable codes on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CO-ROM, magnetic tape, floppy disks, optical data storage devices, and the like, which may also be implemented in the form of carrier waves (for example, transmission over the Internet). Include. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

이상 첨부된 도면을 참조하여 본 발명의 실시예를 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. Although the embodiments of the present invention have been described above with reference to the accompanying drawings, those skilled in the art to which the present invention pertains may implement the present invention in other specific forms without changing the technical spirit or essential features thereof. I can understand that. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive.

도1은 본 발명의 실시예에 따른 은폐형 악성코드 검출 방법을 수행하기 위한 컴퓨터 운영체제의 모습을 나타낸 개념도이다.1 is a conceptual diagram showing the appearance of a computer operating system for performing the concealed malware detection method according to an embodiment of the present invention.

도2는 본 발명의 실시예에 따른 은폐형 악성코드 검출 방법을 나타내는 흐름도이다.2 is a flowchart illustrating a concealed malware detection method according to an embodiment of the present invention.

Claims (8)

네트워크 정보를 이용하여 은폐형 악성코드를 검출하는 방법에 있어서,In the method for detecting concealed malware using network information, 유저 레벨에서 네트워크 정보를 얻기 위한 어플리케이션을 구동시키는 단계;Running an application for obtaining network information at a user level; 커널 레벨에서 TCPIP 드라이버의 함수를 후킹하는 후킹 드라이버를 구동시키는 단계;Driving a hooking driver that hooks a function of the TCPIP driver at the kernel level; 상기 어플리케이션에 의해 네트워크 정보 획득 함수를 호출하고 네트워크 정보를 획득하는 단계;Calling a network information acquisition function by the application and obtaining network information; 상기 TCPIP 드라이버의 함수를 후킹하여 원본 네트워크 정보를 획득하는 단계;Hooking a function of the TCPIP driver to obtain original network information; 상기 어플리케이션에 의해 획득한 네트워크 정보와 상기 원본 네트워크 정보를 비교하는 단계; 및 Comparing the network information obtained by the application with the original network information; And 상기 어플리케이션에 의해 획득한 네트워크 정보와 상기 원본 네트워크 정보가 서로 다를 경우, 상기 원본 네트워크 정보를 통하여 은폐형 악성코드의 프로세스 및 포트를 추출하는 단계를 포함하는 If the network information obtained by the application and the original network information are different from each other, extracting a process and a port of a concealed malicious code through the original network information; 은폐형 악성코드 검출 방법. Stealth malware detection method. 제1항에 있어서, The method of claim 1, 상기 추출된 은폐형 악성코드의 프로세스를 차단하는 단계를 더 포함하는Blocking the process of the extracted stealth malicious code further comprising: 은폐형 악성코드 검출 방법.Stealth malware detection method. 제1항에 있어서, The method of claim 1, 상기 추출된 은폐형 악성코드의 포트를 차단하는 단계를 더 포함하는Blocking the port of the extracted stealth malicious code further comprising: 은폐형 악성코드 검출 방법.Stealth malware detection method. 제1항에 있어서,The method of claim 1, 상기 어플리케이션은 GetTcpTable 또는 GetExtendedTcpTable 함수를 호출하여 상기 네트워크 정보를 얻는 것을 특징으로 하는 The application may obtain the network information by calling a GetTcpTable or GetExtendedTcpTable function. 은폐형 악성코드 검출 방법.Stealth malware detection method. 제1항에 있어서,The method of claim 1, 상기 어플리케이션은 ZwDeviceIoControlFile 함수를 호출하여 상기 네트워크 정보를 얻는 것을 특징으로 하는 The application calls the ZwDeviceIoControlFile function to obtain the network information 은폐형 악성코드 검출 방법.Stealth malware detection method. 제1항에 있어서,The method of claim 1, 상기 후킹 드라이버는 상기 TCPIP 드라이버의 IofCompleteRequest 또는 NT IofCompleteRequest 함수를 후킹하는 것을 특징으로 하는The hooking driver hooks the IofCompleteRequest or NT IofCompleteRequest function of the TCPIP driver. 은폐형 악성코드 검출 방법. Stealth malware detection method. 제1항에 있어서,The method of claim 1, 상기 후킹 드라이버는 상기 TCPIP 드라이버의 상위 단의 TCPIP 필터 드라이버 또는 TCPIP 후크 드라이버를 후킹하는 것을 특징으로 하는The hooking driver hooks a TCPIP filter driver or a TCPIP hook driver of an upper stage of the TCPIP driver. 은폐형 악성코드 검출 방법. Stealth malware detection method. 제1항 내지 제7항 중 어느 한 항의 방법을 컴퓨터 상에서 수행할 수 있도록 하는 컴퓨터 프로그램을 기록한 컴퓨터가 읽을 수 있는 기록매체.A computer readable recording medium having recorded thereon a computer program for performing the method of claim 1 on a computer.
KR1020080044516A 2008-05-14 2008-05-14 Method for detecting hidden malicious code by using network information KR101013417B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080044516A KR101013417B1 (en) 2008-05-14 2008-05-14 Method for detecting hidden malicious code by using network information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080044516A KR101013417B1 (en) 2008-05-14 2008-05-14 Method for detecting hidden malicious code by using network information

Publications (2)

Publication Number Publication Date
KR20090118618A KR20090118618A (en) 2009-11-18
KR101013417B1 true KR101013417B1 (en) 2011-02-14

Family

ID=41602562

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080044516A KR101013417B1 (en) 2008-05-14 2008-05-14 Method for detecting hidden malicious code by using network information

Country Status (1)

Country Link
KR (1) KR101013417B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070121195A (en) * 2006-06-21 2007-12-27 한국전자통신연구원 A system and method for detection of a hidden process using system event

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070121195A (en) * 2006-06-21 2007-12-27 한국전자통신연구원 A system and method for detection of a hidden process using system event

Also Published As

Publication number Publication date
KR20090118618A (en) 2009-11-18

Similar Documents

Publication Publication Date Title
Shaukat et al. RansomWall: A layered defense system against cryptographic ransomware attacks using machine learning
Javaheri et al. Detection and elimination of spyware and ransomware by intercepting kernel-level system routines
CN101478407B (en) Method and apparatus for on-line safe login
US9336390B2 (en) Selective assessment of maliciousness of software code executed in the address space of a trusted process
Wang et al. Detecting stealth software with strider ghostbuster
CN104866765B (en) The malicious code homology analysis method of Behavior-based control characteristic similarity
Bayer et al. Scalable, behavior-based malware clustering.
US8065728B2 (en) Malware prevention system monitoring kernel events
US11438349B2 (en) Systems and methods for protecting devices from malware
CN109586282B (en) Power grid unknown threat detection system and method
CN110837640B (en) Malicious file searching and killing method, device, storage medium and device
WO2016095479A1 (en) Virus processing method, apparatus, system and device, and computer storage medium
KR101623073B1 (en) System and method for detecting malignant code based on application program interface
JP2014038596A (en) Method for identifying malicious executable
CN103049696A (en) Virtual machine identification dodging method and device
CN104640105B (en) Associated method and system is analyzed and threatened to mobile phone viruses
US20140181970A1 (en) System and method for improving the efficiency of application emulation acceleration
US7941850B1 (en) Malware removal system and method
CN104899511A (en) Program behavior algorithm based active defense method
Hamed et al. Protecting windows OS against local threats without using antivirus
CN105718793A (en) Method and system for preventing malicious code from identifying sandbox on the basis of sandbox environment modification
KR20200057402A (en) System and method for detecting malignant code based on virtual and real machine
CN105488414A (en) Method and system for preventing malicious codes from detecting virtual environments
US11811802B2 (en) Cloud security monitoring of applications in PaaS services
Lee et al. On malware characterization and attack classification

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
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: 20140203

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20150202

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20160201

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20190131

Year of fee payment: 9