KR20080047231A - System and method for detecting software attacks on linux - Google Patents

System and method for detecting software attacks on linux Download PDF

Info

Publication number
KR20080047231A
KR20080047231A KR1020070019736A KR20070019736A KR20080047231A KR 20080047231 A KR20080047231 A KR 20080047231A KR 1020070019736 A KR1020070019736 A KR 1020070019736A KR 20070019736 A KR20070019736 A KR 20070019736A KR 20080047231 A KR20080047231 A KR 20080047231A
Authority
KR
South Korea
Prior art keywords
address
function
destination address
list
memory area
Prior art date
Application number
KR1020070019736A
Other languages
Korean (ko)
Other versions
KR100876637B1 (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 한국전자통신연구원
Publication of KR20080047231A publication Critical patent/KR20080047231A/en
Application granted granted Critical
Publication of KR100876637B1 publication Critical patent/KR100876637B1/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
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1416Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/26Address formation of the next micro-instruction ; Microprogram storage or retrieval arrangements
    • G06F9/261Microinstruction address formation

Abstract

A system and a method for detecting software attack in a Linux OS(Operating System) are provided to prevent attacks by a hacker or worms by detecting the software attack before control of a process is moved to an attack code inputted in an address space of the process. A target address obtainer(210) obtains a target address of a command or a function related to a process execution flow. An address validity checker(230) checks whether the obtained target list is included in an address list(220) of an execution code memory area in which control of a process is moved. The address validity checker includes an address range divider(231) dividing the address list of the execution code memory area into more than one address range, an address range selector(232), and a determiner(233) determining whether the obtained target address is included in the selected address range. The target address obtainer obtains the target address from a command target address searcher(213) searching the target address of an indirect CALL, indirect JUMP, or RET command(211). The target address obtainer obtains the target address from a function target address searcher(214) searching the target address from a longjmp() function(212).

Description

Linux 운영체제에서 소프트웨어 공격 탐지 시스템 및 방법{SYSTEM AND METHOD FOR DETECTING SOFTWARE ATTACKS ON LINUX}SYSTEM AND METHOD FOR DETECTING SOFTWARE ATTACKS ON LINUX}

도 1은 본 발명에 의한 소프트웨어 공격을 탐지하기 위한 코드를 실행 코드에 추가하기 위한 처리 절차를 나타내는 도면,1 is a diagram showing a processing procedure for adding code to executable code for detecting a software attack according to the present invention;

도 2는 본 발명에 의한 Linux 운용체제에서 소프트웨어 공격 탐지 시스템의 구성을 나타내는 도면,2 is a diagram showing the configuration of a software attack detection system in the Linux operating system according to the present invention;

도 3는 본 발명에 의한 Linux 운영체제에서 소프트웨어 공격 탐지 방법을 나타내는 도면,3 is a diagram illustrating a software attack detection method in a Linux operating system according to the present invention;

도 4은 본 발명에 의한 특정 목적 주소가 정당한 프로세스의 실행 코드 영역에 속하는지 판단하는 과정을 나타내는 도면,4 is a diagram illustrating a process of determining whether a specific destination address belongs to an executable code region of a legitimate process according to the present invention;

도 5는 본 발명에 의한 실행중인 프로세스의 실행 코드 메모리 영역의 주소 리스트를 생성하는 과정을 나타내는 도면,5 is a diagram illustrating a process of generating an address list of an execution code memory area of a running process according to the present invention;

도 6는 본 발명에 의한 Linux 운영체제가 제공하는 프로세스의 메모리 맵을 표시하는 시스템 파일의 내용을 나타내는 도면이다. 6 is a diagram showing the contents of a system file displaying a memory map of a process provided by a Linux operating system according to the present invention.

본 발명은 소프트웨어 공격을 탐지하는 방법에 관한 것으로, 더욱 상세하게는 컴퓨터 시스템에 대한 소프트웨어 공격이 일어나면 프로세스의 제어가 프로세스의 정상적인 실행코드 영역 대신에 미리 입력된 공격코드가 저장되어 있는 데이터 영역으로 옮겨간다는 점을 이용하여 컴퓨터 프로그램 실행 중에 프로세스의 제어를 다른 곳으로 옮기는 실행 흐름 제어 명령어들이 실행되기 전에 제어가 옮겨가는 곳의 주소가 정상적인 프로세스의 실행코드 영역인지 아니면 다른 영역인지를 판단하여 소프트웨어 공격을 탐지하는 Linux 운영체제에서 소프트웨어 공격 탐지 시스템 및 방법에 관한 것이다. The present invention relates to a method for detecting a software attack. More specifically, when a software attack on a computer system occurs, control of the process is transferred to a data area in which a pre-entered attack code is stored instead of the normal execution code area of the process. By using this method, execution flow control commands that transfer control of a process during execution of a computer program are executed before the control is executed to determine whether the address to which control is transferred is the executable code area of a normal process or another area. The present invention relates to a software attack detection system and method for detecting Linux operating systems.

해커나 웜의 공격에 대응하기 위한 방법으로 공격 대상이 되는 소프트웨어의 모든 취약점을 찾아 제거하는 방법과 소프트웨어 실행 중에 공격이 발생하였을 경우 공격을 탐지하여 공격을 중단시키는 방법이 있다. As a countermeasure against hackers or worms, there are methods to find and remove all vulnerabilities of the target software, and to detect and stop an attack if an attack occurs while the software is running.

소프트웨어 취약점을 제거하는 방법은 소프트웨어의 소스코드를 분석하여 해커나 웜이 악의적으로 이용할 수 있는 것으로 알려진 코드를 찾아 이를 제거하는 방법이다. The way to remove software vulnerabilities is to analyze the source code of the software and find the code known to be exploited by hackers or worms.

그리고, 소프트웨어 실행 중에 공격을 탐지하는 방법은 기존 소프트웨어에 공격이 발생했을 특징을 탐지하는 코드를 추가한 후 실행 코드를 생성하고, 실행 코드가 실행되는 중에 공격에 해당하는 특징이 발생하는 경우에 공격을 탐지하는 방법이다. In addition, the method of detecting an attack during the execution of the software is to add code that detects the characteristic of the attack to the existing software, generate the execution code, and execute the attack when the characteristic corresponding to the attack occurs while the execution code is executed. How to detect it.

