KR100985071B1 - Method and Apparatus for detection and prevention malicious code using script languages for computer system - Google Patents

Method and Apparatus for detection and prevention malicious code using script languages for computer system Download PDF

Info

Publication number
KR100985071B1
KR100985071B1 KR1020080010767A KR20080010767A KR100985071B1 KR 100985071 B1 KR100985071 B1 KR 100985071B1 KR 1020080010767 A KR1020080010767 A KR 1020080010767A KR 20080010767 A KR20080010767 A KR 20080010767A KR 100985071 B1 KR100985071 B1 KR 100985071B1
Authority
KR
South Korea
Prior art keywords
code
protected object
script
blocking
database
Prior art date
Application number
KR1020080010767A
Other languages
Korean (ko)
Other versions
KR20090084530A (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 KR1020080010767A priority Critical patent/KR100985071B1/en
Publication of KR20090084530A publication Critical patent/KR20090084530A/en
Application granted granted Critical
Publication of KR100985071B1 publication Critical patent/KR100985071B1/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/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/554Detecting local intrusion or implementing counter-measures involving event detection and direct action
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2139Recurrent verification

Abstract

본 발명은 스크립트 언어를 사용한 취약점 공격 코드의 실시간 탐지, 차단 방법 및 그 장치에 관한 것이다.The present invention relates to a method and apparatus for real-time detection, blocking of vulnerability code using a scripting language.

본 발명의 일 실시예에 따른 취약점 공격 코드의 실시간 탐지 및 차단 방법은 악성 코드의 시그니처 정보가 저장되어 있는 시그니처 데이터베이스 및 시스템 보호 관련 정책이 저장되어 있는 정책 데이터베이스를 메모리에 로드하는 단계, 스크립트 코드와 보호 대상 객체 사이의 단계에 위치하며, 스크립트 코드 및 보호 대상 객체가 함께 사용하는 운영체제의 공유 라이브러리를 후킹하는 단계, 후킹 단계를 통해 후킹된 공유 라이브러리의 인터페이스를 시그니처 데이터베이스 및 정책 데이터베이스에 기초하여 검사하는 단계, 스크립트 코드가 악성 코드인지 여부를 검사 결과에 기초하여 판단하는 단계를 포함한다.According to an embodiment of the present invention, a method for real-time detection and blocking of vulnerability code includes loading a signature database in which signature information of malicious code is stored and a policy database in which a system protection related policy is stored in a memory, script code and Located at the stage between the protected objects, hooking the shared library of the operating system used by the script code and the protected object, and checking the interface of the hooked shared library based on the signature database and policy database through the hooking step. The method may include determining whether the script code is malicious code based on a test result.

본 발명에 따르면, 취약점 공격 코드가 생성되고 실행되는 과정에서 동적으로 이를 탐지하여 암호화 등의 회피 방법을 사용하는 공격 코드도 실시간으로 탐지하고 이를 차단할 수 있는 효과가 있다.According to the present invention, in the process of generating and executing the vulnerability attack code, the attack code using the evasion method such as encryption can be detected in real time and can be detected in real time and block it.

스크립트, 악성 코드, 취약점 공격 코드, 실시간 탐지 Script, Malware, Vulnerability Attack Code, Real Time Detection

Description

스크립트 언어를 사용한 취약점 공격 코드의 실시간 탐지 및 차단 방법, 및 그 장치{Method and Apparatus for detection and prevention malicious code using script languages for computer system}Method and Apparatus for detection and prevention malicious code using script languages for computer system}

본 발명은 컴퓨터 시스템에서 스크립트 언어를 사용한 취약점 공격 코드를 실시간으로 탐지하고 차단하는 방법 및 그 장치에 관한 것으로서, 더욱 상세하게는, 스크립트 언어를 사용한 취약점 공격 코드의 실행을 공유 라이브러리 후킹을 통해 동적으로 탐지하고 차단하는 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for detecting and blocking vulnerability code in real time using a scripting language in a computer system, and more particularly, to dynamically execute execution of vulnerability code using a scripting language through shared library hooking. A method and apparatus for detecting and blocking.

통상적으로 취약점 공격 코드는 특정 어플리케이션 시스템의 보안 취약점을 이용하여 시스템에 비정상적인 동작을 일으키거나, 시스템의 권한을 획득하여 웜이나 바이러스 같은 형태의 악성 코드를 사용자 시스템에서 실행하거나, 또는 개인 정보를 몰래 얻어내는 등의 방식으로 사용자를 공격하는 코드를 의미한다. 또한, 권한을 얻어낸 사용자의 시스템을 이용하여 제3의 시스템을 공격하는 형태로 동작하기도 한다.Vulnerability code usually uses security vulnerabilities of a specific application system to cause abnormal behavior on the system, or to obtain the system's authority to execute malicious code such as worms or viruses on the user's system, or to secretly obtain personal information. I mean the code that attacks the user in such a way. In addition, it may operate in the form of attacking the third system by using the system of the user who obtained the authority.

이러한 공격 코드의 대부분은, 컴파일러에 의해 동작되는 것이 아닌 해석기를 통해 읽혀지며 다양한 환경에서 실행 가능하고 제작이 쉬운 특징을 지니고 있는 스크립트 언어(scripting language)를 사용하여 제작된다. 특히, 취약점 공격 코드는 불특정 다수의 인터넷 사용자를 공격하기 위하여 인터넷으로 연결된 대부분의 컴퓨터 시스템에서 적용이 가능한 자바 스크립트(Java Script)나 비주얼 베이직 스크립트(Visual Basic Script)로써 작성되어 웹 페이지에 삽입되고 있다. 사용자가 특정 웹 페이지에 접속하게 되면 스크립트 언어로 제작된 취약점 공격 코드가 사용자의 컴퓨터 시스템에 설치되고 실행됨에 따라 취약점 공격 코드가 동작하게 되고 악성 코드가 다운로드 되는 등의 동작이 일어나게 된다. Most of these attack codes are written using a scripting language that is read by an interpreter rather than being operated by a compiler and is characterized by being executable and easy to produce in various environments. In particular, the vulnerability exploit code is written as Java Script or Visual Basic Script that can be applied to most computer systems connected to the Internet in order to attack an unspecified number of Internet users. . When a user accesses a specific web page, the vulnerability code in a scripting language is installed and executed on the user's computer system, causing the vulnerability code to run and the malicious code to be downloaded.

