KR102419867B1 - System and method to detect injection attack type malicious code - Google Patents

System and method to detect injection attack type malicious code Download PDF

Info

Publication number
KR102419867B1
KR102419867B1 KR1020200118204A KR20200118204A KR102419867B1 KR 102419867 B1 KR102419867 B1 KR 102419867B1 KR 1020200118204 A KR1020200118204 A KR 1020200118204A KR 20200118204 A KR20200118204 A KR 20200118204A KR 102419867 B1 KR102419867 B1 KR 102419867B1
Authority
KR
South Korea
Prior art keywords
entropy
code
thread
symbol
attack type
Prior art date
Application number
KR1020200118204A
Other languages
Korean (ko)
Other versions
KR20220036063A (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 KR1020200118204A priority Critical patent/KR102419867B1/en
Publication of KR20220036063A publication Critical patent/KR20220036063A/en
Application granted granted Critical
Publication of KR102419867B1 publication Critical patent/KR102419867B1/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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention is to diagnose/detect injection of an attack type malicious code, such as polymorphic shell code, which is difficult to diagnose as the code exists only in memory. The present invention provides a new technology which can diagnose/detect polymorphic shell codes with high reliability without missing detection or false positives, breaking away from the existing pattern-based detection techniques. That is, the present invention is to realize an injection attack type malicious code detection system and an injection attack type malicious code detection method.

Description

주입 공격형 악성코드 탐지시스템 및 주입 공격형 악성코드 탐지방법{SYSTEM AND METHOD TO DETECT INJECTION ATTACK TYPE MALICIOUS CODE}Injection attack type malicious code detection system and injection attack type malicious code detection method {SYSTEM AND METHOD TO DETECT INJECTION ATTACK TYPE MALICIOUS CODE}

본 발명은 악성코드를 진단/탐지하기 위한 기술에 관한 것으로, 더욱 상세하게는 메모리 상에만 존재하여 진단이 어려운 주입 공격형 악성코드를 진단/탐지하기 위한 기술에 관한 것이다.The present invention relates to a technology for diagnosing/detecting malicious code, and more particularly, to a technology for diagnosing/detecting an injection attack type malicious code that is difficult to diagnose because it exists only in a memory.

악성 행위를 수행하여 공격을 감행하는 악성코드는, 파일 형태로 배포되어 공격 대상의 사용자 시스템에 침투하는 타입도 있으나, 파일리스(fileless) 형태로 배포되어 사용자 시스템의 메모리 상에만 존재하다가 공격을 감행하는 타입도 있다.Malicious code that attacks by performing malicious actions is distributed in the form of a file and infiltrates the target user's system. There are also types that do.

이와 같은 파일리스 형태의 악성코드는, 공격 대상 시스템에서 악의적인 행위를 하기 위해 쉘코드(shellcode)라는 초기 공격 코드를 공격 대상 시스템의 메모리에 주입(injection)하여 공격을 시작한다This fileless type of malware starts an attack by injecting an initial attack code called shellcode into the memory of the attack target system to perform malicious actions on the target system.

그리고, 악성코드는 공격 대상 시스템의 취약점 등을 이용하여 시스템에 대한 실행 제어 권한을 얻고, 메모리에 주입한 쉘코드의 시작 부분을 실행하도록 제어하여 시스템을 탈취/공격한다.In addition, the malicious code obtains execution control authority for the system by using the vulnerability of the attack target system, and controls the execution of the beginning of the shellcode injected into the memory to hijack/attack the system.

따라서, 방어자는 파일리스 형태의 악성코드의 전술과 같은 공격 행위를 탐지하기 위해 주입된 쉘코드의 패턴(signature) 기반으로 진단/탐지하고, 공격자는 패턴 기반의 탐지를 우회하기 위해 패턴 탐지가 어렵게 쉘코드에 다형성(Polymorphic) 기법을 적용하여 진화하고 있다.Therefore, the defender diagnoses/detects based on the pattern (signature) of the injected shellcode to detect the attack behavior such as the tactic of the fileless type of malicious code, and the attacker makes it difficult to detect the pattern to bypass the pattern-based detection. It is evolving by applying polymorphic techniques to shellcode.

결국, 기존의 패턴 기반 탐지 기법으로는, 다형성을 이용해서 계속 랜덤 생성되는 다형성 쉘코드 패턴에 대응할 수 없는 한계를 갖는다.As a result, the existing pattern-based detection technique has a limitation in that it cannot cope with polymorphic shellcode patterns that are continuously randomly generated using polymorphism.

이에, 본 발명에서는, 기존의 패턴 기반 탐지 기법에서 벗어나, 메모리 상에만 존재하여 진단이 어려운 주입 공격형 악성코드 예컨대 다형성 쉘코드를 정확도 높게 진단/탐지할 수 있는 방안(기술)을 제안하고자 한다.Accordingly, the present invention intends to propose a method (technique) capable of diagnosing/detecting an injection attack type malicious code, such as a polymorphic shellcode, which exists only in memory and is difficult to diagnose, with high accuracy, away from the existing pattern-based detection technique.

본 발명은 상기한 사정을 감안하여 창출된 것으로서, 본 발명에서 도달하고자 하는 목적은, 기존의 패턴 기반 탐지 기법에서 벗어나, 메모리 상에만 존재하여 진단이 어려운 주입 공격형 악성코드 예컨대 다형성 쉘코드를 정확도 높게 진단/탐지할 수 있는 새로운 기술, 즉 주입 공격형 악성코드 탐지시스템 및 주입 공격형 악성코드 탐지방법을 제공하는데 있다.The present invention was created in consideration of the above circumstances, and the purpose of the present invention is to break away from the existing pattern-based detection technique, and to accurately detect injection attack-type malicious code that is difficult to diagnose because it exists only in the memory, such as polymorphic shellcode, with high accuracy. It is to provide a new technology for diagnosis/detection, that is, an injection attack type malicious code detection system and an injection attack type malicious code detection method.

상기 목적을 달성하기 위한 본 발명의 제 1 관점에 따른 주입 공격형 악성코드 탐지방법은, 스레드에서 코드가 실행되는 스레드 코드 실행을 감시하는 감시단계; 상기 스레드 코드 실행이 탐지되면, 실행되려는 메모리 상의 스레드 실행 코드의 엔트로피를 측정하는 엔트로피측정단계; 상기 스레드 실행 코드에서 이상 심볼의 출현 여부를 확인한 결과에 따라, 상기 측정한 엔트로피를 보간 처리하는 엔트로피보간단계; 상기 보간 처리한 엔트로피를 근거로, 상기 스레드 실행 코드가 메모리에 주입된 악성 코드인지 여부를 탐지하는 탐지단계를 포함한다.According to a first aspect of the present invention, there is provided a method for detecting an injection attack type malicious code, comprising: a monitoring step of monitoring a thread code execution in which a code is executed in a thread; an entropy measurement step of measuring the entropy of a thread execution code in a memory to be executed when the execution of the thread code is detected; an entropy interpolation step of interpolating the measured entropy according to a result of checking whether an abnormal symbol appears in the thread execution code; and detecting whether the thread execution code is a malicious code injected into a memory based on the interpolated entropy.

상기 목적을 달성하기 위한 본 발명의 제 2 관점에 따른 주입 공격형 악성코드 탐지시스템은, 스레드에서 코드가 실행되는 스레드 코드 실행을 감시하는 감시부; 상기 스레드 코드 실행이 탐지되면, 실행되려는 메모리 상의 스레드 실행 코드의 엔트로피를 측정하는 엔트로피측정부; 상기 스레드 실행 코드에서 이상 심볼의 출현 여부를 확인한 결과에 따라, 상기 측정한 엔트로피를 보간 처리하는 엔트로피보간부; 상기 보간 처리한 엔트로피를 근거로 상기 스레드 실행 코드기 메모리에 주입된 악성 코드인지 여부를 탐지하는 탐지부를 포함한다.According to a second aspect of the present invention, there is provided an injection attack type malicious code detection system, comprising: a monitoring unit monitoring thread code execution in which a code is executed in a thread; an entropy measuring unit measuring entropy of a thread execution code in a memory to be executed when the execution of the thread code is detected; an entropy interpolation unit for interpolating the measured entropy according to a result of checking whether an abnormal symbol appears in the thread execution code; and a detection unit that detects whether the thread execution code is a malicious code injected into a memory based on the interpolated entropy.

본 발명의 실시예들에 따르면, 파일이 존재하지 않고 메모리 상에서만 동작하는 쉘코드 특히 다형성 쉘코드의 경우 엔트로피가 높다는 점에 착안하여, 엔트로피를 이용한 새로운 주입 공격형 악성코드(예: 쉘코드) 탐지 기법을 실현하며, 특히 쉘코드의 엔트로피가 정상 엔트로피로 탐지되는 등의 탐지 누락 또는 오탐을 회피하기 위해 유연한 엔트로비 보간 방식을 적용하여 보다 신뢰도 높은 탐지 기법을 실현하고 있다.According to the embodiments of the present invention, a new injection attack type malicious code (eg, shellcode) using entropy is detected, paying attention to the high entropy of shellcode that does not exist in a file and operates only in memory, especially polymorphic shellcode. In particular, a more reliable detection technique is realized by applying a flexible entropy interpolation method to avoid detection omissions or false positives, such as when the entropy of the shellcode is detected as normal entropy.

이로 인해, 본 발명에 따르면, 메모리 상에만 존재하여 진단이 어려운 주입 공격형 악성코드 예컨대 다형성 쉘코드를 진단/탐지하는데 있어, 기존의 패턴 기반 탐지 기법에서 벗어나, 탐지 누락 또는 오탐 없이 신뢰도 높게 진단/탐지할 수 있는 효과를 도출할 수 있다.For this reason, according to the present invention, in diagnosing/detecting an injection-attacking malicious code, such as polymorphic shellcode, which exists only in memory and is difficult to diagnose, it departs from the existing pattern-based detection technique and diagnoses/detects it with high reliability without missing detection or false positives. possible effects can be derived.

도 1은 본 발명의 일 실시예에 따른 주입 공격형 악성코드 탐지시스템의 구성을 보여주는 구성도이다.
도 2 내지 도 4는 본 발명에서 다형성 쉘코드의 엔트로피를 보간 처리되는 개념을 보여주는 예시 테이블이다.
도 5는 본 발명의 일 실시예에 따른 주입 공격형 악성코드 탐지방법이 동작하는 실시예를 보여주는 흐름 예시도이다.
1 is a block diagram showing the configuration of an injection attack type malicious code detection system according to an embodiment of the present invention.
2 to 4 are exemplary tables showing the concept of interpolating entropy of polymorphic shellcode in the present invention.
5 is a flowchart illustrating an embodiment in which the injection attack type malicious code detection method according to an embodiment of the present invention operates.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.Since the present invention can have various changes and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail. However, this is not intended to limit the present invention to specific embodiments, and should be understood to include all modifications, equivalents and substitutes included in the spirit and scope of the present invention. In describing each figure, like reference numerals have been used for like elements.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is referred to as being “connected” or “connected” to another component, it may be directly connected or connected to the other component, but it is understood that other components may exist in between. it should be On the other hand, when it is said that a certain element is "directly connected" or "directly connected" to another element, it should be understood that the other element does not exist in the middle.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It is to be understood that this does not preclude the possibility of the presence or addition of numbers, steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in a commonly used dictionary should be interpreted as having a meaning consistent with the meaning in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present application. does not

이하, 첨부된 도면을 참조하여 본 발명에 대하여 설명한다.Hereinafter, the present invention will be described with reference to the accompanying drawings.

본 발명은, 메모리 상에만 존재하여 진단이 어려운 주입 공격형 악성코드를 진단/탐지하기 위한 기술에 관한 것이다.The present invention relates to a technique for diagnosing/detecting an injection attack type malicious code that exists only in a memory and is difficult to diagnose.

악성 행위를 수행하여 공격을 감행하는 악성코드는, 파일 형태로 배포되어 공격 대상의 사용자 시스템에 침투하는 타입도 있으나, 파일리스(fileless) 형태로 배포되어 사용자 시스템의 메모리 상에만 존재하다가 공격을 감행하는 타입도 있다.Malicious code that attacks by performing malicious actions is distributed in the form of a file and infiltrates the target user's system. There are also types that do.

이와 같은 파일리스 형태의 악성코드는, 공격 대상 시스템에서 악의적인 행위를 하기 위해 쉘코드(shellcode)라는 초기 공격 코드를 공격 대상 시스템의 메모리에 주입(injection)하여 공격을 시작한다This fileless type of malware starts an attack by injecting an initial attack code called shellcode into the memory of the attack target system to perform malicious actions on the target system.

그리고, 악성코드는 공격 대상 시스템의 취약점 등을 이용하여 시스템에 대한 실행 제어 권한을 얻고, 메모리에 주입한 쉘코드의 시작 부분을 실행하도록 제어하여 시스템을 탈취/공격한다.In addition, the malicious code obtains execution control authority for the system by using the vulnerability of the attack target system, and controls the execution of the beginning of the shellcode injected into the memory to hijack/attack the system.

따라서, 방어자는 파일리스 형태의 악성코드의 전술과 같은 공격 행위를 탐지하기 위해 주입된 쉘코드의 패턴(signature) 기반으로 진단/탐지하고, 공격자는 패턴 기반의 탐지를 우회하기 위해 패턴 탐지가 어렵게 쉘코드에 다형성(Polymorphic) 기법을 적용하여 진화하고 있다.Therefore, the defender diagnoses/detects based on the pattern (signature) of the injected shellcode to detect the attack behavior such as the tactic of the fileless type of malicious code, and the attacker makes it difficult to detect the pattern to bypass the pattern-based detection. It is evolving by applying polymorphic techniques to shellcode.

결국, 기존의 패턴 기반 탐지 기법으로는, 다형성을 이용해서 계속 랜덤 생성되는 다형성 쉘코드 패턴에 대응할 수 없는 한계를 갖는다.As a result, the existing pattern-based detection technique has a limitation in that it cannot cope with polymorphic shellcode patterns that are continuously randomly generated using polymorphism.

이에, 본 발명에서는, 기존의 패턴 기반 탐지 기법에서 벗어나, 메모리 상에만 존재하여 진단이 어려운 주입 공격형 악성코드 예컨대 다형성 쉘코드를 정확도 높게 진단/탐지할 수 있는 방안(기술)을 제안하고자 한다.Accordingly, the present invention intends to propose a method (technique) capable of diagnosing/detecting an injection attack type malicious code, such as a polymorphic shellcode, which exists only in memory and is difficult to diagnose, with high accuracy, away from the existing pattern-based detection technique.

보다 정확히는, 본 발명에서는, 악성코드가 메모리 상에서 사용자 환경에 침투하기 위해 쉘코드를 주입한 공격 행위를 탐지하는 새로운 방식의 탐지 기법을 제안하며, 특히 엔트로피를 이용하는 탐지 기법을 제안하고자 한다.More precisely, the present invention proposes a new detection technique for detecting an attack behavior in which a malicious code injects a shellcode in order to infiltrate the user environment in memory, and in particular, a detection technique using entropy.

엔트로피는 정보량을 의미하고, bit 로 표현한다.Entropy refers to the amount of information and is expressed in bits.

정상적인 코드의 엔트로피 보다 엔트로피가 높다는 것은 불확실성이 높다는 것을 의미하고, 정상적인 코드 형태와 다르다는 것을 의미한다.Higher entropy than the entropy of normal code means high uncertainty and different from normal code shape.

스레드가 다형성이 적용된 형태의 쉘코드를 실행한다고 가정하면, 정상적인 코드와는 다른 형태를 띠며 높은 엔트로피를 갖게 될 것이다.Assuming that a thread executes a shellcode with polymorphism applied, it will have a different form from normal code and will have high entropy.

이에, 본 발명에서는, 다형성 쉘코드의 엔트로피가 높다는 점에 착안하여, 다형성의 쉘코드를 효과적인 탐지하기 위해 엔트로피를 이용하는 탐지 기법을 제안한다. Accordingly, the present invention proposes a detection technique using entropy to effectively detect polymorphic shellcodes, paying attention to the high entropy of polymorphic shellcodes.

즉, 본 발명은, 문서나 스크립트 등의 파일 형태에 포함된 쉘코드가 아닌, 파일이 존재하지 않고 메모리 상에서만 동작하는 쉘코드 특히 다형성 쉘코드를 탐지할 수 있는 기법을 제안한다는 특징을 갖는다.That is, the present invention is characterized by proposing a technique capable of detecting shellcode, particularly polymorphic shellcode, that operates only in memory without a file, rather than shellcode included in a file type such as a document or script.

보다 구체적으로, 본 발명에서는 제안하는 탐지 기법을 실현할 수 있는 주입 공격형 악성코드 탐지시스템(100, 또는 탐지장치)를 구현해내고자 한다.More specifically, the present invention intends to implement an injection attack type malicious code detection system 100 or a detection device capable of realizing the proposed detection technique.

도 1은, 본 발명의 일 실시예에 따른 주입 공격형 악성코드 탐지시스템(100)의 구성을 보여주고 있다.1 shows the configuration of an injection attack type malicious code detection system 100 according to an embodiment of the present invention.

본 발명에 따른 주입 공격형 악성코드 탐지시스템(100)는, 악성코드에 의해 공격 대상이 될 수 있는 독립된 사용자 시스템에 탑재/설치되는 것이 바람직하다. The injection attack type malicious code detection system 100 according to the present invention is preferably mounted/installed on an independent user system that can be attacked by malicious code.

이러한 본 발명의 주입 공격형 악성코드 탐지시스템(100)는, 사용자 시스템에 설치되는 어플리케이션, 또는 프로그램, 또는 엔진 형태일 수 있다.The injection attack type malicious code detection system 100 of the present invention may be in the form of an application, program, or engine installed in a user system.

도 1에 도시된 바와 같이, 본 발명의 일 실시예에 따른 주입 공격형 악성코드 탐지시스템(100)는, 감시부(110), 엔트로피처리부(120), 탐지부(130)를 포함하여 구성될 수 있다. As shown in FIG. 1 , the injection attack type malware detection system 100 according to an embodiment of the present invention may include a monitoring unit 110 , an entropy processing unit 120 , and a detection unit 130 . have.

더 나아가, 주입 공격형 악성코드 탐지시스템(100)는, 엔트로피처리부(120)를 엔트로피측정부(126) 및 엔트로피보간부(128)로 구분하여 구성될 수 있다. Furthermore, the injection attack type malicious code detection system 100 may be configured by dividing the entropy processing unit 120 into an entropy measuring unit 126 and an entropy interpolating unit 128 .

결국, 도 1에 도시된 본 발명의 주입 공격형 악성코드 탐지시스템(100)는, 전술한 구성을 기반으로 본 발명에서 제안하는 탐지 기법, 즉 기존의 패턴 기반 탐지 기법에서 벗어나, 파일이 존재하지 않고 메모리 상에서만 동작하는 쉘코드 특히 다형성 쉘코드를 정확도 높게 진단/탐지할 수 있는 새로운 방식의 기술을 실현할 수 있다. As a result, the injection attack type malicious code detection system 100 of the present invention shown in FIG. 1 deviated from the detection method proposed by the present invention, that is, the existing pattern-based detection method, based on the above-described configuration, and does not include a file. It is possible to realize a new method of diagnosing/detecting shellcodes that operate only in memory, especially polymorphic shellcodes with high accuracy.

이하에서는, 본 발명에서 제안하는 기술을 실현하기 위한 주입 공격형 악성코드 탐지시스템(100) 내 각 구성에 대해 보다 구체적으로 설명하기로 한다.Hereinafter, each configuration in the injection attack type malicious code detection system 100 for realizing the technology proposed by the present invention will be described in more detail.

감시부(110)는, 스레드에서 코드가 실행되는 스레드 코드 실행을 감시하는 기능을 담당한다.The monitoring unit 110 is responsible for monitoring the execution of the thread code in which the code is executed in the thread.

구체적으로 설명하면, 감시부(110)는, 스레드에서 코드가 실행되는 시작 시점을 감시하는 방식으로, 스레드 코드 실행을 감시/탐지할 수 있다.More specifically, the monitoring unit 110 may monitor/detect the execution of the thread code in a manner of monitoring the start time point at which the code is executed in the thread.

스레드 코드의 실행의 감시/탐지는 악성코드의 쉘코드가 메모리에 주입 (injection)된 후 실행(execution)되는 시점을 탐지하기 위한 것을 의미하며, 스레드 생성(create), 스레드 재개(resume), 비동기 작업 요청(apc) 등을 포함하여 스레드를 실행시킬 수 있는 여러 가지 실행 방식을 감지/탐지하는 것을 의미한다.Monitoring/detection of thread code execution means to detect when the malicious code shellcode is injected into memory and then executed. It means detecting/detecting various execution methods that can execute a thread, including work requests (apc), etc.

그리고, 감시부(110)의 스레드 코드 실행 감시/탐지는 윈도우 유저 / 커널 내에서 통지(notify) 기법과 후킹(hook) 매커니즘 등을 통해 전달 받아 실현될 수 있다.In addition, the monitoring/detection of thread code execution by the monitoring unit 110 may be realized by being delivered through a notification technique and a hooking mechanism within a window user/kernel.

엔트로피처리부(120)는, 본 발명의 제안 방안 즉 새롭게 제안하는 탐지 기법의 핵심으로서, 스레드 코드 실행이 탐지되면, 실행되려는 메모리 상의 스레드 실행 코드의 엔트로피를 측정 및 보간하는 기능을 담당한다.The entropy processing unit 120 is the core of the proposed method of the present invention, that is, a newly proposed detection technique, and is responsible for measuring and interpolating the entropy of the thread execution code in the memory to be executed when the execution of the thread code is detected.

구체적으로, 엔트로피처리부(120)는 엔트로피측정부(126) 및 엔트로피보간부(128)로 구분될 수 있다.Specifically, the entropy processing unit 120 may be divided into an entropy measuring unit 126 and an entropy interpolating unit 128 .

엔트로피측정부(126)는, 스레드 코드 실행이 탐지되면, 실행되려는 메모리 상의 스레드 실행 코드의 엔트로피를 측정하는 기능을 담당한다.The entropy measuring unit 126 is responsible for measuring the entropy of the thread execution code in the memory to be executed when the execution of the thread code is detected.

구체적으로 설명하면, 엔트로피측정부(126)는, 감시부(110)의 감시에 따라 스레드 코드 실행이 탐지되면, 메모리 상에서 실행되려는 스레드 실행 코드의 심볼을 추출 및 추출한 심볼에 대한 엔트로피를 측정할 수 있다.Specifically, when the execution of the thread code is detected according to the monitoring of the monitoring unit 110, the entropy measurement unit 126 extracts a symbol of the thread execution code to be executed in the memory and measures the entropy of the extracted symbol. have.

구체적인 일 실시예에 따르면, 엔트로피측정부(126)는, 메모리 상에서 실행되려는 스레드 실행 코드의 시작 부분 심볼을 추출할 수 있다.According to a specific embodiment, the entropy measuring unit 126 may extract the symbol of the beginning of the thread execution code to be executed in the memory.

여기서, 스레드 실행 코드의 시작 부분 심볼을 추출하는 이유는, 스레드 코드의 앞 쪽(예: 앞 0~100바이트)에 후술할 이상 심볼이 출현(존재)하는 경우 악성일 가능성 높기 때문이다.Here, the reason for extracting the symbol at the beginning of the thread execution code is that if an abnormal symbol to be described later appears (exists) in the front (eg, 0 to 100 bytes before) of the thread code, it is highly likely to be malicious.

한편, 메모리 상에서 실행되는 스레드 코드는, 바이트 코드로서 오피코드(opcode) 명령과 오퍼랜드(operand) 인자로 해석되어 실행된다.On the other hand, the thread code executed in the memory is interpreted and executed as an opcode instruction and an operand argument as a byte code.

여기서, 오퍼랜드는 인자 부분으로서 고정되지 않는 값이 사용되므로, 엔트로피 측정 결과에 영향을 줄 수 있다.Here, since an unfixed value is used as a factor part of the operand, it may affect the entropy measurement result.

이에, 엔트로피측정부(126)는, 메모리 상에서 실행되려는 스레드 실행 코드의 오피코드(opcode) 명령/오퍼랜드(operand) 인자 중 오피코드 즉 시작 부분의 오피코드를 디스어셈블하여 심볼로 추출할 수 있다(122).Accordingly, the entropy measuring unit 126 may disassemble the opcode at the beginning of the opcode command/operand argument of the thread execution code to be executed in the memory, that is, the opcode at the beginning and extract it as a symbol ( 122).

그리고, 엔트로피측정부(126)는, 추출한 심볼을 이용하여, 엔트로피를 측정한다.Then, the entropy measuring unit 126 measures entropy by using the extracted symbol.

일 실시예에 따르면, 엔트로피측정부(126)는, 앞서 추출한 바 있는 시작 부분의 오피코드로 이루어진 심볼 배열을 이용하여, 측정 공식 예컨대 새넌 엔트로피 공식(이하, 수학식 1)을 통해 엔트로피를 측정할 수 있다(124).According to an embodiment, the entropy measuring unit 126 may measure entropy through a measurement formula, for example, a Shannon entropy formula (hereinafter, Equation 1), using a symbol array consisting of an opcode of the beginning that has been extracted above. can (124).

[수학식 1][Equation 1]

l(x) = -logP(x)l(x) = -logP(x)

여기서 P는 심볼의 확률을 의미한다. 물론, 본 발명에서는, 새넌 엔트로피 공식 이외의 다른 다양한 측정 공식을 활용하여 엔트로피를 측정할 수 있으며, 측정 공식에 제한을 두지 않을 것이다.Here, P means the probability of the symbol. Of course, in the present invention, entropy may be measured by using various measurement formulas other than the Shannon entropy formula, and the measurement formula will not be limited.

엔트로피보간부(128)는, 금번 스레드 실행 코드에서 이상 심볼의 출현 여부를 확인한 결과에 따라, 금번 측정한 엔트로피를 보간 처리하는 기능을 담당한다.The entropy interpolation unit 128 is responsible for interpolating the currently measured entropy according to a result of checking whether an abnormal symbol appears in the current thread execution code.

구체적으로, 엔트로피보간부(128)는, 엔트로피측정부(126)에서 추출한 스레드 실행 코드의 시작 부분(오피코드) 심볼에서 이상 심볼의 출현 여부를 확인하고, 그 결과에 따라 엔트로피측정부(126)에서 측정한 엔트로피를 보간 처리할 수 있다.Specifically, the entropy interpolation unit 128 checks whether an abnormal symbol appears in a symbol at the beginning (opcode) of the thread execution code extracted from the entropy measurement unit 126, and according to the result, the entropy measurement unit 126. The measured entropy can be interpolated.

정상적인 스레드 시작 코드의 심볼 엔트로피가 3.5~3.7 bit(이하, 정상 엔트로피 기준값의 허용 범위)라고 가정했을 때, 다형성 쉘코드에서 사용된 심볼 중 정상적인 스레드 시작 코드에서 나올 수 없는 명령(이상 심볼)이 있다 하더라도, 그 이상 심볼의 출현 빈도 자체가 적어 정보량이 적을 경우 정상적인 스레드 시작 코드의 심볼 엔트로피와 유사하게 3~4bit 사이로 측정될 수도 있다.Assuming that the symbol entropy of the normal thread start code is 3.5 to 3.7 bits (hereinafter, the allowable range of the normal entropy standard value), among the symbols used in the polymorphic shellcode, there are commands (abnormal symbols) that cannot come out of the normal thread start code. Even so, when the amount of information is small because the frequency of occurrence of more symbols is small, similar to the symbol entropy of a normal thread start code, it may be measured between 3 and 4 bits.

즉, 금번 스레드 실행 코드가 쉘코드(또는 다형성 쉘코드)인 경우라도, 심볼을 이용하여 엔트로피측정부(126)에서 측정한 엔트로피가 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)에 속하는 상황이 생길 수 있는 것이다.That is, even when the current thread execution code is a shellcode (or polymorphic shellcode), the entropy measured by the entropy measuring unit 126 using the symbol falls within the allowable range of the normal entropy reference value (eg, 3.5 to 3.7 bits). situations can arise.