본 발명에 의한 Linux 운영체제에서 소프트웨어 공격 탐지 시스템 및 방법은 소프트웨어 실행 중에 공격을 탐지하는 방법에 관한 것으로, 이러한 방법을 사용하는 대표적인 기법들로는 StackGuard, StackShield, SSP 등이 있다. 상기와 같은 기법들은 모두 소프트웨어 공격방법 중에서 버퍼오버플로우 공격을 탐지하는 방법들이다. 버퍼오버플로우가 발생하면 버퍼 주위에 있는 프로그램의 제어와 관련된 메모리인 함수의 복귀주소(return address) 또는 함수 포인터(function pointer)가 다른 값으로 덮어써지고 그 과정에서 버퍼와 제어 관련 메모리 사이에 있는 데이터들도 임의의 값으로 덮어써지는 특성을 이용하여, 버퍼와 제어관련 메모리 사이에 특정한 값을 저장해 두고 추후 저장해둔 메모리 값이 다른 값으로 변경되었을 경우 제어 관련 메모리의 값도 다른 값으로 변경된 것으로 판단하여 공격이 발생한 것으로 판단한다.Software attack detection system and method in the Linux operating system according to the present invention relates to a method for detecting an attack during the execution of the software, and representative techniques using such a method include StackGuard, StackShield, SSP. All of these techniques are methods for detecting buffer overflow attacks among software attack methods. When a buffer overflow occurs, the function's return address or function pointer, which is memory associated with the control of the program around the buffer, is overwritten with a different value, and the data between the buffer and control-related memory in the process. Also, if a certain value is stored between the buffer and the control memory and the memory value stored later is changed to another value, the value of the control memory is changed to another value. It is determined that an attack has occurred.

그 외에도 버퍼오버플로우 공격 기법이 대부분 'strcpy' 등과 같은 라이브러리 함수를 이용하여 버퍼의 내용을 복사할 때 발생하므로 해당 라이브러리 함수가 실행될 때 버퍼의 크기를 넘어선 복사를 방지하도록 고안된 시스템 라이브러리 함수로 교체하는 방법, 해커나 웜이 소프트웨어를 공격할 때 공격에 사용되는 공격 코드가 대부분 프로그램의 데이터가 저장되는 스택 메모리 영역에 저장된 후 실행되므로 스택 메모리 영역의 내용은 실행되지 못하므로 운영체제에서 메모리의 특성을 제거하는 방법, 마이크로소프트사의 Window XP SP2 에서와 같이 하드웨어적으로 스택 또는 데이터 영역의 실행 가능 특성을 제어하는 방법 등이 있다. In addition, most buffer overflow attacks occur when the contents of a buffer are copied using a library function such as 'strcpy', so when the library function is executed, it is replaced with a system library function designed to prevent copying beyond the buffer size. When a method, a hacker or a worm attacks software, the attack code used in the attack is executed after it is stored in the stack memory area where most of the program's data is stored. Therefore, the contents of the stack memory area are not executed. Therefore, the operating system removes memory characteristics. How to control the executable characteristics of the stack or data area in hardware, as in Microsoft's Windows XP SP2.

