KR100968120B1 - Detection system for malicious program considering code modification and method thereof - Google Patents

Detection system for malicious program considering code modification and method thereof Download PDF

Info

Publication number
KR100968120B1
KR100968120B1 KR1020080021885A KR20080021885A KR100968120B1 KR 100968120 B1 KR100968120 B1 KR 100968120B1 KR 1020080021885 A KR1020080021885 A KR 1020080021885A KR 20080021885 A KR20080021885 A KR 20080021885A KR 100968120 B1 KR100968120 B1 KR 100968120B1
Authority
KR
South Korea
Prior art keywords
code
point
memory area
specific code
execution
Prior art date
Application number
KR1020080021885A
Other languages
Korean (ko)
Other versions
KR20090096825A (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 KR1020080021885A priority Critical patent/KR100968120B1/en
Publication of KR20090096825A publication Critical patent/KR20090096825A/en
Application granted granted Critical
Publication of KR100968120B1 publication Critical patent/KR100968120B1/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/566Dynamic detection, i.e. detection performed at run-time, e.g. emulation, suspicious activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs

Abstract

본 발명은 코드 변형 감지 시스템 및 그 방법을 개시한다. 즉, 코드 메모리 영역 상에서 실행점(IP,Instruction Pointer)이 특정 코드의 실행 시작 주소인 시작점(EP, Entry Point)을 지시하여 상기 특정 코드가 실행될 경우, 설정 주기 동안 상기 코드 메모리 영역 상의 설정 범위 내에서 데이터 기록이 이루어지는 것을 모니터링(Monitoring)하여 상기 특정 코드의 변형 여부를 감지하는 코드 변형 감지 모듈; 및 설정 주기 동안 상기 실행점의 이동을 모니터링하여 상기 특정 코드의 변형에 대한 복원 시점을 감지하는 복원 시점 감지 모듈을 포함을 포함함으로써, 실행파일압축, 실행파일암호화 그리고 PE_PATCH 등을 포함하는 다양한 코드 변형 복원 시점을 용이하게 파악할 수 있고, 아울러 이중 압축 및 다형성 바이러스와 암호화 바이러스에서 블록 암호화가 동반되는 경우에도 동일하게 적용할 수 있다.The present invention discloses a code tamper detection system and method thereof. That is, when the specific code is executed by indicating an execution point (IP), which is an execution start address of a specific code, on the code memory area, the execution point (IP) is within a setting range on the code memory area during a setting period. A code deformation detection module for monitoring whether data recording is performed in the network and detecting whether the specific code is modified; And a restoration time detection module that monitors movement of the execution point during a setting cycle and detects a restoration time point for the transformation of the specific code, thereby compressing various codes including execution file compression, execution file encryption, and PE_PATCH. The recovery time point can be easily identified, and the same can be applied to the case where block encryption is accompanied by double compression and polymorphic viruses and encryption viruses.

코드 변형, 복원 Code transformation, restore

Description

코드 변형 감지 시스템 및 그 방법{DETECTION SYSTEM FOR MALICIOUS PROGRAM CONSIDERING CODE MODIFICATION AND METHOD THEREOF}CODE DETECTION SYSTEM FOR MALICIOUS PROGRAM CONSIDERING CODE MODIFICATION AND METHOD THEREOF

본 발명은 코드 변형이 이루어진 악성 코드를 감지하는 것에 대한 것으로, 보다 상세하게는, 악성 코드를 진단함에 있어서 실행 압축 등과 같은 다양한 코드 변형 여부를 확인하고 코드가 복원되는 시점을 검출하는 코드 변형 감지 시스템 및 그 방법에 관한 것이다.The present invention relates to detecting malicious code in which code modifications have been made, and more particularly, a code change detection system that checks whether various code modifications, such as execution compression, etc. are detected in diagnosing malicious code, and detects a time point at which a code is restored. And to a method thereof.

종래의 코드 변형이 이루어진 특정 코드를 감지하는 기술들은 원 시작점(OEP, Original Entry Point)을 기반으로 소프트웨어 에뮬레이팅이나 브레이크 포인터를 활용한 방법 내지, 전용 알고리즘을 구현하여 그 종점을 파악하는 방법 등을 사용하고 있다.Techniques for detecting a specific code in which a conventional code transformation has been performed include software emulation or a break pointer method based on an original entry point (OEP), or a method of identifying an end point by implementing a dedicated algorithm. I use it.

그러나, 전자의 경우 안티 디버깅 기법에 취약하며, 후자의 경우 개발 시간이 많이 소요되며 높은 기반 지식을 요구하고 있어 신속하고 원활한 대응이 어려운 실정이다.However, the former is vulnerable to anti-debugging techniques, and the latter requires a lot of development time and requires high base knowledge, making it difficult to respond quickly and smoothly.

또한, 코드 변형 여부를 판단하기 위한 별도의 방법(시그너쳐, 알고리즘)을 구현하고 있으며 그 변형 여부를 판단하는 방법에서 사실상 1개 알고리즘에 1개 방법을 구현하는 전용 판단 함수로 새롭게 출현하는 변형된 방법은 판단할 수 없어 범용적(generic)으로 사용하기 어렵다. 게다가 판단 함수의 경우에도 높은 지식을 요구하게 되어 신속한 대응에 큰 장애가 된다.In addition, it implements a separate method (signature, algorithm) for judging whether a code is modified, and a modified method newly emerged as a dedicated judgment function that implements one method in virtually one algorithm. Cannot be used generically. In addition, the judgment function requires high knowledge, which is a big obstacle to quick response.

본 발명은 상기한 바와 같이 선행 기술에 내재되었던 문제점을 해결하기 위해 창작된 것으로, 본 발명의 목적은, 실행 압축 등을 포함하는 다양한 코드 변형 여부를 확인하고 코드가 복원되는 시점을 검출하는 코드 변형 감지 시스템 및 그 방법을 제공함에 있다. The present invention was created to solve the problems inherent in the prior art as described above, an object of the present invention is to determine whether or not a variety of code modifications, including execution compression, etc. code modifications to detect the time when the code is restored The present invention provides a sensing system and method.

상술한 목적을 달성하기 위한 본 발명의 일면에 따라, 코드 변형 감지 시스템이 제공되며: 이 시스템은, 코드 메모리 영역 상에서 실행점(IP,Instruction Pointer)이 특정 코드의 실행 시작 주소인 시작점(EP, Entry Point)을 지시하여 상기 특정 코드가 실행될 경우, 설정 주기 동안 상기 코드 메모리 영역 상의 설정 범위 내에서 데이터 기록이 이루어지는 것을 모니터링(Monitoring)하여 상기 특정 코드의 변형 여부를 감지하는 코드 변형 감지 모듈; 및 설정 주기 동안 상기 실행점의 이동을 모니터링하여 상기 특정 코드의 변형에 대한 복원 시점을 감지하는 복원 시점 감지 모듈을 포함하는 것을 특징으로 한다.
바람직하게는, 상기 코드 변형 감지 모듈은, 상기 코드 메모리 영역 상의 데이터 기록 동작에 따라 상기 코드 메모리 영역 상의 기록시작점을 기준으로 기록된 영역의 크기가 증가하는 경우, 상기 특정 코드의 실행에 의해 상기 데이터 기록이 이루어진 영역의 크기를 파악하는 것을 특징으로 한다.
바람직하게는, 상기 코드 변형 감지 모듈은, 상기 기록 동작이 이루어진 코드 메모리 영역의 크기가 기 설정치 이상일 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 한다.
바람직하게는, 상기 코드 변형 감지 모듈은, 상기 코드 메모리 영역 상에서의 기록 동작이 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 한다.
바람직하게는, 상기 코드 변형 감지 모듈은, 상기 코드 메모리 영역 상에서의 기록 동작이 설정 범위 내의 간격을 토대로 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 한다.
바람직하게는, 상기 복원 시점 감지 모듈은, 상기 특정 코드의 실행에 의해 기록 동작이 이루어진 상기 코드 메모리 영역의 기록시작점과 기록종료점 사이에 상기 실행점이 이동하여 상기 특정 코드에 대한 압축이 해제된 경우, 상기 이동 시점을 상기 특정 코드의 변형에 대한 복원 시점으로 감지하는 것을 특징으로 한다.
바람직하게는, 상기 코드 변형 감지 모듈은, 상기 기록 동작이 이루어진 상기 코드 메모리 영역의 기록시작점과 기록종료점 사이에 위치한 상기 실행점을 기준으로 설정 범위 내에서 데이터 기록이 이루어지는 것을 모니터링하여 상기 특정 코드의 변형 여부를 감지하는 것을 특징으로 한다.
본 발명의 또 다른 일면에 따라 코드 변형 감지 방법이 제공되며: 이 방법은, a) 코드 메모리 영역 상에서 실행점(IP,Instruction Pointer)이 특정 코드의 실행 시작 주소인 시작점(EP, Entry Point)을 지시하여 상기 특정 코드가 실행될 경우, 설정 주기 동안 상기 코드 메모리 영역 상의 설정 범위 내에서 데이터 기록이 이루어지는 것을 모니터링(Monitoring)하는 단계; b) 상기 코드 메모리 영역 상의 데이터 기록 동작에 따라, 상기 데이터 기록이 이루어진 영역의 크기를 파악하는 단계; c) 상기 기록 동작이 이루어진 상기 코드 메모리 영역의 크기를 포함하는 상기 기록 동작의 특성을 토대로 상기 특정 코드의 변형 여부를 감지하는 단계; 및 d) 상기 'c) 단계' 결과, 상기 특정 코드에 대한 변형이 감지될 경우, 설정 주기 동안 상기 실행점의 이동을 모니터링하여 상기 특정 코드의 변형에 대한 복원 시점을 감지하는 단계를 포함하는 것을 특징으로 한다.
바람직하게는, 상기 방법은, e) 상기 "d) 단계"에서의 상기 실행점의 이동 위치를 기준으로 상기 a) 내지 b) 단계를 반복 수행하는 단계를 더 포함하는 것을 특징으로 한다.
바람직하게는, 상기 b) 단계는, 상기 코드 메모리 영역 상의 기록시작점을 기준으로 기록된 영역의 크기가 증가하는 경우, 상기 특정 코드의 실행에 의해 상기 데이터 기록이 이루어진 영역의 크기를 파악하는 것을 특징으로 한다.
바람직하게는, 상기 c) 단계는, 상기 기록 동작이 이루어진 코드 메모리 영역의 크기가 기 설정치 이상일 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 한다.
바람직하게는, 상기 c) 단계는, 상기 코드 메모리 영역 상에서의 기록 동작이 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 한다.
바람직하게는, 상기 c) 단계는, 상기 코드 메모리 영역 상에서의 기록 동작이 설정 범위 내의 간격을 토대로 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 한다.
바람직하게는, 상기 d) 단계는, 상기 특정 코드의 실행에 의해 상기 기록 동작이 이루어진 상기 코드 메모리 영역의 기록시작점과 기록종료점 사이에 상기 실행점이 이동하여 상기 특정 코드의 압축이 해제된 경우, 상기 이동 시점을 상기 특정 코드의 변형에 대한 복원 시점으로 감지하는 것을 특징으로 한다.
In accordance with an aspect of the present invention for achieving the above object, there is provided a code deformation detection system: The system is characterized in that the start point (EP, A code deformation detection module for detecting whether or not the specific code is modified by monitoring that data writing is performed within a setting range on the code memory area during a setting period when the specific code is executed by indicating an entry point; And a restoration time detection module for monitoring a movement of the execution point during a setting period and detecting a restoration time point for the deformation of the specific code.
Preferably, the code deformation detection module is further configured to execute the data by executing the specific code when the size of the recorded area on the code memory area is increased based on a recording start point on the code memory area. The size of the area where recording is made is characterized.
Preferably, the code deformation detection module detects that the specific code is deformed when the size of the code memory area in which the write operation is performed is greater than or equal to a preset value.
Preferably, the code deformation detection module detects that the specific code is deformed when a write operation on the code memory area is performed sequentially (forward and backward).
Preferably, the code deformation detection module detects that the specific code is deformed when a write operation on the code memory area is sequentially performed (forward and backward) based on an interval within a setting range.
Preferably, when the restoration point detection module is decompressed for the specific code by moving the execution point between a recording start point and a recording end point of the code memory area in which the recording operation is performed by the execution of the specific code, The movement time may be sensed as a restoration time for deformation of the specific code.
Preferably, the code deformation detection module monitors that data is written within a setting range based on the execution point located between a recording start point and a recording end point of the code memory area in which the writing operation is performed. It is characterized by detecting whether the deformation.
According to another aspect of the present invention, a method for detecting a code change is provided. The method includes: a) an entry point (EP) in which an execution point (IP) is an execution start address of a specific code on a code memory area Instructing to monitor, when the specific code is executed, data writing is made within a setting range on the code memory area during a setting period; b) determining the size of the area where the data has been written, according to a data write operation on the code memory area; c) detecting whether the specific code is deformed based on a characteristic of the write operation including the size of the code memory area in which the write operation is performed; And d) detecting a restoration point for the modification of the specific code by monitoring the movement of the execution point during a set period when a modification to the specific code is detected as a result of step 'c)'. It features.
Preferably, the method further comprises e) repeating steps a) to b) based on the moving position of the execution point in step “d).
Preferably, in the step b), when the size of the recorded area on the basis of the recording start point on the code memory area increases, the size of the area where the data is written is determined by execution of the specific code. It is done.
Preferably, the step c) is characterized in that, when the size of the code memory area in which the write operation is performed is greater than or equal to a predetermined value, detecting that the specific code is modified.
Preferably, the step c) is characterized in that, when the write operation on the code memory area is performed sequentially (forward, reverse), it is characterized in that the specific code has been modified.
Preferably, the step c) is characterized in that, when the write operation on the code memory area is sequentially (forward, reverse) based on the interval within the setting range, it is characterized in that the specific code is detected.
Preferably, the step d) is performed when the execution point is moved between a recording start point and a recording end point of the code memory area in which the writing operation is performed by the execution of the specific code, thereby decompressing the specific code. The movement time may be sensed as a restoration time for the deformation of the specific code.