이러한 상황에서도 쉘코드(또는 다형성 쉘코드)를 정확히 진단/탐지하기 위해, 본 발명에서는 엔트로피보간부(128)를 구성하고 있다.In order to accurately diagnose/detect the shellcode (or polymorphic shellcode) even in such a situation, the entropy interpolation unit 128 is configured in the present invention.

보다 구체적인 실시예를 설명하면, 엔트로피보간부(128)는, 정상 검증된 다수의 스레드 시작 코드 데이터를 근거로 정의한 심볼 테이블을 사용하여, 금번 스레드 실행 코드에서 이상 심볼의 출현 여부를 확인할 수 있다.In a more specific embodiment, the entropy interpolation unit 128 may check whether an abnormal symbol appears in the current thread execution code by using a symbol table defined based on a plurality of normally verified thread start code data.

예를 들면, 본 발명의 주입 공격형 악성코드 탐지시스템(100)에서는, 정상 검증된 다수(예: 수십만개 이상)의 스레드 시작 코드 데이터에서 정상적인 스레드 시작 코드가 사용한 유니크한 심볼들로 이루어진 심볼 테이블을 기 정의할 수 있다.For example, in the injection attack malware detection system 100 of the present invention, a symbol table consisting of unique symbols used by a normal thread start code from a plurality of normally verified (eg, hundreds of thousands or more) thread start code data is generated. can be defined.