COM(Component Object Model) 객체는 운영체제의 종류와 관계없이 언어 중립적인 방식으로 수행 가능하며, 여기에는 일정한 규약이 따른다. 이는 외부 프로그램이 해당 객체를 사용할 수 있기 위한 규약으로서 객체의 식별자(예컨대, 클래스 아이디, UUID 등), 파일 위치, 객체가 제공하는 속성(attribute), 인터페이스 함수의 목록, 속성 개수, 및 데이터 형식 등을 형식 라이브러리의 형태로 운영체제에 등록한다. 통상적으로, 외부 프로그램은 형식 라이브러리에 열거되어 있는 속성을 변경하거나 인터페이스 함수를 호출하는 방법으로 해당 객체를 사용한다. 또한, 일반적으로 COM 객체라는 표현은 OLE, OLE Automation, ActiveX, DCOM, COM+, XPCOM 기술 등을 모두 포함하는 상위적인 개념으로 사용된다.COM (Component Object Model) objects can be executed in a language-neutral way, regardless of the type of operating system, and there are certain conventions. This is a convention for external programs to use the object. It is the identifier of the object (e.g., class ID, UUID, etc.), file location, attribute provided by the object, list of interface functions, number of attributes, and data type. Register with the operating system in the form of a type library. Typically, external programs use the object by changing the properties listed in the type library or by calling interface functions. Also, the term COM object is generally used as a high level concept that includes all OLE, OLE Automation, ActiveX, DCOM, COM +, and XPCOM technologies.

예를 들면, 취약점 공격 코드는 사용자의 컴퓨터에 설치되어 있는 키보드 입력 이벤트 관련 COM 객체의 속성이나 인터페이스 함수를 사용하여 특정 웹 사이트에 대한 비밀번호를 얻어낼 수도 있고, 문자열 입력에 대해서 보안이 취약한 특정 객체의 파라미터에 버퍼 오버플로우 등을 유발하여 비정상적으로 동작하게 할 수도 있다.For example, the vulnerability could use a COM object's properties or interface functions associated with a keyboard input event installed on the user's computer to obtain a password for a particular website. It may also cause a buffer overflow, etc., to cause an abnormal operation.

이러한 공격 코드에 의한 피해를 방지하기 위한 종래 기술은 악성 코드를 진단하는 것과 같이 공격 코드의 시그니처(signature)를 작성한 후, 시그니처 패턴과 일치하는 공격 코드가 감지되면 해당 스크립트 파일을 삭제하는 방법이었다. 통상적으로, 공격 코드의 시그니처는 그 공격 코드임을 식별할 수 있는 지표가 되는 것으로서, 공격 코드의 동작 과정에서 공격 코드가 사용하려고 하는 객체, 예컨대 COM 객체의 인터페이스에 적용하려는 파라미터 값 등에 기초하여 작성된다. 따라서, 공격 코드가 포함된 스크립트 등에서 시그니처가 발견될 경우 해당 스크립트를 삭제하는 것과 같은 방식으로 공격 코드에 의한 피해를 방지한다.The prior art for preventing the damage caused by the attack code was to create a signature of the attack code, such as to diagnose malicious code, and then delete the corresponding script file when an attack code matching the signature pattern is detected. In general, the signature of the attack code is an indicator for identifying the attack code, and is created based on an object that the attack code intends to use during the operation of the attack code, for example, a parameter value to be applied to an interface of a COM object. . Therefore, if a signature is found in a script including an attack code, the damage by the attack code is prevented in the same manner as deleting the script.

그러나, 이러한 종래의 공격 코드 방지 기술은 새롭게 나올 수많은 공격 코드의 시그니처를 일일이 작성해야 하고, 공격 코드가 암호화되거나 조작되는 경우에는 기존에 작성된 시그니처로는 이를 검색할 수 없는 문제점이 있다. 예컨대, 공격 대상이 되는 객체의 인터페이스 함수의 파라미터를 이용한 공격의 경우 파라미터를 암호화 시키거나 문자열을 조작하는 방법을 사용하여 인터페이스를 호출할 경우, 기존에 작성된 시그니처 정보를 통해서 공격 코드를 파악하기 어려운 문제점이 존재한다.However, such a conventional attack code prevention technology has to create signatures of a number of new attack codes one by one, and there is a problem in that when the attack code is encrypted or manipulated, it cannot be detected by a previously created signature. For example, in case of an attack using a parameter of an interface function of an object to be attacked, it is difficult to grasp the attack code through signature information previously created when calling an interface using a method of encrypting a parameter or manipulating a string. This exists.

도 1은 종래의 공격 코드 탐지 기술을 회피하기 위하여 문자열 조작 방법을 사용하는 공격 코드의 한 예를 나타내고 있다. 1 illustrates an example of an attack code using a string manipulation method to evade a conventional attack code detection technique.

기존의 공격 코드에서 인터페이스 함수에 입력하는 파라미터 값이 “This is a very bad parameter”라고 할 경우, 시그니처를 이러한 문자열을 검색하도록 작 성될 수 있다. 그러나 이를 회피하기 위해 공격 코드는 “This is a very”,“bad parameter”와 같이 입력 값을 두 개로 분리한 후, 이를 별도의 문자열 변수에 각각 저장한 뒤에 이 문자열 변수를 연결 연산자를 통해 연결하여 공격 대상 객체의 인터페이스를 호출할 수도 있다. 이러한 경우에는 기존에 작성된 시그니처로는 공격 코드의 탐지가 되지 않을 뿐만 아니라, 이러한 방법 외에도 문자열을 조작하는 방법은 무수하게 존재할 수 있기 때문에 이에 대응하는 시그니처를 일일이 작성하는 것은 매우 어려운 일이라 할 수 있다.If the parameter value input to the interface function in the existing attack code is "This is a very bad parameter", the signature can be written to search for these strings. However, to avoid this, the attack code separates the input values into two, such as “This is a very” and “bad parameter”, stores them in separate string variables, and concatenates them using the concatenation operator. You can also call the interface of the target object. In this case, not only attack code can be detected by existing signatures, but also there are countless ways to manipulate strings. Therefore, it is very difficult to create corresponding signatures. .

이와 같이, 시그니처 비교하여 공격코드를 탐지하는 종래의 방법은 암호화 내지 문자열 조작 등을 사용하여 시그니처를 조작하는 공격 코드를 탐지하는 데 한계가 있을 뿐만 아니라, 암호화되거나 문자열이 조작된 모든 경우를 시그니처 목록에 포함시켜야 한다는 문제점이 있었다. As such, the conventional method of detecting attack codes by comparing signatures is not only limited to detecting attack codes that manipulate signatures using encryption or string manipulation, but also includes a list of signatures for all cases where encrypted or strings are manipulated. There was a problem to include in.

본 발명은 상기와 같은 문제점을 해결하기 위한 것으로서, 본 발명이 이루고자 하는 기술적 과제는 공유 라이브러리 후킹 기술을 이용하여 사용자의 시스템을 스크립트를 사용한 공격 코드로부터 보호하기 위해 그러한 공격 코드가 실행되는 것을 실시간으로 탐지하고 차단하는 방법 및 장치를 제공하는 것이다.SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and the technical problem to be achieved by the present invention is to execute such an attack code in real time to protect the user's system from attack code using a script using a shared library hooking technique. To provide a method and apparatus for detecting and blocking.

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