삭제delete

삭제delete

삭제delete

삭제delete

삭제delete

삭제delete

삭제delete

삭제delete

삭제delete

삭제delete

삭제delete

삭제delete

삭제delete

본 발명에 따른 코드 변형 감지 시스템 및 그 방법은 코드가 실행된 후 일정 범위 내에서 메모리 기록이 순차적으로 일어났는지를 확인하는 것을 통해 코드 변형이 있었음을 감지하게 되며 그 이후 기록 영역에 실행점(IP,Instruction Pointer)이 진입하게 되는 경우 복원 시점을 감지함으로써, 실행파일압축, 실행파일암호화 그리고 PE_PATCH 등을 포함하는 다양한 코드 변형 복원 시점을 용이하게 파악할 수 있고, 아울러 이중 압축 및 다형성 바이러스와 암호화 바이러스에서 블록 암호화가 동반되는 경우에도 동일하게 적용할 수 있다.The code deformation detection system and method according to the present invention detects that there is a code change by checking whether the memory write has occurred sequentially within a certain range after the code is executed, and then executes an execution point (IP) in the recording area. Instruction Pointer detects restoration time when it enters, and it is easy to identify various code modification restoration points including executable file compression, executable file encryption, and PE_PATCH. The same applies to the case where block encryption is accompanied.

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