이러한 심볼 테이블은, 주기적 또는 정해진 이벤트 시점 마다 새롭게 갱신되어, 최신 심볼 테이블로서 관리/유지될 수 있다.Such a symbol table may be newly updated periodically or at a predetermined event time point, and may be managed/maintained as the latest symbol table.

이에, 엔트로피보간부(128)는, 기 정의한 심볼 테이블을 사용하여, 엔트로피측정부(126)에서 추출한 금번 스레드 실행 코드의 시작 부분 심볼에서 심볼 테이블에 포함되지 않은 심볼이 출현하는지 판단함으로써, 이상 심볼의 출현 여부를 확인할 수 있다.Accordingly, the entropy interpolation unit 128 determines whether a symbol not included in the symbol table appears in the symbol at the beginning of the current thread execution code extracted by the entropy measurement unit 126 using a predefined symbol table. appearance can be checked.

즉, 엔트로피보간부(128)는, 금번 스레드 실행 코드의 시작 부분 심볼에서 심볼 테이블에 포함되지 않은 심볼이 출현한다면, 해당 심볼을 이상 심볼로 판단/확인하는 것이다.That is, if a symbol not included in the symbol table appears in the symbol at the beginning of the current thread execution code, the entropy interpolator 128 determines/confirms the symbol as an abnormal symbol.