상기 목적을 달성하기 위하여 본 발명의 실시예에 따른 취약점 공격 코드의 실시간 탐지 및 차단 방법은 악성 코드의 시그니처 정보가 저장되어 있는 시그니처 데이터베이스 및 시스템 보호 관련 정책이 저장되어 있는 정책 데이터베이스를 메모리에 로드하는 단계, 스크립트 코드와 보호 대상 객체 사이의 단계에 위치하며 스크립트 코드 및 보호 대상 객체가 함께 사용하는 운영체제의 공유 라이브러리를 후킹하는 단계, 후킹 단계를 통해 후킹된 공유 라이브러리의 인터페이스를 시그니처 데이터베이스 및 정책 데이터베이스에 기초하여 검사하는 단계, 스크립트 코드가 악성 코드인지 여부를 검사 결과에 기초하여 판단하는 단계를 포함한다.In order to achieve the above object, a real-time detection and blocking method of a vulnerability attack code according to an embodiment of the present invention loads a signature database in which signature information of malicious code is stored and a policy database in which a system protection related policy is stored in a memory. Step, which is located between the script code and the protected object, hooking the shared library of the operating system used by the script code and the protected object, and hooking the interface to the signature database and policy database. Checking based on the method, and determining whether the script code is malicious code based on the test result.

바람직하게는 보호 대상 객체는 COM(Component Object Model) 객체를 포함한다.Preferably, the object to be protected includes a Component Object Model (COM) object.

바람직하게는 정책 데이터베이스는 각 객체별로 설정된 보호 정책을 포함한다.Preferably, the policy database includes a protection policy set for each object.

바람직하게는 판단 결과 악성 코드라고 판단될 경우 객체의 실행을 차단하는 단계를 더 포함한다.Preferably it further comprises the step of blocking the execution of the object if it is determined that the malicious code.

바람직하게는 판단 결과 정상 스크립트 코드라고 판단될 경우 정책 데이터베이스를 기반으로 객체가 차단 객체인지 여부를 검사하는 단계 및 검사 결과 차단 객체이면 객체의 실행을 차단하는 단계를 더 포함한다.Preferably, if it is determined that the normal script code is determined, the method further includes checking whether the object is a blocked object based on the policy database, and blocking the execution of the object if the object is a blocked object.

본 발명의 또 다른 일 실시예에 따른 취약점 공격 코드의 실시간 탐지 및 방지 방법은 시스템 보호 관련 정책이 저장되어 있는 정책 데이터베이스를 메모리에 로드하는 단계, 스크립트 코드와 보호 대상 객체 사이의 통신을 담당하며 스크립트 코드 및 보호 대상 객체가 함께 사용하는 운영체제의 공유 라이브러리를 후킹하는 단계, 후킹 단계를 통해 후킹된 공유 라이브러리의 인터페이스를 정책 데이터베이스에 기초하여 검사하여 보호 대상 객체가 차단 객체로 설정되어 있는지 여부를 판단하는 단계, 및 판단 결과 차단 객체인 경우 객체의 실행을 차단하는 단계를 포함한다.According to another embodiment of the present invention, a method for real-time detection and prevention of vulnerability attack code includes loading a policy database in which a system protection related policy is stored in memory, and is in charge of communication between script code and a protected object. Hooking the shared library of the operating system used by the code and the protected object, and checking the interface of the hooked shared library based on the policy database through the hooking step to determine whether the protected object is set as a blocked object. And blocking the execution of the object when the determination result is a blocking object.

상기 목적을 달성하기 위하여 본 발명의 실시예에 따른 취약점 공격 코드의 실시간 탐지 및 방지 장치는 악성 코드의 시그니처 정보가 저장되어 있는 시그니처 데이터베이스, 시스템 보호 관련 정책이 저장되어 있는 정책 데이터베이스, 공유 라이브러리를 후킹하는 후킹 엔진, 시그니처 데이터베이스 및 정책 데이터베이스를 기반으로 하여 공격 코드의 존재 여부를 판단하는 결정 엔진을 포함한다.In order to achieve the above object, the apparatus for real-time detection and prevention of vulnerability attack code according to an embodiment of the present invention hooks a signature database in which signature information of malicious code is stored, a policy database in which system protection-related policies are stored, and a shared library. And a decision engine that determines whether an attack code exists based on a hooking engine, a signature database, and a policy database.

바람직하게는 본 발명에 따른 방법을 실행하기 위한 컴퓨터로 읽을 수 있는 프로그램을 기록한 기록매체를 포함한다.It preferably comprises a recording medium having recorded thereon a computer readable program for carrying out the method according to the invention.

기타 실시예들의 구체적인 사항들은 상세한 설명 및 도면들에 포함되어 있다. Specific details of other embodiments are included in the detailed description and the drawings.

상술한 바와 같은 본 발명의 스크립트 언어를 사용한 취약점 공격 코드의 실시간 탐지, 차단 방법 및 그 장치 방법에 따르면 다음과 같은 효과가 있다.According to the real-time detection, blocking method and apparatus method of the vulnerability attack code using the script language of the present invention as described above has the following effects.

본 발명에 따르면, 취약점 공격 코드가 생성되고 실행되는 과정에서 동적으로 이를 탐지하기 때문에, 암호화 등의 회피 방법을 사용하는 공격 코드도 실시간으로 탐지하고 차단할 수 있는 장점이 있다. According to the present invention, since a vulnerability attack code is dynamically detected during the generation and execution of the vulnerability, the attack code using an evasion method such as encryption can be detected and blocked in real time.

또한, 공격 코드의 진단에 실패하는 경우에도 정책에 따라 보호하고자 하는 객체의 실행을 차단함으로써 사용자의 시스템을 보호할 수 있는 장점이 있다.In addition, even when the diagnosis of the attack code fails, the user's system can be protected by blocking the execution of the object to be protected according to the policy.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.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.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하기로 한다. 첨부된 블록도의 각 블록과 흐름도의 각 단계의 조합들은 컴퓨터 프로그램 인스트럭션들에 의해 수행될 수 있음을 이해할 수 있을 것이다. 이들 컴퓨터 프로그램 인스트럭션들은 범용 컴퓨터, 특수용 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서에 탑재될 수 있으므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비의 프로세서를 통해 수행되는 그 인스트럭션들이 블록도의 각 블록 또는 흐름도의 각 단계에서 설명된 기능들을 수행하는 수단을 생성하게 된다. 이들 컴퓨터 프로그램 인스트럭션들은 특정 방식으로 기능을 구현하기 위해 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 지향할 수 있는 컴퓨터 이용 가능 또는 컴퓨터 판독 가능 메모리에 저장되는 것도 가능하므로, 그 컴퓨터 이용가능 또는 컴퓨터 판독 가능 메모리에 저장된 인스트럭션들은 블록도의 각 블록 또는 흐름도 각 단계에서 설명된 기능을 수행하는 인스트럭션 수단을 내포하는 제조 품목을 생산하는 것도 가능하다. 컴퓨터 프로그램 인스트럭션들은 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에 탑재되는 것도 가능하므로, 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비 상에서 일련의 동작 단계들이 수행되어 컴퓨터로 실행되는 프로세스를 생성해서 컴퓨터 또는 기타 프로그램 가능한 데이터 프로세싱 장비를 수행하는 인스트럭션들은 블록도의 각 블록 및 흐름도의 각 단계에서 설명된 기능들을 실행하기 위한 단계들을 제공하는 것도 가능하다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. 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 flow chart 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 implementations, 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.