도 1에는 본 발명의 실시예에 따른 코드 변형 감지 시스템의 개략적인 구성도를 도시한다.1 shows a schematic configuration diagram of a code deformation detection system according to an embodiment of the present invention.

도 1에 도시한 바와 같이, 상기 시스템은 코드 메모리 영역 상에서 실행점(IP,Instruction Pointer)이 특정 코드의 실행 시작 주소인 시작점(EP, Entry Point)으로 이동하여 상기 특정 코드가 실행될 경우, 데이터 기록이 이루어지는 것을 모니터링(Monitoring)하여 상기 특정 코드의 변형 여부를 감지하는 코드 변형 감지 모듈(100); 및 상기 실행점의 이동을 모니터링하여 상기 특정 코드의 변형에 대한 복원 시점을 감지하는 복원 시점 감지 모듈(200)을 포함하는 구성을 갖는다.As shown in FIG. 1, the system records data when an execution point (IP) is moved to an entry point (EP), which is an execution start address of a specific code, on the code memory area, and the specific code is executed. A code deformation detection module (100) for monitoring whether this is done and detecting whether the specific code is modified; And a restoration point detection module 200 for monitoring a movement of the execution point to detect a restoration point for the deformation of the specific code.

상기 코드 변형 감지 모듈(100)은 코드 메모리 영역 상에서 실행점(IP)이 시작점(EP)으로 이동 다시 말해, 상기 실행점이 특정 코드의 시작점을 지시하여 상기 특정 코드가 실행될 경우, 설정 주기 동안 데이터 기록이 이루어지는 것을 모니터링함으로써 상기 특정 코드의 변형 여부를 감지한다.The code deformation detection module 100 moves the execution point IP to the start point EP on the code memory area, that is, when the execution point indicates the start point of the specific code and executes the specific code, writes data during a setting cycle. By monitoring this, it detects whether or not the specific code is modified.