이후, 엔트로피보간부(128)는, 엔트로피측정부(126)에서 추출한 금번 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼의 출현 여부를 확인한 결과에 따라, 엔트로피측정부(126)에서 측정한 엔트로피를 보간 처리한다.Thereafter, the entropy interpolation unit 128 interpolates the entropy measured by the entropy measurement unit 126 according to the result of checking whether an abnormal symbol appears in the symbol at the beginning of the current thread execution code extracted by the entropy measurement unit 126 . handle

즉, 엔트로피보간부(128)는, 이상 심볼의 출현 여부를 확인한 결과 이상 심볼이 출현된다면, 이상 심볼의 출현 빈도가 낮더라도 그 엔트로피가 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)에 속하는 상황이 발생하지 않도록, 엔트로피측정부(126)에서 측정한 엔트로피를 보간(증가) 처리해야 한다.That is, the entropy interpolation unit 128 determines whether an abnormal symbol appears, and if an abnormal symbol appears, the entropy is within the allowable range of the normal entropy reference value (eg, 3.5 to 3.7 bit) even if the frequency of occurrence of the abnormal symbol is low. In order not to cause a belonging situation, the entropy measured by the entropy measuring unit 126 should be interpolated (increased).

구체적인 실시예를 설명하면, 엔트로피보간부(128)는, 금번 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼이 출현되는 빈도 및 엔트로피측정부(126)에서 앞서 측정한 엔트로피에 따라 상이한 가중치를 적용하여, 앞서 측정한 엔트로피를 보간 처리할 수 있다. To describe a specific embodiment, the entropy interpolation unit 128 applies different weights according to the frequency at which the abnormal symbol appears in the symbol at the beginning of the current thread execution code and the entropy previously measured by the entropy measurement unit 126, The previously measured entropy can be interpolated.

예를 들면, 엔트로피보간부(128)는, 금번 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼 출현이 확인되면, 엔트로피측정부(126)에서 앞서 측정한 엔트로피를 기준으로, 스레드 실행 코드 즉 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼이 출현되는 빈도가 낮은 경우에 그 빈도가 높은 경우 보다 큰 가중치를 적용하는 방식으로, 보간 증가치를 상대적으로 크게 할 수 있다.For example, when the entropy interpolation unit 128 confirms that an abnormal symbol appears in the symbol at the beginning of the current thread execution code, the entropy measurement unit 126 determines the entropy previously measured as the basis for the thread execution code, that is, the thread execution code. In a case where the frequency of occurrence of an anomaly symbol is low in the symbol at the beginning of , the interpolation increment can be relatively large by applying a greater weight than when the frequency is high.

이렇게 되면, 금번 스레드 실행 코드가 쉘코드(또는 다형성 쉘코드)인 경우를 가정할 때, 이상 심볼의 출현 빈도가 낮을수록 심볼을 이용하여 엔트로피측정부(126)에서 측정한 엔트로피가 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)에 속할 가능성이 높을 것이나, 보간 증가치를 상대적으로 크게 하여 쉘코드(또는 다형성 쉘코드) 엔트로피가 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)에 속할 가능성을 낮출 수 있다.In this case, assuming that the current thread execution code is a shellcode (or polymorphic shellcode), the lower the occurrence frequency of the abnormal symbol, the lower the entropy measured by the entropy measuring unit 126 using the symbol is that of the normal entropy reference value. It is highly likely to fall within the allowable range (e.g., 3.5 to 3.7 bit), but by making the interpolation increment relatively large, the shellcode (or polymorphic shellcode) entropy may fall within the allowable range of the normal entropy reference value (e.g., 3.5 to 3.7 bit). can lower the chances.

반대로, 엔트로피보간부(128)는, 금번 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼 출현이 확인되면, 엔트로피측정부(126)에서 앞서 측정한 엔트로피를 기준으로, 스레드 실행 코드 즉 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼이 출현되는 빈도가 높은 경우에 그 빈도가 낮은 경우 보다 작은 가중치를 적용하는 방식으로, 보간 증가치를 상대적으로 작게 할 수 있다.Conversely, the entropy interpolation unit 128, when it is confirmed that an abnormal symbol appears in the symbol at the beginning of the current thread execution code, is based on the entropy previously measured by the entropy measurement unit 126, that is, the start of the thread execution code, that is, the thread execution code. When the frequency of occurrence of an abnormal symbol in the partial symbol is high, the interpolation increment can be relatively small by applying a smaller weight than when the frequency is low.

이렇게 되면, 금번 스레드 실행 코드가 쉘코드(또는 다형성 쉘코드)인 경우를 가정할 때, 이상 심볼의 출현 빈도가 높을수록 심볼을 이용하여 엔트로피측정부(126)에서 측정한 엔트로피가 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)에 속할 가능성이 충분히 낮아지므로, 보간 증가치를 그에 맞게 작은 값으로 유연하게 사용할 수 있다. In this case, assuming that the current thread execution code is a shellcode (or polymorphic shellcode), the higher the occurrence frequency of the abnormal symbol, the higher the entropy measured by the entropy measuring unit 126 using the symbol is that of the normal entropy reference value. Since the probability of falling within the allowable range (eg 3.5 to 3.7 bit) is sufficiently low, the interpolation increment can be flexibly used with a correspondingly small value.

물론, 엔트로피보간부(128)는, 이상 심볼의 출현 여부를 확인한 결과 이상 심볼이 출현하지 않는다면, 엔트로피측정부(126)에서 측정한 엔트로피를 보간(증가) 처리하지 않거나 보간값을 0으로 하여 보간 처리할 수 있다.Of course, the entropy interpolation unit 128 does not interpolate (increase) the entropy measured by the entropy measurement unit 126 or interpolates the interpolation value as 0 if the abnormal symbol does not appear as a result of checking whether the abnormal symbol appears. can be processed