이하에서는 먼저, 본 발명에 따른 공격 코드의 실시간 탐지 및 차단 방법을 설명하기 위해 컴퓨터 시스템에서 통상적인 COM 객체의 실행 구조 및 스크립트 언어를 사용한 통상적인 공격 코드의 흐름도를 살펴본다.Hereinafter, a flow chart of a typical attack code using an execution structure and a script language of a typical COM object in a computer system will be described first to describe a method for real-time detection and blocking of an attack code according to the present invention.

도 2는 컴퓨터 시스템에서 스크립트 코드가 COM 객체를 실행하는 단계를 도시한 구조를 나타내는 도면이다.2 is a diagram illustrating a structure showing a step in which a script code executes a COM object in a computer system.

어떤 스크립트 코드(210)가 컴퓨터 시스템(200) 상의 특정 객체(230)에 접근하여 이에 대한 사용 권한을 얻고자 하는 경우, 스크립트 코드(210)가 직접 특정 객체(230)의 바이너리에 접근하여 이에 대한 권한을 획득하는 것이 아니라, 운영 체제의 공유 라이브러리(220)를 통해 접근하여 권한을 획득하게 된다. 공유 라이브러리(220)는 예컨대 마이크로소프트 사의 윈도우 운영체제의 경우 mshtml.dll, oleaut32.dll등이 있다. 예를 들어, 스크립트 코드(210)가 COM 객체(230)에 접근하고자 할 경우, 공유 라이브러리(220)에 COM 객체(230)의 식별자(예컨대, 클래스 아이디) 등의 정보를 제공하면서 객체의 생성을 요청하게 되고 공유 라이브러리(220)가 이 정보를 통해 해당하는 COM 객체를 제공한다. 이와 같은 과정은 컴퓨 터 내에서 정상적인 동작을 수행하기 위하여 일반적인 스크립트 언어로 작성된 코드 뿐만 아니라 취약점을 공격하려는 코드 역시 동일하게 거치는 과정이다. 한편, 공유 라이브러리를 통하여 접근할 수 있는 객체는 COM 객체에 한정되는 것은 아니며 ActiveX, COM+, DCOM, XPCOM 등 본 발명의 기술 분야에서 통상적으로 사용되는 모든 객체를 포함할 수 있다.When a script code 210 wants to access and obtain permission to a specific object 230 on the computer system 200, the script code 210 directly accesses the binary of the specific object 230 and Instead of acquiring the right, the right is accessed through the shared library 220 of the operating system to acquire the right. The shared library 220 includes, for example, mshtml.dll and oleaut32.dll in the case of the Microsoft Windows operating system. For example, when the script code 210 wants to access the COM object 230, the script library 210 provides the shared library 220 with information such as an identifier (eg, a class ID) of the COM object 230 to generate the object. The shared library 220 provides the corresponding COM object through this information. This process goes through not only code written in general scripting language but also code to attack vulnerabilities in order to perform normal operation in computer. On the other hand, the object accessible through the shared library is not limited to the COM object may include all objects commonly used in the technical field of the present invention, such as ActiveX, COM +, DCOM, XPCOM.

도 3은 스크립트 언어를 사용한 공격 코드의 전형적인 흐름을 나타낸 흐름도이다.3 is a flow diagram illustrating a typical flow of attack code using a scripting language.

통상적으로 스크립트 언어를 사용한 공격 코드가 객체에 대한 사용 권한을 획득하는 과정(S300)은 전술한 도 2의 과정과 동일한 바 이에 대한 설명은 생략한다. 상술한 바와 같이 공격 코드가 공격하고자 하는 객체를 생성하거나 객체에 대한 접근권을 획득한 후, 객체의 속성(attribute) 데이터 값을 변경하거나 인터페이스 함수의 파라미터에 컴퓨터 시스템을 비정상적으로 동작시킬 수 있는 값을 입력하여 인터페이스 함수를 호출한다.(S320) 보다 구체적으로 설명하면, 통상, 객체가 외부와 연결되고 동작하기 위한 수단으로 속성과 인터페이스 함수를 갖는다. 속성이란 객체의 특징을 나타낼 수 있는 변수를 의미하며, 인터페이스 함수는 객체의 특정 동작을 수행할 수 있도록 하는 함수를 의미한다. 따라서, 객체의 속성 값을 조작한다면 해당 객체의 특성이 변경되어서 정상적인 동작 수행에 장애가 발생할 수 있다. 또한, 인터페이스 함수의 파라미터(인자) 값은 함수의 동작 시에 필요한 값으로, 예컨대 객체의 동작을 일정시간 정지시키는 함수가 있다면, 정지 시간이 인자 값의 하나가 될 수 있다. 파라미터는 문자열이 될 수도 있으며, 그 입 력 값에 따라 컴퓨터 시스템을 비정상적으로 동작시킬 수도 있다. 예컨대, 인터페이스 함수에 사전 결정되어 있는 입력 문자열의 크기보다 큰 문자열 값을 넣을 경우 버퍼 오버플로우가 발생하여 객체 및 컴퓨터 시스템이 오동작할 수 있다. 다음으로, 공격 코드가 객체를 호출하게 되면 객체의 코드가 동작되기에 앞서 운영체제의 공유 라이브러리 코드가 실행되게 된다.(S330) 이후 공유 라이브러리 코드 단에서는 공격 코드로부터 입력받은 정보, 예컨대 생성 또는 실행하고자 하는 객체의 식별자(예컨대, 클래스 아이디), 인터페이스 함수 및 파라미터 값 등의 정보를 통해 객체를 재호출(S340)한다. 즉, 공격 코드를 포함한 통상적인 스크립트 코드와 객체는 공유 라이브러리 코드를 통해 통신하게 된다. 공격 코드는 그 종류에 따라 객체의 파라미터에 전술한 바와 같이 문자열 조작된 값이나 암호화된 값을 입력(S310)하여 공격 코드를 탐지하고자 하는 시도를 우회할 수도 있다.Typically, the process (S300) of the attack code using the script language to obtain the permission for the object is the same as the process of FIG. 2 described above, and thus description thereof will be omitted. As described above, after the attack code creates the object to be attacked or obtains access to the object, the attack code may change the attribute data value of the object or set a value that may abnormally operate the computer system in the parameter of the interface function. In more detail, in general, an object has an attribute and an interface function as a means for connecting and operating the object. An attribute refers to a variable that can represent the characteristics of an object, and an interface function refers to a function that enables a specific operation of an object. Therefore, if the property value of the object is manipulated, the property of the object may be changed, which may cause a failure in normal operation. In addition, the parameter (argument) value of the interface function is a value required for the operation of the function, for example, if there is a function for stopping the operation of the object for a certain time, the stop time may be one of the argument values. The parameter may be a string, or the computer system may behave abnormally depending on the input value. For example, if a string value larger than a predetermined size of an input string is input to an interface function, a buffer overflow may occur and an object and a computer system may malfunction. Next, when the attack code calls the object, the shared library code of the operating system is executed before the code of the object is operated (S330). The shared library code stage then inputs information received from the attack code, for example, to generate or execute the object. The object is recalled (S340) through information such as an identifier (eg, class ID), an interface function, and a parameter value of the object. That is, normal script code and objects including attack code communicate through shared library code. The attack code may bypass an attempt to detect an attack code by inputting a string manipulated value or an encrypted value to the parameter of the object as described above (S310).