보다 구체적으로, 코드 변형 감지 모듈(100)은 상기 특정 코드의 실행에 의해 코드 메모리 영역 상에서 데이터 기록이 이루어질 경우, 해당 기록시작점을 기준으로 기록된 영역의 크기가 증가되는 것을 감지하는 방식으로 모니터링할 수 있다.More specifically, the code deformation detection module 100 may monitor in a manner of detecting that the size of the recorded area is increased based on the corresponding recording start point when data is written on the code memory area by execution of the specific code. Can be.

이때, 코드 변형 감지 모듈(100)은 상기 기록 동작이 이루어진 코드 메모리 영역의 크기가 기 설정치 이상일 경우, 상기 특정 코드가 변형되었음을 감지하며 반면, 코드 메모리 영역의 크기가 기설정치 미만일 경우 감지 동작을 종료한다. 예컨대, 시작점(EP)으로부터 실행을 시작하여 일정 주기 내에 데이터(혹은 코드)의 기록이 발생한다면 또 그것이 4 바이트(byte) 이상 연속된다면 그 기록시작점과 기록종료점을 범위로 기록하게 되며 그 크기가 최소한의 프로그램 함수 구성 크기 통상적으로 8KB 이상인 경우 코드 변형임을 감지하게 된다.In this case, the code deformation detection module 100 detects that the specific code is deformed when the size of the code memory area in which the write operation is performed is greater than or equal to a preset value, and terminates the detection operation when the size of the code memory area is less than the preset value. do. For example, if recording of data (or code) occurs within a certain period after starting execution from the start point (EP) and if it is more than 4 bytes continuous, the recording start point and the end point of recording are recorded in the range, and the size is at least. Program function configuration size of is usually more than 8KB will detect the code variant.

아울러, 코드 변형 감지 모듈(100)은 코드 메모리 영역 상에서의 기록 동작이 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지하며 반면, 상기 기록 동작이 순차적이지 못하거나 연속된 기록 동작 간의 간격이 설정 범위를 초과할 경우 감지 동작을 중단한다. 즉, 코드 변형 감지 모듈(100)은 코드의 압축이나 암호화의 경우 이전 데이터를 활용하는 OFB(Output FeedBack) 형태를 많이 활용하여 앞에서 뒤로 혹은 뒤에서 앞으로 압축 해제 및 복호화가 진행되는 특성을 이용하여 코드 변형 감지 모듈(100)은 코드 메모리 영역 상에서의 기록 동작이 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지한다. 참고로, 실행압축의 경우 압축률이 좋은 사전식 압축인 LZW(Lempel-Ziv-Welch) 방식을 이용하는 경우가 많고, 이러한 방식은 앞에서 해 제된 데이터가 다음 데이터 해제에 이용되는 특성이 있으며 이는 블록이 랜덤하게 압축이 해제되는 것이 아니라 차례대로 해제하게 된다. 이러한 특성은 비손실 압축(Lossless Compression)방식에서는 모두 동일하게 적용된다. 또한, 암호화 도구의 경우도 마찬가지로 앞의 암호화 내지 복호화 결과를 활용하여 뒤의 데이터들을 복원하는 OFB나 CFB(Cipher feedback)등을 이용하고 있어 그 특성이 유사하다.In addition, the code deformation detection module 100 detects that the specific code is deformed when the write operation on the code memory area is performed sequentially (forward and backward), whereas the write operation is not sequential or continuous write operation. If the interval between them exceeds the setting range, the detection operation is stopped. That is, the code deformation detection module 100 uses a feature of decompressing and decrypting forward or backward from the front or the back using a lot of OFB (Output FeedBack) forms that utilize previous data in the case of code compression or encryption. The sensing module 100 detects that the specific code is deformed when the write operation on the code memory area is performed sequentially (forward and reverse). For reference, in case of execution compression, LZW (Lempel-Ziv-Welch) method, which is a lexical compression with good compression ratio, is often used, and this method has the characteristic that the data released earlier is used for the next data release. It is not decompressed, but in turn. These characteristics are equally applied in Lossless Compression. In the case of the encryption tool, similar characteristics are used because OFB or Cipher Feedback (CFB), which restores data afterward by utilizing the result of the previous encryption or decryption, is similarly used.