도 2 내지 도 4에서는, 본 발명에서 다형성 쉘코드의 엔트로피를 보간 처리되는 개념을 예시 테이블로서 보여주고 있다.2 to 4, the concept of interpolating entropy of polymorphic shellcode in the present invention is shown as an example table.

도 2 및 도 3은, 다형성 스레드 시작 부분의 바이트코드인 "D9C0BF439FAC24D97424F4582BC966B9370283C004317815033B8A4ED1EE3F6299F4B8FA720C39FD8ABF6FABDD55E70C88C059D92221A694FF613E2EBB4D1EB9" 에 대해, 심볼 추출 과정을 보여주고 있다.2 and 3 show the symbol extraction process for "D9C0BF439FAC24D97424F4582BC966B9370283C004317815033B8A4ED1EE3F6299F4B8FA720C39FD8ABF6FABDD55E70C88C059D92221A694FF613E2EBB", the bytecode at the beginning of the polymorphic thread.

즉, 본 발명의 실시예에서는, 다형성 스레드 시작 부분의 바이트 코드 중 디스어셈블을 통해 시작 부분의 오피코드 심볼 만을 추출하며, 이렇게 되면 도 3과 같은 심볼 배열 "D9 BF D9 58 2B 66 83 31 03 8A EE 3F 62 0C FD 8A E7 88 59 D9 21 2E"을 얻을 수 있다.That is, in the embodiment of the present invention, only the opcode symbol at the beginning of the bytecode at the beginning of the polymorphic thread is extracted through disassembly, and in this case, the symbol arrangement "D9 BF D9 58 2B 66 83 31 03 8A" EE 3F 62 0C FD 8A E7 88 59 D9 21 2E".

이처럼 얻어진 심볼 배열 "D9 BF D9 58 2B 66 83 31 03 8A EE 3F 62 0C FD 8A E7 88 59 D9 21 2E"을 이용하여, 새넌 엔트로피 공식을 통해 엔트로피를 측정하면, 4.15 bit 를 얻을 수 있다.Using the thus obtained symbol arrangement "D9 BF D9 58 2B 66 83 31 03 8A EE 3F 62 0C FD 8A E7 88 59 D9 21 2E", if entropy is measured through the Shannon entropy formula, 4.15 bit can be obtained.

도 3에서 알 수 있듯이, 심볼 배열에는 다형성을 위해 사용하는 오피코드인 d9 fld, d9 fnstenv와 같이, 정상적인 스레드 시작 코드에서는 사용되지 않는 심볼들이 포함되어 있다.As can be seen from FIG. 3 , the symbol arrangement includes symbols that are not used in normal thread start codes, such as d9 fld and d9 fnstenv, which are opcodes used for polymorphism.

즉, 본 발명에서는, 66 mov, 58 pop, 2b sub 등과 같은 일반적인 오피코드(심볼 테이블 기반)와 달리, 정상적인 스레드 시작 코드에서는 사용되지 않는 심볼은 이상 심볼로 분류/이상 심볼 출현으로 확인하고, 이상 심볼의 출현 빈도 및 측정한 엔트로피(수치)에 따라 적정한 가중치를 적용하여 엔트로피를 보간하는 증가치를 유연하게 함으로써, 동적으로 보간되는 엔트로피를 얻을 수 있다.That is, in the present invention, unlike general opcodes (symbol table-based) such as 66 mov, 58 pop, 2b sub, etc., symbols not used in the normal thread start code are classified as abnormal symbols / abnormal symbol appearance is identified, Dynamically interpolated entropy can be obtained by applying an appropriate weight according to the frequency of appearance of symbols and the measured entropy (numerical value) to flexibly increase the entropy interpolation value.

도 4는, 본 발명에서, 전술에 따라 다형성 스레드 시작 코드 심볼의 엔트로피(측정 엔트로피, entropy) 및 보간 처리된 엔트로피(entropy 2), 그리고 이때 적용되는 가중치(weight)의 관계를 보여주고 있다.4 shows the relationship between the entropy (measured entropy, entropy) of the polymorphic thread start code symbol and the interpolated entropy (entropy 2) of the polymorphic thread start code symbol according to the above, and the weight applied at this time in the present invention.

도 4를 참조하면, 도 2 및 도 3에서 언급한 다형성 쉘코드의 경우, 추출한 심볼 배열의 엔트로피(entropy) 4.15 bit 에 가중치 0.82가 적용되는 보간 처리에 의해, 보간 엔트로피(entropy 2) 5.29bit를 얻을 수 있음을 알 수 있다.Referring to FIG. 4, in the case of the polymorphic shellcode mentioned in FIGS. 2 and 3, the interpolation entropy of 5.29 bits is obtained by interpolation processing in which a weight of 0.82 is applied to 4.15 bits of entropy of the extracted symbol array. know you can get it.

탐지부(130)는, 엔트로피보간부(128)에서 보간 처리한 엔트로피를 근거로, 금번 스레드 실행 코드가 메모리에 주입된 악성 코드 예컨대 쉘코드(또는 다형성 쉘코드)인지 여부를 탐지하는 기능을 담당한다.The detection unit 130 is responsible for detecting whether the current thread execution code is a malicious code injected into the memory, for example, shellcode (or polymorphic shellcode) based on the entropy interpolated by the entropy interpolation unit 128 . do.

구체적으로, 탐지부(130)는, 엔트로피보간부(128)에서 보간 처리한 엔트로피(entropy 2)와 정상 엔트로피 기준값을 비교하여 기 정의된 허용 범위 즉 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)를 벗어나는 경우, 금번 스레드 실행 코드를 메모리에 주입된 악성 코드 예컨대 쉘코드(또는 다형성 쉘코드)로 탐지할 수 있다. Specifically, the detection unit 130 compares the entropy 2 interpolated by the entropy interpolation unit 128 with the normal entropy reference value, and a predefined allowable range, that is, the allowable range of the normal entropy reference value (eg, 3.5 to 3.7). bit), the current thread execution code can be detected as malicious code injected into memory, such as shellcode (or polymorphic shellcode).

이상 설명한 바와 같이, 본 발명의 주입 공격형 악성코드 탐지시스템(100)에서는, 파일이 존재하지 않고 메모리 상에서만 동작하는 쉘코드 특히 다형성 쉘코드의 경우 엔트로피가 높다는 점에 착안하여, 엔트로피를 이용한 새로운 주입 공격형 악성코드(예: 쉘코드) 탐지 기법을 실현하며, 특히 쉘코드의 엔트로피가 정상 엔트로피로 탐지되는 등의 탐지 누락 또는 오탐을 회피하기 위해 유연한 엔트로비 보간 방식을 적용하여 보다 신뢰도 높은 탐지 기법을 실현하고 있다.As described above, in the injection-attack malware detection system 100 of the present invention, new injection using entropy, paying attention to the fact that entropy is high in the case of shellcode that does not exist in a file and operates only in memory, especially polymorphic shellcode A more reliable detection technique is realized by applying a flexible entropy interpolation method to avoid detection omissions or false positives, such as when the shellcode entropy is detected as normal entropy. are realizing

이로써, 본 발명에 따르면, 메모리 상에만 존재하여 진단이 어려운 주입 공격형 악성코드 예컨대 다형성 쉘코드를 진단/탐지하는데 있어, 기존의 패턴 기반 탐지 기법에서 벗어나, 탐지 누락 또는 오탐 없이 신뢰도 높게 진단/탐지할 수 있는 효과를 도출할 수 있다.Accordingly, according to the present invention, in diagnosing/detecting injection-attack malware, such as polymorphic shellcode, which exists only in memory and is difficult to diagnose, it is possible to diagnose/detect with high reliability without missing detection or false positive, departing from the existing pattern-based detection technique. possible effects can be derived.

이하에서는, 도 5를 참조하여, 본 발명의 주입 공격형 악성코드 탐지방법이 동작하는 구체적인 일 실시예를 설명하겠다.Hereinafter, with reference to FIG. 5, a specific embodiment in which the injection attack type malicious code detection method of the present invention operates will be described.

설명의 편의 상, 본 발명의 주입 공격형 악성코드 탐지방법이 수행되는 동작 주체로서 주입 공격형 악성코드 탐지시스템(100)를 언급하여 설명하겠다.For convenience of description, the injection attack type malicious code detection system 100 will be referred to as an operating subject for performing the injection attack type malicious code detection method of the present invention.

본 발명의 주입 공격형 악성코드 탐지방법에 따르면, 주입 공격형 악성코드 탐지시스템(100)는, 스레드에서 코드가 실행되는 스레드 코드 실행을 감시한다(S10).According to the injection attack type malicious code detection method of the present invention, the injection attack type malicious code detection system 100 monitors the thread code execution in which the code is executed in the thread (S10).

구체적으로 설명하면, 본 발명의 주입 공격형 악성코드 탐지방법에 따르면, 주입 공격형 악성코드 탐지시스템(100)는, 스레드에서 코드가 실행되는 시작 시점을 감시하는 방식으로, 스레드 코드 실행을 감시/탐지할 수 있다.Specifically, according to the injection attack type malicious code detection method of the present invention, the injection attack type malicious code detection system 100 monitors/detects the execution of the thread code by monitoring the starting point of code execution in the thread. can