보다 구체적으로 살펴보면, 공격 코드가 인터페이스 함수를 호출할 시에는 반드시 운영 체제의 공유 라이브러리를 통하게 되고, 따라서 공유 라이브러리에 전달되는 객체의 속성 값 또는 파라미터 값을 알아 내면 객체에 전달되는 속성 값 또는 파라미터 값을 파악할 수 있다. 또한, 공격 코드가 스크립트 코드 상에서 암호화된 값이나 조작된 문자열을 사용하여 미리 작성된 시그니처를 통하여 공격 코드를 탐지하는 방법을 회피하고자 하는 경우에도, 최종적으로 객체에 전달되어야 하는 값은 복호화되거나 정상적으로 조합된 문자열이어야 하기 때문에 공유 라이브러리로 전달되는 값 역시 복원된 값이 된다. 즉, 공격 코드가 실행되어 공유 라이브러리를 호출하게 된 시점에서 공유 라이브러리의 각종 파라미터 값들을 조사하면 암호화 여부와 관계없이 공격 코드의 시그니처를 파악할 수 있다.More specifically, when an attack code calls an interface function, the attacker's code must pass through the operating system's shared library. Therefore, if the attacker finds the property value or parameter value of the object passed to the shared library, the property value or parameter value passed to the object is passed. Can be identified. In addition, even if the attack code wants to circumvent how to detect the attack code through a pre-written signature using an encrypted value or a manipulated string on the script code, the value to be finally delivered to the object is decrypted or normally combined. Because it must be a string, the value passed to the shared library is also the restored value. In other words, when the attack code is executed to call the shared library, the signature of the attack code can be determined regardless of encryption by examining various parameter values of the shared library.

이하에서는 본원 발명의 실시예들에 따른 방법들의 흐름도를 참조하여 설명하며, 전술한 바와 같이 흐름도의 각 단계 순서는 절대적인 것은 아니며, 본 발명의 사상을 벗어나지 않는 범위 내에서 역순으로 수행되거나 또는 생략될 수도 있다.The following describes with reference to a flowchart of the method according to the embodiments of the present invention, and as described above, the order of each step of the flowchart is not absolute, and may be performed in the reverse order or omitted within the scope without departing from the spirit of the present invention. It may be.

도 4는 본원 발명의 일 실시예에 따른 취약점 공격 코드의 실시간 탐지 및 방지 방법의 흐름도를 나타낸 도면이다.4 is a flowchart illustrating a real-time detection and prevention method of a vulnerability attack code according to an embodiment of the present invention.

스크립트 코드에 의해 공유 라이브러리로 전달되는 인자 값 등을 검사하고, 검사 결과에 기초하여 스크립트 코드가 공격 코드라고 판단될 시에 객체의 실행을 차단하기 위해, 공유 라이브러리를 후킹(S400)한다. 후킹이란 통상 다른 프로세스나 쓰레드 등에 전달되는 메시지나 이벤트 등을 가로채는 동작을 의미한다. 또한, 공격 코드들의 시그니처 관련 정보가 저장되어 있는 시그니처 데이터베이스 및 차단할 객체 리스트 등 객체의 보호와 관련된 정책이 저장되어 있는 정책 데이터베이스를 메모리에 로드(S410)한다. 다음으로, 후킹된 공유 라이브러리에 객체로 전달되는 함수가 호출되거나 이벤트가 발생하면 이를 조사(S420)한다. 시그니처 데이터베이스 또는 정책 데이터베이스에 기초하여 취약점 공격 코드라고 판단되는 경우(S430의‘예’), 해당 객체의 인터페이스 실행을 차단(S440)함으로써 공격을 방지한다. 또한, 정책에 따라서 해당 객체의 생성 자체를 차단함으로써 공격을 방지하는 것도 가능하다. 즉, 객체의 생성시부터 소멸시까지 일련의 과정을 동적으로 감시하고 보호한다.In order to check argument values and the like delivered to the shared library by the script code and to block execution of the object when it is determined that the script code is an attack code based on the check result, the shared library is hooked (S400). Hooking usually means intercepting messages or events that are sent to other processes or threads. In addition, a signature database in which signature related information of attack codes is stored and a policy database in which a policy related to protection of an object, such as a list of objects to be blocked, are stored are loaded into the memory (S410). Next, if a function that is delivered as an object to the hooked shared library is called or an event occurs, it is examined (S420). If it is determined that the vulnerability attack code is based on the signature database or the policy database (YES in S430), the execution of the interface of the object is blocked (S440) to prevent the attack. In addition, it is possible to prevent an attack by blocking the creation of the object itself according to the policy. That is, it dynamically monitors and protects a series of processes from creation to destruction of objects.

후킹 단계(S400)는 본 발명의 기술 분야에서 통상적으로 사용되는 방법을 통해 수행될 수 있다. 시그니처 데이터베이스에는 공격 코드의 시그니처 정보 등이 저장되어 있으며 공유 라이브러리 후킹을 통해 얻게 되는 정보와의 비교를 통해 공격 코드인지 여부를 판단(S430)할 수 있다. 정책 데이터베이스는 컴퓨터 시스템을 보호하고자 하는 구체적인 방향을 설정하고 있는 정책을 저장하고 있는 데이터 베이스로서, 예를 들어 보호하고자 하는 각각의 객체 별로 보호 정도를 설정할 수도 있고, 취약점이 많거나 빈번하게 공격을 받는 것으로 판단되는 객체의 경우 공격 코드로 판단되는 것과 관계 없이 객체의 생성 또는 실행을 차단할 수도 있다. 따라서, 공격 코드라고 판단하는 단계(S430)에서는 시그니처 데이터베이스 또는 정책 데이터베이스에만 기초하여 판단할 수도 있고, 양자를 동시에 참조하여 객체의 실행 여부를 판단할 수도 있다.Hooking step (S400) may be performed through a method commonly used in the art. Signature information of the attack code is stored in the signature database, and it may be determined whether the attack code is through the comparison with the information obtained through the shared library hooking (S430). A policy database is a database that stores policies that set specific directions for protecting computer systems. For example, a policy database can set the degree of protection for each object to be protected. The object determined to be blocked may be created or executed regardless of the object determined to be an attack code. Therefore, in step S430 of determining that the attack code is determined, only the signature database or the policy database may be determined, or both may be determined simultaneously to determine whether the object is executed.