상기 복원 시점 감지 모듈(200)은 설정 주기 동안 상기 실행점(IP)의 이동을 모니터링하여 상기 특정 코드의 변형에 대한 복원 시점을 감지한다. 즉, 복원 시점 감지 모듈(200)은 특정 코드의 실행 종료에 의해 코드 메모리 영역의 기록시작점과 기록종료점 사이에 실행점(IP)이 이동하여 위치 즉, 상기 메모리 영역의 기록시작점과 기록종료점 사이의 주소를 상기 실행점이 지시할 경우, 상기 이동 시점을 상기 특정 코드의 변형에 대한 복원 시점으로 감지하며, 이동이 완료된 실행점(IP)의 위치는 원 시작점(OEP, Original Entry Point)의 위치로 간주한다.The restoration point detection module 200 monitors the movement of the execution point IP during a set period to detect a restoration point for the deformation of the specific code. That is, the restoration point detection module 200 moves the execution point IP between the recording start point and the recording end point of the code memory area by the termination of execution of a specific code, that is, between the recording start point and the recording end point of the memory area. When the execution point indicates the address, the movement time is detected as a restoration time for the modification of the specific code, and the position of the execution point IP where the movement is completed is regarded as the position of the original entry point (OEP). do.

한편, 코드 변형 감지 모듈(100)은 복원 시점 감지 모듈(200)과 연동하여 상기 원 시작점(OEP) 바람직하게는, 상기 기록 동작이 이루어진 상기 코드 메모리 영역의 기록시작점과 기록종료점 사이에 위치한 실행점(IP)을 기준으로 설정 범위 내에서 데이터 기록이 이루어지는 것을 모니터링함으로써 이중, 삼중의 코드 변형 또한 감지할 수 있다. 이는 코드의 압축뿐만이 아니라 코드가 암호화 혹은 다형성 바이러스의 경우에도 마찬가지로 기록 범위 내에 실행점(IP)이 위치하는지를 검증함으로써 적용 가능하다.On the other hand, the code deformation detection module 100 in conjunction with the restoration time detection module 200, the execution point located between the original start point (OEP), preferably, the recording start point and the recording end point of the code memory area in which the writing operation is performed. By monitoring data recording within a set range based on (IP), double and triple code variations can also be detected. This can be applied not only by compressing the code, but also by verifying that the execution point (IP) is located within the recording range in the case of a coded or polymorphic virus.

이하에서는, 도 2를 참조하여 본 발명의 실시예에 따른 코드 변형 감지 방법 을 설명하기로 한다. 여기서, 도 2는 본 발명의 실시예에 따른 코드 변형 감지 방법을 설명하기 위한 개략적인 순서도이다.Hereinafter, a code deformation detection method according to an exemplary embodiment of the present invention will be described with reference to FIG. 2. 2 is a schematic flowchart for describing a code deformation detection method according to an exemplary embodiment of the present invention.

먼저, 특정 코드의 실행에 따라 코드 메모리 영역 상에서 실행점(IP)이 시작점(EP)으로 이동할 경우, 데이터 기록이 이루어지는 것을 모니터링한다(S110). 바람직하게는, 코드 변형 감지 모듈(100)이 코드 메모리 영역 상에서 실행점(IP)이 시작점(EP)으로 이동 다시 말해, 상기 실행점이 특정 코드의 시작점을 지시하여 상기 특정 코드가 실행될 경우, 설정 주기 동안 데이터 기록이 이루어지는 것을 모니터링한다.First, when the execution point IP moves to the starting point EP on the code memory area according to execution of a specific code, the data recording is monitored (S110). Preferably, the code transformation detection module 100 moves the execution point IP to the start point EP on the code memory area, that is, the execution point indicates the start point of the specific code, so that the specific code is executed. Monitor the recording of data while it is taking place.

다음, 코드 메모리 영역 상의 데이터 기록 동작에 따라, 상기 데이터 기록이 이루어진 영역의 크기를 파악한다(S120). 바람직하게는, 코드 변형 감지 모듈(100)이 상기 특정 코드의 실행에 의한 코드 메모리 영역 상의 데이터 기록 동작이 이루어질 경우, 해당 기록시작점을 기준으로 기록된 영역의 크기가 증가되는 것을 감지한다.Next, according to the data write operation on the code memory area, the size of the area where the data is written is determined (S120). Preferably, when the data modification operation is performed on the code memory area by the execution of the specific code, the code deformation detection module 100 detects that the size of the recorded area is increased based on the corresponding recording start point.

그런 다음, 기록 동작이 이루어진 코드 메모리 영역의 크기를 포함하는 상기 기록 동작의 특성을 토대로 상기 특정 코드의 변형 여부를 감지한다(S130-S140). 바람직하게는, 코드 변형 감지 모듈(100)이 기록 동작이 이루어진 코드 메모리 영역의 크기가 기 설정치 이상일 경우, 상기 특정 코드가 변형되었음을 감지하며 반 면, 코드 메모리 영역의 크기가 기설정치 미만일 경우 감지 동작을 종료한다. 아울러, 코드 변형 감지 모듈(100)은 코드 메모리 영역 상에서의 기록 동작이 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지하며 반면, 상기 기록 동작이 순차적이지 못하거나 연속된 기록 동작 간의 간격이 설정 범위를 초과할 경우 감지 동작을 중단한다.Then, whether the specific code is deformed is detected based on the characteristic of the write operation including the size of the code memory area in which the write operation is performed (S130-S140). Preferably, the code deformation detection module 100 detects that the specific code is deformed when the size of the code memory area in which the write operation is performed is greater than or equal to a preset value, and detects when the size of the code memory area is less than the preset value. To exit. In addition, the code deformation detection module 100 detects that the specific code is deformed when the write operation on the code memory area is performed sequentially (forward and backward), whereas the write operation is not sequential or continuous write operation. If the interval between them exceeds the setting range, the detection operation is stopped.