본 발명의 주입 공격형 악성코드 탐지방법에 따르면, 주입 공격형 악성코드 탐지시스템(100)는, S10단계의 감시에 따라 스레드 코드 실행이 탐지되면, 메모리 상에서 실행되려는 스레드 실행 코드의 심볼을 추출한다(S20).According to the injection attack type malicious code detection method of the present invention, the injection attack type malicious code detection system 100 extracts the symbol of the thread execution code to be executed on the memory when the execution of the thread code is detected according to the monitoring in step S10 (S20) ).

구체적으로, 본 발명의 주입 공격형 악성코드 탐지방법에 따르면, 주입 공격형 악성코드 탐지시스템(100)는, 메모리 상에서 실행되려는 스레드 실행 코드의 시작 부분 심볼을 추출할 수 있고, 특히 오피코드(opcode) 명령/오퍼랜드(operand) 인자 중 오피코드 즉 시작 부분의 오피코드를 디스어셈블하여 심볼로 추출할 수 있다(S20).Specifically, according to the injection attack type malicious code detection method of the present invention, the injection attack type malicious code detection system 100 can extract the symbol of the beginning of the thread execution code to be executed in the memory, and in particular, an opcode command. The opcode of the /operand argument, that is, the opcode at the beginning may be disassembled and extracted as a symbol (S20).

그리고, 본 발명의 주입 공격형 악성코드 탐지방법에 따르면, 주입 공격형 악성코드 탐지시스템(100)는, S20단계에서 추출한 심볼을 이용하여, 엔트로피를 측정한다(S30).And, according to the injection attack type malicious code detection method of the present invention, the injection attack type malicious code detection system 100 measures entropy by using the symbol extracted in step S20 (S30).

일 실시예에 따르면, 주입 공격형 악성코드 탐지시스템(100)는, 앞서 추출한 바 있는 시작 부분의 오피코드로 이루어진 심볼 배열을 이용하여, 측정 공식 예컨대 새넌 엔트로피 공식(수학식 1)을 통해 엔트로피를 측정할 수 있다.According to an embodiment, the injection attack type malicious code detection system 100 measures entropy through a measurement formula, for example, the Shannon entropy formula (Equation 1), using a symbol array consisting of the previously extracted opcodes at the beginning. can do.

한편, 본 발명의 주입 공격형 악성코드 탐지방법에 따르면, 주입 공격형 악성코드 탐지시스템(100)는, S20단계에서 추출한 스레드 실행 코드의 시작 부분(오피코드) 심볼에서 이상 심볼의 출현 여부를 확인하고, 그 결과에 따라 S30단계에서 측정한 엔트로피를 보간 처리할 수 있다(S40,S50).On the other hand, according to the injection attack type malicious code detection method of the present invention, the injection attack type malicious code detection system 100 checks whether an abnormal symbol appears in the symbol at the beginning of the thread execution code extracted in step S20 (opcode), Depending on the result, the entropy measured in step S30 may be interpolated (S40, S50).

보다 구체적인 실시예를 설명하면, 주입 공격형 악성코드 탐지시스템(100)는, 정상 검증된 다수의 스레드 시작 코드 데이터를 근거로 정의한 심볼 테이블을 사용하여, 금번 스레드 실행 코드에서 이상 심볼의 출현 여부를 확인할 수 있다(S40).In a more specific embodiment, the injection attack type malicious code detection system 100 checks whether an abnormal symbol appears in the current thread execution code by using a symbol table defined based on a plurality of normally verified thread start code data. can be (S40).

예를 들면, 본 발명의 주입 공격형 악성코드 탐지시스템(100)에서는, 정상 검증된 다수(예: 수십만개 이상)의 스레드 시작 코드 데이터에서 정상적인 스레드 시작 코드가 사용한 유니크한 심볼들로 이루어진 심볼 테이블을 기 정의할 수 있다.For example, in the injection attack malicious code detection system 100 of the present invention, a symbol table consisting of unique symbols used by a normal thread start code from a plurality of normally verified (eg, hundreds of thousands or more) thread start code data is generated. can be defined.

이에, 주입 공격형 악성코드 탐지시스템(100)는, 기 정의한 심볼 테이블을 사용하여, S20단계에서 추출한 금번 스레드 실행 코드의 시작 부분 심볼에서 심볼 테이블에 포함되지 않은 심볼이 출현하는지 판단함으로써, 이상 심볼의 출현 여부를 확인할 수 있다.Accordingly, the injection attack type malicious code detection system 100 determines whether a symbol that is not included in the symbol table appears in the symbol at the beginning of the current thread execution code extracted in step S20 using a predefined symbol table. appearance can be checked.

즉, 주입 공격형 악성코드 탐지시스템(100)는, 금번 스레드 실행 코드의 시작 부분 심볼에서 심볼 테이블에 포함되지 않은 심볼이 출현한다면, 해당 심볼을 이상 심볼로 판단/확인하는 것이다.That is, if a symbol not included in the symbol table appears in the symbol at the beginning of the current thread execution code, the injection attack type malicious code detection system 100 determines/confirms the corresponding symbol as an abnormal symbol.

이후, 주입 공격형 악성코드 탐지시스템(100)는, S40단계에서 이상 심볼의 출현 여부를 확인한 결과에 따라, S30단계에서 측정한 엔트로피를 보간 처리한다(S50).Thereafter, the injection attack type malicious code detection system 100 interpolates the entropy measured in step S30 according to the result of checking whether an abnormal symbol appears in step S40 (S50).

즉, 주입 공격형 악성코드 탐지시스템(100)는, 이상 심볼의 출현 여부를 확인한 결과 이상 심볼이 출현된다면, 이상 심볼의 출현 빈도가 낮더라도 그 엔트로피가 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)에 속하는 상황이 발생하지 않도록, S30단계에서 측정한 엔트로피를 보간(증가) 처리해야 한다.That is, if an abnormal symbol appears as a result of checking whether an abnormal symbol appears, the entropy is within the allowable range of the normal entropy reference value (eg, 3.5 to 3.7 even if the frequency of occurrence of the abnormal symbol is low). bit), the entropy measured in step S30 should be interpolated (increased).

구체적인 실시예를 설명하면, 주입 공격형 악성코드 탐지시스템(100)는, 금번 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼이 출현되는 빈도 및 S30단계에서 측정한 엔트로피에 따라 상이한 가중치를 적용하여, 앞서 측정한 엔트로피를 보간 처리할 수 있다. In a specific embodiment, the injection attack type malicious code detection system 100 applies different weights according to the frequency at which an abnormal symbol appears in the symbol at the beginning of the current thread execution code and the entropy measured in step S30, and measures the above. One entropy can be interpolated.

예를 들면, 주입 공격형 악성코드 탐지시스템(100)는, 금번 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼 출현이 확인되면, S30단계에서 측정한 엔트로피를 기준으로, 스레드 실행 코드 즉 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼이 출현되는 빈도가 낮은 경우에 그 빈도가 높은 경우 보다 큰 가중치를 적용하는 방식으로, 보간 증가치를 상대적으로 크게 할 수 있다.For example, when an abnormal symbol appears in the symbol at the beginning of the current thread execution code, the injection attack type malware detection system 100 starts the thread execution code, that is, the thread execution code, based on the entropy measured in step S30. When the frequency of occurrence of an abnormal symbol in the partial symbol is low, the interpolation increment can be relatively large by applying a greater weight than when the frequency is high.

이렇게 되면, 금번 스레드 실행 코드가 쉘코드(또는 다형성 쉘코드)인 경우를 가정할 때, 이상 심볼의 출현 빈도가 낮을수록 심볼을 이용하여 S30단계에서 측정한 엔트로피가 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)에 속할 가능성이 높을 것이나, 보간 증가치를 상대적으로 크게 하여 쉘코드(또는 다형성 쉘코드) 엔트로피가 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)에 속할 가능성을 낮출 수 있다.In this case, assuming that the current thread execution code is a shellcode (or polymorphic shellcode), the lower the frequency of occurrence of the abnormal symbol, the lower the entropy measured in step S30 using the symbol is within the allowable range of the normal entropy reference value (e.g. : 3.5~3.7 bit), but it is possible to reduce the possibility that the shellcode (or polymorphic shellcode) entropy falls within the allowable range of the normal entropy reference value (e.g. 3.5~3.7 bit) by making the interpolation increment relatively large. have.

반대로, 주입 공격형 악성코드 탐지시스템(100)는, 금번 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼 출현이 확인되면, S30단계에서 측정한 엔트로피를 기준으로, 스레드 실행 코드 즉 스레드 실행 코드의 시작 부분 심볼에서 이상 심볼이 출현되는 빈도가 높은 경우에 그 빈도가 낮은 경우 보다 작은 가중치를 적용하는 방식으로, 보간 증가치를 상대적으로 작게 할 수 있다.Conversely, the injection attack type malware detection system 100 detects the occurrence of an abnormal symbol in the symbol at the beginning of the current thread execution code, based on the entropy measured in step S30, the symbol at the beginning of the thread execution code, that is, the thread execution code. In the case where the frequency of occurrence of abnormal symbols is high in , the interpolation increment can be relatively small by applying a smaller weight than when the frequency is low.