이와 같이 본 발명에 따른 취약점 공격 코드의 탐지 및 차단 방법은 객체가 생성되고 인터페이스 함수가 수행되는 과정을 실행 시에 동적으로 검사하므로 종래의 정적인 방식에 의한 탐지 및 차단 방법에 비해 안정성과 정확성이 향상된다. 또한, 앞서 서술한 바와 같이 객체의 실행 시에는 암호화되거나 조작된 파라미터 값 등도 공유 라이브러리가 객체를 호출하는 시점에는 모두 복원되기 때문에 공격 코드 탐지의 정확성이 향상되는 효과가 있다.As described above, the method for detecting and blocking the vulnerability attack code according to the present invention dynamically checks the process of creating an object and performing an interface function at execution time, so that the stability and accuracy of the vulnerability attack code is higher than that of the conventional static method. Is improved. In addition, as described above, when the object is executed, the encrypted or manipulated parameter values are all restored when the shared library calls the object, thereby improving the accuracy of attack code detection.

도 5는 본 발명의 다른 실시예에 따른 취약점 공격 코드의 실시간 탐지 및 차단 방법을 나타낸 도면이다.5 is a diagram illustrating a real-time detection and blocking method of a vulnerability attack code according to another embodiment of the present invention.

공유 라이브러리 후킹 단계(S500), 시그니처 및 정책 데이터베이스 로딩 단 계(S510) 및 인터페이스 함수 조사 단계(S520)는 도 4의 과정과 동일한 과정이므로, 자세한 설명은 생략한다. 정책 데이터베이스에 기반하여 차단객체라고 판단될 경우(S530의 ‘예’) 인터페이스 실행을 차단(S540)한다.Since the shared library hooking step S500, the signature and policy database loading step S510, and the interface function investigation step S520 are the same processes as those of FIG. 4, a detailed description thereof will be omitted. If it is determined that the object is blocked based on the policy database (YES in S530), the interface is blocked (S540).

즉, 스크립트 코드가 정상이라고 판단되는 경우라도, 공격이 빈번한 객체이거나 취약성이 높은 객체(S530의 ‘예’)라면, 이와 같은 객체의 인터페이스 함수의 실행을 공격 코드 여부에 관계없이 차단하게끔 정책을 설정함으로써 실행을 차단한다. 객체 별로 설정된 정책 정도에 따라 위험성이 있는 객체의 실행을 차단하여 시스템을 안전하게 보호할 수 있다. 또한, 공유 라이브러리 후킹을 통해서 객체의 생성 시점부터 객체의 일련의 동작을 후킹할 수 있으므로, 객체 별로 설정된 정책에 따라 객체의 생성 자체를 차단하는 것도 가능하다.That is, even if it is determined that the script code is normal, if the object is a frequent attack or an object having high vulnerability (YES in S530), the policy is set to block execution of the interface function of such an object regardless of the attack code. To block execution. The system can be secured by blocking the execution of dangerous objects according to the policy level set for each object. In addition, since it is possible to hook a series of operations of the object from the time of object creation through the shared library hooking, it is also possible to block the creation of the object itself according to the policy set for each object.

도 6은 본 발명의 또 다른 일 실시예에 따른 취약점 공격 코드의 실시간 탐지 및 차단 방법을 나타낸 도면이다.6 is a diagram illustrating a real-time detection and blocking method of a vulnerability attack code according to another embodiment of the present invention.

공유 라이브러리 후킹 단계(S600), 시그니처 및 정책 데이터베이스 로딩 단계(S610) 및 인터페이스 함수 조사 단계(S620)는 도 4의 과정과 동일한 과정이므로, 자세한 설명은 생략한다. 시그니처 데이터베이스 또는 정책 데이터베이스에 기초하여 취약점 공격 코드라고 판단되는 경우(S630의‘예’), 해당 객체의 인터페이스 생성 또는 실행을 차단(S650)함으로써 공격을 방지한다. 또한, 취약점 공격 코드라고 판단되지 않더라도(S630의‘아니오’) 보안 정책의 레벨에 따라서 실행 시 위험성이 높다고 판단되는 객체인 경우(S640의‘예’) 역시 수행을 차단할 수 있다. 전술한 바와 같이 각 단계의 순서는 절대적인 것은 아니며, 본 발명의 사상 을 벗어나지 않는 범위 내에서 역순으로 수행되거나 또는 생략될 수도 있다.Since the shared library hooking step S600, the signature and policy database loading step S610, and the interface function checking step S620 are the same processes as those of FIG. 4, a detailed description thereof will be omitted. If it is determined that the vulnerability attack code is based on the signature database or the policy database (YES in S630), the attack is prevented by blocking the creation or execution of the interface of the object (S650). In addition, even if it is not determined to be a vulnerability attack code (NO in S630), an object that is determined to be at high risk in execution may be blocked according to the security policy level (YES in S640). As described above, the order of each step is not absolute and may be performed in the reverse order or omitted without departing from the spirit of the present invention.

도 7은 본 발명의 일 실시예에 따른 스크립트 언어를 사용한 취약점 공격 코드의 실시간 탐지 및 차단 장치의 구성을 나타내는 블록도이다.7 is a block diagram showing the configuration of a real-time detection and blocking device for vulnerability attack code using a scripting language according to an embodiment of the present invention.

본 발명에 따른 스크립트 언어를 사용한 취약점 공격 코드의 실시간 탐지 및 차단 장치는 시그니처 데이터 베이스부(710), 정책 데이터 베이스부(720), 후킹 엔진부(730) 및 결정 엔진부(740)로 구성된다. An apparatus for real-time detection and blocking of vulnerability code using a scripting language according to the present invention includes a signature database unit 710, a policy database unit 720, a hooking engine unit 730, and a decision engine unit 740. .

시그니처 데이터 베이스부(710)는 공격 코드가 입력하는 파라미터 값 및 속성 값 등의 인자 값 등으로부터 현재 스크립트 코드가 공격 코드인지 여부를 검사하기 위한 기준으로 사용되는 악성 코드 시그니처가 저장되어 있다. 정책 데이터 베이스부(720)는 예컨대 각 객체들에 대하여 또는 일괄적으로 운영 체제(700)에 대하여 보호 레벨을 정하거나, 객체의 실행 여부를 결정하는 것과 같은 보호 정책을 결정하고 저장하고 있다. 후킹 엔진부(730)는 공유 라이브러리의 코드를 후킹한 후 객체의 생성, 인터페이스 함수의 호출 및 사용 등 일련의 과정을 감시하는데 사용된다. 결정 엔진부(740)는 후킹 엔진부(730)로부터 취득한 결과와 시그니처 데이터 및 정책 데이터를 기준으로 하여 객체의 실행 여부를 결정하는 역할을 수행한다.The signature database unit 710 stores a malicious code signature that is used as a criterion for checking whether the current script code is an attack code from parameter values and attribute values inputted by the attack code. The policy database unit 720 determines and stores a protection policy, such as setting a protection level for each object or collectively for the operating system 700 or determining whether to execute an object. The hooking engine unit 730 hooks the code of the shared library and then is used to monitor a series of processes such as creating an object and calling and using an interface function. The decision engine unit 740 determines whether to execute the object based on the result obtained from the hooking engine unit 730 and the signature data and the policy data.