이후, 상기 특정 코드에 대한 변형이 감지될 경우, 설정 주기 동안 상기 실행점의 이동을 모니터링하여 상기 특정 코드의 변형에 대한 복원 시점을 감지한다(S150-S170). 바람직하게는, 복원 시점 감지 모듈(200)이 설정 주기 동안 상기 실행점(IP)의 이동을 모니터링하여 상기 특정 코드의 변형에 대한 복원 시점을 감지한다. 즉, 복원 시점 감지 모듈(200)은 기록 동작이 이루어진 코드 메모리 영역의 기록시작점과 기록종료점 사이에 실행점(IP)이 이동하여 위치할 경우, 상기 이동 시점을 상기 특정 코드의 변형에 대한 복원 시점으로 감지하며, 이동이 완료된 제어권(IP)의 위치된 원 시작점(OEP, Original Entry Point)의 위치로 간주한다.Thereafter, when a deformation of the specific code is detected, the movement of the execution point is monitored during a set period to detect a restoration point of the deformation of the specific code (S150-S170). Preferably, the restoration point detection module 200 monitors the movement of the execution point IP during a set period to detect a restoration point for the modification of the specific code. That is, when the execution point IP moves between the recording start point and the recording end point of the code memory area in which the write operation is performed, the restoration time detection module 200 restores the movement time to the restoration point for the deformation of the specific code. It is regarded as the position of the original entry point (OEP) of the control right (IP) where the movement is completed.

지금까지 본 발명을 바람직한 실시예를 참조하여 상세히 설명하였지만, 본 발명이 상기한 실시예에 한정되는 것은 아니며, 이하의 특허청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 누구든지 다양한 변형 또는 수정이 가능한 범위까지 본 발명의 기술적 사상이 미친다 할 것이다.Although the present invention has been described in detail with reference to the preferred embodiments, the present invention is not limited to the above-described embodiments, and the present invention belongs to the present invention without departing from the gist of the present invention as claimed in the following claims. Anyone skilled in the art will have the technical idea of the present invention to the extent that various modifications or changes are possible.

본 발명에 따른 코드 변형 감지 시스템 및 그 방법은 특정한 형태의 변형만 대응하는 것이 아니라 일반적인 코드 변형에 대부분 적용이 가능하여 범용적(generic)으로 이용할 수 있다는 점에서 기존 기술의 한계를 뛰어 넘음에 따라 관련 기술에 대한 이용만이 아닌 적용되는 장치의 시판 또는 영업의 가능성이 충분할 뿐만 아니라 현실적으로 명백하게 실시할 수 있는 정도이므로 산업상 이용가능성이 있는 발명이다.Code deformation detection system and method according to the present invention is not only corresponding to a specific type of deformation, but can be applied to most general code modifications, so as to overcome the limitations of the existing technology in that it can be used generically (generic) The invention has industrial applicability because not only the use of related technology but also the possibility of marketing or sales of the applied device is not only sufficient but also practically obvious.

본 명세서에서 첨부되는 다음의 도면들은 본 발명의 바람직한 실시예를 예시하는 것이며, 후술하는 발명의 상세한 설명과 함께 본 발명의 기술사상을 더욱 이해시키는 역할을 하는 것이므로, 본 발명은 그러한 도면에 기재된 사항에만 한정되어 해석되어서는 아니된다.The following drawings, which are attached in this specification, illustrate preferred embodiments of the present invention, and together with the detailed description of the present invention, serve to further understand the technical spirit of the present invention. It should not be construed as limited to.

도 1은 본 발명의 실시예에 따른 코드 변형 감지 시스템의 개략적인 구성도.1 is a schematic configuration diagram of a code deformation detection system according to an embodiment of the present invention.

도 2는 본 발명의 실시예에 따른 코드 변형 감지 방법을 설명하기 위한 개략적인 순서도.2 is a schematic flowchart illustrating a code deformation detection method according to an embodiment of the present invention.

*도면의 주요 부분에 대한 부호의 설명** Description of the symbols for the main parts of the drawings *

100: 코드 변형 감지 모듈100: code deformation detection module

200: 복원 시점 감지 모듈200: restore point detection module

삭제delete

Claims (14)