이렇게 되면, 금번 스레드 실행 코드가 쉘코드(또는 다형성 쉘코드)인 경우를 가정할 때, 이상 심볼의 출현 빈도가 높을수록 심볼을 이용하여 S30단계에서 측정한 엔트로피가 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)에 속할 가능성이 충분히 낮아지므로, 보간 증가치를 그에 맞게 작은 값으로 유연하게 사용할 수 있다. In this case, assuming that the current thread execution code is a shellcode (or polymorphic shellcode), the higher the frequency of occurrence of the abnormal symbol, the higher the entropy measured in step S30 using the symbol is within the allowable range of the normal entropy reference value (e.g. : 3.5~3.7 bit) is low enough, so the interpolation increment can be flexibly used as a small value accordingly.

물론, 주입 공격형 악성코드 탐지시스템(100)는, 이상 심볼의 출현 여부를 확인한 결과 이상 심볼이 출현하지 않는다면, S30단계에서 측정한 엔트로피를 보간(증가) 처리하지 않거나 보간값을 0으로 하여 보간 처리할 수 있다.Of course, the injection attack type malicious code detection system 100 does not interpolate (increase) the entropy measured in step S30 or interpolates the interpolation value as 0 if the abnormal symbol does not appear as a result of checking whether the abnormal symbol appears. can do.

이후, 본 발명의 주입 공격형 악성코드 탐지방법에 따르면, 주입 공격형 악성코드 탐지시스템(100)는, S50단계에서 보간 처리한 엔트로피를 근거로, 금번 스레드 실행 코드가 메모리에 주입된 악성 코드 예컨대 쉘코드(또는 다형성 쉘코드)인지 여부를 탐지한다.Thereafter, according to the injection attack type malicious code detection method of the present invention, the injection attack type malicious code detection system 100 detects malicious code, such as shellcode, in which the current thread execution code is injected into the memory based on the entropy interpolated in step S50. (or polymorphic shellcode).

구체적으로, 주입 공격형 악성코드 탐지시스템(100)는, S50단계에서 보간 처리한 엔트로피(entropy 2)와 정상 엔트로피 기준값을 비교하여 기 정의된 허용 범위 즉 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)를 벗어나는 경우(S60 Yes), 금번 스레드 실행 코드를 메모리에 주입된 악성 코드 예컨대 쉘코드(또는 다형성 쉘코드)로 탐지할 수 있다(S70).Specifically, the injection attack type malicious code detection system 100 compares the entropy 2 interpolated in step S50 with the normal entropy reference value, and the allowable range of the normal entropy reference value, that is, the predefined allowable range (e.g., 3.5 to 3.7). bit), the execution code of the current thread may be detected as malicious code injected into the memory, for example, shellcode (or polymorphic shellcode) (S70).

한편, 주입 공격형 악성코드 탐지시스템(100)는, S50단계에서 보간 처리한 엔트로피(entropy 2)와 정상 엔트로피 기준값을 비교하여 기 정의된 허용 범위 즉 정상 엔트로피 기준값의 허용 범위(예: 3.5~3.7 bit)를 벗어나지 않는 경우(S60 NO), 금번 스레드 실행 코드를 정상 스레드 코드로 탐지할 수 있다(S80).On the other hand, the injection attack type malware detection system 100 compares the entropy 2 interpolated in step S50 with the normal entropy reference value, and a predefined allowable range, that is, the allowable range of the normal entropy reference value (e.g., 3.5 to 3.7 bit) ), the current thread execution code may be detected as a normal thread code (S60 NO).

본 발명의 주입 공격형 악성코드 탐지방법에 따르면, 주입 공격형 악성코드 탐지시스템(100)는, 탐지시스템(100)의 탐지 기능이 오프되지 않는 한(S90 No), 전술의 S10단계 및 그 이후 단계들을 반복하여 수행할 것이다.According to the injection attack type malicious code detection method of the present invention, the injection attack type malicious code detection system 100 performs the aforementioned step S10 and subsequent steps unless the detection function of the detection system 100 is turned off (S90 No). will do it repeatedly.

이상, 설명한 바와 같이, 본 발명의 주입 공격형 악성코드 탐지방법은, 파일이 존재하지 않고 메모리 상에서만 동작하는 쉘코드 특히 다형성 쉘코드의 경우 엔트로피가 높다는 점에 착안하여, 엔트로피를 이용한 새로운 주입 공격형 악성코드(예: 쉘코드) 탐지 기법을 실현하며, 특히 쉘코드의 엔트로피가 정상 엔트로피로 탐지되는 등의 탐지 누락 또는 오탐을 회피하기 위해 유연한 엔트로비 보간 방식을 적용하여 보다 신뢰도 높은 탐지 기법을 실현하고 있다.As described above, in the method for detecting an injection-attacking malicious code of the present invention, a new injection-attacking malicious code using entropy, paying attention to the fact that entropy is high in the case of shellcode, particularly polymorphic shellcode, that does not exist in a file and operates only in memory Realizes a code (eg shellcode) detection technique, and in particular, a more reliable detection technique is realized by applying a flexible entropy interpolation method to avoid detection omissions or false positives, such as when the shellcode entropy is detected as normal entropy. have.

이로써, 본 발명에 따르면, 메모리 상에만 존재하여 진단이 어려운 주입 공격형 악성코드 예컨대 다형성 쉘코드를 진단/탐지하는데 있어, 기존의 패턴 기반 탐지 기법에서 벗어나, 탐지 누락 또는 오탐 없이 신뢰도 높게 진단/탐지할 수 있는 효과를 도출할 수 있다.Accordingly, according to the present invention, in diagnosing/detecting injection-attack malware, such as polymorphic shellcode, which exists only in memory and is difficult to diagnose, it is possible to diagnose/detect with high reliability without missing detection or false positive, departing from the existing pattern-based detection technique. possible effects can be derived.

본 발명의 실시예에 따르는 주입 공격형 악성코드 탐지방법은, 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The injection attack type malicious code detection method according to an embodiment of the present invention may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer readable medium. The computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the medium may be specially designed and configured for the present invention, or may be known and available to those skilled in the art of computer software. Examples of the computer-readable recording medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic such as floppy disks. - includes magneto-optical media, and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

이상과 같이 본 발명에서는 구체적인 구성 요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다.As described above, the present invention has been described with specific matters such as specific components and limited embodiments and drawings, but these are only provided to help a more general understanding of the present invention, and the present invention is not limited to the above embodiments. , various modifications and variations are possible from these descriptions by those of ordinary skill in the art to which the present invention pertains.

따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 것들은 본 발명 사상의 범주에 속한다고 할 것이다.Therefore, the spirit of the present invention should not be limited to the described embodiments, and not only the claims described below, but also all those with equivalent or equivalent modifications to the claims will be said to belong to the scope of the spirit of the present invention. .

100 : 주입 공격형 악성코드 탐지시스템
110 : 감시부 120 : 엔트로피처리부
126 : 엔트로피측정부 128 : 엔트로피보간부
130 : 탐지부
100: Injection attack type malware detection system
110: monitoring unit 120: entropy processing unit
126: entropy measurement unit 128: entropy interpolation unit
130: detection unit

Claims (11)

