KR101961818B1 - Method for memory randomization without process stop and computing device performing thereof - Google Patents
Method for memory randomization without process stop and computing device performing thereof Download PDFInfo
- Publication number
- KR101961818B1 KR101961818B1 KR1020180136355A KR20180136355A KR101961818B1 KR 101961818 B1 KR101961818 B1 KR 101961818B1 KR 1020180136355 A KR1020180136355 A KR 1020180136355A KR 20180136355 A KR20180136355 A KR 20180136355A KR 101961818 B1 KR101961818 B1 KR 101961818B1
- Authority
- KR
- South Korea
- Prior art keywords
- shared library
- memory
- randomization
- target program
- module
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/14—Protection against unauthorised use of memory or access to memory
- G06F12/1458—Protection against unauthorised use of memory or access to memory by checking the subject access rights
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
Description
본 발명의 실시예들은 소프트웨어에 대한 메모리 공격을 방어하기 위한 기술과 관련된다.Embodiments of the invention relate to techniques for defending against memory attacks on software.
버퍼 오버플로우(buffer overflow) 공격, 포맷 스트링(format string) 공격 등과 같은 메모리 공격은 해커가 원격에서 관리자 권한의 쉘(shell)을 획득하게 할 수 있을 정도로 심각한 위험이다. 이러한 메모리 공격을 막기 위해 ASLR(Address Space Layout Randomization)과 DEP(Data Execution Prevention)와 같은 방어 기법들이 개발되었다. 그러나, 코드 재사용(code reuse) 공격, ROP(Return-Oriented Programming) 공격 등과 같은 최신 메모리 공격 기술이 개발됨에 따라 이러한 방어 기법들 역시 우회 가능하게 되었다. A memory attack, such as a buffer overflow attack or a format string attack, is a serious risk that a hacker can remotely acquire a shell with administrator privileges. Defense mechanisms such as Address Space Layout Randomization (ASLR) and Data Execution Prevention (DEP) have been developed to prevent such memory attacks. However, as newer memory attack technologies such as code reuse attacks and return-oriented programming (ROP) attacks have been developed, these defense techniques have also become possible to bypass.
ROP 공격은 JIT-ROP, Blind-ROP 등의 공격으로 세분화되기도 한다. 이런 최신 공격 기술에 대응하기 위해 여러 방어 기법들이 제안되었으나, 이 방법들은 메모리 랜덤화를 위해 소프트웨어를 재컴파일하거나 프로세스를 중단시킨 후 다시 실행시켜야 하는 제한이 있어, 프로세스 중단 없이 수행되어야 하는 응용 프로그램(Mission Critical Application)에는 적합하지 않다는 문제점이 있다.ROP attacks are subdivided into attacks such as JIT-ROP and Blind-ROP. Several defense techniques have been proposed to cope with these latest attack techniques. However, these methods have limitations to recompile the software for memory randomization or interrupt the process and restart it. Mission Critical Application).
본 발명의 실시예들은 프로세스 중단 없이 메모리 랜덤화를 수행하기 위한 방법 및 이를 수행하기 위한 컴퓨팅 장치를 제공하기 위한 것이다.Embodiments of the present invention provide a method for performing memory randomization without process interruption and a computing device for performing the method.
본 발명의 일 실시예에 따른 메모리 랜덤화 방법은, (a) 실행 중인 대상 프로그램에 메모리 랜덤화를 수행하기 위한 메모리 랜덤화 모듈을 인젝트(inject)하는 단계; (b) 상기 메모리 랜덤화 모듈이, 상기 대상 프로그램에 의해 이용되는 공유 라이브러리를 재배치하기 위한 임의의 주소 공간을 할당하는 단계; (c) 상기 메모리 랜덤화 모듈이, 상기 공유 라이브러리를 상기 할당된 메모리 주소 공간으로 복사하여 예비(stand-by) 공유 라이브러리를 생성하는 단계; (d) 상기 메모리 랜덤화 모듈이, 상기 공유 라이브러리에 대한 포인터를 수정하는 단계; 및 (e) 상기 메모리 랜덤화 모듈이, 상기 예비 공유 라이브러리를 활성화시키는 단계를 포함하되, 상기 (b) 단계 내지 상기 (e) 단계는 상기 대상 프로그램 실행 중 기 설정된 주기에 따라 반복 수행된다.A method of randomizing a memory according to an embodiment of the present invention includes the steps of: (a) injecting a memory randomizing module to perform memory randomizing on a target program being executed; (b) allocating an arbitrary address space for relocating the shared library used by the target program; (c) copying the shared library into the allocated memory address space to create a stand-by shared library; (d) the memory randomization module modifying a pointer to the shared library; And (e) activating the pre-shared library by the memory randomizing module, wherein the steps (b) to (e) are repeatedly performed according to a predetermined period of time during execution of the target program.
상기 메모리 랜덤화 모듈은, 상기 대상 프로그램의 실행 중 공유 라이브러리 형태로 메모리 공간 내에 인젝트될 수 있다.The memory randomization module may be injected into the memory space in the form of a shared library during execution of the target program.
상기 메모리 랜덤화 모듈은, 상기 대상 프로그램의 프로세스 내에서 상기 메모리 랜덤화를 위해 생성된 스레드(thread)를 통해 상기 메모리 랜덤화를 수행할 수 있다.The memory randomization module may perform the memory randomization through a thread created for the memory randomization within the process of the target program.
상기 (d) 단계는, 상기 공유 라이브러리의 각 함수에 대한 포인터가 상기 예비 공유 라이브러리의 함수 주소를 포인팅하도록 상기 공유 라이브러리의 각 함수에 대한 포인터를 수정할 수 있다.The step (d) may modify a pointer to each function of the shared library so that a pointer to each function of the shared library points to a function address of the spare shared library.
상기 (e) 단계는, PLT(procedure Linkage Table)에서 상기 공유 라이브러리의 함수들에 대한 주소를 예비 공유 라이브러리의 함수들에 대한 주소로 변경할 수 있다.The step (e) may change an address of functions of the shared library in a procedure linkage table (PLT) to an address of functions of the preliminary shared library.
본 발명의 일 실시예에 따른 컴퓨팅 장치는, 실행 중인 대상 프로그램에 메모리 랜덤화 모듈을 인젝트(inject)하여 메모리 랜덤화를 수행하며, 상기 메모리 랜덤화 모듈은, (a) 상기 대상 프로그램에 의해 이용되는 공유 라이브러리를 재배치하기 위한 임의의 주소 공간을 할당하는 과정; (b) 상기 공유 라이브러리를 상기 할당된 메모리 주소 공간으로 복사하여 예비(stand-by) 공유 라이브러리를 생성하는 과정; (c) 상기 공유 라이브러리에 대한 포인터를 수정하는 과정; 및 (d) 상기 예비 공유 라이브러리를 활성화시키는 과정 상기 대상 프로그램 실행 중 기 설정된 주기에 따라 반복적으로 실행하기 위한 명령어들을 포함한다.A computing device according to an embodiment of the present invention executes a memory randomization by injecting a memory randomizing module into a target program that is being executed, the memory randomizing module comprising: (a) Allocating an arbitrary address space for relocating a shared library to be used; (b) creating a stand-by shared library by copying the shared library into the allocated memory address space; (c) modifying a pointer to the shared library; And (d) activating the preliminary shared library, the instructions for repeatedly executing the preliminary shared library according to a predetermined period during execution of the target program.
상기 메모리 랜덤화 모듈은, 상기 대상 프로그램의 실행 중 공유 라이브러리 형태로 메모리 공간 내에 인젝트될 수 있다.The memory randomization module may be injected into the memory space in the form of a shared library during execution of the target program.
상기 메모리 랜덤화 모듈은, 상기 대상 프로그램의 프로세스 내에서 상기 메모리 랜덤화를 위해 생성된 스레드(thread)를 통해 상기 메모리 랜덤화를 수행할 수 있다.The memory randomization module may perform the memory randomization through a thread created for the memory randomization within the process of the target program.
상기 (c) 과정은, 상기 공유 라이브러리의 각 함수에 대한 포인터가 상기 예비 공유 라이브러리의 함수 주소를 포인팅하도록 상기 공유 라이브러리의 각 함수에 대한 포인터를 수정할 수 있다.In the step (c), a pointer to each function of the shared library may be modified such that a pointer to each function of the shared library points to a function address of the spare shared library.
상기 (d) 과정은, PLT(procedure Linkage Table)에서 상기 공유 라이브러리의 함수들에 대한 주소를 예비 공유 라이브러리의 함수들에 대한 주소로 변경할 수 있다.In step (d), the address of the functions of the shared library in the procedure linkage table (PLT) may be changed to the addresses of the functions of the preliminary shared library.
본 발명의 실시예들에 따르면, 대상 프로그램의 실행 중 인젝트되는 메모리 랜덤화 모듈을 이용하여 재컴파일이나 프로세스 중단 없이 메모리 랜덤화가 가능하도록 함으로써, 미션 크리티컬 애플리케이션과 같이 프로세스 중단 없이 수행되어야 하는 응용 프로그램에 대한 메모리 공격을 방어할 수 있게 된다.According to the embodiments of the present invention, memory randomization can be performed without recompilation or process interruption using an injected memory randomization module during the execution of a target program, so that an application program, such as a mission-critical application, To defend against memory attacks.
도 1은 본 발명의 실시예들에서 사용되기에 적합한 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도
도 2은 본 발명의 일 실시예에 따른 메모리 랜덤화 방법의 순서도
도 3은 본 발명의 일 실시예에 따른 메모리 랜덤화를 설명하기 위한 예시도1 is a block diagram illustrating and illustrating a computing environment including a computing device suitable for use in embodiments of the present invention.
2 is a flowchart of a memory randomization method according to an embodiment of the present invention
3 is an exemplary diagram for explaining memory randomization according to an embodiment of the present invention.
이하, 도면을 참조하여 본 발명의 구체적인 실시형태를 설명하기로 한다. 이하의 상세한 설명은 본 명세서에서 기술된 방법, 장치 및/또는 시스템에 대한 포괄적인 이해를 돕기 위해 제공된다. 그러나 이는 예시에 불과하며 본 발명은 이에 제한되지 않는다.Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. The following detailed description is provided to provide a comprehensive understanding of the methods, apparatus, and / or systems described herein. However, this is merely an example and the present invention is not limited thereto.
본 발명의 실시예들을 설명함에 있어서, 본 발명과 관련된 공지기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다. 그리고, 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다. 상세한 설명에서 사용되는 용어는 단지 본 발명의 실시예들을 기술하기 위한 것이며, 결코 제한적이어서는 안 된다. 명확하게 달리 사용되지 않는 한, 단수 형태의 표현은 복수 형태의 의미를 포함한다. 본 설명에서, "포함" 또는 "구비"와 같은 표현은 어떤 특성들, 숫자들, 단계들, 동작들, 요소들, 이들의 일부 또는 조합을 가리키기 위한 것이며, 기술된 것 이외에 하나 또는 그 이상의 다른 특성, 숫자, 단계, 동작, 요소, 이들의 일부 또는 조합의 존재 또는 가능성을 배제하도록 해석되어서는 안 된다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail. The following terms are defined in consideration of the functions of the present invention, and may be changed according to the intention or custom of the user, the operator, and the like. Therefore, the definition should be based on the contents throughout this specification. The terms used in the detailed description are intended only to describe embodiments of the invention and should in no way be limiting. Unless specifically stated otherwise, the singular form of a term includes plural forms of meaning. In this description, the expressions "comprising" or "comprising" are intended to indicate certain features, numbers, steps, operations, elements, parts or combinations thereof, Should not be construed to preclude the presence or possibility of other features, numbers, steps, operations, elements, portions or combinations thereof.
도 1은 본 발명의 실시예들에서 사용되기에 적합한 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도이다. 도시된 실시예에서, 각 컴포넌트들은 이하에 기술된 것 이외에 상이한 기능 및 능력을 가질 수 있고, 이하에 기술되지 않은 것 이외에도 추가적인 컴포넌트를 포함할 수 있다.1 is a block diagram illustrating and illustrating a computing environment including a computing device suitable for use in embodiments of the present invention. In the illustrated embodiment, each of the components may have different functions and capabilities than those described below, and may include additional components in addition to those not described below.
도시된 컴퓨팅 환경(10)은 컴퓨팅 장치(12)를 포함한다. 컴퓨팅 장치(12)는 적어도 하나의 프로세서(14), 컴퓨터 판독 가능 저장 매체(16) 및 통신 버스(18)를 포함한다. 프로세서(14)는 컴퓨팅 장치(12)로 하여금 앞서 언급된 예시적인 실시예에 따라 동작하도록 할 수 있다. 예컨대, 프로세서(14)는 컴퓨터 판독 가능 저장 매체(16)에 저장된 하나 이상의 프로그램들을 실행할 수 있다. 상기 하나 이상의 프로그램들은 하나 이상의 컴퓨터 실행 가능 명령어를 포함할 수 있으며, 상기 컴퓨터 실행 가능 명령어는 프로세서(14)에 의해 실행되는 경우 컴퓨팅 장치(12)로 하여금 예시적인 실시예에 따른 동작들을 수행하도록 구성될 수 있다.The illustrated
컴퓨터 판독 가능 저장 매체(16)는 컴퓨터 실행 가능 명령어 내지 프로그램 코드, 프로그램 데이터 및/또는 다른 적합한 형태의 정보를 저장하도록 구성된다. 컴퓨터 판독 가능 저장 매체(16)에 저장된 프로그램(20)은 프로세서(14)에 의해 실행 가능한 명령어의 집합을 포함한다. 일 실시예에서, 컴퓨터 판독 가능 저장 매체(16)는 메모리(랜덤 액세스 메모리와 같은 휘발성 메모리, 비휘발성 메모리, 또는 이들의 적절한 조합), 하나 이상의 자기 디스크 저장 디바이스들, 광학 디스크 저장 디바이스들, 플래시 메모리 디바이스들, 그 밖에 컴퓨팅 장치(12)에 의해 액세스되고 원하는 정보를 저장할 수 있는 다른 형태의 저장 매체, 또는 이들의 적합한 조합일 수 있다.The computer-
통신 버스(18)는 프로세서(14), 컴퓨터 판독 가능 저장 매체(16)를 포함하여 컴퓨팅 장치(12)의 다른 다양한 컴포넌트들을 상호 연결한다.
컴퓨팅 장치(12)는 또한 하나 이상의 입출력 장치(24)를 위한 인터페이스를 제공하는 하나 이상의 입출력 인터페이스(22) 및 하나 이상의 네트워크 통신 인터페이스(26)를 포함할 수 있다. 입출력 인터페이스(22) 및 네트워크 통신 인터페이스(26)는 통신 버스(18)에 연결된다. 입출력 장치(24)는 입출력 인터페이스(22)를 통해 컴퓨팅 장치(12)의 다른 컴포넌트들에 연결될 수 있다. 예시적인 입출력 장치(24)는 포인팅 장치(마우스 또는 트랙패드 등), 키보드, 터치 입력 장치(터치패드 또는 터치스크린 등), 음성 또는 소리 입력 장치, 다양한 종류의 센서 장치 및/또는 촬영 장치와 같은 입력 장치, 및/또는 디스플레이 장치, 프린터, 스피커 및/또는 네트워크 카드와 같은 출력 장치를 포함할 수 있다. 예시적인 입출력 장치(24)는 컴퓨팅 장치(12)를 구성하는 일 컴포넌트로서 컴퓨팅 장치(12)의 내부에 포함될 수도 있고, 컴퓨팅 장치(12)와는 구별되는 별개의 장치로 컴퓨팅 장치(12)와 연결될 수도 있다.The
도 2은 본 발명의 일 실시예에 따른 메모리 랜덤화 방법의 순서도이다. 2 is a flowchart of a memory randomization method according to an embodiment of the present invention.
도 2에 도시된 방법은 예를 들어, 도 1에 도시된 컴퓨팅 장치(12)에 의해 수행될 수 있다.The method shown in FIG. 2 may be performed, for example, by the
도 2를 참조하면, 우선, 컴퓨팅 장치(12)는 실행 중인 대상 프로그램에 메모리 랜덤화 모듈을 인젝트(inject)한다(210).Referring to FIG. 2, first, the
구체적으로, 메모리 랜덤화 모듈은 공유 라이브러리(shared library) 형태로 대상 프로그램의 프로세스 실행 중 메모리 공간 내에 인젝트될 수 있다. Specifically, the memory randomization module can be injected into the memory space during the process execution of the target program in the form of a shared library.
한편, 인젝트된 메모리 랜덤화 모듈은 대상 프로그램의 프로세스 내에서 메모리 랜덤화를 위한 스레드를 생성하여 메모리 랜덤화를 수행할 수 있다. 구체적으로, 메모리 랜덤화 모듈에 의해 수행되는 메모리 랜덤화는 대상 프로그램의 프로세스 내에서 메인 스레드(thread)와 구별되는 별도의 스레드를 통해 수행할 수 있다. 또한, 메모리 랜덤화 모듈이 대상 프로그램에 인젝트된 경우, 인젝트된 메모리 랜덤화 모듈의 데이터 구조, 클래스, 변수 등을 초기화하는 과정이 수반될 수 있다.Meanwhile, the injected memory randomization module can perform memory randomization by creating a thread for memory randomization in the process of the target program. Specifically, the memory randomization performed by the memory randomizing module can be performed through a separate thread that is different from the main thread in the process of the target program. In addition, when the memory randomizing module is introduced to the target program, the process of initializing the data structure, class, and variables of the injected memory randomizing module may be involved.
한편, 메모리 랜덤화 모듈이 인젝트된 경우, 메모리 랜덤화 모듈은 대상 프로그램에 의해 이용되고 있는 공유 라이브러리를 재배치하기 위한 임의의 주소 공간을 할당한다(220). Meanwhile, when the memory randomizing module is inserted, the memory randomizing module allocates an arbitrary address space for relocating the shared library used by the target program (220).
이후, 메모리 랜덤화 모듈은 공유 라이브러리를 할당된 주소 공간으로 복사하여 예비(stand-by) 공유 라이브러리를 생성한다(230).Thereafter, the memory randomizing module copies the shared library into the allocated address space to create a stand-by shared library (230).
이후, 메모리 랜덤화 모듈은 공유 라이브러리에 대한 포인터를 수정한다(240). Thereafter, the memory randomization module modifies the pointer to the shared library (240).
구체적으로, 메모리 랜덤화 모듈은 공유 라이브러리의 각 함수에 대한 포인터가 예비 공유 라이브러리의 함수 주소를 포인팅하도록 공유 라이브러리의 각 함수에 대한 포인터를 수정할 수 있다.Specifically, the memory randomization module may modify the pointer to each function of the shared library so that a pointer to each function of the shared library points to a function address of the spare shared library.
이후, 메모리 랜덤화 모듈은 예비 공유 라이브러리를 활성화시킨다(250).Thereafter, the memory randomization module activates the spare shared library (250).
구체적으로, 메모리 랜덤화 모듈은 대상 프로그램의 메인 스레드와 메모리 랜덤화를 위한 스레드를 동기화하고, PLT(Procedure Linkage Table)에서 공유 라이브러리의 함수들에 대한 주소를 예비 공유 라이브러리의 함수들에 대한 주소로 변경함으로써, 예비 공유 라이브러리를 활성화시킬 수 있다.Specifically, the memory randomization module synchronizes the thread for memory randomization with the main thread of the target program, and registers the address of the functions of the shared library in the Procedure Linkage Table (PLT) as addresses for the functions of the spare shared library By changing this, the reserve shared library can be activated.
이후, 메모리 랜덤화 모듈은 기 설정된 시간 간격으로 상술한 220 단계 내지 250 단계를 반복적으로 수행하여, 공유 라이브러리를 메모리 공간 내에서 지속적으로 재배치한다.Thereafter, the memory randomizing module repeatedly performs
한편, 도 2에 도시된 순서도에서는 상기 방법을 복수 개의 단계로 나누어 기재하였으나, 적어도 일부의 단계들은 순서를 바꾸어 수행되거나, 다른 단계와 결합되어 함께 수행되거나, 생략되거나, 세부 단계들로 나뉘어 수행되거나, 또는 도시되지 않은 하나 이상의 단계가 부가되어 수행될 수 있다.In the flowchart shown in FIG. 2, the method is described by dividing into a plurality of steps. However, at least some of the steps may be performed in reverse order, performed in combination with other steps, omitted, , Or one or more steps not shown may be added.
도 3은 본 발명의 일 실시예에 따른 메모리 랜덤화를 설명하기 위한 예시도이다.3 is an exemplary diagram for explaining memory randomization according to an embodiment of the present invention.
도 3을 참조하면, 메모리 공간 내에 인젝트된 메모리 랜덤화 모듈(310)은 현재 활성화된 공유 라이브러리(320)를 임의의 주소 공간으로 복사하여 예비 공유 라이브러리(330)를 생성한다.Referring to FIG. 3, the
이후, 메모리 랜덤화 모듈(320)은 공유 라이브러리의 각 함수들에 대한 포인터가 예비 공유 라이브러리(330)의 함수 주소를 포인팅 하도록 포인터를 조정한 후, PLT(340)를 변경하여 예비 공유 라이브러리를 활성화시킨다(350).Thereafter, the
이후, 메모리 랜덤화 모듈(320)은 도 3에 도시된 메모리 랜덤화 과정을 기 설정된 간격(예를 들어, 50ms)으로 반복 수행하여 메모리 공간 내에서 공유 라이브러리를 지속적으로 재배치시킬 수 있다.Thereafter, the
이상에서 대표적인 실시예를 통하여 본 발명에 대하여 상세하게 설명하였으나, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 전술한 실시예에 대하여 본 발명의 범주에서 벗어나지 않는 한도 내에서 다양한 변형이 가능함을 이해할 것이다. 그러므로 본 발명의 권리범위는 설명된 실시예에 국한되어 정해져서는 안 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, I will understand. Therefore, the scope of the present invention should not be limited to the above-described embodiments, but should be determined by equivalents to the appended claims, as well as the appended claims.
10: 컴퓨팅 환경
12: 컴퓨팅 장치
14: 프로세서
16: 컴퓨터 판독 가능 저장 매체
18: 통신 버스
20: 프로그램
22: 입출력 인터페이스
24: 입출력 장치
26: 네트워크 통신 인터페이스10: Computing environment
12: computing device
14: Processor
16: Computer readable storage medium
18: Communication bus
20: Program
22: I / O interface
24: input / output device
26: Network communication interface
Claims (10)
(b) 상기 메모리 랜덤화 모듈이, 상기 대상 프로그램에 의해 이용되는 공유 라이브러리를 재배치하기 위한 임의의 주소 공간을 할당하는 단계;
(c) 상기 메모리 랜덤화 모듈이, 상기 공유 라이브러리를 상기 할당된 메모리 주소 공간으로 복사하여 예비(stand-by) 공유 라이브러리를 생성하는 단계;
(d) 상기 메모리 랜덤화 모듈이, 상기 공유 라이브러리에 대한 포인터를 수정하는 단계; 및
(e) 상기 메모리 랜덤화 모듈이, 상기 예비 공유 라이브러리를 활성화시키는 단계를 포함하되,
상기 (b) 단계 내지 상기 (e) 단계는 상기 대상 프로그램 실행 중 기 설정된 주기에 따라 반복 수행되는 메모리 랜덤화 방법.
(a) injecting a memory randomization module to perform memory randomization on a running target program;
(b) allocating an arbitrary address space for relocating the shared library used by the target program;
(c) copying the shared library into the allocated memory address space to create a stand-by shared library;
(d) the memory randomization module modifying a pointer to the shared library; And
(e) activating the pre-shared library by the memory randomization module,
Wherein the steps (b) to (e) are repeatedly performed according to a predetermined period during execution of the target program.
상기 메모리 랜덤화 모듈은, 상기 대상 프로그램의 실행 중 공유 라이브러리 형태로 메모리 공간 내에 인젝트되는 메모리 랜덤화 방법.
The method according to claim 1,
Wherein the memory randomization module is injected into a memory space in the form of a shared library during execution of the target program.
상기 메모리 랜덤화 모듈은, 상기 대상 프로그램의 프로세스 내에서 상기 메모리 랜덤화를 위해 생성된 스레드(thread)를 통해 상기 메모리 랜덤화를 수행하는 메모리 랜덤화 방법.
The method according to claim 1,
Wherein the memory randomization module performs the memory randomization through a thread created for the memory randomization in a process of the target program.
상기 (d) 단계는, 상기 공유 라이브러리의 각 함수에 대한 포인터가 상기 예비 공유 라이브러리의 함수 주소를 포인팅하도록 상기 공유 라이브러리의 각 함수에 대한 포인터를 수정하는 메모리 랜덤화 방법.
The method according to claim 1,
Wherein the step (d) modifies a pointer to each function of the shared library such that a pointer to each function of the shared library points to a function address of the spare shared library.
상기 (e) 단계는, PLT(procedure Linkage Table)에서 상기 공유 라이브러리의 함수들에 대한 주소를 예비 공유 라이브러리의 함수들에 대한 주소로 변경하는 메모리 랜덤화 방법.
The method according to claim 1,
Wherein the step (e) includes: replacing an address of the shared library functions in a procedure linkage table (PLT) with an address of functions of the spare shared library.
(a) 상기 대상 프로그램에 의해 이용되는 공유 라이브러리를 재배치하기 위한 임의의 주소 공간을 할당하는 과정;
(b) 상기 공유 라이브러리를 상기 할당된 메모리 주소 공간으로 복사하여 예비(stand-by) 공유 라이브러리를 생성하는 과정;
(c) 상기 공유 라이브러리에 대한 포인터를 수정하는 과정; 및
(d) 상기 예비 공유 라이브러리를 활성화시키는 과정을 상기 대상 프로그램 실행 중 기 설정된 주기에 따라 반복적으로 실행하기 위한 명령어들을 포함하는 컴퓨팅 장치.
1. A computing device for performing memory randomization by injecting a memory randomization module into a target program in execution, the memory randomizing module comprising:
(a) allocating an arbitrary address space for relocating a shared library used by the target program;
(b) creating a stand-by shared library by copying the shared library into the allocated memory address space;
(c) modifying a pointer to the shared library; And
and (d) repeatedly executing a process of activating the preliminary shared library according to a predetermined period of time during execution of the target program.
상기 메모리 랜덤화 모듈은, 상기 대상 프로그램의 실행 중 공유 라이브러리 형태로 메모리 공간 내에 인젝트되는 컴퓨팅 장치.
The method of claim 6,
Wherein the memory randomization module is injected into a memory space in the form of a shared library during execution of the target program.
상기 메모리 랜덤화 모듈은, 상기 대상 프로그램의 프로세스 내에서 상기 메모리 랜덤화를 위해 생성된 스레드(thread)를 통해 상기 메모리 랜덤화를 수행하는 컴퓨팅 장치.
The method of claim 6,
Wherein the memory randomization module performs the memory randomization through a thread created for the memory randomization within a process of the target program.
상기 (c) 과정은, 상기 공유 라이브러리의 각 함수에 대한 포인터가 상기 예비 공유 라이브러리의 함수 주소를 포인팅하도록 상기 공유 라이브러리의 각 함수에 대한 포인터를 수정하는 컴퓨팅 장치.
The method of claim 6,
Wherein the step (c) modifies a pointer to each function of the shared library such that a pointer to each function of the shared library points to a function address of the spare shared library.
상기 (d) 과정은, PLT(procedure Linkage Table)에서 상기 공유 라이브러리의 함수들에 대한 주소를 예비 공유 라이브러리의 함수들에 대한 주소로 변경하는 컴퓨팅 장치.The method of claim 6,
Wherein the step (d) changes an address of functions of the shared library in a procedure linkage table (PLT) to an address of functions of a spare shared library.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020180136355A KR101961818B1 (en) | 2018-11-08 | 2018-11-08 | Method for memory randomization without process stop and computing device performing thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020180136355A KR101961818B1 (en) | 2018-11-08 | 2018-11-08 | Method for memory randomization without process stop and computing device performing thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101961818B1 true KR101961818B1 (en) | 2019-03-25 |
Family
ID=65907947
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020180136355A KR101961818B1 (en) | 2018-11-08 | 2018-11-08 | Method for memory randomization without process stop and computing device performing thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101961818B1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160092674A1 (en) * | 2014-09-30 | 2016-03-31 | Apple Inc. | Aslr map obfuscation |
US20170364452A1 (en) | 2016-06-17 | 2017-12-21 | Massachusetts Institute Of Technology | Timely randomized memory protection |
US10049211B1 (en) * | 2014-07-16 | 2018-08-14 | Bitdefender IPR Management Ltd. | Hardware-accelerated prevention of code reuse attacks |
KR101890125B1 (en) * | 2016-12-01 | 2018-08-21 | 한국과학기술원 | Memory alignment randomization method for mitigation of heap exploit |
-
2018
- 2018-11-08 KR KR1020180136355A patent/KR101961818B1/en active IP Right Grant
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10049211B1 (en) * | 2014-07-16 | 2018-08-14 | Bitdefender IPR Management Ltd. | Hardware-accelerated prevention of code reuse attacks |
US20160092674A1 (en) * | 2014-09-30 | 2016-03-31 | Apple Inc. | Aslr map obfuscation |
US20170364452A1 (en) | 2016-06-17 | 2017-12-21 | Massachusetts Institute Of Technology | Timely randomized memory protection |
KR101890125B1 (en) * | 2016-12-01 | 2018-08-21 | 한국과학기술원 | Memory alignment randomization method for mitigation of heap exploit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11188638B2 (en) | Fine-grained memory address space layout randomization | |
US10311227B2 (en) | Obfuscation of an address space layout randomization mapping in a data processing system | |
RU2513909C1 (en) | Restricting memory areas for instruction reading depending on hardware mode and security flag | |
Sung et al. | Intra-unikernel isolation with intel memory protection keys | |
US9454676B2 (en) | Technologies for preventing hook-skipping attacks using processor virtualization features | |
US20180088988A1 (en) | Return Flow Guard Using Control Stack Identified By Processor Register | |
US10545851B2 (en) | Breakpoint insertion into kernel pages | |
US9336383B2 (en) | Mitigating just-in-time spraying attacks in a network environment | |
US10311229B1 (en) | Mitigating timing side-channel attacks by obscuring alternatives in code | |
JP6984710B2 (en) | Computer equipment and memory management method | |
US20130061012A1 (en) | Virtual machine code injection | |
DeMott | Bypassing EMET 4.1 | |
CN112256396B (en) | Memory management method and system, security processing device and data processing device | |
US10303885B2 (en) | Methods and systems for securely executing untrusted software | |
KR20080104591A (en) | Memory protection method and apparatus | |
KR20200131855A (en) | Random tag setting command for tag protected memory system | |
GB2577947A (en) | Verifying stack pointer | |
KR102315532B1 (en) | Method for defending memory sharing-based side channel attacks by embedding random values in binaries | |
US10459851B2 (en) | Method and apparatus for executing a process on a device using memory privileges | |
US10380338B2 (en) | System and method for intra-level privilege seperation for system software on arm | |
KR101961818B1 (en) | Method for memory randomization without process stop and computing device performing thereof | |
US11150887B2 (en) | Secure code patching | |
US11977889B2 (en) | Method for control flow isolation with protection keys and indirect branch tracking | |
US20160313938A1 (en) | Fine grained memory protection to thwart memory overrun attacks | |
TWI682323B (en) | Server and setting method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GRNT | Written decision to grant |