코드 변형 감지 시스템에 있어서,In the code deformation detection system, 코드 메모리 영역 상에서 실행점(IP,Instruction Pointer)이 특정 코드의 실행 시작 주소인 시작점(EP, Entry Point)을 지시하여 상기 특정 코드가 실행될 경우, 설정 주기 동안 상기 코드 메모리 영역 상의 설정 범위 내에서 데이터 기록이 이루어지는 것을 모니터링(Monitoring)하여 상기 특정 코드의 변형 여부를 감지하는 코드 변형 감지 모듈; 및When an instruction point (IP) indicates an entry point (EP) which is an execution start address of a specific code on the code memory area and the specific code is executed, data is set within the setting range on the code memory area during a setting cycle. A code modification detection module for monitoring whether a recording is made and detecting whether the specific code is modified; And 설정 주기 동안 상기 실행점의 이동을 모니터링하여 상기 특정 코드의 변형에 대한 복원 시점을 감지하는 복원 시점 감지 모듈을 포함하는 것을 특징으로 하는 코드 변형 감지 시스템.And a restoration time detection module for monitoring a movement of the execution point during a set period to detect a restoration time point for the deformation of the specific code. 제 1 항에 있어서, 상기 코드 변형 감지 모듈은,The method of claim 1, wherein the code deformation detection module, 상기 코드 메모리 영역 상의 데이터 기록 동작에 따라 상기 코드 메모리 영역 상의 기록시작점을 기준으로 기록된 영역의 크기가 증가하는 경우, 상기 특정 코드의 실행에 의해 상기 데이터 기록이 이루어진 영역의 크기를 파악하는 것을 특징으로 하는 코드 변형 감지 시스템.When the size of the recorded area on the code memory area is increased based on the recording start point on the code memory area, the size of the area where the data is written is determined by execution of the specific code. Code Deformation Detection System. 제 2 항에 있어서, 상기 코드 변형 감지 모듈은,The method of claim 2, wherein the code deformation detection module, 상기 기록 동작이 이루어진 코드 메모리 영역의 크기가 기 설정치 이상일 경 우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 하는 코드 변형 감지 시스템.And detecting that the specific code is deformed when the size of the code memory area in which the write operation is performed is larger than or equal to a preset value. 제 2 항에 있어서, 상기 코드 변형 감지 모듈은,The method of claim 2, wherein the code deformation detection module, 상기 코드 메모리 영역 상에서의 기록 동작이 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 하는 코드 변형 감지 시스템.And detecting that the specific code is deformed when the write operation on the code memory area is performed sequentially (forward and reverse). 제 4 항에 있어서, 상기 코드 변형 감지 모듈은,The method of claim 4, wherein the code deformation detection module, 상기 코드 메모리 영역 상에서의 기록 동작이 설정 범위 내의 간격을 토대로 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 하는 코드 변형 감지 시스템.And detecting that the specific code is deformed when the write operation on the code memory area is performed sequentially (forward and reverse) based on an interval within a setting range. 제 1 항에 있어서, 상기 복원 시점 감지 모듈은,The method of claim 1, wherein the restore point detection module, 상기 특정 코드의 실행에 의해 기록 동작이 이루어진 상기 코드 메모리 영역의 기록시작점과 기록종료점 사이에 상기 실행점이 이동하여 상기 특정 코드에 대한 압축이 해제된 경우, 상기 이동 시점을 상기 특정 코드의 변형에 대한 복원 시점으로 감지하는 것을 특징으로 하는 코드 변형 감지 시스템.When the execution point is moved between the recording start point and the recording end point of the code memory area in which the recording operation is performed by the execution of the specific code, and the compression of the specific code is released, the movement time is determined for the deformation of the specific code. Code transformation detection system, characterized in that the detection by the restore point. 제 6 항에 있어서, 상기 코드 변형 감지 모듈은,The method of claim 6, wherein the code deformation detection module, 상기 기록 동작이 이루어진 상기 코드 메모리 영역의 기록시작점과 기록종료점 사이에 위치한 상기 실행점을 기준으로 설정 범위 내에서 데이터 기록이 이루어지는 것을 모니터링하여 상기 특정 코드의 변형 여부를 감지하는 것을 특징으로 하는 코드 변형 감지 시스템.Code modification, characterized in that for detecting the modification of the specific code by monitoring that the data recording is made within a set range on the basis of the execution point located between the recording start point and the recording end point of the code memory area where the write operation is performed; Detection system. 코드 변형 감지 방법에 있어서,In the code deformation detection method, a) 코드 메모리 영역 상에서 실행점(IP,Instruction Pointer)이 특정 코드의 실행 시작 주소인 시작점(EP, Entry Point)을 지시하여 상기 특정 코드가 실행될 경우, 설정 주기 동안 상기 코드 메모리 영역 상의 설정 범위 내에서 데이터 기록이 이루어지는 것을 모니터링(Monitoring)하는 단계;a) When the specific code is executed by indicating an execution point (IP, Entry Point) that is an execution start address of a specific code on the code memory area, it is within a setting range on the code memory area during a setting period. Monitoring a data record being made in the server; b) 상기 코드 메모리 영역 상의 데이터 기록 동작에 따라, 상기 데이터 기록이 이루어진 영역의 크기를 파악하는 단계;b) determining the size of the area where the data has been written, according to a data write operation on the code memory area; c) 상기 기록 동작이 이루어진 상기 코드 메모리 영역의 크기를 포함하는 상기 기록 동작의 특성을 토대로 상기 특정 코드의 변형 여부를 감지하는 단계; 및c) detecting whether the specific code is deformed based on a characteristic of the write operation including the size of the code memory area in which the write operation is performed; And d) 상기 'c) 단계' 결과, 상기 특정 코드에 대한 변형이 감지될 경우, 설정 주기 동안 상기 실행점의 이동을 모니터링하여 상기 특정 코드의 변형에 대한 복원 시점을 감지하는 단계를 포함하는 것을 특징으로 하는 코드 변형 감지 방법.and d) detecting a restoration point for the modification of the specific code by monitoring the movement of the execution point during a set period when a modification to the specific code is detected as a result of step 'c)'. Code transformation detection method. 제 8 항에 있어서, 상기 방법은,The method of claim 8, wherein e) 상기 "d) 단계"에서의 상기 실행점의 이동 위치를 기준으로 상기 a) 내지 b) 단계를 반복 수행하는 단계를 더 포함하는 것을 특징으로 하는 코드 변형 감지 방법.and e) repeating steps a) to b) based on the moving position of the execution point in step "d). 제 8 항에 있어서, 상기 b) 단계는,The method of claim 8, wherein b), 상기 코드 메모리 영역 상의 기록시작점을 기준으로 기록된 영역의 크기가 증가하는 경우, 상기 특정 코드의 실행에 의해 상기 데이터 기록이 이루어진 영역의 크기를 파악하는 것을 특징으로 하는 코드 변형 감지 방법.And if the size of the recorded area on the basis of the recording start point on the code memory area increases, determining the size of the area where the data is recorded by executing the specific code. 제 8 항에 있어서, 상기 c) 단계는,The method of claim 8, wherein c) 상기 기록 동작이 이루어진 코드 메모리 영역의 크기가 기 설정치 이상일 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 하는 코드 변형 감지 방법.And detecting that the specific code is deformed when the size of the code memory area in which the write operation is performed is greater than or equal to a preset value. 제 8 항에 있어서, 상기 c) 단계는,The method of claim 8, wherein c) 상기 코드 메모리 영역 상에서의 기록 동작이 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 하는 코드 변형 감지 방법.And detecting that the specific code is deformed when the write operation on the code memory area is performed sequentially (forward and reverse). 제 12 항에 있어서, 상기 c) 단계는,The method of claim 12, wherein step c) 상기 코드 메모리 영역 상에서의 기록 동작이 설정 범위 내의 간격을 토대로 순차적(순방향, 역방향)으로 이루어질 경우, 상기 특정 코드가 변형되었음을 감지하는 것을 특징으로 하는 코드 변형 감지 방법.And detecting that the specific code is deformed when the write operation on the code memory area is sequentially made (forward and reverse) based on an interval within a setting range. 제 8 항에 있어서, 상기 d) 단계는,The method of claim 8, wherein the d) step, 상기 특정 코드의 실행에 의해 상기 기록 동작이 이루어진 상기 코드 메모리 영역의 기록시작점과 기록종료점 사이에 상기 실행점이 이동하여 상기 특정 코드의 압축이 해제된 경우, 상기 이동 시점을 상기 특정 코드의 변형에 대한 복원 시점으로 감지하는 것을 특징으로 하는 코드 변형 감지 방법.When the execution point is moved between the recording start point and the recording end point of the code memory area where the recording operation is performed by the execution of the specific code, the compression of the specific code is decompressed. Code transformation detection method characterized in that the detection by the restore point.
KR1020080021885A 2008-03-10 2008-03-10 Detection system for malicious program considering code modification and method thereof KR100968120B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080021885A KR100968120B1 (en) 2008-03-10 2008-03-10 Detection system for malicious program considering code modification and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080021885A KR100968120B1 (en) 2008-03-10 2008-03-10 Detection system for malicious program considering code modification and method thereof