주입 공격형 악성코드 탐지시스템에서 수행되는 주입 공격형 악성코드 탐지방법에 있어서,
스레드에서 코드가 실행되는 스레드 코드 실행을 감시하는 감시단계;
상기 스레드 코드 실행이 탐지되면, 실행되려는 메모리 상의 스레드 실행 코드의 엔트로피를 측정하고 상기 스레드 실행 코드에서 이상 심볼의 출현 여부를 확인하는 단계;
상기 스레드 실행 코드에서 이상 심볼의 출현 여부를 확인한 결과에 따라, 상기 측정한 엔트로피를 보간 처리하는 엔트로피보간단계; 및
상기 보간 처리한 엔트로피를 근거로, 상기 스레드 실행 코드가 메모리에 주입된 악성 코드인지 여부를 탐지하는 탐지단계를 포함하며;
상기 엔트로피보간단계는,
상기 측정한 엔트로피를 기준으로, 상기 확인한 이상 심볼이 출현되는 빈도가 낮은 경우에 상기 빈도가 높은 경우 보다 보간 증가치를 크게 하는 것을 특징으로 하는 주입 공격형 악성코드 탐지방법.
In the injection attack type malicious code detection method performed in the injection attack type malicious code detection system,
a monitoring step of monitoring the thread code execution in which the code is executed in the thread;
when the execution of the thread code is detected, measuring the entropy of the thread execution code in the memory to be executed and checking whether an abnormal symbol appears in the thread execution code;
an entropy interpolation step of interpolating the measured entropy according to a result of checking whether an abnormal symbol appears in the thread execution code; and
a detecting step of detecting whether the thread execution code is a malicious code injected into a memory based on the interpolated entropy;
The entropy interpolation step is
Based on the measured entropy, when the frequency of occurrence of the identified abnormal symbol is low, the interpolation increase value is increased compared to when the frequency is high, the injection attack type malicious code detection method.
제 1 항에 있어서,
상기 엔트로피측정단계는,
상기 스레드 코드 실행이 탐지되면, 실행되려는 메모리 상의 스레드 실행 코드의 시작 부분 심볼을 추출하는 단계,
상기 추출한 심볼을 이용하여, 엔트로피를 측정하는 단계를 포함하는 것을 특징으로 하는 주입 공격형 악성코드 탐지방법.
The method of claim 1,
The entropy measurement step is,
when the execution of the thread code is detected, extracting a symbol of the beginning of the thread execution code on the memory to be executed;
and measuring entropy by using the extracted symbol.
제 1 항에 있어서,
상기 엔트로피보간단계는,
정상 검증된 다수의 스레드 시작 코드 데이터를 근거로 정의한 심볼 테이블을 사용하여, 상기 스레드 실행 코드에서 이상 심볼의 출현 여부를 확인하는 것을 특징으로 하는 주입 공격형 악성코드 탐지방법.
The method of claim 1,
The entropy interpolation step is
An injection attack type malicious code detection method, characterized in that it is checked whether an abnormal symbol appears in the thread execution code by using a symbol table defined based on data of a plurality of normally verified thread start code.
제 3 항에 있어서,
상기 엔트로피보간단계는,
상기 스레드 실행 코드에서 이상 심볼이 출현되는 빈도 및 상기 측정한 엔트로피에 따라 상이한 가중치를 적용하여, 상기 측정한 엔트로피를 보간 처리하는 것을 특징으로 하는 주입 공격형 악성코드 탐지방법.
4. The method of claim 3,
The entropy interpolation step is
The injection attack type malicious code detection method, characterized in that the measured entropy is interpolated by applying different weights according to the frequency of occurrence of abnormal symbols in the thread execution code and the measured entropy.
제 3 항에 있어서,
상기 엔트로피보간단계는,
동일한 이상 심볼이, 상기 스레드 실행 코드에서 출현되는 빈도가 낮을수록 상기 빈도가 높은 경우 보다 큰 가중치를 적용하는 것을 특징으로 하는 주입 공격형 악성코드 탐지방법.
4. The method of claim 3,
The entropy interpolation step is
The method for detecting an injection attack type malicious code, characterized in that the lower the frequency of occurrence of the same abnormal symbol in the thread execution code, the greater the weight is applied when the frequency is higher.
제 1 항에 있어서,
상기 탐지단계는,
상기 보간 처리한 엔트로피와 정상 엔트로피 기준값을 비교하여 기 정의된 허용 범위를 벗어나는 경우, 상기 스레드 실행 코드를 메모리에 주입된 악성 코드로 탐지하는 것을 특징으로 하는 주입 공격형 악성코드 탐지방법.
The method of claim 1,
The detection step is
and detecting the thread execution code as a malicious code injected into a memory when the interpolated entropy and the normal entropy reference value are out of a predefined allowable range.
스레드에서 코드가 실행되는 스레드 코드 실행을 감시하는 감시부;
상기 스레드 코드 실행이 탐지되면, 실행되려는 메모리 상의 스레드 실행 코드의 엔트로피를 측정하는 엔트로피측정부;
상기 스레드 코드 실행이 탐지되면, 상기 스레드 실행 코드에서 이상 심볼의 출현 여부를 확인하고, 확인한 결과에 따라 상기 측정한 엔트로피를 보간 처리하는 엔트로피보간부; 및
상기 보간 처리한 엔트로피를 근거로 상기 스레드 실행 코드가 메모리에 주입된 악성 코드인지 여부를 탐지하는 탐지부를 포함하며;
상기 엔트로피보간부는,
상기 측정한 엔트로피를 기준으로, 상기 확인한 이상 심볼이 출현되는 빈도가 낮은 경우에 상기 빈도가 높은 경우 보다 보간 증가치를 크게 하는 것을 특징으로 하는 주입 공격형 악성코드 탐지시스템.
a monitoring unit that monitors execution of a thread code in which code is executed in a thread;
an entropy measuring unit measuring entropy of a thread execution code in a memory to be executed when the execution of the thread code is detected;
an entropy interpolation unit that, when the execution of the thread code is detected, checks whether an abnormal symbol appears in the thread execution code, and interpolates the measured entropy according to the checked result; and
a detection unit configured to detect whether the thread execution code is a malicious code injected into a memory based on the interpolated entropy;
The entropy interpolation unit,
Based on the measured entropy, when the frequency of occurrence of the identified anomaly symbol is low, the interpolation increase value is larger than when the frequency is high.
제 7 항에 있어서,
상기 엔트로피측정부는,
상기 스레드 코드 실행이 탐지되면, 실행되려는 메모리 상의 스레드 실행 코드의 시작 부분 심볼을 추출하고,
상기 추출한 심볼을 이용하여, 엔트로피를 측정하는 것을 특징으로 하는 주입 공격형 악성코드 탐지시스템.
8. The method of claim 7,
The entropy measuring unit,
When the execution of the thread code is detected, extracting a symbol of the beginning of the thread execution code on the memory to be executed,
An injection attack type malware detection system, characterized in that entropy is measured by using the extracted symbol.
제 7 항에 있어서,
상기 엔트로피보간부는,
정상 검증된 다수의 스레드 시작 코드 데이터를 근거로 정의한 심볼 테이블을 사용하여, 상기 스레드 실행 코드에서 이상 심볼의 출현 여부를 확인하는 것을 특징으로 하는 주입 공격형 악성코드 탐지시스템.
8. The method of claim 7,
The entropy interpolation unit,
An injection attack type malicious code detection system, characterized in that it is checked whether an abnormal symbol appears in the thread execution code by using a symbol table defined based on a plurality of normally verified thread start code data.
제 9 항에 있어서,
상기 엔트로피보간부는,
상기 스레드 실행 코드에서 이상 심볼이 출현되는 빈도 및 상기 측정한 엔트로피에 따라 상이한 가중치를 적용하여, 상기 측정한 엔트로피를 보간 처리하는 것을 특징으로 하는 주입 공격형 악성코드 탐지시스템.
10. The method of claim 9,
The entropy interpolation unit,
and applying different weights according to the frequency of occurrence of abnormal symbols in the thread execution code and the measured entropy, and interpolating the measured entropy.
제 1 항 내지 제 6 항 중 어느 한 항의 방법을 수행하는 프로그램을 기록한 컴퓨터 판독 가능 기록 매체.A computer-readable recording medium recording a program for performing the method of any one of claims 1 to 6.
KR1020200118204A 2020-09-15 2020-09-15 System and method to detect injection attack type malicious code KR102419867B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200118204A KR102419867B1 (en) 2020-09-15 2020-09-15 System and method to detect injection attack type malicious code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200118204A KR102419867B1 (en) 2020-09-15 2020-09-15 System and method to detect injection attack type malicious code

Publications (2)

Publication Number Publication Date
KR20220036063A KR20220036063A (en) 2022-03-22
KR102419867B1 true KR102419867B1 (en) 2022-07-13

Family

ID=80992396

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200118204A KR102419867B1 (en) 2020-09-15 2020-09-15 System and method to detect injection attack type malicious code

Country Status (1)

Country Link
KR (1) KR102419867B1 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101775602B1 (en) * 2015-09-16 2017-09-07 주식회사 안랩 Detection method for injection, and apparatus applied to the same

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Hui Yin et al, "A malware variants detection methodology with an opcode-based feature learning method and a fast density-based clustering algorithm"(2020.02.)

Also Published As

Publication number Publication date
KR20220036063A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
US8621624B2 (en) Apparatus and method for preventing anomaly of application program
US10127379B2 (en) Profiling code execution
US10055585B2 (en) Hardware and software execution profiling
JP6706273B2 (en) Behavioral Malware Detection Using Interpreted Virtual Machines
JP4938576B2 (en) Information collection system and information collection method
EP2937807B1 (en) Monitoring device and monitoring method
US9507933B2 (en) Program execution apparatus and program analysis apparatus
CN113632432B (en) Method and device for judging attack behaviors and computer storage medium
WO2018063756A1 (en) System, apparatus and method for performing on-demand binary analysis for detecting code reuse attacks
US8646076B1 (en) Method and apparatus for detecting malicious shell codes using debugging events
US10318731B2 (en) Detection system and detection method
JP5437977B2 (en) Analysis system, analysis apparatus, analysis method, and analysis program
WO2018129916A1 (en) Sandbox testing method, sandbox system and sandbox device
KR102419867B1 (en) System and method to detect injection attack type malicious code
JP2006146600A (en) Operation monitoring server, terminal apparatus and operation monitoring system
JP2008176352A (en) Computer program, computer device and operation control method
CN113157543B (en) Trusted measurement method and device, server and computer readable storage medium
JP7168010B2 (en) Action plan estimation device, action plan estimation method, and program
CN114154150A (en) Virus detection method and device for pre-loading configuration of hijack system
KR101489142B1 (en) Client system and control method thereof
EP3661149A1 (en) Test system and method for data analytics
US10810098B2 (en) Probabilistic processor monitoring
KR101217677B1 (en) Malicious program blocking apparatus and method
KR101368949B1 (en) Exploit-code execution pre-protection method and device thereof
WO2024043882A1 (en) System and method for pattern-based detection and mitigation of zero-day vulnerability exploitation

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right