하지만, 상기의 방법들은 대부분 버퍼 오버플로우 기법을 이용한 소프트웨어 공격은 탐지할 수 있지만, 힙오버플로우 기법, 포맷스트링 기법 등 다른 공격 기법을 이용한 공격은 탐지할 수 없다. 이는 소프트웨어 공격이 발생하면 공격 코드를 공격의 대상이 되는 프로그램의 메모리에 저장하고 공격 코드로 프로그램의 제어를 옮겨야 하는데, 상기 기법들은 대부분 프로그램 제어와 관련된 메모리 영역(함수 복귀주소, 함수포인터, longjmp() 함수의 버퍼 등) 중에서 함수 복귀주소와 관련된 부분의 변경을 주로 탐지하기 때문이다. 따라서 함수포인터나 longjmp() 함수의 버퍼를 변경하는 다른 형태의 소프트웨어 공격을 효과적으로 탐지하기 위해서는 이와 같은 프로그램 제어와 관련된 메모리 영역의 변경을 모두 탐지할 수 있는 방법이 필요하다. However, most of the above methods can detect software attacks using a buffer overflow technique, but cannot detect attacks using other attack techniques such as a heap overflow technique and a format string technique. This means that when a software attack occurs, the attack code must be stored in the memory of the program to be attacked and the control of the program transferred to the attack code. The above techniques are mostly used in memory areas (function return address, function pointer, longjmp () related to program control. This is because it mainly detects the change of the function return address related to the function return address. Therefore, to effectively detect other types of software attacks that modify the function pointer or the buffer of the longjmp () function, we need a way to detect all changes in the memory area related to such program control.

따라서, 본 발명은 상기한 종래 기술의 문제점을 해결하기 위해 이루어진 것으로서, 본 발명의 목적은 실행 중인 프로세스에 대한 소프트웨어 공격이 발생하여 프로세스의 주소 공간에 입력된 공격 코드로 프로세스의 제어가 변경되기 전에 소프트웨어 공격을 탐지함으로써 해커나 웜에 의한 공격을 방지할 수 있는 Linux 운영체제에서 소프트웨어 공격 탐지 시스템 및 방법을 제공하는데 있다. Accordingly, the present invention has been made to solve the above-mentioned problems of the prior art, and an object of the present invention is to generate a software attack on a running process before changing the control of the process with the attack code entered in the address space of the process. The present invention provides a system and method for detecting software attacks in the Linux operating system that can prevent attacks by hackers or worms by detecting software attacks.

한편, 본 발명의 다른 목적은 프로그램의 실행을 제어하는 데 사용되는 함수의 복귀주소뿐만 아니라 함수 포인터, longjmp() 함수 버퍼의 내용이 변경되는 경우도 소프트웨어 공격을 탐지할 수 있는 소프트웨어 공격 탐지 시스템 및 방법을 제공하는데 있다. Meanwhile, another object of the present invention is to provide a software attack detection system capable of detecting a software attack even when the contents of a function pointer and a longjmp () function buffer, as well as the return address of a function used to control the execution of a program, and To provide a method.

상기와 같은 목적을 달성하기 위한 본 발명의 Linux 운영체제에서 소프트웨어 공격 탐지 시스템은 프로세스 실행 제어와 관련된 명령 또는 함수의 목적주소를 획득하는 목적주소 획득부;Software attack detection system in the Linux operating system of the present invention for achieving the above object is an object address obtaining unit for obtaining the object address of a command or function related to process execution control;

운영체제에서 제공하는 메모리 영역 정보로부터 프로세스의 제어가 옮겨갈 수 있는 실행코드 메모리 영역의 주소 리스트에 상기 획득된 목적주소가 포함되는지 확인하는 주소 정당성 검사부를 포함하여 이루어지는 것을 특징으로 한다. And an address validity checker for checking whether the obtained destination address is included in the address list of the executable code memory area to which the control of the process can be transferred from the memory area information provided by the operating system.

이때, 상기 프로세서 실행 제어와 관련된 명령은 indirect CALL, indirect JMP 또는 RET 명령으로 이루어지고, 상기 RET 명령의 목적주소의 획득은 스택에 저장되어 있는 복귀주소를 획득하여 이루어지는 것을 특징으로 한다. In this case, the command related to the processor execution control is made of an indirect CALL, indirect JMP or RET command, and the acquisition of the destination address of the RET command is characterized by obtaining a return address stored in the stack.

또한, 상기 프로세스 실행 제어와 관련된 함수는 longjmp() 함수로 이루어지는 것을 특징으로 하고, 상기 longjmp() 함수의 목적주소의 획득은 상기 longjmp() 함수의 호출 전에 longjmp() 함수가 제어를 옮기려고 하는 주소를 획득하여 이루어지는 것을 특징으로 한다. In addition, the function related to the process execution control is characterized in that consisting of a longjmp () function, the acquisition of the destination address of the longjmp () function is the address to which the longjmp () function is to transfer control before the call to the longjmp () function Characterized in that the obtained.

또한, 상기 주소 정당성 검사부는 상기 프로세스의 실행코드 메모리 영역의 주소 리스트 중에서 적어도 하나의 주소 범위를 선택하여 상기 획득된 목적 주소가 상기 선택된 주소 범위에 속하는지를 판단하는 것을 특징으로 하고, 상기 획득된 목적 주소가 상기 선택된 주소 범위에 속하지 않는 것으로 판단되면 다음 주소 범 위에 대해 판단하는 것을 특징으로 한다. The address validity checker may determine whether the obtained destination address belongs to the selected address range by selecting at least one address range from an address list of an execution code memory area of the process. If it is determined that the address does not belong to the selected address range, the next address range is determined.

그리고, 상기 획득된 목적 주소가 모든 실행코드 메모리 영역의 주소 리스트에 속하지 않으면 프로세스를 종료하고, 상기 획득된 목적 주소가 상기 선택된 주소 범위에 속하는 경우에 명령을 실행하거나 함수를 호출하는 것을 특징으로 한다. And if the obtained destination address does not belong to the address list of all the execution code memory areas, terminates the process, and executes a command or calls a function when the obtained destination address belongs to the selected address range. .

한편, 본 발명에 의한 Linux 운영체제에서 소프트웨어 공격 탐지 방법은 프로세스 실행 제어와 관련된 명령 또는 함수의 목적주소를 획득하는 1 단계;On the other hand, the software attack detection method in the Linux operating system according to the present invention comprises the steps of obtaining the target address of the command or function associated with the process execution control;

운영체제에서 제공하는 메모리 영역 정보로부터 프로세스의 제어가 옮겨갈 수 있는 실행코드 메모리 영역의 주소 리스트를 생성하는 2 단계;Generating an address list of an executable code memory area to which the control of the process can be transferred from the memory area information provided by the operating system;

상기 획득된 목적주소가 상기 생성된 실행코드 메모리 영역의 주소 리스트에 포함되는지 확인하는 3 단계를 포함하여 이루어지는 것을 특징으로 한다. And confirming whether the obtained destination address is included in an address list of the generated execution code memory area.

이때, 상기 실행코드 메모리 영역의 주소 리스트를 생성하는 단계는 프로그램의 main() 함수가 실행된 직후 프로세스의 메모리 맵을 이용하여 프로세스의 실행코드 메모리 영역의 주소 리스트를 생성하고, 프로세서가 동적으로 라이브러리를 load 하는 dlopen() 함수, 또는 unload 하는 dlclose() 함수가 호출되면 프로세스의 메모리 맵을 다시 확인하여 실행코드의 메모리 영역의 주소 리스트를 재작성하는 것을 특징으로 한다. In this case, the generating of the address list of the execution code memory region may include generating an address list of the execution code memory region of the process by using the memory map of the process immediately after the main () function of the program is executed, and the processor may dynamically When the dlopen () function that loads or the dlclose () function that unloads is called, the memory map of the process is rechecked to rewrite the address list of the memory region of the execution code.

또한, 상기 프로세스의 제어가 옮겨갈 수 있는 실행코드 메모리 영역의 주소 리스트의 생성은 운영체제가 제공하는 /proc/self/maps 파일을 읽으면서 이루어지 는 것을 특징으로 한다. In addition, the generation of the address list of the execution code memory area to which the control of the process can be transferred is characterized in that it is made while reading the / proc / self / maps file provided by the operating system.

이하, 본 발명의 Linux 운영체제에서 소프트웨어 공격 탐지 시스템 및 방법에 대하여 첨부된 도면을 참조하여 상세히 설명하기로 한다. Hereinafter, a software attack detection system and method in a Linux operating system of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 의한 소프트웨어 공격을 탐지하기 위한 코드를 실행 코드에 추가하기 위한 처리 절차를 나타내는 도면이다. 1 is a diagram illustrating a processing procedure for adding code to an executable code for detecting a software attack according to the present invention.

소프트웨어 공격을 탐지하기 위한 코드는 프로그램 소스코드를 컴파일할 때 생성되는 indirect CALL, indirect JMP, RET 명령의 목적 주소와 longjmp() 함수가 제어를 옮기는 데 사용하는 목적 주소가 프로그램의 정상적인 실행코드가 저장된 메모리 영역에 속하는지 확인함으로써 소프트웨어 공격을 탐지한다. 도 1은 이러한 소프트웨어 공격을 탐지하기 위한 코드를 추가하는 과정을 도시하고 있다. The code for detecting software attacks contains the destination address of the indirect CALL, indirect JMP, and RET instructions that are generated when the program source code is compiled, and the destination address that the longjmp () function uses to transfer control. Detect software attacks by verifying that they belong to a memory area. Figure 1 illustrates the process of adding code to detect such a software attack.

먼저, 컴파일러를 이용하여 프로그램 소스코드(100)를 입력으로 하여 프로그램 소스코드에 대한 어셈블리 코드(112)를 생성한다.(111) 프로그램 소스코드(100)는 소프트웨어 공격으로부터 보호대상이 되는 프로그램의 소스코드이다. First, the program source code 100 is input using a compiler to generate assembly code 112 for the program source code. (111) The program source code 100 is a source of a program to be protected from a software attack. Is the code.

Linux 운영체제에 있어서 gcc 컴파일러를 이용할 경우에는 컴파일러 옵션 중 '-S'를 이용함으로써 어셈블리 코드를 생성할 수 있다. 다만, 본 발명에 있어서는 동일한 기능을 수행할 수 있는 경우라면 컴파일러의 종류에 대해서 국한하지는 않는다. In the Linux operating system, when using the gcc compiler, assembly code can be generated by using the compiler option '-S'. However, the present invention is not limited to the type of compiler as long as the same function can be performed.

생성된 어셈블리 코드(112)는 프로그램의 소스코드와 동일한 기능을 수행하 기 위해서 컴퓨터에 의해 최종적으로 실행될 실행코드가 어셈블리 형태로 표현된다. In the generated assembly code 112, execution code finally executed by a computer is represented in an assembly form in order to perform the same function as the source code of the program.

생성된 어셈블리 코드(112)의 내용 중에는 indirect CALL(이하, "인디렉트 콜"이라고도 한다.), indirect JMP(이하, "인디렉트 JMP"라고도 한다.), RET 명령어와 main() 함수, dlopen()/dlclose() 함수, longjmp() 함수 호출부분을 검색하여 소프트웨어 공격을 탐지하기 위한 코드와 소프트웨어 공격을 탐지하기 위해서 프로세스의 실행코드 영역의 주소 리스트를 생성하는 지원 라이브러리(115) 함수를 호출하는 코드를 추가한다.(113)The generated assembly code 112 contains indirect CALLs (also called "indirect calls"), indirect JMPs (also referred to as "indirect JMPs"), RET instructions and the main () function, and dlopen ( / dlclose () function, the longjmp () function call to retrieve the code to detect software attacks, and to call the support library 115 function to generate an address list of the process's executable code area to detect software attacks. Add code (113)

생성된 어셈블리 코드(112)에 소프트웨어 공격을 탐지하기 위한 코드와 지원 라이브러리(115) 함수를 호출하는 코드를 추가하는 과정을 통하여 처리된 어셈블리코드(114)는 지원 라이브러리(115)와 함께 컴파일러에 의해서 안전한 실행코드(120)를 생성하는데 사용된다. The assembly code 114 processed by the compiler along with the support library 115 is added to the generated assembly code 112 by adding code for detecting a software attack and code for calling the support library 115 function. It is used to generate safe executable code 120.

도 2는 본 발명에 의한 Linux 운영체제에서 소프트웨어 공격 탐지 시스템의 구성을 나타내는 도면이다. 2 is a diagram showing the configuration of a software attack detection system in the Linux operating system according to the present invention.

Linux 운영체제에서 소프트웨어 공격 탐지 시스템은 목적주소 획득부(210), 실행코드 메모리 영역의 주소리스트(220), 그리고 주소 정당성 검사부(230)를 포함하여 이루어진다. The software attack detection system in the Linux operating system includes a destination address acquisition unit 210, an address list 220 of an execution code memory area, and an address validity checker 230.

목적주소 획득부(210)는 프로세스 실행 제어와 관련된 명령 또는 함수의 목적 주소를 획득한다. 프로세스 실행 제어와 관련된 명령은 indirect CALL, indirect JMP, 그리고 RET 명령(211)으로 포함하여 이루어지고, 프로세서 실행 제오와 관련된 함수는 longjmp()함수가 이용된다. The destination address obtaining unit 210 obtains a destination address of a command or a function related to process execution control. Commands related to process execution control include indirect CALL, indirect JMP, and RET command 211. The function related to processor execution control is used by the longjmp () function.

실행코드 메모리 영역의 주소 리스트는 main() 함수 실행에 의한 주소 리스트 생성부(221)와 dlopen(), dlclose() 함수의 호출에 의한 주소 리스트 생성부(222)에 의해 생성된다. main() 함수 실행에 의한 주소 리스트 생성부(221)는 프로그램의 main() 함수가 실행된 직후 프로세스의 메모리 맵을 이용하여 프로세스의 실행코드 영역의 리스트를 생성할 수 있다. dlopen(), dlclose() 함수의 호출에 의한 주소 리스트 생성부(222)는 dlopen() 함수와 dlclose() 함수가 호출되면 프로세스의 메모리 맵을 다시 확인하여 실행 코드의 메모리 영역의 주소 리스트를 재작성한다.The address list of the execution code memory area is generated by the address list generator 221 by executing the main () function and the address list generator 222 by calling the dlopen () and dlclose () functions. The address list generator 221 by executing the main () function may generate a list of the execution code region of the process by using the memory map of the process immediately after the main () function of the program is executed. When the dlopen () and dlclose () functions are called, the address list generator 222 reconfirms the memory map of the process and re-creates the address list of the memory area of the execution code when the dlopen () and dlclose () functions are called. Write.

주소 정당성 검사부(230)는 목적주소 획득부(210)에 의해 획득된 목적 주소가 실행코드 메모리 영역의 주소 리스트(220)에 포함되는지를 판단하여 목적주소가 주소 리스트에 포함되면 제어부(240)에 의해 명령을 실행하거나 함수를 호출하고, 목적주소가 주소 리스트에 포함되지 않을 경우에는 제어부(240)에 의해 시스템을 종료한다. The address validity checking unit 230 determines whether the destination address obtained by the destination address obtaining unit 210 is included in the address list 220 of the execution code memory area, and if the destination address is included in the address list, the control unit 240 determines whether the destination address is included in the address list. By executing a command or calling a function, and if the destination address is not included in the address list, the control unit 240 terminates the system.

주소 정당성 검사부(230)는 주소 범위 분할부(231), 주소 범위 선택부(232), 그리고 판단부(233)를 포함하여 이루어진다. The address validity checker 230 includes an address range divider 231, an address range selector 232, and a determiner 233.

주소 범위 분할부(231)는 프로세스의 실행코드 영역의 주소 리스트가 여러 개의 주소 범위로 존재할 수 있으므로, 여러 개의 주소 범위로 분할한다. 또한, 분할된 여러 개의 주소 범위를 일정한 순서를 지정한다. The address range dividing unit 231 divides the address list of the execution code region of the process into several address ranges, and thus may be divided into several address ranges. In addition, the divided address ranges are specified in a certain order.

주소 범위 선택부(232)는 주소 범위 분할부(231)에 의해 분할된 주소 범위 중에서 하나를 선택한다. 만일 선택된 주소 범위에 목적 주소 획득부(210)에 의해 획득된 목적주소가 포함되지 않은 것으로 판단부(233)에 의해 판단되면 다음 주소 범위를 선택하여 판단한다. The address range selector 232 selects one of the address ranges divided by the address range divider 231. If it is determined by the determination unit 233 that the destination address obtained by the destination address acquisition unit 210 is not included in the selected address range, the next address range is selected and determined.

제어부(240)는 판단부(233)에 의해 목적주소가 실행코드 메모리 영역의 주소 리스트(220)에 포함되는 것으로 판단되면 명령을 실행하거나 함수를 호출하고, 포함되지 않는 것으로 판단되면 소프트웨어 공격이 있는 것으로 탐지하여 시스템을 종료한다. The control unit 240 executes a command or calls a function when it is determined by the determination unit 233 that the destination address is included in the address list 220 of the execution code memory area. Detect and shut down the system.

도 3는 본 발명에 의한 Linux 운영체제에서 소프트웨어 공격 탐지 방법을 나타내는 도면이다. 3 is a diagram illustrating a software attack detection method in the Linux operating system according to the present invention.

소프트웨어 공격을 탐지하는 방법은 프로세스 실행 중 indirect CALL, indirect JMP, RET 명령 실행 및 longjmp() 함수 호출시에 공격을 탐지한다. indirect CALL, indirect JMP, RET 명령 실행 및 longjmp() 함수 호출 전에 각 명령어 및 함수 호출에 의해 제어가 옮겨가는 곳의 목적주소를 획득한다.(S300) 여기서 목적주소는 명령어가 실행되거나 함수가 호출된 후 프로세스의 제어가 옮겨가는 위치를 말한다. The software attack detection method detects attacks when executing indirect CALL, indirect JMP, RET instruction, and calling longjmp () function during process execution. Before executing indirect CALL, indirect JMP, RET instruction and calling longjmp () function, obtain the destination address where control is transferred by each command and function call. (S300) Here, the destination address is the command executed or the function is called. This is where control of post process transfers.

각 명령어 및 함수의 목적 주소가 획득되면 목적 주소가 프로세스의 실행 코드 영역의 주소 리스트에 포함되는지 확인하기 위해 주소 정당성 검사 루틴을 호출한다.(S310) When the destination address of each instruction and function is obtained, the address validity checking routine is called to check whether the destination address is included in the address list of the execution code area of the process (S310).

주소 정당성 검사 루틴에 의해 목적 주소가 프로세스의 실행 코드 영역의 주소 리스트에 포함되는지 확인한 결과 반환된 값(리턴 값)을 비교하여 리턴값이 TRUE 이면 원래 명령을 실행하거나 함수를 호출하고(S230), 리턴 값이 FALSE 이면 프로세스에 대한 소프트웨어 공격이 발생한 것으로 판단하여 프로세스를 종료한다.(S340)After checking whether the destination address is included in the address list of the execution code area of the process by the address validity checking routine, comparing the returned value (return value), if the return value is TRUE, execute the original command or call the function (S230), If the return value is FALSE, it is determined that a software attack on the process has occurred, and the process is terminated (S340).

소프트웨어 공격을 탐지하는 방법과 프로세스의 실행 코드 영역 주소 리스트를 생성하는 방법을 구체적으로 설명한다. It describes in detail how to detect software attacks and how to generate a list of executable code area addresses for a process.

소프트웨어 공격을 탐지하는 방법은 indirect CALL, indirect JMP, RET 명령 실행 및 longjmp() 함수 각각에 따라 구별된다. How to detect software attacks is distinguished by indirect CALL, indirect JMP, RET command execution and longjmp () functions respectively.

RET 명령은 실행 후 스택에 저장되어 있는 함수 복귀주소로 프로세스의 제어가 옮겨진다. 따라서, RET 명령 실행 전에 스택에 저장되어 있는 복귀주소가 정상적인 실행코드 메모리 영역의 주소 리스트에 속하는지 확인하는 코드를 추가하여 소프트웨어 공격을 탐지한다. After the RET instruction is executed, control is transferred to the function return address stored on the stack. Therefore, the software attack is detected by adding a code to check whether the return address stored in the stack belongs to the address list of the normal execution code memory area before executing the RET instruction.

CALL, JMP 명령의 경우 모든 CALL 및 JMP 명령어 대신 명령어가 CALL 하거나 JMP 할 목적 주소가 데이터 영역에 저장되어 있는 indirect CALL, indirect JMP 명령만을 대상으로 처리를 수행한다. 실행코드에 목적주소가 포함되는 CALL, JMP 명령의 경우 목적주소가 실행 코드에 포함되어 있으며, 실행코드가 저장된 메모리 영역은 변경이 불가능하므로 소프트웨어 공격 탐지 대상에서 제외된다. 따라서, 본 발명에서는 indirect CALL, indirect JMP 명령 앞에 indirect CALL, indirect JMP 명령의 목적 주소가 프로그램의 실행코드 영역에 속하는지 확인하는 코드를 추가하 여 소프트웨어 공격을 탐지한다.In the case of CALL and JMP instructions, processing is performed only for indirect CALL and indirect JMP instructions whose destination address is stored in the data area instead of all CALL and JMP instructions. In the case of CALL and JMP instructions that include the target address in the executable code, the target address is included in the executable code, and the memory area where the executable code is stored cannot be changed. Therefore, in the present invention, a software attack is detected by adding a code for checking whether the destination address of the indirect CALL and indirect JMP commands belongs to the program execution code area before the indirect CALL and indirect JMP commands.

또한, 시스템 라이브러리 중 longjmp() 함수는 setjmp() 함수에 의해서 미리 지정된 실행코드 부분으로 프로그램의 제어를 옮기므로 longjmp() 함수 호출 전에 longjmp() 함수가 제어를 옮기려고 하는 주소가 실행코드 영역인지 확인하는 코드를 추가하여 소프트웨어 공격을 탐지한다. Also, since longjmp () of the system library transfers control of the program to the part of the execution code designated by the setjmp () function, it is necessary to check whether the address where the longjmp () function attempts to transfer control to is before executing the longjmp () function. Add code to detect software attacks.

프로세스의 메모리 영역은 컴퓨터의 전체 메모리 주소 중에서 특정 프로세스가 점유하고 있는 영역을 나타낸다. 프로세스의 메모리 영역은 프로그램이 처음 실행된 후 운영체제가 제공하는 정보를 이용하여 확인할 수 있다. 따라서, 프로그램의 main() 함수가 실행된 직후 프로세스의 메모리 맵을 이용하여 프로세스의 실행코드 영역의 리스트를 생성할 수 있다. 또한 이러한 기능을 수행하는 코드의 추가를 통해 프로세스의 실행 영역의 리스트를 생성할 수 있다. The memory area of a process represents the area of a computer's total memory address occupied by a particular process. The memory area of a process can be checked using information provided by the operating system after the program is first executed. Therefore, immediately after the main () function of the program is executed, the list of execution code regions of the process can be generated using the memory map of the process. You can also create a list of process execution regions by adding code that performs these functions.

프로세스는 동적으로 라이브러리를 load 하거나 unload 할 때 메모리 맵이 변경된다. 따라서 라이브러리를 동적으로 load 하는 dlopen() 함수와 unload 하는 dlclose() 함수가 호출되면 프로세스의 메모리 맵을 다시 확인하여 실행 코드의 메모리 영역의 주소 리스트를 재작성한다. 또한 메모리 영역의 주소 리스트를 재작성하는 코드를 호출하는 코드를 추가하여 메모리 영역의 주소 리스트를 재작성할 수 있다. As the process dynamically loads or unloads libraries, the memory map changes. Therefore, when the dlopen () function that dynamically loads the library and the dlclose () function that unloads the library are called, the memory map of the process is rechecked to rewrite the address list of the memory area of the executable code. You can also rewrite the address list of the memory area by adding code that calls code to rewrite the address list of the memory area.

도 4은 본 발명에 의한 특정 목적 주소가 정당한 프로세스의 실행 코드 영역 에 속하는지 판단하는 과정을 나타내는 도면이다. 즉 도 3의 주소 정당성 검사 루틴을 구체적으로 나타낸다. 4 is a diagram illustrating a process of determining whether a specific destination address belongs to an executable code region of a legitimate process according to the present invention. That is, the address validity checking routine of FIG. 3 is shown in detail.

프로세스의 실행코드 영역의 주소 리스트에는 여러 개의 주소 범위가 있을 수 있다. 따라서 비교 대상 주소 리스트의 대상을 초기화한다.(S410) 주소 리스트의 대상의 초기화는 여러 개의 주소 범위 중에서 적어도 하나를 선택하는 과정이다. There can be multiple address ranges in the address list of the process's executable code area. Therefore, the target of the comparison target address list is initialized. (S410) The initialization of the target of the address list is a process of selecting at least one of a plurality of address ranges.

비교 대상 주소 리스트의 대상이 초기화(n=1)되면, 주소 정당성 검사 루틴은 입력 주소(입력 목적 주소)와 현재 검사 대상 주소범위를 비교하여 입력 주소가 선택된 비교 대상 주소 리스트의 범위에 포함되는지 여부를 판단한다.(S420)When the target of the target list of addresses to be compared is initialized (n = 1), the address validity checking routine compares the input address (the input destination address) with the current range of target addresses and checks whether the input address is included in the range of the selected target list. Determine (S420).

비교 결과 입력 주소가 현재 검사 대상(n번째 주소 범위)주소 범위에 속할 경우 TRUE를 결과값으로 되돌리고,(S430) 현재 검사 대상 주소 범위에 속하지 않을 경우 비교 대상 주소 리스트의 대상을 다음 항목(n+1)으로 변경한다.(S440)If the comparison result input address is in the current check target (n-th address range) address range, TRUE is returned to the result value (S430) .If the input address does not belong to the current scan target address range, the target of the comparison target address list is changed to the next item (n +). 1). (S440)

이러한 과정을 반복적으로 수행하면서 다음 항목의 비교 대상 주소 리스트의 숫자(n)와 전체 비교 대상 주소 리스트의 숫자를 비교한다.(S450)While repeatedly performing this process, the number (n) of the comparison target address list of the next item is compared with the number of the entire comparison target address list (S450).

그 결과, 다음 비교 대상 주소 리스트의 숫자가 전체 비교 대상 주소 리스트의 숫자보다 크다면 입력 주소는 실행코드 영역에 포함되지 않으므로 FALSE를 결과 값으로 되돌린다.(S460)As a result, if the number of the next comparison target address list is larger than the number of the entire comparison target address list, the input address is not included in the execution code area, and thus FALSE is returned to the result value (S460).

만약, 비교 대상 리스트가 남아 있다면 작업을 계속한다. If the list to be compared remains, continue working.

도 5는 본 발명에 의한 실행중인 프로세스의 실행 코드 메모리 영역의 주소 리스트를 생성하는 과정을 나타내는 도면이다. 5 is a diagram illustrating a process of generating an address list of an execution code memory area of a running process according to the present invention.

프로세스의 실행 코드 메모리 영역의 주소 리스트는 프로그램이 처음 실행되었을 때는 main() 함수에서 그리고, 프로세스가 동적으로 load 하거나 unload 하는 경우에는 dlopen() 함수와 dlclose() 함수가 호출된 후 실행 코드 메모리 영역의 주소 리스트를 생성한다. The address list of the process's executable code memory area is shown in the main () function when the program is first executed, and in the executable code memory area after the dlopen () and dlclose () functions are called if the process loads or unloads dynamically. Create a list of addresses.

Linux 운영체제에서 프로세스는 자신의 메모리 맵을 운영체제가 제공하는 '/proc/self/maps' 파일을 읽음으로써 획득할 수 있으므로 해당 파일을 읽는다.(S500)In the Linux operating system, a process can obtain its memory map by reading the '/ proc / self / maps' file provided by the operating system.

다음으로 전체 실행코드 주소 영역의 개수를 초기화하고(S510), 메모리 맵에서 실행코드 영역을 검색한다.(S520)Next, the number of all execution code address areas is initialized (S510), and the execution code areas are searched in the memory map (S520).

실행코드 영역을 검색한 결과 새로운 영역이 존재하는 경우 해당 주소 범위를 실행 코드 주소 영역 리스트에 추가하고(S540), 실행 코드 주소 영역의 개수를 증가시킨다.(S550) 이와 같은 동작을 실행 코드 영역이 더 이상 존재할지 않을 때까지 계속한다. If a new region exists as a result of searching the execution code region, the corresponding address range is added to the execution code address region list (S540), and the number of execution code address regions is increased (S550). Continue until it no longer exists.

도 6는 본 발명에 의한 Linux 운영체제가 제공하는 프로세스의 메모리 맵을 표시하는 시스템 파일의 내용을 나타내는 도면이다. 6 is a diagram showing the contents of a system file displaying a memory map of a process provided by a Linux operating system according to the present invention.

도 6에 진하게 표시된 'Address range', 'Perms', 'Mapped file' 은 이해를 돕기 위한 것으로 실재 메모리 맵 파일에는 나타나지 않는 부분이다. 도 6에서 Perms 부분이 'r-xp'로 표시된 것은 해당 주소로 지정된 메모리 영역이 변경 불가 능하고(not writable), 실행 가능한(executable) 메모리 영역, 즉 실행코드 영역이라는 것을 나타내고 있다. 따라서 Perms 부분이 'r-xp' 인 메모리 영역의 Address range 에 해당하는 주소들의 리스트를 만들면 실행코드가 저장된 메모리 영역의 리스트를 생성할 수 있다. The 'Address range', 'Perms', and 'Mapped file' shown in bold in FIG. 6 are for understanding and are not shown in the actual memory map file. In FIG. 6, the marking of the Perms part as 'r-xp' indicates that the memory area designated by the address is not writable and an executable memory area, that is, an executable code area. Therefore, if you make a list of addresses that correspond to the address range of the memory area where the Perms part is 'r-xp', you can create a list of memory areas where the executable code is stored.

이상에서 몇 가지 실시예를 들어 본 발명을 더욱 상세하게 설명하였으나, 본 발명은 반드시 이러한 실시예로 국한되는 것이 아니고 본 발명의 기술 사상을 벗어나지 않는 범위 내에서 다양하게 변형실시될 수 있다. Although the present invention has been described in more detail with reference to some embodiments, the present invention is not necessarily limited to these embodiments, and various modifications can be made without departing from the spirit of the present invention.

상술한 바와 같이, 본 발명에 의한 Linux 운영체제에서 소프트웨어 공격 탐지 시스템 및 방법은 특정 공격기법의 특성을 이용하여 공격을 탐지하는 대신 소프트웨어에 대한 공격이 발생하는 경우에 나타나는 프로세스의 제어가 정상적인 실행코드 영역 대신에 미리 입력된 공격 코드가 저장된 영역으로 옮겨가는 비정상적인 상황을 감지하여 공격을 탐지함으로써 다양한 형태의 공격을 탐지할 수 있는 효과가 있다. As described above, the software attack detection system and method in the Linux operating system according to the present invention controls the process that appears when an attack on the software occurs instead of detecting an attack using the characteristics of a specific attack technique. Instead, various types of attacks can be detected by detecting an attack by detecting an abnormal situation in which a pre-entered attack code is moved to a stored area.

또한, 본 발명에 의한 Linux 운영체제에서 소프트웨어 공격 탐지 시스템 및 방법은 프로그램의 실행을 제어하는 데 사용되는 함수의 복귀주소뿐만 아니라 함수 포인터, longjmp() 함수 버퍼의 내용이 변경되는 경우에도 소프트웨어 공격을 탐지할 수 있는 효과가 있다. In addition, the software attack detection system and method in the Linux operating system according to the present invention detects a software attack when the contents of a function pointer and a longjmp () function buffer as well as the return address of a function used to control the execution of a program are changed. It can work.

Claims (18)

프로세스 실행 제어와 관련된 명령 또는 함수의 목적주소를 획득하는 1 단계;Obtaining a destination address of a command or a function related to process execution control; 운영체제에서 제공하는 메모리 영역 정보로부터 프로세스의 제어가 옮겨갈 수 있는 실행코드 메모리 영역의 주소 리스트를 생성하는 2 단계;Generating an address list of an executable code memory area to which the control of the process can be transferred from the memory area information provided by the operating system; 상기 획득된 목적주소가 상기 생성된 실행코드 메모리 영역의 주소 리스트에 포함되는지 확인하는 3 단계를 포함하여 이루어지는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법.And confirming whether the obtained destination address is included in an address list of the generated execution code memory area. 제 1 항에 있어서, The method of claim 1, 상기 프로세서 실행 제어와 관련된 명령은 인디렉트(indirect) CALL, 인디렉트(indirect) JMP 또는 RET 명령으로 이루어지는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법.The method related to processor execution control is a software attack detection method in a Linux operating system, characterized in that the indirect (ALL), indirect (Indirect) JMP or RET command. 제 2 항에 있어서, The method of claim 2, 상기 RET 명령의 목적주소를 획득하는 단계는 스택에 저장되어 있는 복귀주소를 획득하여 이루어지는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법.And obtaining the destination address of the RET command by acquiring a return address stored in the stack. 제 1 항에 있어서, The method of claim 1, 상기 프로세스 실행 제어와 관련된 함수는 longjmp() 함수로 이루어지는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법.The function related to the process execution control is a software attack detection method in Linux operating system, characterized in that consisting of a longjmp () function. 제 4 항에 있어서, The method of claim 4, wherein 상기 longjmp() 함수의 목적주소의 획득은 상기 longjmp() 함수의 호출 전에 longjmp() 함수가 제어를 옮기려고 하는 주소를 획득하여 이루어지는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법.Obtaining the destination address of the longjmp () function is a software attack detection method in the Linux operating system, characterized in that by obtaining the address to which the longjmp () function is to transfer control before the call to the longjmp () function. 제 1 항에 있어서, The method of claim 1, 상기 실행코드 메모리 영역의 주소 리스트를 생성하는 단계는 프로그램의 main() 함수가 실행된 직후 프로세스의 메모리 맵을 이용하여 프로세스의 실행코드 메모리 영역의 주소 리스트를 생성하는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법.The generating of the address list of the execution code memory region may include generating an address list of the execution code memory region of the process using a memory map of the process immediately after the main () function of the program is executed. Attack detection method. 제 1 항에 있어서, The method of claim 1, 상기 실행코드 메모리 영역의 주소 리스트를 생성하는 단계는 프로세서가 라이브러리를 로드(load)하는 dlopen() 함수 또는 언로드(unload)하는 dlclose() 함수가 호출되면 프로세스의 메모리 맵을 다시 확인하여 실행코드의 메모리 영역의 주소 리스트를 재작성하는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법. The generating of the address list of the execution code memory region may include re-checking the memory map of the process when the dlopen () function for loading a library or the dlclose () function for unloading is called. Software attack detection method in Linux operating system, characterized by rebuilding address list of memory area. 제 1 항에 있어서, The method of claim 1, 상기 2 단계에서 상기 프로세스의 제어가 옮겨갈 수 있는 실행코드 메모리 영역의 주소 리스트의 생성은 운영체제가 제공하는 /proc/self/maps 파일을 읽으면서 이루어지는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법. The method of claim 2, wherein the generation of an address list of an execution code memory area in which the control of the process is shifted is performed by reading an / proc / self / maps file provided by an operating system. 제 1 항에 있어서, 상기 3 단계는 The method of claim 1, wherein the three steps 상기 프로세스의 실행코드 메모리 영역의 주소 리스트 중에서 적어도 하나의 주소 범위를 선택하는 초기 단계;An initial step of selecting at least one address range from an address list of an execution code memory area of the process; 상기 획득된 목적 주소가 상기 선택된 주소 범위에 속하는지 판단하는 단계를 포함하여 이루어지는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법. And determining whether the obtained destination address belongs to the selected address range. 제 9 항에 있어서, The method of claim 9, 상기 판단 결과 상기 획득된 목적 주소가 상기 선택된 주소 범위에 속하지 않는 것으로 판단되면 다음 주소 범위에 대해 판단하는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법.If it is determined that the obtained destination address does not belong to the selected address range, the software attack detection method of the Linux operating system, characterized in that for determining the next address range. 제 10 항에 있어서, The method of claim 10, 상기 획득된 목적 주소가 모든 실행코드 메모리 영역의 주소 리스트에 속하지 않으면 프로세스를 종료하는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법. If the obtained destination address does not belong to the address list of all the execution code memory area, the process is terminated in the Linux operating system, characterized in that the process. 제 9 항에 있어서, The method of claim 9, 상기 판단 결과 상기 획득된 목적 주소가 상기 선택된 주소 범위에 속하는 경우에 명령을 실행하거나 함수를 호출하는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 방법.And executing a command or calling a function when the obtained destination address belongs to the selected address range. 프로세스 실행 제어와 관련된 명령 또는 함수의 목적주소를 획득하는 목적주소 획득부;An object address obtaining unit obtaining an object address of a command or a function related to process execution control; 프로세스의 제어가 옮겨갈 수 있는 실행코드 메모리 영역의 주소 리스트에 상기 획득된 목적주소가 포함되는지 확인하는 주소 정당성 검사부를 포함하여 이루어지는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 시스템.The software attack detection system of the Linux operating system, characterized in that it comprises an address validity check unit for confirming that the obtained destination address is included in the address list of the executable code memory area to which the control of the process can be transferred. 제 13 항에 있어서, The method of claim 13, 상기 목적주소 획득부는 인디렉트 CALL, 인디렉트 JMP, 또는 RET 명령의 목적 주소를 탐색하는 명령 목적주소 탐색부로부터 목적주소를 획득하는 것을 특징으 로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 시스템.The destination address obtaining unit obtains a destination address from a command destination address search unit for searching for a destination address of an indirect CALL, indirect JMP, or RET command. 제 14 항에 있어서, The method of claim 14, 상기 목적주소 획득부는 longjmp() 함수로부터 목적 주소를 탐색하는 함수 목적주소 탐색부로부터 목적주소를 획득하는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 시스템.The destination address obtaining unit obtains a destination address from a function destination search unit for searching for a destination address from a longjmp () function. 제 13 항에 있어서, 상기 주소 정당성 검사부는 The method of claim 13, wherein the address validity checking unit 상기 실행코드 메모리 영역의 주소 리스트를 적어도 하나 이상의 주소범위로 분할하는 주소 범위 분할부;An address range dividing unit dividing the address list of the execution code memory area into at least one address range; 상기 분할된 적어도 하나 이상의 주소범위에서 하나의 주소범위를 선택하는 주소범위 선택부;An address range selector which selects one address range from the divided at least one address range; 상기 획득한 목적주소가 상기 선택된 주소범위에 속하는지 여부를 판단하는 판단부를 포함하여 이루어지는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 시스템. And a determination unit for determining whether the obtained destination address belongs to the selected address range. 제 16 항에 있어서, The method of claim 16, 상기 선택부는 상기 판단부의 판단결과 목적주소가 상기 선택된 주소범위에 속하지 않는 것으로 판단되면 다른 주소범위를 선택하는 것을 특징으로 하는 Linux 운영체제에서 소프트웨어 공격 탐지 시스템. The selection unit selects another address range if it is determined that the destination address does not belong to the selected address range, the software attack detection system of the Linux operating system. 제 13 항 내지 제 16 항 중 어느 하나의 항에 있어서, The method according to any one of claims 13 to 16, 상기 획득된 목적주소가 상기 실행코드 메모리 영역의 주소 리스트에 포함되지 않는 경우에 프로세스를 종료하는 것을 특징으로 하는 것을 특징으로 하는 Linux 운용체제에서 소프트웨어 공격 탐지 시스템.And the process is terminated when the obtained destination address is not included in the address list of the execution code memory area.
KR1020070019736A 2006-11-23 2007-02-27 Apparatus and method for detecting software attacks on linux KR100876637B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020060116506 2006-11-23
KR20060116506 2006-11-23

Publications (2)

Publication Number Publication Date
KR20080047231A true KR20080047231A (en) 2008-05-28
KR100876637B1 KR100876637B1 (en) 2009-01-09

Family

ID=39663891

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070019736A KR100876637B1 (en) 2006-11-23 2007-02-27 Apparatus and method for detecting software attacks on linux

Country Status (1)

Country Link
KR (1) KR100876637B1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110083884A (en) * 2010-01-15 2011-07-21 삼성전자주식회사 Apparatus and method for detecting code injection attack
KR20160146929A (en) * 2014-06-27 2016-12-21 맥아피 인코퍼레이티드 System and method to mitigate malicious calls
KR20170035507A (en) * 2015-09-23 2017-03-31 한국전자통신연구원 Apparatus for analysis application using expansion code and method usnig the same
KR20230050869A (en) * 2021-10-08 2023-04-17 엘에스일렉트릭(주) Vulnerability testing method and apparatus for serial communication apparaus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7716495B2 (en) * 2003-12-31 2010-05-11 Microsoft Corporation Protection against runtime function attacks

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110083884A (en) * 2010-01-15 2011-07-21 삼성전자주식회사 Apparatus and method for detecting code injection attack
KR20160146929A (en) * 2014-06-27 2016-12-21 맥아피 인코퍼레이티드 System and method to mitigate malicious calls
US10204223B2 (en) 2014-06-27 2019-02-12 Mcafee, Llc System and method to mitigate malicious calls
KR20170035507A (en) * 2015-09-23 2017-03-31 한국전자통신연구원 Apparatus for analysis application using expansion code and method usnig the same
KR20230050869A (en) * 2021-10-08 2023-04-17 엘에스일렉트릭(주) Vulnerability testing method and apparatus for serial communication apparaus

Also Published As

Publication number Publication date
KR100876637B1 (en) 2009-01-09

Similar Documents

Publication Publication Date Title
JP6189039B2 (en) Data processing apparatus and method using secure domain and low secure domain
EP3123311B1 (en) Malicious code protection for computer systems based on process modification
US8117660B2 (en) Secure control flows by monitoring control transfers
CN109508536B (en) Detection method and device for tampering program flow attack
AU2006210698B2 (en) Intrusion detection for computer programs
KR102160916B1 (en) Data processing apparatus and method using secure domain and less secure domain
KR101799261B1 (en) Restricting memory areas for an instruction read in dependence upon a hardware mode and a security flag
US10310992B1 (en) Mitigation of cyber attacks by pointer obfuscation
US20150213260A1 (en) Device and method for detecting vulnerability attack in program
CN109840410A (en) The method and system of data isolation and protection in a kind of process
KR20090052596A (en) A method and a device for malware detection
US10515216B2 (en) Memory layout based monitoring
US8024798B2 (en) Method and apparatus for protecting against buffer overrun attacks
JP2010049627A (en) Computer virus detection system
CN105678168A (en) Method and apparatus for detecting Shellcode based on stack frame abnormity
US11928206B2 (en) Selective import/export address table filtering
KR100876637B1 (en) Apparatus and method for detecting software attacks on linux
CN113176926B (en) API dynamic monitoring method and system based on virtual machine introspection technology
EP3940566A1 (en) Using a variable write profile for detecting intrusion of a computer program
KR101052735B1 (en) Method for detecting presence of memory operation and device using same
KR100927974B1 (en) Source code generation system of executable image and its method
KR20190035244A (en) Screen leak prevention program and screen leak prevention service providing method for injecting watermark into captured data
KR101341328B1 (en) User definition api function creation
WO2020012474A1 (en) Return-oriented programming attack protection system and method
KR102514257B1 (en) Apparatus and Method for Detecting Violation of Control Flow Integrity

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
AMND Amendment
J201 Request for trial against refusal decision
B701 Decision to grant
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20121011

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20130930

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20140916

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20161219

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20171222

Year of fee payment: 10