상술한 각 구성요소는 소프트웨어(software) 또는, FPGA(field-programmable gate array)나 ASIC(application-specific integrated circuit)과 같은 하드웨어(hardware)를 의미할 수 있다.  그렇지만 상기 구성요소들은 소프트웨어 또는 하드웨어에 한정되는 의미는 아니며, 어드레싱(addressing)할 수 있는 저장 매체에 있도록 구성될 수도 있고 하나 또는 그 이상의 프로세서들을 실행시키도록 구성될 수도 있다.  상기 구성요소들 안에서 제공되는 기능은 더 세분화된 구성요소에 의하여 구현될 수 있으며, 복수의 구성요소들을 합하여 특정한 기능을 수행하는 것으로 구현할 수도 있다.  뿐만 아니라, 상기 구성요소들은 시스템 내의 하나 또는 그 이상의 컴퓨터들을 실행시키도록 구현될 수 있다. 또한, 모든 구성요소가 필수 구성요소이지는 않으며, 본 발명의 기술적 사상을 벗어나지 않는 범위에서 포함되지 않거나 복수로 포함될 수도 있다.Each component described above may refer to software or hardware such as a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). However, the components are not limited to software or hardware, and may be configured to be in an addressable storage medium and may be configured to execute one or more processors. The functions provided in the above components may be implemented by more detailed components, or may be implemented by combining a plurality of components to perform a specific function. In addition, the components may be implemented to execute one or more computers in a system. In addition, not all components are essential components and may not be included or included in a plurality without departing from the spirit of the present invention.

이상 첨부된 도면을 참조하여 본 발명의 실시예를 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. Although 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 an embodiment of a source code of an attack code using a string manipulation method to evade a conventional attack code detection technique.

도 2는 컴퓨터 시스템에서 스크립트 코드가 COM 객체를 실행하는 단계를 도시한 구조를 나타내는 도면이다.2 is a diagram illustrating a structure showing a step in which a script code executes a COM object in a computer system.

도 3은 스크립트 언어를 사용한 공격 코드의 전형적인 흐름을 나타낸 흐름도이다. 3 is a flow diagram illustrating a typical flow of attack code using a scripting language.

도 4는 본원 발명의 일 실시예에 따른 취약점 공격 코드의 실시간 탐지 및 방지 방법의 흐름도를 나타낸 도면이다.4 is a flowchart illustrating a real-time detection and prevention method of a vulnerability attack code according to an embodiment of the present invention.

도 5는 본 발명의 다른 실시예에 따른 취약점 공격 코드의 실시간 탐지 및 차단 방법을 나타낸 도면이다.5 is a diagram illustrating a real-time detection and blocking method of a vulnerability attack code according to another embodiment of the present invention.

도 6은 본 발명의 또 다른 일 실시예에 따른 취약점 공격 코드의 실시간 탐지 및 차단 방법을 나타낸 도면이다.6 is a diagram illustrating a real-time detection and blocking method of a vulnerability attack code according to another embodiment of the present invention.

도 7은 본 발명의 일 실시예에 따른 스크립트 언어를 사용한 취약점 공격 코드의 실시간 탐지 및 차단 장치의 구성을 나타내는 블록도이다.7 is a block diagram showing the configuration of a real-time detection and blocking device for vulnerability attack code using a scripting language according to an embodiment of the present invention.

Claims (11)