Publications (2)

Publication Number Publication Date
KR20090096825A KR20090096825A (en) 2009-09-15
KR100968120B1 true KR100968120B1 (en) 2010-07-06

Family

ID=41356368

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080021885A KR100968120B1 (en) 2008-03-10 2008-03-10 Detection system for malicious program considering code modification and method thereof

Country Status (1)

Country Link
KR (1) KR100968120B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101663013B1 (en) * 2010-01-15 2016-10-06 삼성전자주식회사 Apparatus and method for detecting code injection attack
KR102112929B1 (en) * 2018-10-30 2020-05-19 한국과학기술원 Mechanisms for cuda code memory page scanning and cuda function scanning

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100620313B1 (en) 2005-06-15 2006-09-06 (주)이월리서치 The system for detecting malicious code using the structural features of microsoft portable executable and its using method
KR20070004270A (en) * 2005-07-04 2007-01-09 주식회사 안철수연구소 Method and apparatus for detecting virus in attached file of e-mail
KR20080047251A (en) * 2006-11-23 2008-05-28 한국전자통신연구원 Apparatus and method for detecting packed file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100620313B1 (en) 2005-06-15 2006-09-06 (주)이월리서치 The system for detecting malicious code using the structural features of microsoft portable executable and its using method
KR20070004270A (en) * 2005-07-04 2007-01-09 주식회사 안철수연구소 Method and apparatus for detecting virus in attached file of e-mail
KR20080047251A (en) * 2006-11-23 2008-05-28 한국전자통신연구원 Apparatus and method for detecting packed file

Also Published As

Publication number Publication date
KR20090096825A (en) 2009-09-15

Similar Documents

Publication Publication Date Title
US6968461B1 (en) Providing break points in a malware scanning operation
KR100938672B1 (en) The method and apparatus for detecting dll inserted by malicious code
CN102314561B (en) Automatic analysis method and system of malicious codes based on API (application program interface) HOOK
US10264002B2 (en) Program, information processing device, and information processing method
CN102799826B (en) The detection method of application program installation kit decompression procedure and device, client device
CN110381033B (en) Web application vulnerability detection method, device, system, storage medium and server
WO2006130233A3 (en) Methods and systems for repairing applications
CN107563192B (en) Lesso software protection method and device, electronic equipment and storage medium
US20080222215A1 (en) Method for Deleting Virus Program and Method to Get Back the Data Destroyed by the Virus
CN110138731B (en) Network anti-attack method based on big data
TW201104489A (en) Method and system for cleaning malicious software and computer program product and storage medium
KR100954356B1 (en) Detection system for malicious program considering code protection method and method thereof
SG181959A1 (en) System event logging system
CN110647750A (en) File integrity measurement method and device, terminal and security management center
KR100968120B1 (en) Detection system for malicious program considering code modification and method thereof
US20100037066A1 (en) Information processing apparatus, method, program, and information processing system
CN110046505B (en) Container security reinforcement method, system and storage medium
CN116305290A (en) System log security detection method and device, electronic equipment and storage medium
KR20160138523A (en) Method and apparatus for determining behavior information corresponding to a dangerous file
CN106682512B (en) Method, device and system for preventing program from being modified
CN111856257B (en) Method, system, equipment and medium for detecting and protecting CPLD (complex programmable logic device) firmware
CN106899977B (en) Abnormal flow detection method and device
CN107273177B (en) Method and device for positioning ARM firmware loading base address based on jump table
KR102036847B1 (en) Method of profiling runtime feature
JP4898823B2 (en) Application information alteration monitoring device and 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: 20130701

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20140630

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20160629

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20190701

Year of fee payment: 10