악성 코드의 시그니처 정보가 저장되어 있는 시그니처 데이터베이스 및 시스템 보호 관련 정책이 저장되어 있는 정책 데이터베이스를 메모리에 로드하는 단계;Loading a signature database in which signature information of malicious code is stored and a policy database in which a system protection related policy is stored in memory; 스크립트 코드와 보호 대상 객체 사이에 위치하며 상기 스크립트 코드 및 상기 보호 대상 객체가 함께 사용하는 운영체제의 공유 라이브러리를 후킹하는 단계;Hooking a shared library of an operating system located between a script code and a protected object and used by the script code and the protected object; 상기 후킹하는 단계를 통해 후킹된 상기 공유 라이브러리의 인터페이스를 상기 시그니처 데이터베이스 및 상기 정책 데이터베이스에 기초하여 검사하는 단계; Inspecting the interface of the shared library hooked through the hooking based on the signature database and the policy database; 상기 검사하는 단계의 결과에 기초하여 상기 스크립트 코드가 악성 코드인지 여부를 판단하는 단계를 포함하는Determining whether the script code is malicious code based on a result of the checking step; 스크립트 언어를 사용한 취약점 공격 코드의 실시간 탐지 및 차단 방법.Real-time detection and blocking of vulnerability exploit code using scripting language. 제 1 항에 있어서,The method of claim 1, 상기 보호 대상 객체는 COM(Component Object Model) 객체를 포함하는The protected object includes a Component Object Model (COM) object. 방법.Way. 제 1 항에 있어서The method of claim 1 상기 정책 데이터베이스는 각 객체별로 설정된 보호 정책을 포함하는The policy database includes a protection policy set for each object. 방법.Way. 제 1 항에 있어서,The method of claim 1, 상기 판단하는 단계에서 상기 스크립트 코드가 악성 코드라고 판단될 경우 상기 보호 대상 객체의 생성 또는 실행을 차단하는 단계를 더 포함하는If it is determined in the determining that the script code is malicious code, the method further includes blocking generation or execution of the protected object. 방법.Way. 제 1 항에 있어서,The method of claim 1, 상기 판단하는 단계에서 상기 스크립트 코드가 정상 스크립트 코드라고 판단될 경우 상기 정책 데이터베이스를 기반으로 상기 보호 대상 객체가 차단 객체인지 여부를 검사하는 단계; 및If it is determined in the determining that the script code is a normal script code, checking whether the protected object is a blocked object based on the policy database; And 상기 보호 대상 객체가 차단 객체이면 상기 보호 대상 객체의 생성 또는 실행을 차단하는 단계를 더 포함하는Blocking the creation or execution of the protected object if the protected object is a blocked object; 방법.Way. 제 1 항에 있어서,The method of claim 1, 상기 검사하는 단계는 상기 보호 대상 객체의 생성 시부터 소멸 시까지 수행 되는The inspecting step is performed from creation to destruction of the object to be protected. 방법.Way. 시스템 보호 관련 정책이 저장되어 있는 정책 데이터베이스를 메모리에 로드하는 단계;Loading a policy database storing system protection related policies into a memory; 스크립트 코드와 보호 대상 객체 사이의 통신을 담당하며 상기 스크립트 코드 및 상기 보호 대상 객체가 함께 사용하는 운영체제의 공유 라이브러리를 후킹하는 단계;Hooking a shared library of an operating system that is in charge of communication between script code and a protected object and is used by the script code and the protected object; 상기 후킹하는 단계를 통해 후킹된 상기 공유 라이브러리의 인터페이스를 상기 정책 데이터베이스에 기초하여 검사하여 상기 보호 대상 객체가 차단 객체로 설정되어 있는지 여부를 판단하는 단계; 및 Inspecting the hooked interface of the shared library based on the policy database to determine whether the protected object is set as a blocked object; And 상기 보호 대상 객체가 차단 객체인 경우 상기 보호 대상 객체의 생성 또는 실행을 차단하는 단계를 포함하는Blocking the creation or execution of the protected object if the protected object is a blocked object; 스크립트 언어를 사용한 취약점 공격 코드의 실시간 탐지 및 차단 방법.Real-time detection and blocking of vulnerability exploit code using scripting language. 제 7 항에 있어서,The method of claim 7, wherein 상기 보호 대상 객체는 COM 객체를 포함하는The protected object includes a COM object 방법.Way. 제 1 항에 있어서,The method of claim 1, 상기 판단하는 단계는 상기 보호 대상 객체의 생성 시부터 소멸 시까지 수행되는The determining may be performed from the creation of the protected object to the destruction of the object. 방법.Way. 악성 코드의 시그니처 정보가 저장되어 있는 시그니처 데이터베이스;A signature database that stores signature information of malicious code; 시스템 보호 관련 정책이 저장되어 있는 정책 데이터베이스;A policy database that stores system protection related policies; 스크립트 코드와 보호 대상 객체 사이에 위치하며 상기 스크립트 코드 및 상기 보호 대상 객체가 함께 사용하는 운영체제의 공유 라이브러리를 후킹하는 후킹 엔진;A hooking engine positioned between a script code and a protected object and hooking a shared library of an operating system used by the script code and the protected object; 상기 후킹 엔진이 후킹하는 상기 공유 라이브러리의 인터페이스를 상기 시그니처 데이터베이스 및 상기 정책 데이터베이스에 기초해 검사하여 공격 코드의 존재 여부를 판단하는 결정 엔진을 포함하는And a determination engine that determines whether an attack code exists by checking an interface of the shared library hooked by the hooking engine based on the signature database and the policy database. 스크립트 언어를 사용한 취약점 공격 코드의 실시간 탐지 및 차단 장치.Real-time detection and blocking of vulnerability exploit code using scripting language. 제 1 항 내지 제 9 항 중 어느 한 항에 의한 방법을 실행하기 위한 컴퓨터로 읽을 수 있는 프로그램을 기록한 기록매체.A recording medium on which a computer-readable program is recorded for executing the method according to any one of claims 1 to 9.
KR1020080010767A 2008-02-01 2008-02-01 Method and Apparatus for detection and prevention malicious code using script languages for computer system KR100985071B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080010767A KR100985071B1 (en) 2008-02-01 2008-02-01 Method and Apparatus for detection and prevention malicious code using script languages for computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080010767A KR100985071B1 (en) 2008-02-01 2008-02-01 Method and Apparatus for detection and prevention malicious code using script languages for computer system

Publications (2)

Publication Number Publication Date
KR20090084530A KR20090084530A (en) 2009-08-05
KR100985071B1 true KR100985071B1 (en) 2010-10-05

Family

ID=41205069

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080010767A KR100985071B1 (en) 2008-02-01 2008-02-01 Method and Apparatus for detection and prevention malicious code using script languages for computer system

Country Status (1)

Country Link
KR (1) KR100985071B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101181843B1 (en) 2010-12-21 2012-09-11 한국인터넷진흥원 JavaScript obfuscation by hooking automatically decrypted and how to detect malicious Web sites

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101628101B1 (en) * 2014-12-31 2016-06-09 주식회사 시큐아이 Ips apparatus for detecting signature
KR101859823B1 (en) * 2016-07-04 2018-06-28 순천향대학교 산학협력단 Ransomware prevention technique using key backup
KR102067733B1 (en) * 2019-05-15 2020-01-17 세종대학교산학협력단 Method for detecting format string vulnerability and apparatus for executing the method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050007906A (en) * 2003-07-12 2005-01-21 삼성전자주식회사 Shared library system and method for constructing the system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050007906A (en) * 2003-07-12 2005-01-21 삼성전자주식회사 Shared library system and method for constructing the system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101181843B1 (en) 2010-12-21 2012-09-11 한국인터넷진흥원 JavaScript obfuscation by hooking automatically decrypted and how to detect malicious Web sites

Also Published As

Publication number Publication date
KR20090084530A (en) 2009-08-05

Similar Documents

Publication Publication Date Title
KR102307534B1 (en) Systems and methods for tracking malicious behavior across multiple software entities
EP3039608B1 (en) Hardware and software execution profiling
EP2946330B1 (en) Method and system for protecting computerized systems from malicious code
KR101265173B1 (en) Apparatus and method for inspecting non-portable executable files
Wysopal et al. Static detection of application backdoors: Detecting both malicious software behavior and malicious indicators from the static analysis of executable code
US20160224789A1 (en) System and method for hypervisor-based security
US9600665B2 (en) Monitoring device and monitoring method
US20130326618A1 (en) Systems, methods and media for managing process image hijacks
CN113632432B (en) Method and device for judging attack behaviors and computer storage medium
Ramilli et al. Multi-stage delivery of malware
JP2013168141A (en) Method for detecting malware
Verma et al. A literature review on malware and its analysis
KR100985071B1 (en) Method and Apparatus for detection and prevention malicious code using script languages for computer system
KR100745640B1 (en) Method for protecting kernel memory and apparatus thereof
KR100666562B1 (en) Method for protecting kernel driver and process
Piromsopa et al. Survey of protections from buffer-overflow attacks
CN110717181B (en) Non-control data attack detection method and device based on novel program dependency graph
Korkin Hypervisor-based active data protection for integrity and confidentiality of dynamically allocated memory in windows kernel
US10402564B2 (en) Fine-grained analysis and prevention of invalid privilege transitions
US11449610B2 (en) Threat detection system
Albabtain et al. The process of reverse engineering GPU malware and provide protection to GPUs
JP5177206B2 (en) Software falsification detection device and falsification detection method
Kirmani et al. Analyzing detection avoidance of malware by process hiding
US20210157925A1 (en) Selective runtime activation of anti-rop defense
JP5177205B2 (en) Software falsification preventing apparatus and falsification preventing method

Legal Events

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

Payment date: 20130930

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20140929

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20150929

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20160928

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20170928

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20180928

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20190930

Year of fee payment: 10