KR20210108848A - Cfi-based protection device and method for defending against got overwrite attacks - Google Patents

Cfi-based protection device and method for defending against got overwrite attacks Download PDF

Info

Publication number
KR20210108848A
KR20210108848A KR1020200038983A KR20200038983A KR20210108848A KR 20210108848 A KR20210108848 A KR 20210108848A KR 1020200038983 A KR1020200038983 A KR 1020200038983A KR 20200038983 A KR20200038983 A KR 20200038983A KR 20210108848 A KR20210108848 A KR 20210108848A
Authority
KR
South Korea
Prior art keywords
branch
library
calling program
identifier
validation
Prior art date
Application number
KR1020200038983A
Other languages
Korean (ko)
Other versions
KR102351663B1 (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 PCT/KR2021/002188 priority Critical patent/WO2021201433A1/en
Publication of KR20210108848A publication Critical patent/KR20210108848A/en
Application granted granted Critical
Publication of KR102351663B1 publication Critical patent/KR102351663B1/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
    • 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/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/54Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by adding security routines or objects to programs
    • 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

Landscapes

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

Abstract

Disclosed are a control flow integrity (CFI) based global offset table (GOT) modulation attack defending apparatus and a method thereof. According to an embodiment, the GOT modulation attack defending method performed by a GOT protection apparatus implemented by a computer comprises: a step of coding a dynamic binding symbol shared between a calling program and a library to generate a branch identifier; a step of performing a branch validity check through a command code to check the coded branch identifier in a branch table included in the calling program; and a step of executing the calling program through function calling from the branch table included in the calling program based on the performed branch validity check.

Description

CFI 기반 GOT 변조 공격 방지 장치 및 그 방법{CFI-BASED PROTECTION DEVICE AND METHOD FOR DEFENDING AGAINST GOT OVERWRITE ATTACKS}CFI-BASED PROTECTION DEVICE AND METHOD FOR DEFENDING AGAINST GOT OVERWRITE ATTACKS

아래의 설명은 GOT 변조 공격 방지 기술에 관한 것이다. The description below relates to the GOT tampering attack prevention technique.

제어흐름탈취 공격이란, 버퍼 오버플로우 등의 메모리 오류 취약점을 이용하여 공격자가 의도한 프로그램 코드 주소로 프로그램의 실행흐름을 바꾸어 프로그램의 제어권을 탈취하는 행위를 일컫는다. GOT(Global Offset Table) 변조공격은 유닉스 계열 시스템 환경에서 소프트웨어 권한 탈취를 위한 전통적인 제어흐름 탈취 기법 중 하나로서, ELF(Executable and Linkable Format) 프로그램의 동적 바인딩 장치를 이용한다. ELF 프로그램에는 호출되는 라이브러리 함수 별로 PLT(Procedure Linkage Table)라는 이름의 분기 테이블을 포함하는데, 이 엔트리 명령 코드는 해당 라이브러리 함수가 호출될 때 동적 링커가 주소값을 찾아 바인딩해 둔 GOT 엔트리 값을 참조한다. GOT 공격은 바로 이 GOT 엔트리를 공격자의 분기 목표점 주소값으로 변조하고, 프로그램에서 해당 라이브러리 함수가 호출될 때 제어흐름을 탈취하는 공격기법이다.A control flow takeover attack refers to an act of taking control of a program by changing the execution flow of a program to an intended program code address by an attacker using a memory error vulnerability such as a buffer overflow. The GOT (Global Offset Table) tampering attack is one of the traditional control flow hijacking techniques for software privilege hijacking in a Unix-like system environment, and uses the dynamic binding device of the ELF (Executable and Linkable Format) program. The ELF program includes a branch table named PLT (Procedure Linkage Table) for each library function that is called. This entry command code refers to the GOT entry value that the dynamic linker finds and binds to the address value when the corresponding library function is called. do. GOT attack is an attack technique that modulates this GOT entry into the attacker's branch target address and steals the control flow when the corresponding library function is called in the program.

GOT 변조를 방어하기 위한 기법들 중에서, ELF 파일 로딩시 주소 재배치를 마치고, GOT 영역을 읽기 전용 속성으로 만드는 Full Relro 기법이 GOT 변조 공격 방지를 위해서 효과적인 방어기법으로 활용되고 있다. 하지만, Full Relro 기법은 로딩시간의 지연을 초래하고, 라이브러리 파일에는 적용할 수 없는 문제가 있다. 특히, 최근의 정교한 코드 재사용 공격기법은 라이브러리 GOT 공격을 가능하게 하고, 있어 Full Relro 기법으로는 더 이상 방어할 수 없는 문제가 있다.Among the techniques to prevent GOT tampering, the Full Relro technique that completes address relocation when ELF file is loaded and makes the GOT area read-only is used as an effective defense technique to prevent GOT tampering attacks. However, the Full Relro technique causes a delay in loading time, and there is a problem that it cannot be applied to library files. In particular, the recent sophisticated code reuse attack technique enables the library GOT attack, so there is a problem that the Full Relro technique can no longer defend.

Full Relro에서 방어가 불가능하던 라이브러리 파일을 포함해 실행파일의 로딩 지연 및 성능 오버헤드를 최소화하면서도 GOT 공격을 효과적으로 차단하는 방법 및 장치를 제공할 수 있다. It is possible to provide a method and device for effectively blocking GOT attacks while minimizing the loading delay and performance overhead of executable files, including library files, which could not be defended in Full Relro.

CFI(Control Flow Integrity) 기법을 사용한 GOT 보호 장치 및 방법을 제공할 수 있다. It is possible to provide a GOT protection apparatus and method using a Control Flow Integrity (CFI) technique.

컴퓨터로 구현되는 GOT(Global Offset Table) 보호 장치에 의해 수행되는 GOT 변조 공격 방지 방법은, 호출 프로그램과 라이브러리 간에 공유되는 동적 바인딩 심볼을 코드화하여 분기 식별자를 생성하는 단계; 상기 호출 프로그램에 포함된 분기 테이블에서 상기 코드화된 분기 식별자 코드를 검사하기 위한 명령 코드를 통해 분기 유효성 검사를 수행하는 단계; 및 상기 수행된 분기 유효성 검사에 기초하여 상기 호출 프로그램에 포함된 분기 테이블로부터 함수 호출을 통해 호출 프로그램을 실행시키는 단계를 포함할 수 있다. A GOT tampering attack prevention method performed by a computer-implemented Global Offset Table (GOT) protection device includes: generating a branch identifier by coding a dynamic binding symbol shared between a calling program and a library; performing branch validation through an instruction code for checking the coded branch identifier code in a branch table included in the calling program; and executing a calling program through a function call from a branch table included in the calling program based on the performed branch validation check.

상기 분기 유효성 검사를 수행하는 단계는, 상기 라이브러리에 상기 생성된 분기 식별자를 삽입하고, 상기 라이브러리에 삽입된 분기 식별자와 상기 호출 프로그램 PLT(Procedure Linkage Table) 엔트리에서 상기 코드화된 분기 식별자 코드를 검사하기 위하여 추가된 명령 코드를 통해 GOT 엔트리가 가리키는 분기 목표점에 위치한 값을 비교하고, 상기 비교한 결과값이 일치할 경우 분기를 진행하고, 상기 비교한 결과값이 일치하지 않을 경우, GOT 엔트리 값을 재설정하는 단계를 포함할 수 있다. The performing of the branch validation check includes inserting the generated branch identifier into the library, and checking the coded branch identifier code in the branch identifier inserted into the library and the calling program PLT (Procedure Linkage Table) entry. Compares the value located at the branch target point indicated by the GOT entry through the command code added for may include the step of

상기 분기 유효성 검사를 수행하는 단계는, 프로그램의 실행 환경에 따라 호출 프로그램이나 라이브러리 중 어느 하나에 CFI 기반의 GOT 변조 공격 방지 방법이 적용된 채로 호출이 발생될 경우, 상기 분기 유효성 검사 수행 여부를 결정하는 단계를 포함할 수 있다. The step of performing the branch validation check is to determine whether to perform the branch validation check when a call is made while the CFI-based GOT tampering attack prevention method is applied to any one of the calling program or library according to the execution environment of the program. may include steps.

상기 분기 유효성 검사를 수행하는 단계는, 상기 호출 프로그램에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않을 경우, 분기 식별자 검사를 미수행하는 단계를 포함할 수 있다. The performing the branch validation check may include not performing the branch identifier check when the CFI-based GOT tampering attack prevention method is not applied to the calling program.

상기 분기 유효성 검사를 수행하는 단계는, 상기 라이브러리에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않을 경우, 상기 라이브러리에서 분기 식별자를 포함하고 있는지 여부를 체크하여 분기 유효성 검사 코드 추가 여부를 결정하는 단계를 포함할 수 있다. The performing of the branch validation may include determining whether to add a branch validation code by checking whether the library includes a branch identifier when the CFI-based GOT tampering attack prevention method is not applied to the library. may include.

상기 분기 유효성 검사를 수행하는 단계는, 상기 라이브러리에 분기 식별자를 포함하고 있을 경우, 상기 호출 프로그램의PLT 엔트리에 분기 식별자를 포함하는 명령 코드 삽입하고, 상기 라이브러리에 분기 식별자를 포함하고 있지 않을 경우, 동적 링커에 의한 심볼 바인딩을 통해 호출 프로그램을 다이렉트로 호출하는 단계를 포함할 수 있다. In the step of performing the branch validation, if the library includes a branch identifier, inserting an instruction code including a branch identifier into the PLT entry of the calling program, and if the library does not include a branch identifier, The method may include directly calling the calling program through symbol binding by the dynamic linker.

컴퓨터로 구현되는 GOT(Global Offset Table) 보호 장치는, 호출 프로그램과 라이브러리 간에 공유되는 동적 바인딩 심볼을 코드화하여 분기 식별자를 생성하는 식별자 생성부; 상기 호출 프로그램에 포함된 분기 테이블에서 상기 코드화된 분기 식별자 코드를 검사하기 위한 명령 코드를 통해 분기 유효성 검사를 수행하는 유효성 검사부; 및 상기 수행된 분기 유효성 검사에 기초하여 상기 호출 프로그램에 포함된 분기 테이블로부터 함수 호출을 통해 호출 프로그램을 실행시키는 프로그램 실행부를 포함할 수 있다. A computer-implemented Global Offset Table (GOT) protection device includes: an identifier generator generating a branch identifier by coding a dynamic binding symbol shared between a calling program and a library; a validity check unit that performs branch validation through an instruction code for checking the coded branch identifier code in the branch table included in the calling program; and a program execution unit executing a calling program through a function call from a branch table included in the calling program based on the performed branch validation check.

상기 유효성 검사부는, 상기 라이브러리에 상기 생성된 분기 식별자를 삽입하고, 상기 라이브러리에 삽입된 분기 식별자와 상기 호출 프로그램 PLT(Procedure Linkage Table) 엔트리에서 상기 코드화된 분기 식별자 코드를 검사하기 위하여 추가된 명령 코드를 통해 GOT 엔트리가 가리키는 분기 목표점에 위치한 값을 비교하고, 상기 비교한 결과값이 일치할 경우 분기를 진행하고, 상기 비교한 결과값이 일치하지 않을 경우, GOT 엔트리 값을 재설정할 수 있다. The validity check unit inserts the generated branch identifier into the library, and checks the branch identifier inserted into the library and the coded branch identifier code in the calling program Procedure Linkage Table (PLT) entry. value located at the branch target point indicated by the GOT entry is compared through , branching is performed when the compared result values match, and when the compared result values do not match, the GOT entry value can be reset.

상기 유효성 검사부는, 프로그램의 실행 환경에 따라 호출 프로그램이나 라이브러리 중 어느 하나에 CFI 기반의 GOT 변조 공격 방지 방법이 적용된 채로 호출이 발생될 경우, 상기 분기 유효성 검사 수행 여부를 결정할 수 있다. The validation unit may determine whether to perform the branch validation check when a call is made while the CFI-based GOT tampering attack prevention method is applied to any one of the calling program or library according to the execution environment of the program.

상기 유효성 검사부는, 상기 호출 프로그램에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않을 경우, 분기 식별자 검사를 미수행할 수 있다. The validity check unit may not perform branch identifier check when the CFI-based GOT tampering attack prevention method is not applied to the calling program.

상기 유효성 검사부는, 상기 라이브러리에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않을 경우, 상기 라이브러리에서 분기 식별자를 포함하고 있는지 여부를 체크하여 분기 유효성 검사 코드 추가 여부를 결정할 수 있다. When the CFI-based GOT tampering attack prevention method is not applied to the library, the validation unit may determine whether to add a branch validation code by checking whether the library includes a branch identifier.

상기 유효성 검사부는, 상기 라이브러리에 분기 식별자를 포함하고 있을 경우, 상기 호출 프로그램의PLT 엔트리에 분기 식별자를 포함하는 명령 코드 삽입하고, 상기 라이브러리에 분기 식별자를 포함하고 있지 않을 경우, 동적 링커에 의한 심볼 바인딩을 통해 호출 프로그램을 다이렉트로 호출할 수 있다. The validity check unit inserts an instruction code including a branch identifier into the PLT entry of the calling program when the library includes a branch identifier, and when the library does not include a branch identifier, a symbol generated by the dynamic linker The calling program can be directly called through binding.

동적 바인딩 함수 심볼을 CFI의 분기 식별자로 사용하고, 호출 프로그램의 PLT 호출 지점에서 라이브러리 점프 테이블에 코드화된 분기 식별자 코드를 검사함으로써 GOT 변조 공격을 차단할 수 있다. By using the dynamic binding function symbol as the branch identifier of the CFI and checking the branch identifier code coded in the library jump table at the PLT call point of the calling program, the GOT tampering attack can be blocked.

또한, Full Relro에서 방어가 불가능하던 라이브러리 파일을 포함해 실행파일의 로딩 지연 및 성능 오버헤드를 최소화하면서도 GOT 공격을 효과적으로 차단할 수 있다. In addition, it is possible to effectively block GOT attacks while minimizing the loading delay and performance overhead of executable files, including library files, which could not be defended in Full Relro.

또한, 성능 오버헤드를 최소화하여 점진적인 빌드가 가능하고, 기존의 라이브러리와도 높은 호환성을 가진다.In addition, gradual build is possible by minimizing performance overhead, and it has high compatibility with existing libraries.

도 1은 프로그램에서 동적 라이브러리 함수를 호출하는 것을 설명하기 위한 도면이다.
도 2는 일 실시예에 따른 GOT 보호 장치의 구성을 설명하기 위한 블록도이다.
도 3은 일 실시예에 따른 GOT 보호 장치에서 GOT 변조 공격을 방지하는 방법을 설명하기 위한 흐름도이다.
도 4는 일 실시예에 있어서, 프로그램과 라이브러리 간 동적 함수 심볼을 공유하는 것을 설명하기 위한 도면이다.
도 5는 일 실시예에 있어서, 호출 프로그램의 PLT 엔트리에서 분기 식별자를 검사하는 것을 설명하기 위한 도면이다.
도 6은 일 실시예에 있어서, 라이브러리 점프 테이블을 설명하기 위한 도면이다.
도 7은 일 실시예에 있어서, 라이브러리 함수를 호출하는 예제 프로그램에 대하여 라이브러리 점프 테이블을 구현한 것을 설명하기 위한 예이다.
도8은 일 실시예에 있어서, 호출 프로그램에서의 분기 검증을 설명하기 위한 도면이다.
도 9는 일 실시예에 있어서, 프로그램 그룹의 파일 크기 정보를 설명하기 위한 예이다.
도 10은 일 실시예에 있어서, 프로그램 그룹이 호출한 라이브러리의 파일 크기 정보를 설명하기 위한 도면이다.
도 11은 일 실시예에 있어서, 프로그램별 서로 다른 기법에 의한 동적 링커의 재배치 회수와 로딩시간을 설명하기 위한 도면이다.
1 is a diagram for explaining calling a dynamic library function in a program.
2 is a block diagram for explaining the configuration of a GOT protection device according to an embodiment.
3 is a flowchart illustrating a method of preventing a GOT tampering attack in the GOT protection device according to an embodiment.
4 is a diagram for explaining sharing of dynamic function symbols between a program and a library, according to an embodiment.
5 is a diagram for explaining checking a branch identifier in a PLT entry of a calling program, according to an embodiment.
6 is a diagram for explaining a library jump table according to an embodiment.
7 is an example for explaining the implementation of a library jump table with respect to an example program that calls a library function according to an embodiment.
8 is a diagram for explaining branch verification in a calling program according to an embodiment.
9 is an example for explaining file size information of a program group according to an embodiment.
10 is a diagram for explaining file size information of a library called by a program group according to an embodiment.
11 is a diagram for explaining the number of relocation and loading times of the dynamic linker according to different techniques for each program, according to an embodiment.

이하, 실시예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings.

도 1은 프로그램에서 동적 라이브러리 함수를 호출하는 것을 설명하기 위한 도면이다.1 is a diagram for explaining calling a dynamic library function in a program.

유닉스 계열 정적 링커는 동적 라이브러리 링크를 지원하기 위해 PLT, GOT 두 구조체를 생성하여 호출 프로그램의 ELF 파일의 섹션으로 포함시킬 수 있다. 이때, 동적 라이브러리 링크는 호출 프로그램과 라이브러리 간의 함수에 대한 심볼 바인딩 프로세스가 실행 시간에 동적으로 이루어지도록 하는 기법이다. 동적 링커와 정적 링커는 서로 협력하여 모듈 간 심볼 바인딩이 이루어지도록 한다. PLT는 호출 프로그램과 라이브러리 함수를 연결하는 함수 호출 테이블로서 정적 링커에 의해 최종 실행 프로그램 혹은 라이브러리 파일 단위로 포함된다. 정적 링커는 각 라이브러리 함수 호출 별로 PLT 엔트리를 생성하고, 원래의 함수 호출 명령문을 PLT 엔트리로의 오프셋 직접분기로 수정할 수 있다. PLT 엔트리에는 짝을 이루고 있는 GOT 엔트리의 값을 참조하여 목표 분기점 주소로 간접 호출을 실행하는 명령 코드가 포함될 수 있다. GOT는 호출 프로그램에 동적으로 바인딩되는 라이브러리 함수들의 실행시간 주소 값을 담는 포인터 배열 구조체로서 앞서 언급했듯이 동적 링커에 의해 주소 값이 저장될 수 있다.Unix-like static linker can create two structures PLT and GOT to support dynamic library linking and include them as a section of the calling program's ELF file. In this case, the dynamic library linking is a technique that allows the symbol binding process for a function between the calling program and the library to be performed dynamically at run time. The dynamic linker and the static linker work together to enable symbol binding between modules. The PLT is a function call table that links the calling program and the library function, and is included in the final executable program or library file unit by the static linker. The static linker creates a PLT entry for each library function call, and the original function call statement can be modified with an offset direct branch to the PLT entry. The PLT entry may contain instruction code that executes an indirect call to the target branch address by referring to the value of the paired GOT entry. GOT is a pointer array structure containing runtime address values of library functions that are dynamically bound to the calling program. As mentioned above, address values can be stored by the dynamic linker.

실시예에서는 CFI(Control Flow Integrity)를 적용한 GOT 변조 공격 방지 방법 및 GOT 보호 장치를 설명하기로 한다. CFI 기법은 정상 제어흐름 그래프를 생성하는 분석 단계와 실행 시간에 정상 제어흐름 그래프 하에서 제어흐름 분기가 이루어지도록 분기 유효성 검사 코드를 삽입하는 단계로 구성될 수 있다. In the embodiment, a method for preventing a GOT tampering attack and a GOT protection device to which Control Flow Integrity (CFI) is applied will be described. The CFI technique may consist of an analysis step of generating a normal control flow graph and a step of inserting a branch validation code so that a control flow branch is made under the normal control flow graph at execution time.

실시예에서 제안하는 CFI를 적용한 GOT 변조 공격 방지 방법은 일반적인 리눅스 방어 기법이 동작하는 실행 환경과 강력한 공격 모델을 가정한다. 실행 프로그램 및 라이브러리 파일은 ELF 파일을 대상으로 하며, 메모리 페이지는 DEP에 의해 실행과 동시에 쓰기가 가능하지 않다. 과도한 프로그램 오류를 발생시키지 않는 수준에서 공격자는 메모리 변조와 정보 누출 공격을 통해 모든 데이터 페이지 메모리를 읽거나 쓸 수 있고 코드 페이지 메모리를 읽을 수 있다. 프로그램 및 라이브러리 파일은 Partial Relro가 적용되고, 프로그램의 외부 라이브러리 호출은 PLT/GOT 를 통해 이루어진다. 공격자는 프로그램 혹은 라이브러리의 GOT 테이블 엔트리 변조를 통한 제어흐름탈취 공격을 시도한다. 도 1에 도시된 바와 같이, 프로그램 실행 환경에서 모듈 간 호출에 대해 GOT 변조 공격을 방지하기 위한 방법 및 장치를 제안할 수 있다. The GOT tampering attack prevention method to which CFI is applied, as proposed in the embodiment, assumes an execution environment in which a general Linux defense technique operates and a strong attack model. Executable program and library files target ELF files, and memory pages are not writeable at the same time as execution by DEP. At a level that does not cause excessive program errors, an attacker can read or write any data page memory or read code page memory through memory tampering and information leak attacks. Partial Relro is applied to program and library files, and external library calls of programs are made through PLT/GOT. The attacker attempts a control flow takeover attack by tampering with the GOT table entry of a program or library. As shown in Fig. 1, it is possible to propose a method and apparatus for preventing GOT tampering attacks for inter-module calls in a program execution environment.

도 2는 일 실시예에 따른 GOT 보호 장치의 구성을 설명하기 위한 블록도이고, 도 3은 일 실시예에 따른 GOT 보호 장치에서 GOT 변조 공격을 방지하는 방법을 설명하기 위한 흐름도이다.2 is a block diagram for explaining the configuration of a GOT protection device according to an embodiment, and FIG. 3 is a flowchart for explaining a method of preventing a GOT tampering attack in the GOT protection device according to an embodiment.

GOT 보호 장치(100)에 포함된 프로세서는 식별자 생성부(210), 유효성 검사부(220) 및 프로그램 실행부(230)를 포함할 수 있다. 이러한 프로세서 및 프로세서의 구성요소들은 도 3의 GOT 변조 공격을 방지하는 방법이 포함하는 단계들(310 내지 330)을 수행하도록 GOT 보호 장치를 제어할 수 있다. 이때, 프로세서 및 프로세서의 구성요소들은 메모리가 포함하는 운영체제의 코드와 적어도 하나의 프로그램의 코드에 따른 명령(instruction)을 실행하도록 구현될 수 있다. 여기서, 프로세서의 구성요소들은 GOT 보호 장치(100)에 저장된 프로그램 코드가 제공하는 제어 명령에 따라 프로세서에 의해 수행되는 서로 다른 기능들(different functions)의 표현들일 수 있다. The processor included in the GOT protection device 100 may include an identifier generation unit 210 , a validity check unit 220 , and a program execution unit 230 . Such a processor and components of the processor may control the GOT protection device to perform steps 310 to 330 included in the method for preventing a GOT tampering attack of FIG. 3 . In this case, the processor and components of the processor may be implemented to execute instructions according to the code of the operating system and the code of at least one program included in the memory. Here, the components of the processor may be expressions of different functions performed by the processor according to a control command provided by the program code stored in the GOT protection device 100 .

프로세서는 GOT 변조 공격을 방지하는 방법을 위한 프로그램의 파일에 저장된 프로그램 코드를 메모리에 로딩할 수 있다. 예를 들면, GOT 보호 장치(100)에서 프로그램이 실행되면, 프로세서는 운영체제의 제어에 따라 프로그램의 파일로부터 프로그램 코드를 메모리에 로딩하도록 GOT 보호 장치를 제어할 수 있다. The processor may load the program code stored in the file of the program into the memory for a method of preventing a GOT tampering attack. For example, when a program is executed in the GOT protection device 100 , the processor may control the GOT protection device to load a program code from a file of the program into the memory according to the control of the operating system.

단계(310)에서 식별자 생성부(210)는 호출 프로그램과 라이브러리 간에 공유되는 동적 바인딩 심볼을 코드화하여 분기 식별자를 생성할 수 있다. In step 310, the identifier generating unit 210 may generate a branch identifier by coding a dynamic binding symbol shared between the calling program and the library.

단계(320)에서 유효성 검사부(220)는 호출 프로그램에 포함된 분기 테이블에서 코드화된 분기 식별자 코드를 검사하기 위한 명령 코드를 통해 분기 유효성 검사를 수행할 수 있다. 유효성 검사부(220)는 라이브러리에 생성된 분기 식별자를 삽입하고, 라이브러리에 삽입된 분기 식별자와 호출 프로그램 PLT(Procedure Linkage Table) 엔트리에서 코드화된 분기 식별자 코드를 검사하기 위하여 추가된 명령 코드를 통해 GOT 엔트리가 가리키는 분기 목표점에 위치한 값을 비교하고, 비교한 결과값이 일치할 경우 분기를 진행하고, 비교한 결과값이 일치하지 않을 경우, GOT 엔트리 값을 재설정할 수 있다. 유효성 검사부(220)는 프로그램의 실행 환경에 따라 호출 프로그램이나 라이브러리 중 어느 하나에 CFI 기반의 GOT 변조 공격 방지 방법이 적용된 채로 호출이 발생될 경우, 분기 유효성 검사 수행 여부를 결정할 수 있다. 유효성 검사부(220)는 호출 프로그램에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않을 경우, 분기 식별자 검사를 미수행할 수 있다. 유효성 검사부(220)는 라이브러리에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않을 경우, 라이브러리에서 분기 식별자를 포함하고 있는지 여부를 체크하여 분기 유효성 검사 코드 추가 여부를 결정할 수 있다. 유효성 검사부(220)는 라이브러리에 분기 식별자를 포함하고 있을 경우, 호출 프로그램의PLT 엔트리에 분기 식별자를 포함하는 명령 코드 삽입하고, 라이브러리에 분기 식별자를 포함하고 있지 않을 경우, 동적 링커에 의한 심볼 바인딩을 통해 호출 프로그램을 다이렉트로 호출할 수 있다. In step 320 , the validity check unit 220 may perform branch validity check through the command code for checking the branch identifier code coded in the branch table included in the calling program. The validation unit 220 inserts the generated branch identifier into the library, and checks the branch identifier inserted into the library and the branch identifier code coded in the calling program PLT (Procedure Linkage Table) entry through the added command code to enter the GOT entry. It is possible to compare the values located at the branching target point indicated by , and if the compared results match, branching is performed. If the compared results do not match, the GOT entry value can be reset. The validation unit 220 may determine whether to perform branch validation when a call is made while the CFI-based GOT tampering attack prevention method is applied to any one of the calling program or library according to the execution environment of the program. When the CFI-based GOT tampering attack prevention method is not applied to the calling program, the validity check unit 220 may not perform branch identifier check. When the CFI-based GOT tampering attack prevention method is not applied to the library, the validation unit 220 may determine whether to add a branch validation code by checking whether the library includes a branch identifier. When the library includes the branch identifier, the validation unit 220 inserts the instruction code including the branch identifier into the PLT entry of the calling program, and when the library does not include the branch identifier, performs symbol binding by the dynamic linker. The calling program can be called directly through

단계(330)에서 프로그램 실행부(230)는 수행된 분기 유효성 검사에 기초하여 상기 호출 프로그램에 포함된 분기 테이블로부터 함수 호출을 통해 호출 프로그램을 실행시킬 수 있다. In step 330 , the program execution unit 230 may execute a calling program through a function call from a branch table included in the calling program based on the performed branch validation check.

도 4는 일 실시예에 있어서, 프로그램과 라이브러리 간 동적 함수 심볼을 공유하는 것을 설명하기 위한 도면이다.4 is a diagram for explaining sharing of dynamic function symbols between a program and a library, according to an embodiment.

GOT 보호 장치는 동적 바인딩 심볼을 사용한 정적 분기 식별자를 공유할 수 있다. 모듈 간 제어흐름에 CFI 적용을 위해서는 라이브러리가 고려된 분기 식별자 할당이 이루어져야 한다. 동적 바인딩 함수 심볼은 호출 프로그램과 라이브러리 간에 정적으로 공유된 식별자이다. 동적 링커의 바인딩 과정은 호출 프로그램의 라이브러리 목록과 심볼 테이블을 사용할 수 있다. 도 4를 참고하면, 동일한 라이브러리 함수를 호출하는 서로 다른 프로그램은 각각의 ELF 파일의 '.dynamic' 섹션에 동일한 라이브러리 파일에 대한 엔트리와, '.dynsym' 섹션에 동일한 함수 심볼에 대한 엔트리를 포함한 것을 확인할 수 있다. 동적 바인딩 함수 심볼은 PLT 엔트리에서 분기 식별자로 사용될 수 있는데, 이때, 각 연결된 GOT 엔트리에 바인딩되는 함수 심볼은 고유하기 때문이다. 이때, 정적 분석시 다른 간접 호출 분기점에서는 호출 함수의 심볼이 일반적으로 고유하게 결정되지 않는다.GOT protection devices can share static branch identifiers using dynamic binding symbols. In order to apply CFI to the control flow between modules, a branch identifier assignment in consideration of the library must be made. A dynamic binding function symbol is an identifier that is statically shared between the calling program and the library. The binding process of the dynamic linker can use the library list and symbol table of the calling program. Referring to Figure 4, different programs calling the same library function '. You can see that the entry for the same library file is included in the dynamic ' section and the entry for the same function symbol is included in the '.dynsym ' section. A dynamic binding function symbol can be used as a branch identifier in a PLT entry, since the function symbol bound to each linked GOT entry is unique. At this time, the symbol of the calling function is generally not uniquely determined at other indirect call branch points during static analysis.

동적 바인딩 함수 심볼은 작은 크기의 분기 식별자 그룹의 요건을 충족할 수 있다. 라이브러리 함수는 일반적으로 외부 연결(External Linkage)의 속성을 갖고 있어 프로세스 공간에서 고유하게 식별이 된다. 정적 링크시 외부 연결(External Linage) 속성을 갖고 있는 동일한 이름의 서로 다른 함수가 존재할 때, 정적 링커는 중복된 심볼 오류(duplicated symbol error)를 일으키기 때문에 실행 시간에 호출 함수의 심볼 충돌은 발생하지 않는다. 만약, 호출 함수의 심볼이 약한 연결(Weak Linkage) 속성을 갖고 있다면, 해당 함수는 다수의 라이브러리에 중복되어 포함되어 있을 수 있다. 이 경우, 호출 프로그램의 실행시간 환경에 따라 동일한 함수 심볼에 대해 서로 다른 주소가 바인딩 될 수 있어 결과적으로 약한 연결의 심볼은 다소 큰 분기 그룹을 형성할 수 있다. 한편, 하나의 모듈에서 정의된 외부 연결 속성의 함수 심볼이 다른 모듈에서는 지역 연결(Local Linkage) 속성으로 정의될 수도 있는데, 지역 연결 속성의 함수는 동적 링크의 대상에서 제외되므로(즉, 동적 심볼 테이블에 존재하지 않음) 동적 바인딩 함수 심볼은 고유한 분기 식별자 선택을 위한 좋은 후보가 될 수 있다.A dynamic binding function symbol can meet the requirements of a small-sized branch identifier group. Library functions generally have the property of External Linkage, so they are uniquely identified in the process space. When there are different functions with the same name with the External Linage property during static linking, the static linker generates a duplicated symbol error, so symbol collision of the calling function does not occur at runtime. . If the symbol of the calling function has a weak linkage property, the function may be duplicated and included in multiple libraries. In this case, different addresses may be bound to the same function symbol depending on the runtime environment of the calling program, and as a result, the weakly connected symbol may form a rather large branching group. On the other hand, a function symbol of an external linkage property defined in one module may be defined as a local linkage property in another module. does not exist in ), dynamic binding function symbols can be good candidates for unique branch identifier selection.

GOT 보호 장치는 동적 바인딩 함수 심볼을 CFI의 분기 식별자로 사용하기 위하여 동적 바인딩 심볼의 코드화를 수행할 수 있다. 라이브러리 함수 심볼은 가변적 길이의 문자열이어서 분기 식별자 코드로 직접 사용하기에는 부적절하다. 또한, C++ 언어에서는 템플릿 선언 등에 의해 다른 형식의 동일한 함수 이름이 정의될 수 있다. 예를 들면, 분기 식별자로 사용하기 위해 동적 바인딩 심볼은 다음의 코드화 과정이 수행될 수 있다. 일례로, GOT 보호 장치는 해시함수를 사용하여 하나의 명령 코드에 로딩할 수 있는 고정된 길이의 비트코드를 생성하되 해시함수의 입력이 되는 문자열은 이름 꾸밈(name mangling) 규칙에 의해 전처리된 심볼 이름이 사용될 수 있다. 컴파일러에 의해 이름 꾸밈된 심볼은 동적 링커가 바인딩시 사용하는 문자열이고, 중복성이 없기 때문에 식별자 생성을 위한 별도의 이름 꾸밈이 필요하지 않다.The GOT protection device may perform coding of the dynamic binding symbol in order to use the dynamic binding function symbol as a branch identifier of the CFI. A library function symbol is a variable-length string and is not suitable for direct use as a branch identifier code. Also, in the C++ language, the same function name in a different format may be defined by a template declaration or the like. For example, the following coding process may be performed for a dynamic binding symbol to be used as a branch identifier. As an example, the GOT protection device uses a hash function to generate a bit code of a fixed length that can be loaded into one command code, but the string input to the hash function is a symbol preprocessed by the name mangling rule. Names may be used. Symbols decorated with names by the compiler are strings used by the dynamic linker when binding, and since there is no redundancy, there is no need for a separate name decoration for generating identifiers.

도 5는 일 실시예에 있어서, 호출 프로그램의 PLT 엔트리에서 분기 식별자를 검사하는 것을 설명하기 위한 도면이다. 5 is a diagram for explaining checking a branch identifier in a PLT entry of a calling program, according to an embodiment.

GOT 보호 장치는 호출 프로그램 PLT 엔트리의 분기 식별자를 점검할 수 있다. GOT 보호 장치는 전역 함수 심볼을 분기 식별자로 사용하기 때문에 분기원점에서 단순한 비교 명령문 실행을 통해 분기 유효성 검사를 수행할 수 있다. 도 5를 참고하면, 분기 목표 모듈에 분기 식별자 테이블이 존재할 경우 분기 유효성 검사 명령코드를 추가하는 링커의 의사 알고리즘을 나타낸 예이다. GOT 보호 장치는 GOT 엔트리가 가리키는 분기 목표점에 위치한 분기 식별자 명령 코드를 로딩하고, 분기 식별자 명령 코드를 로딩함에 따른 값과 라이브러리의 분기 식별자를 비교하고, 비교한 값이 일치하면 분기를 정상적으로 진행하고, 그렇지 않으면 동적 바인딩을 통해 GOT 엔트리 값을 재설정할 수 있다. 동적 바인딩은 동적 링커에 의한 지연된 바인딩(Lazy Binding or Lazy Symbol Resolution) 장치를 수정 없이 사용할 수 있다. 다시 말해서, 재배치 테이블의 엔트리 순번을 스택에 저장하고, PLT[0] 로 분기하여 동적 링커가 실행되도록 한다. 도 5의 'je' 분기문 다음에 오는 두 명령 코드는 동적 바인딩의 시작을 나타낸다.The GOT protection device may check the branch identifier of the calling program PLT entry. Since the GOT protection device uses a global function symbol as a branch identifier, branch validation can be performed by executing a simple comparison statement at the branch origin. Referring to FIG. 5 , when a branch identifier table exists in the branch target module, it is an example illustrating a pseudo-algorithm of the linker for adding a branch validation command code. The GOT protection device loads the branch identifier instruction code located at the branch target point indicated by the GOT entry, compares the value obtained by loading the branch identifier instruction code with the branch identifier of the library, and if the compared values match, the branch proceeds normally; Otherwise, you can reset the GOT entry value through dynamic binding. Dynamic binding can use the Lazy Binding or Lazy Symbol Resolution device by the dynamic linker without modification. In other words, it stores the order of entries in the relocation table on the stack and branches to PLT[0] so that the dynamic linker is executed. The two instruction codes following the 'je' branch of FIG. 5 indicate the start of dynamic binding.

PLT 엔트리의 명령 코드는 GOT 엔트리 값을 참조하는 무조건 분기에서 분기 식별자 검사가 포함된 조건부 분기로 변경될 수 있다. 이때, 복수 개(예를 들면, 세 개)의 명령 코드가 추가될 수 있다. GOT 보호 장치는 프로그램의 첫 호출 때와 공격자에 의해 GOT 엔트리가 변조되었을 때, 식별자 검사에 실패할 수 있다. 첫 호출시 GOT 엔트리 초기값이 가리키는 주소에는 분기 식별자 코드가 존재하지 않는다. 이 경우, 동적 링커의 지연된 바인딩 과정에 의해 GOT 엔트리는 올바른 함수 주소 값으로 수정될 수 있다. 공격자는 분기 유효성 검사를 우회하기 어렵다. 상기에서 언급한 공격 모델을 가정할 때 공격자는 모든 GOT 엔트리를 원하는 분기 목표점 주소 값으로 조작할 수 있다. 그러나, PLT 코드 영역의 수정은 불가하므로 공격자는 분기 식별자 검사 명령 코드 및 분기 식별자 코드를 변조할 수 없다. 이에 따라, GOT 엔트리 변조에 성공하더라도 PLT 엔트리의 분기 유효성 검사에서 실패하고, 변조된 GOT 엔트리는 동적 링커에 의해 올바른 함수 주소로 갱신되어 GOT 변조에 의한 제어흐름탈취 공격에 실패하게 된다.The instruction code of the PLT entry can be changed from an unconditional branch referencing the GOT entry value to a conditional branch with branch identifier check. In this case, a plurality of (eg, three) command codes may be added. The GOT protection device may fail the identifier check at the first invocation of the program and when the GOT entry is tampered with by an attacker. In the first call, there is no branch identifier code at the address indicated by the initial value of the GOT entry. In this case, the GOT entry can be modified to the correct function address value by the delayed binding process of the dynamic linker. It is difficult for an attacker to bypass branch validation. Assuming the above-mentioned attack model, an attacker can manipulate all GOT entries into a desired branch target address value. However, since it is impossible to modify the PLT code area, an attacker cannot tamper with the branch identifier check instruction code and the branch identifier code. Accordingly, even if the GOT entry modulation succeeds, the branch validation check of the PLT entry fails, and the modified GOT entry is updated with the correct function address by the dynamic linker to fail the control flow takeover attack by GOT modulation.

도 6은 일 실시예에 있어서, 라이브러리 점프 테이블을 설명하기 위한 도면이다. GOT 보호 장치는 라이브러리 점프 테이블을 생성할 수 있다. PLT 엔트리에서의 분기 유효성 검사는 라이브러리 코드에 분기 식별자 코드가 삽입되어야 한다. 이때, 라이브러리 함수에 분기 식별자 코드를 직접 삽입하는 방법은 함수의 오프셋 변화를 가져와 추가적인 코드 주소의 재배치 및 호환성 문제를 일으킬 수 있다. 이에, GOT 보호 장치는 라이브러리 내 기존 코드 섹션의 수정이 없도록, 분기 식별자 검사를 위한 별도의 점프 테이블을 생성할 수 있다. 점프 테이블은 라이브러리의 외부 인터페이스가 되어 점프 테이블의 각 엔트리는 라이브러리 함수 호출 진입점이 되고, 라이브러리 내부에 정의된 각 함수와 연결될 수 있다.6 is a diagram for explaining a library jump table according to an embodiment. The GOT protection device can create a library jump table. For branch validation in the PLT entry, the branch identifier code must be inserted into the library code. In this case, the method of directly inserting the branch identifier code into the library function may cause an offset change of the function, which may cause additional code address relocation and compatibility problems. Accordingly, the GOT protection device can create a separate jump table for branch identifier checking so that there is no modification of an existing code section in the library. The jump table becomes an external interface of the library, and each entry in the jump table becomes an entry point for calling a library function, and can be connected to each function defined inside the library.

도 6을 참고하면, 분기 테이블 엔트리와 라이브러리 함수의 호출 연결 관계를 도시한 것이다. 점프 테이블의 각 엔트리 코드는 짝을 이루는 라이브러리 함수로의 직접 분기 명령 코드와 해당 함수 심볼의 분기 식별자 코드를 포함하는 명령 코드로 구성될 수 있다. 점프 테이블 전체 명령 코드는 하나의 독립된 함수로 생성하여 기존 라이브러리 내에 추가적인 주소 재배치가 없도록 한다. 또한, 호출 프로그램이 라이브러리 함수 호출시 점프 테이블 엔트리 주소가 바인딩 될 수 있도록 정적 링커는 라이브러리 함수의 심볼 주소가 점프 테이블 엔트리를 가리키도록 변경할 수 있다.Referring to FIG. 6 , a call connection relationship between branch table entries and library functions is shown. Each entry code in the jump table may be composed of an instruction code including a direct branch instruction code to a corresponding library function and a branch identifier code of the corresponding function symbol. The entire jump table instruction code is created as a single independent function so that there is no additional address relocation in the existing library. In addition, the static linker can change the symbol address of the library function to point to the jump table entry so that the jump table entry address can be bound when the calling program calls the library function.

점프 테이블이 포함된 라이브러리는 적은 양의 명령 코드로 효율적인 모듈간 분기 유효성 검사를 가능하게 한다. 라이브러리는 호출 함수 당 점프 테이블 내에 하나의 엔트리를 가지며, 각 엔트리는 2개의 명령 코드만을 포함한다. 하나의 직접 분기 명령 코드만 부가적으로 실행되므로 메모리 및 성능 오버헤드는 제한적이다. 분기 식별자가 인코딩된 명령코드는 분기 원점에서 로딩 되지만, 라이브러리에서 실행되지는 않는다. A library with jump tables enables efficient cross-module branch validation with a small amount of instruction code. The library has one entry in the jump table per calling function, and each entry contains only two instruction codes. Memory and performance overhead are limited as only one direct branch instruction code is additionally executed. The instruction code encoded with the branch identifier is loaded from the branch origin, but is not executed from the library.

도 7은 일 실시예에 있어서, 라이브러리 함수를 호출하는 예제 프로그램에 대하여 라이브러리 점프 테이블을 구현한 것을 설명하기 위한 예이다. 7 is an example for explaining the implementation of a library jump table with respect to an example program that calls a library function according to an embodiment.

일례로, CFI 기반의 GOT 변조 공격 방지 방법은 LLVM 10 버전의 Module Pass 프레임워크 및 LLD 링커 프로젝트를 기반으로 구현될 수 있고, X86-64 아키텍처를 대상으로 한다. 라이브러리의 점프 테이블 생성 코드는 Module Pass에 기반하여 LTO(Link Time Optimization) 라이브러리(LLVMgold.so)의 일부로 구현되어 LLD 링커의 플러그인으로 입력될 수 있다. 호출 프로그램의 분기 유효성 검사는 LLD 링커의 PLT 생성 코드를 수정하여 구현되는 것을 예를 들어 설명하기로 한다.As an example, the CFI-based GOT tampering attack prevention method can be implemented based on the LLVM 10 version of the Module Pass framework and the LLD linker project, and targets the X86-64 architecture. The jump table generation code of the library is implemented as a part of the LTO (Link Time Optimization) library (LLVMgold.so) based on the Module Pass and can be input as a plug-in of the LLD linker. The branch validation of the calling program will be described as an example implemented by modifying the PLT generation code of the LLD linker.

LLVM 컴파일러는 특정 단위의 코드 분석 및 변환을 위한 프레임워크를 제공할 수 있다. 예를 들면, LLVM은 'Module', 'Function', 'Basic Block' 단위의 코드 분석 및 변환을 위한 Pass 프레임워크를 제공할 수 있으며, 실시예에서는 Module Pass 단계에서 구현될 수 있다. Module Pass 단계에서는 입력 파일 단위의 분석 및 코드 최적화가 수행될 수 있다. 구현된 Pass는 모듈 내 지역 연결 속성이 아닌 정의된 함수들을 목록화하고 모듈 별로 하나의 점프 테이블을 구성한 후 각 함수의 시작점으로 분기하는 엔트리 함수를 생성할 수 있다. 점프 테이블은 타 컴파일러(예를 들면, LLVM)의 함수 형식 검증 기반 CFI 구현에 사용된 점프 테이블과 유사한 방식으로 구성될 수 있다. 점프 테이블 엔트리의 심볼은 정의된 함수의 심볼명과 외부 연결 속성을 갖도록 한다. 정의된 함수 심볼에는 .cfi 접미사를 붙이고 지역 연결 속성으로 변환하여, 외부 호출 모듈을 포함해 기존 함수 심볼을 참조하던 코드들은 모두 점프 테이블 엔트리를 참조하도록 한다. 타 컴파일러(예를 들면, LLVM)에서 구현된 점프 테이블과는 달리 엔트리 별 분기 명령 코드 다음에는 분기 식별자가 인코딩된 명령 코드를 배치하여 호출 원점에서의 분기 유효성 검사를 가능하게 한다. 분기 식별자로는 이름 꾸밈된 함수의 심볼에서 MD5 해시 값을 취한 후 상위 4바이트를 리틀 엔디안(little endian) 형식으로 변환된 값이 사용될 수 있다. 이 값은 분기 식별자를 인코딩하기 위해 사용된 명령 코드(prefetchnta instruction)의 하위 4바이트에 배치될 수 있다. 'prefetchnta' 는 8바이트로 구성된 X86-64 명령 코드로서, 캐시에 명령코드를 미리 읽어오는 기능을 수행하며 실행시 기능적 부작용(side effect)은 없다. 도7 은 2개의 전역 함수가 포함된 라이브러리 예제 소스코드와 생성된 점프 테이블 코드를 objdump 명령으로 확인한 결과를 나타낸 예이다. 각 점프 테이블 엔트리는 16바이트로 구성되고 'prefetchnta' 명령 코드 다음에 오는 3개의 'int3' 명령 코드는 16바이트 정렬을 위한 패딩 바이트이다. The LLVM compiler can provide a framework for code analysis and transformation of specific units. For example, LLVM may provide a pass framework for code analysis and conversion in units of 'Module ', ' Function ', and ' Basic Block ', and may be implemented in the Module Pass step in the embodiment. In the module pass stage, analysis and code optimization in units of input files may be performed. The implemented Pa ss lists the defined functions rather than the local connection properties in the module, and composes one jump table for each module, and then creates an entry function that branches to the starting point of each function. The jump table may be constructed in a similar manner to the jump table used in the CFI implementation based on function type validation of other compilers (eg, LLVM). The symbol of the jump table entry should have the symbol name of the defined function and the external linkage attribute. The .cfi suffix is appended to the defined function symbol and converted into a local connection attribute, so that all codes that referenced the existing function symbol, including the external call module, refer to the jump table entry. Unlike the jump table implemented in other compilers (eg, LLVM), the branch identifier-encoded instruction code is placed after the branch instruction code for each entry to enable branch validation at the origin of the call. As the branch identifier, a value obtained by taking the MD5 hash value from the symbol of the decorated function and converting the upper 4 bytes into a little endian format may be used. This value may be placed in the lower 4 bytes of the prefetchnta instruction used to encode the branch identifier. 'prefetchnta' is an 8-byte X86-64 instruction code that reads the instruction code in advance from the cache and has no functional side effect during execution. 7 is an example showing the result of checking the library example source code including two global functions and the generated jump table code with the objdump command. Each jump table entry consists of 16 bytes and the three 'int3' instruction codes following the 'prefetchnta' instruction code are padding bytes for 16-byte alignment.

모듈 별 점프 테이블 생성은 링크 시간에 코드 최적화를 수행하는 LTO 단계에서 이루어진다. LTO 단계의 코드 변환은 LLVM IR 비트코드(bitcode) 형식의 입력 모듈을 요구하기 때문에 실시예에서는 Clang 10 컴파일러에 -flto 컴파일 옵션을 사용하여 링커의 입력 모듈을 컴파일할 수 있다. 비트코드가 아닌 오브젝트 모듈은 링킹시 LTO 단계에서 코드 변환이 수행되지 않아 해당 함수들은 생성 라이브러리의 점프 테이블 엔트리에 포함되지 않는다. 실시예에서는 동적 분기를 보호대상으로 하므로 동적 라이브러리로 링크될 오브젝트 모듈에 대해서만 LLVM IR 형식의 파일 생성이 필요하고, 실행 파일이나 정적 아카이브로 링크될 모듈에 대해서는 LLVM IR 비트코드를 생성할 필요는 없다.The module-specific jump table generation is done in the LTO stage, which performs code optimization at link time. Since the code conversion of the LTO stage requires an input module in the LLVM IR bitcode format, the input module of the linker can be compiled by using the -flto compile option to the Clang 10 compiler in the embodiment. When linking non-bitcode object modules, code conversion is not performed in the LTO stage, so the corresponding functions are not included in the jump table entry of the generation library. In the embodiment, since dynamic branching is protected, it is necessary to generate a file in LLVM IR format only for object modules to be linked as dynamic libraries, and it is not necessary to generate LLVM IR bitcodes for modules to be linked as executable files or static archives. .

호출 프로그램에서의 분기 유효성 검증은 LLVM의 링커 프로젝트인 LLD 의 PLT 생성 코드를 수정하여 구현될 수 있다. 각 PLT 엔트리 별로 분기 유효성을 검사하기 위한 명령 코드가 생성될 수 있다. 분기 식별자는 참조할 GOT 엔트리와 연결된 함수 심볼로부터 점프 테이블 엔트리에서와 같은 방식으로 MD5 해시 값을 취하여 도출될 수 있다. 분기 식별자 검사를 위한 명령 코드는 GOT 엔트리가 가리키는 주소로부터 9바이트('jmp' 명령코드 5바이트 + 'prefetchnta' 명령코드 내의 분기 식별자 오프셋 4바이트) 떨어진 곳에 위치한 4바이트의 값의 분기 식별자와 비교될 수 있다. 도 8은 도 7의 라이브러리 함수를 호출하는 예제 프로그램에 대해 실시예에서 제안된 방법을 적용한 결과로서, 분기 식별자 점검 코드가 포함된 PLT 를 보여준다. 'je' 명령 코드를 통해 분기 식별자가 동일하면 라이브러리 함수로의 분기가 이루어지고 그렇지 않으면 지연된 바인딩을 위한 명령 코드가 실행될 수 있다. 각 PLT 엔트리는 32 바이트로 구성되고, 'jmpq' 명령 코드 다음에 오는 4개의 'int3' 명령 코드는 32바이트 정렬을 위한 패딩 바이트이다.Branch validation in the calling program can be implemented by modifying the PLT generation code of LLD, the linker project of LLVM. An instruction code for checking branch validity may be generated for each PLT entry. The branch identifier can be derived from the function symbol associated with the referenced GOT entry by taking the MD5 hash value in the same way as in the jump table entry. The instruction code for branch identifier check is compared with the branch identifier of a value of 4 bytes located 9 bytes away from the address pointed to by the GOT entry (5 bytes of the 'jmp' instruction code + 4 bytes of the branch identifier offset in the 'prefetchnta' instruction code). can FIG. 8 shows a PLT including a branch identifier check code as a result of applying the method proposed in the embodiment to the example program that calls the library function of FIG. 7 . If the branch identifier is the same through the 'je' instruction code, a branch to the library function is made, otherwise the instruction code for deferred binding may be executed. Each PLT entry consists of 32 bytes, and the 4 'int3' command codes following the 'jmpq' command code are padding bytes for 32-byte alignment.

PLT 엔트리 명령코드의 변화는 GOT 엔트리 초기값에 영향을 줄 수 있다. Partial Relro의 경우 GOT 엔트리 초기값은 동적 링커가 사용할 재배치 인덱스를 저장하는 'pushq' 명령 코드의 주소를 가리킨다. 실시예에 따른 PLT 엔트리에서는 분기 유효성 검사가 실패하면 'pushq' 명령 코드로 분기하여 동적 링킹을 수행하므로 GOT 엔트리 값 초기화는 별도로 필요하지 않다. 한편, GOT 보호 장치는 제어흐름 보호가 적용되지 않은 라이브러리 함수에 대해 호출 프로그램에서 분기 유효성 검사를 수행할 수 있다. 이 경우 불필요한 분기 식별자 점검에 의한 성능 오버헤드가 발생할 수 있어, PLT 엔트리 별로 선택적인 분기 유효성 검사가 가능하도록 제공할 수 있다. 링커에 의해 PLT 엔트리 생성 시 라이브러리 함수가 제어흐름 보호가 적용되어 분기 테이블을 포함하고 있는지를 판단될 수 있다. GOT 보호 장치는 라이브러리의 지원 여부에 따라 분기 유효성 검사 코드의 추가 여부를 결정할 수 있다. 실시예에서는, 라이브러리의 경로에 특정 문자열이 포함된 경우에 한해 해당 함수 호출시 분기 유효성 검사 코드를 추가할 수 있다. A change in the PLT entry command code may affect the initial value of the GOT entry. In the case of Partial Relro, the initial value of the GOT entry points to the address of the 'pushq' instruction code that stores the relocation index to be used by the dynamic linker. In the PLT entry according to the embodiment, if branch validation fails, it branches to the 'pushq' command code to perform dynamic linking, so initialization of the GOT entry value is not separately required. Meanwhile, the GOT protection device can perform branch validation in the calling program for library functions to which control flow protection is not applied. In this case, performance overhead due to unnecessary branch identifier checking may occur, and thus, selective branch validation for each PLT entry may be provided. When a PLT entry is created by the linker, it may be determined whether the library function includes a branch table with control flow protection applied. The GOT protection device may decide whether to add the branch validation code according to whether the library supports it. In an embodiment, only when a specific string is included in the path of the library, the branch validation code may be added when the corresponding function is called.

도8은 일 실시예에 있어서, 호출 프로그램에서의 분기 검증을 설명하기 위한 도면이다.8 is a diagram for explaining branch verification in a calling program according to an embodiment.

GOT 보호 장치는 효용성 검증을 위해 binutils-gdb 프로그램 그룹을 대상으로 증가된 파일 사이즈의 크기를 측정하고, 보안성, 성능, 호환성을 평가할 수 있다. binutils-gdb 프로그램 그룹은 리눅스에서 활용도가 높고, 복잡성과 규모면에서 시험 평가에 적절한 다종의 프로그램을 포함하고 있다. 일례로, AMD Ryzen 3700X CPU, Ubuntu 18.04 LTS 환경에서 binutils-gdb 2.33 버전을 사용하여 평가가 수행될 수 있다.The GOT protection device can measure the size of the increased file size for the binutils-gdb program group to verify its effectiveness, and evaluate security, performance, and compatibility. The binutils-gdb program group contains a variety of programs that are highly utilized in Linux and suitable for test evaluation in terms of complexity and size. As an example, evaluation can be performed using binutils-gdb version 2.33 in an AMD Ryzen 3700X CPU, Ubuntu 18.04 LTS environment.

도 8을 참고하면, 호출 프로그램에서는 분기 유효성 검사 코드가 추가되고, 라이브러리에서는 분기테이블이 생성되므로 모듈의 바이너리 크기가 증가한다. 호출 프로그램에서는 X86-64 의 경우 원래 PLT의 각 엔트리 크기는16바이트이나 실시예에 따른 CFI 기반의 GOT 변조 공격 방지 방법을 적용하였을 경우, PLT 엔트리 크기는 32바이트로 증가한다. 이에 따라, 호출 프로그램의 바이너리 파일은 {PLT 엔트리 개수*16바이트} 만큼 크기가 증가될 수 있다. Referring to FIG. 8 , since a branch validation code is added to the calling program and a branch table is generated from the library, the binary size of the module increases. In the calling program, in the case of X86-64, the original PLT entry size is 16 bytes, but when the CFI-based GOT tampering attack prevention method according to the embodiment is applied, the PLT entry size increases to 32 bytes. Accordingly, the binary file of the calling program may be increased in size by {PLT entry number*16 bytes}.

도9 를 참고하면, binutils-gdb 프로그램 그룹의 파일 크기 정보를 설명하기 위한 도면이다. Partial Relro 로 컴파일 후 디버그 정보가 제거된 binutils-gdb 프로그램 그룹에 대해 실행파일 별로 증가된 파일 크기 정보를 나타낸다. 실제 바이너리 크기 증가량은 PLT 크기 증가량과 일치하지는 않는데 이는 Partial Relro 적용에 따른 .dynamic 섹션 엔트리 개수의 감소, .got.plt 섹션의 배치 세그먼트 변경 및 세그먼트 페이지 바운더리 정렬에 의한 바이트 패딩 수 차이 때문이다. 일반적으로 PLT 엔트리 개수와 무관하게 PLT 의 크기가 바이너리 전체 크기에서 차지하는 비율은 낮다. 이에 따라, 호출 프로그램의 바이너리 크기 증가율은 도 9에서 보는 것과 같이 낮은 수준을 보인다. Referring to FIG. 9 , it is a diagram for explaining the file size information of the binutils-gdb program group. It shows the increased file size information for each executable file for the binutils-gdb program group from which debug information is removed after compiling with Partial Relro. The actual binary size increase does not match the PLT size increase because of the decrease in the number of .dynamic section entries due to the application of Partial Relro, the change in the placement segment of the .got.plt section, and the difference in the number of byte padding due to segment page boundary alignment. In general, regardless of the number of PLT entries, the ratio of the size of the PLT to the total size of the binary is low. Accordingly, the increase rate of the binary size of the calling program shows a low level as shown in FIG. 9 .

또한, 라이브러리에는 정의된 전역 함수 별로 분기테이블 엔트리가 생성될 수 있다. 도 7을 참고하면, 각 점프 테이블 엔트리는 5바이트의 무조건 분기 명령코드와 분기 식별자가 인코딩된 8바이트의 명령 코드 및 16바이트 정렬을 위한 3바이트의 패딩으로 구성될 수 있다. 따라서, 라이브러리의 경우 {호출 함수 개수*16바이트} 크기의 점프 테이블이 포함되어 파일 크기는 증가하며, 라이브러리가 또 다른 의존 라이브러리를 포함하는 경우 분기 유효성 검사 코드에 의해 바이너리 크기는 더 커질 수 있다. Also, a branch table entry may be created for each defined global function in the library. Referring to FIG. 7 , each jump table entry may be composed of a 5-byte unconditional branch instruction code, an 8-byte instruction code in which a branch identifier is encoded, and 16-byte padding of 3 bytes for alignment. Therefore, in the case of a library, a jump table with a size of {number of function calls * 16 bytes} is included to increase the file size, and if the library includes another dependent library, the binary size may be larger by the branch validation code.

표 1은 binutils-gdb 프로그램 그룹에 포함된 동적 라이브러리 libinproctrace.so 에 대해 각각의 변조 공격 방지 동작의 적용 전후 바이너리 크기 정보를 비교한 결과이다.Table 1 shows the result of comparing binary size information before and after application of each tamper attack prevention action for the dynamic library libinproctrace.so included in the binutils-gdb program group.

표 1:Table 1:

Figure pat00001
Figure pat00001

일례로, binutils-gdb 프로그램 그룹은 PLT 개수(53개) 및 전역 호출 함수의 개수(6개)가 작은 하나의 동적 라이브러리만 포함하고 있어, 규모가 큰 라이브러리에 대한 파일 크기가 측정될 수 있다. 도 10은 프로그램 그룹이 호출한 라이브러리의 파일 크기 정보를 설명하기 위한 도면이다. 도 10을 참고하면, binutils-gdb 프로그램 그룹에서 의존하는 동적 라이브러리의 PLT 엔트리 개수와 정의된 전역 함수의 개수를 기반으로 변조 공격 방지 동작의 적용에 따른 파일 크기 증가치의 추정값을 나타낸 것이다. 실제의 파일 크기는 세그먼트 바운더리 정렬 등에 의해 페이지 크기 범위에서 차이가 발생할 수 있다. 라이브러리 모듈은 특성상 일반적으로 실행파일에 비해 더 많은 전역 함수 심볼을 포함할 수 있으나 실시예를 적용한 바이너리 크기의 증가치는 크지 않다. 특히, 실제의 파일 크기의 규모가 클수록 변조 공격 방지 동작 적용에 의한 증가율은 낮다. 이에 따라 실시예를 적용한 호출 프로그램 및 라이브러리 모듈의 파일 크기 증가는 허용할 수 있는 수준임을 확인할 수 있다. For example, the binutils-gdb program group includes only one dynamic library with a small number of PLTs (53) and global call functions (6), so the file size for a large library can be measured. 10 is a diagram for explaining file size information of a library called by a program group. Referring to FIG. 10, based on the number of PLT entries of the dynamic library that the binutils-gdb program group depends on and the number of defined global functions, the estimated value of the file size increase according to the application of the tamper attack prevention operation is shown. The actual file size may differ in the page size range due to segment boundary alignment or the like. A library module may generally include more global function symbols than an executable file due to its characteristics, but the increase in the binary size to which the embodiment is applied is not large. In particular, the larger the actual file size, the lower the rate of increase due to the application of the tamper attack prevention operation. Accordingly, it can be confirmed that the file size increase of the calling program and the library module to which the embodiment is applied is an acceptable level.

도 11은 일 실시예에 있어서, 프로그램별 서로 다른 기법에 의한 동적 링커의 재배치 회수와 로딩시간을 설명하기 위한 도면이다. 11 is a diagram for explaining the number of relocation and loading times of the dynamic linker according to different techniques for each program, according to an embodiment.

도 11은 전체/부분(Full/Partial) Relro에서 재배치 엔트리 및 로딩 시간을 변경하는 것을 설명하기 위한 도면이다. 실시예에 따른 CFI 기반의 GOT 변조 공격 방지 방법이 적용되었을 때 공격자가 무력화 혹은 우회할 수 있는 가능성에 대해 분석될 수 있다. 도8의 cmpl 명령코드 참조하면, GOT 보호 장치는 호출 원점에 하드 코딩된 4바이트의 분기 식별자와 호출 목표점에서 0x9 바이트 떨어진 곳에 위치한 4바이트의 분기 식별자를 비교함으로써 분기의 유효성 검사를 수행할 수 있다. 공격자는 프로세스의 메모리 공간에서 분기 식별자와 동일한 값을 포함한 코드를 찾아 -0x9 지점의 주소로 GOT 엔트리 값을 변조한다면 분기 식별자 검사가 성공하여 해당 주소로 제어흐름을 분기시킬 수 있다. MD5 해시값의 충돌 가능성을 고려할 때, 해시값과 동일한 연속된 4바이트가 우연히 존재하고, 더욱이 -0x9 오프셋 지점부터 시작하는 주소 영역이 실행 가능한 공격명령 코드의 집합으로 구성되어 있을 가능성은 사실상 없다. 11 is a diagram for explaining changing a relocation entry and a loading time in Full/Partial Relro. When the CFI-based GOT tampering attack prevention method according to the embodiment is applied, the possibility that an attacker can neutralize or bypass it may be analyzed. Referring to the cmpl command code in Fig. 8, the GOT protection device can perform branch validation by comparing a 4-byte branch identifier hard-coded at the call origin with a 4-byte branch identifier located 0x9 bytes away from the call target point. . If an attacker finds a code containing the same value as the branch identifier in the memory space of the process and modulates the GOT entry value with the address of the -0x9 point, the branch identifier check can succeed and the control flow can branch to that address. Considering the possibility of collision of MD5 hash values, there is an accidental occurrence of 4 consecutive bytes identical to the hash value, and furthermore, there is virtually no possibility that the address range starting from the -0x9 offset is composed of a set of executable attack instruction codes.

일반적인 DEP 환경에서 공격자는 코드 삽입 공격이 불가능하다. 실시예에 따른 CFI 기반의 GOT 변조 공격 방지 방법의 보안성은 프로세스 공간에 호출 라이브러리 함수와 동일한 심볼을 가진 또 다른 함수가 배치될 수 있는 확률과 해당 함수의 공격 코드로의 활용 가능성에 의존한다. 지역 연결 속성 함수는 분기 식별자 및 분기 엔트리 생성 대상이 아니므로 고려대상에서 제외된다. 또한, 외부 연결 속성의 함수는 중복될 경우 링크 과정에서 실패하므로 고려되지 않는다. 상기에서 언급한 바와 같이, 약한 연결 속성의 함수는 프로세스 공간에 중복적으로 배치될 수 있다. 그러나, 이 함수 집합은 약한 연결 속성의 특성상 유사한 기능을 수행할 가능성이 높고, 공격자에 의해 그룹 내 다른 함수로 분기되더라도 최적화의 차이만 있을 뿐, 실행 결과의 차이는 없어 공격 코드로 사용될 수 있는 가능성은 희박하다. binutils-gdb 에 포함된 프로그램 중 프로세스 공간 코드 영역의 크기가 가장 큰 gdb 에 대해 함수 심볼 및 분기 식별자 중첩 가능성이 분석될 수 있다. gdb는 도10 에 포함된 binutils-gdb 프로그램 그룹이 의존하는 라이브러리 중 liblto_plugin.so를 제외한 모든 라이브러리를 로딩할 수 있다. gdb 가 의존하는 13개의 라이브러리와 이 라이브러리에 포함된 모든 외부 및 약한 연결 속성의 함수 9,151개의 함수 심볼을 분석한 결과 동일한 함수 심볼은 발견되지 않았고, MD5 분기 식별자의 해시값 충돌의 경우도 나타나지 않음을 확인할 수 있다.In a normal DEP environment, an attacker cannot perform a code injection attack. The security of the CFI-based GOT tampering attack prevention method according to the embodiment depends on the probability that another function having the same symbol as the calling library function can be placed in the process space and the possibility of utilizing the function as an attack code. Local connection attribute functions are excluded from consideration because they are not subject to branch identifier and branch entry creation. In addition, if the function of the external link property is duplicated, it is not considered because it fails in the link process. As mentioned above, functions of weak connection properties may be redundantly placed in the process space. However, this function set is highly likely to perform similar functions due to the nature of the weak connection property, and even if it is branched to another function in the group by an attacker, there is only a difference in optimization and there is no difference in execution result, so it can be used as an attack code is rare Among the programs included in binutils-gdb , the possibility of overlapping function symbols and branch identifiers can be analyzed for gdb , which has the largest process space code area. gdb can load all libraries except liblto_plugin.so among the libraries that the binutils-gdb program group included in FIG. 10 depends on. As a result of analyzing the 13 libraries that gdb depends on and 9,151 function symbols of all external and weak link properties included in this library, the same function symbol was not found, and there was no case of hash value collision of MD5 branch identifiers. can be checked

도 11을 참고하면, binutils-gdb 프로그램 그룹에 대해 Full Relro를 적용한 그룹과 Partial Relro 와 실시예에서 제안된 CFI 기반의 GOT 변조 공격 방지 방법을 함께 적용한 그룹의 로딩 및 실행 성능을 비교한 것이다. Full Relro 기법은 현재 실행파일의 GOT 보호를 위해서 가장 널리 구현되고 있는 기법이고, Partial Relro와 비교함에 따라 .got.plt 섹션을 읽기전용 속성으로 변경하여 GOT 변조 공격을 차단할 수 있다. 이때, 실행파일에 대해서는 Full Relro 기법과 실시예에서 제안된 CFI 기반의 GOT변조 공격 방지 방법은 보호 대상이 동일하다. 성능적인 측면에서 Full Relro의 경우 프로그램 로딩시간에 프로그램 내의 라이브러리 함수 심볼에 대한 일괄적 바인딩으로 로딩 지연이 발생될 수 있다. 실시예에서 제안된 CFI 기반의 GOT변조 공격 방지 방법의 경우 Partial Relro 적용으로 지연 바인딩에 의한 빠른 로딩 효과를 얻을 수 있지만, 실행시간에 동적 바인딩 오버헤드 및 분기 유효성 검사에 의한 시간 지연이 발생할 수 있다. 예를 들면, 'LD_DEBUG=statistics' 동적 링커의 옵션을 사용하여 프로그램 별 동적 링커에서 수행한 재배치 회수(number of relocations)와 총 시작 시간("Total startup time in dynamic loader")이 측정될 수 있다. 측정 시 캐싱 효과를 없애기 위하여 'echo 3 > /proc/sys/vm/drop_caches' 명령이 사용될 수 있고, 측정 시간 편차를 줄이기 위해 100 차례 로딩 시간의 평균이 측정될 수 있다. Referring to FIG. 11 , the loading and execution performance of the group to which Full Relro is applied to the binutils-gdb program group and the group to which Partial Relro and the CFI-based GOT tampering attack prevention method proposed in the example are applied together are compared. The Full Relro technique is currently the most widely implemented technique for protecting the GOT of an executable file, and in comparison with Partial Relro, the GOT tampering attack can be blocked by changing the .got.plt section to a read-only property. At this time, for the executable file, the protection target is the same for the Full Relro technique and the CFI-based GOT forgery attack prevention method proposed in the embodiment. In terms of performance, in the case of Full Relro, loading delay may occur due to batch binding to library function symbols in the program at program loading time. In the case of the CFI-based GOT tampering attack prevention method proposed in the embodiment, a fast loading effect by delayed binding can be obtained by applying Partial Relro, but a time delay may occur due to dynamic binding overhead and branch validation at runtime. . For example, by using the 'LD_DEBUG=statistics' dynamic linker option, the number of relocations performed by the dynamic linker for each program and the total startup time ("Total startup time in dynamic loader") can be measured. In order to eliminate the caching effect during measurement, the 'echo 3 >/proc/sys/vm/drop_caches' command may be used, and the average of 100 loading times may be measured to reduce measurement time deviation.

도 11을 참고하면, 프로그램 별 두 기법에 의한 동적 링커의 재배치 회수와 로딩시간을 나타낸 것으로, 도 11(a)에 도시된 바와 같이, 주소 재배치 회수는 함수 심볼뿐만 아니라 전역 데이터 심볼 및 모든 재배치를 포함할 수 있다. Full Relro에서 증가한 재배치 회수가 로딩 시간의 지연을 가져오는 함수 심볼에 대한 재배치 회수이다. 도 11(b)에 도시된 바와 같이, 적은 숫자의 함수 심볼 재배치 회수는 상당한 시간 지연이 초래될 수 있다. binutils-gdb 프로그램 그룹의 작은 실행 파일 크기를 고려할 때, 큰 규모의 프로그램에서는 로딩 시간 오버헤드가 더욱 클 것으로 추정된다. Referring to FIG. 11, the number of relocations and loading times of the dynamic linker by two techniques for each program are shown. As shown in FIG. may include The number of relocations increased in Full Relro is the number of relocations for function symbols that cause delay in loading time. As shown in FIG. 11( b ), a small number of function symbol relocation times may result in a significant time delay. Considering the small executable size of the binutils-gdb program group, it is estimated that the loading time overhead will be greater for large programs.

실시예에서 제안된 CFI 기반의 GOT 변조 공격 방지 방법을 적용하면 함수 호출시 실행시간 동적 바인딩에 의한 시간 지연과 분기 식별자 검사 시간에 의한 성능 오버헤드가 발생될 수 있다. 동적 바인딩에 소요되는 전체 시간은 호출되는 함수의 개수에 의존하고, 프로그램의 실행환경에 따라 달라질 수 있다. 실행 프로그램에 포함된 라이브러리 함수 중 실제 호출되는 비율은 일반적으로 낮은 것으로 알려져 있다. 또한, 각 호출은 프로그램의 실행 중 분산되어 발생하므로, 개별 동적 바인딩 시간은 체감되지 않고 측정이 쉽지 않다. 분기 유효성 검사에서는 세 개의 명령코드가 추가 실행되는데, 함수 호출시 발생하는 문맥 전환(context switching) 오버헤드를 고려할 때 미치는 영향은 미미하다. 이에 따라, 실시예에서는 Full Relro에서 잃게 되는 지연된 바인딩에 의한 로딩 성능 향상 효과를 획득할 수 있다.When the CFI-based GOT tampering attack prevention method proposed in the embodiment is applied, a time delay due to the runtime dynamic binding and a performance overhead due to the branch identifier check time may occur when a function is called. The total time required for dynamic binding depends on the number of called functions and may vary depending on the execution environment of the program. It is generally known that the ratio of library functions included in the executable program to be actually called is low. In addition, since each call occurs distributedly during the execution of the program, the individual dynamic binding time is not diminished and it is not easy to measure. In branch validation, three additional instruction codes are executed, and the effect is negligible when considering the context switching overhead that occurs when calling a function. Accordingly, in the embodiment, it is possible to obtain the effect of improving loading performance due to delayed binding, which is lost in Full Relro.

한편, 호출 프로그램과 라이브러리에 함께 변조 공격 방지 방법이 적용될 수 있다. 그러나, 프로그램 실행환경에 따라 호출 프로그램이나 라이브러리 중 한쪽에만 CFI 기반의 GOT 변조 공격 방지 방법이 적용된 채로 호출이 발생할 수 있다. 호출 프로그램에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않은 경우 실행 흐름은 분기 식별자 검사없이 기존의 심볼 바인딩 과정과 함수 호출 과정을 수행할 수 있다. 이 경우, 라이브러리의 심볼 테이블은 점프 테이블의 엔트리 주소를 가리키게 되므로, 호출 원점에서는 목표 함수가 아닌 점프 테이블로 분기될 수 있다. 따라서, 한 번의 직접 분기 오버헤드가 발생할 수 있다. 반대로, 라이브러리 모듈에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않은 경우 호출시 매번 분기 식별자 검사가 실패하고 동적 링커에 의한 심볼 바인딩이 수행될 수 있다. 이 경우 자주 호출되는 함수일 경우 성능 하락이 발생할 수 있다. 다시 말해서, 모듈 간 호출에서 한쪽만 변조 공격 방지 기법이 적용된 경우 성능 오버헤드의 우려는 있지만 프로그램 기능상의 변화는 없다. On the other hand, the tamper attack prevention method may be applied to the calling program and the library together. However, depending on the program execution environment, a call may occur with the CFI-based GOT tampering attack prevention method applied to only one of the calling program or library. If the CFI-based GOT tampering attack prevention method is not applied to the calling program, the execution flow can perform the existing symbol binding process and function call process without branch identifier checking. In this case, since the symbol table of the library points to the entry address of the jump table, the origin of the call may branch to the jump table rather than the target function. Thus, one direct branch overhead may occur. Conversely, if the CFI-based GOT tampering attack prevention method is not applied to the library module, the branch identifier check fails every time it is called, and symbol binding by the dynamic linker may be performed. In this case, if it is a function that is called frequently, performance degradation may occur. In other words, if the tamper attack prevention technique is applied to only one side of the module-to-module call, there is a concern about performance overhead, but there is no change in program function.

다시 말해서, GOT 보호 장치는 분기 유효성 검사 코드 생성시 라이브러리의 CFI 기반의 GOT 변조 공격 방지 동작의 적용 여부를 확인하여 심볼 별로 변조 공격 방지 방법을 적용할 수 있다. 실시예에 따르면, 성능 오버헤드를 최소화하여 점진적인 빌드가 가능하고, 기존의 라이브러리와도 높은 호환성을 가진다.In other words, when generating the branch validation code, the GOT protection device may check whether the library's CFI-based GOT tampering attack prevention operation is applied and apply the tampering attack prevention method for each symbol. According to the embodiment, it is possible to build gradually by minimizing the performance overhead, and has high compatibility with the existing library.

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The device described above may be implemented as a hardware component, a software component, and/or a combination of the hardware component and the software component. For example, devices and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA). , a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions, may be implemented using one or more general purpose or special purpose computers. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For convenience of understanding, although one processing device is sometimes described as being used, one of ordinary skill in the art will recognize that the processing device includes a plurality of processing elements and/or a plurality of types of processing elements. It can be seen that can include For example, the processing device may include a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치에 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may comprise a computer program, code, instructions, or a combination of one or more of these, which configures a processing device to operate as desired or is independently or collectively processed You can command the device. The software and/or data may be any kind of machine, component, physical device, virtual equipment, computer storage medium or device, to be interpreted by or to provide instructions or data to the processing device. may be embodied in The software may be distributed over networked computer systems, and stored or executed in a distributed manner. Software and data may be stored in one or more computer-readable recording media.

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

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with reference to the limited embodiments and drawings, various modifications and variations are possible from the above description by those skilled in the art. For example, the described techniques are performed in a different order than the described method, and/or the described components of the system, structure, apparatus, circuit, etc. are combined or combined in a different form than the described method, or other components Or substituted or substituted by equivalents may achieve an appropriate result.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.

Claims (12)

컴퓨터로 구현되는 GOT(Global Offset Table) 보호 장치에 의해 수행되는 GOT 변조 공격 방지 방법에 있어서,
호출 프로그램과 라이브러리 간에 공유되는 동적 바인딩 심볼을 코드화하여 분기 식별자를 생성하는 단계;
상기 호출 프로그램에 포함된 분기 테이블에서 상기 코드화된 분기 식별자 코드를 검사하기 위한 명령 코드를 통해 분기 유효성 검사를 수행하는 단계; 및
상기 수행된 분기 유효성 검사에 기초하여 상기 호출 프로그램에 포함된 분기 테이블로부터 함수 호출을 통해 호출 프로그램을 실행시키는 단계
를 포함하는 GOT 변조 공격 방지 방법.
A method for preventing GOT tampering attacks performed by a computer-implemented Global Offset Table (GOT) protection device, the method comprising:
encoding a dynamic binding symbol shared between the calling program and the library to generate a branch identifier;
performing branch validation through an instruction code for checking the coded branch identifier code in a branch table included in the calling program; and
executing a calling program through a function call from a branch table included in the calling program based on the performed branch validation check
A method for preventing GOT tampering attacks, comprising:
제1항에 있어서,
상기 분기 유효성 검사를 수행하는 단계는,
상기 라이브러리에 상기 생성된 분기 식별자를 삽입하고, 상기 라이브러리에 삽입된 분기 식별자와 상기 호출 프로그램 PLT(Procedure Linkage Table) 엔트리에서 상기 코드화된 분기 식별자 코드를 검사하기 위하여 추가된 명령 코드를 통해 GOT 엔트리가 가리키는 분기 목표점에 위치한 값을 비교하고, 상기 비교한 결과값이 일치할 경우 분기를 진행하고, 상기 비교한 결과값이 일치하지 않을 경우, GOT 엔트리 값을 재설정하는 단계
를 포함하는 GOT 변조 공격 방지 방법.
According to claim 1,
The step of performing the branch validation check is,
Inserting the generated branch identifier into the library, and checking the coded branch identifier code from the branch identifier inserted into the library and the calling program PLT (Procedure Linkage Table) entry, the GOT entry is generated through the added instruction code. Comparing the values located at the indicated branching target points, performing branching if the compared result values match, and resetting the GOT entry value if the compared result values do not match
A method for preventing GOT tampering attacks, comprising:
제1항에 있어서,
상기 분기 유효성 검사를 수행하는 단계는,
프로그램의 실행 환경에 따라 호출 프로그램이나 라이브러리 중 어느 하나에 CFI 기반의 GOT 변조 공격 방지 방법이 적용된 채로 호출이 발생될 경우, 상기 분기 유효성 검사 수행 여부를 결정하는 단계
를 포함하는 GOT 변조 공격 방지 방법.
According to claim 1,
The step of performing the branch validation check is,
Determining whether to perform the branch validation when a call is made with the CFI-based GOT tampering attack prevention method applied to any one of the calling program or library according to the execution environment of the program
A method for preventing GOT tampering attacks, comprising:
제3항에 있어서,
상기 분기 유효성 검사를 수행하는 단계는,
상기 호출 프로그램에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않을 경우, 분기 식별자 검사를 미수행하는 단계
를 포함하는 GOT 변조 공격 방지 방법.
4. The method of claim 3,
The step of performing the branch validation check is,
If the CFI-based GOT tampering attack prevention method is not applied to the calling program, the branch identifier check is not performed.
A method for preventing GOT tampering attacks, comprising:
제3항에 있어서,
상기 분기 유효성 검사를 수행하는 단계는,
상기 라이브러리에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않을 경우, 상기 라이브러리에서 분기 식별자를 포함하고 있는지 여부를 체크하여 분기 유효성 검사 코드 추가 여부를 결정하는 단계
를 포함하는 GOT 변조 공격 방지 방법.
4. The method of claim 3,
The step of performing the branch validation check is,
Determining whether to add a branch validation code by checking whether the library includes a branch identifier when the CFI-based GOT tampering attack prevention method is not applied to the library
A method for preventing GOT tampering attacks, comprising:
제5에 있어서,
상기 분기 유효성 검사를 수행하는 단계는,
상기 라이브러리에 분기 식별자를 포함하고 있을 경우, 상기 호출 프로그램의PLT 엔트리에 분기 식별자를 포함하는 명령 코드 삽입하고, 상기 라이브러리에 분기 식별자를 포함하고 있지 않을 경우, 동적 링커에 의한 심볼 바인딩을 통해 호출 프로그램을 다이렉트로 호출하는 단계
를 포함하는 GOT 변조 공격 방지 방법.
The method according to claim 5,
The step of performing the branch validation check is,
When the library includes a branch identifier, the instruction code including the branch identifier is inserted into the PLT entry of the calling program. If the library does not include the branch identifier, the calling program is performed through symbol binding by the dynamic linker. Steps to call directly
A method for preventing GOT tampering attacks, comprising:
컴퓨터로 구현되는 GOT(Global Offset Table) 보호 장치에 있어서,
호출 프로그램과 라이브러리 간에 공유되는 동적 바인딩 심볼을 코드화하여 분기 식별자를 생성하는 식별자 생성부;
상기 호출 프로그램에 포함된 분기 테이블에서 상기 코드화된 분기 식별자 코드를 검사하기 위한 명령 코드를 통해 분기 유효성 검사를 수행하는 유효성 검사부; 및
상기 수행된 분기 유효성 검사에 기초하여 상기 호출 프로그램에 포함된 분기 테이블로부터 함수 호출을 통해 호출 프로그램을 실행시키는 프로그램 실행부
를 포함하는 GOT 보호 장치.
In the GOT (Global Offset Table) protection device implemented by a computer,
an identifier generator for generating a branch identifier by coding a dynamic binding symbol shared between the calling program and the library;
a validity check unit that performs branch validation through an instruction code for checking the coded branch identifier code in the branch table included in the calling program; and
A program execution unit that executes a calling program through a function call from a branch table included in the calling program based on the performed branch validation check
GOT protection device including
제7항에 있어서,
상기 유효성 검사부는,
상기 라이브러리에 상기 생성된 분기 식별자를 삽입하고, 상기 라이브러리에 삽입된 분기 식별자와 상기 호출 프로그램 PLT(Procedure Linkage Table) 엔트리에서 상기 코드화된 분기 식별자 코드를 검사하기 위하여 추가된 명령 코드를 통해 GOT 엔트리가 가리키는 분기 목표점에 위치한 값을 비교하고, 상기 비교한 결과값이 일치할 경우 분기를 진행하고, 상기 비교한 결과값이 일치하지 않을 경우, GOT 엔트리 값을 재설정하는
것을 특징으로 하는 GOT 보호 장치.
8. The method of claim 7,
The validation unit,
Inserting the generated branch identifier into the library, and checking the coded branch identifier code from the branch identifier inserted into the library and the calling program PLT (Procedure Linkage Table) entry, the GOT entry is generated through the added instruction code. Comparing the value located at the branching target point pointed to, performing branching if the compared result value is the same, and resetting the GOT entry value if the compared result value does not match
GOT protection device, characterized in that.
제7항에 있어서,
상기 유효성 검사부는,
프로그램의 실행 환경에 따라 호출 프로그램이나 라이브러리 중 어느 하나에 CFI 기반의 GOT 변조 공격 방지 방법이 적용된 채로 호출이 발생될 경우, 상기 분기 유효성 검사 수행 여부를 결정하는
것을 특징으로 하는 GOT 보호 장치.
8. The method of claim 7,
The validation unit,
When a call is made with the CFI-based GOT tampering attack prevention method applied to any one of the calling program or library according to the execution environment of the program, the branch validation check is performed.
GOT protection device, characterized in that.
제9항에 있어서,
상기 유효성 검사부는,
상기 호출 프로그램에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않을 경우, 분기 식별자 검사를 미수행하는
것을 특징으로 하는 GOT 보호 장치.
10. The method of claim 9,
The validation unit,
If the CFI-based GOT tampering attack prevention method is not applied to the calling program, branch identifier check is not performed.
GOT protection device, characterized in that.
제9항에 있어서,
상기 유효성 검사부는,
상기 라이브러리에 CFI 기반의 GOT 변조 공격 방지 방법이 적용되지 않을 경우, 상기 라이브러리에서 분기 식별자를 포함하고 있는지 여부를 체크하여 분기 유효성 검사 코드 추가 여부를 결정하는
것을 특징으로 하는 GOT 보호 장치.
10. The method of claim 9,
The validation unit,
When the CFI-based GOT tampering attack prevention method is not applied to the library, it is determined whether the branch validation code is added by checking whether the library includes a branch identifier.
GOT protection device, characterized in that.
제11에 있어서,
상기 유효성 검사부는,
상기 라이브러리에 분기 식별자를 포함하고 있을 경우, 상기 호출 프로그램의PLT 엔트리에 분기 식별자를 포함하는 명령 코드 삽입하고, 상기 라이브러리에 분기 식별자를 포함하고 있지 않을 경우, 동적 링커에 의한 심볼 바인딩을 통해 호출 프로그램을 다이렉트로 호출하는
것을 특징으로 하는 GOT 보호 장치.
The method of claim 11,
The validation unit,
When the library includes a branch identifier, the instruction code including the branch identifier is inserted into the PLT entry of the calling program. If the library does not include the branch identifier, the calling program is performed through symbol binding by the dynamic linker. to call directly
GOT protection device, characterized in that.
KR1020200038983A 2020-02-26 2020-03-31 Cfi-based protection device and method for defending against got overwrite attacks KR102351663B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/KR2021/002188 WO2021201433A1 (en) 2020-02-26 2021-02-22 Device and method for cfi-based got falsification attack prevention

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20200023549 2020-02-26
KR1020200023549 2020-02-26

Publications (2)

Publication Number Publication Date
KR20210108848A true KR20210108848A (en) 2021-09-03
KR102351663B1 KR102351663B1 (en) 2022-01-17

Family

ID=77785182

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200038983A KR102351663B1 (en) 2020-02-26 2020-03-31 Cfi-based protection device and method for defending against got overwrite attacks

Country Status (2)

Country Link
KR (1) KR102351663B1 (en)
WO (1) WO2021201433A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230063250A (en) * 2021-11-01 2023-05-09 부산대학교 산학협력단 System and Method for Protecting Indirect Call in WebAssembly

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150356294A1 (en) * 2014-06-09 2015-12-10 Lehigh University Methods for enforcing control flow of a computer program
JP2019121203A (en) * 2018-01-09 2019-07-22 株式会社Attc Conversion device, conversion program, and program conversion method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2256659A1 (en) * 2009-05-27 2010-12-01 NTT DoCoMo, Inc. Method and apparatus for preventing modification of a program execution flow
KR101256149B1 (en) * 2010-07-12 2013-04-19 홍익대학교 산학협력단 Method and apparatus for securing indirect function calls by using program counter encoding
KR101955356B1 (en) * 2017-12-08 2019-03-07 한국인터넷진흥원 Binary fatching apparatus and method thereof for supplementing vulnerabilties casued from using vulnerable functions

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150356294A1 (en) * 2014-06-09 2015-12-10 Lehigh University Methods for enforcing control flow of a computer program
JP2019121203A (en) * 2018-01-09 2019-07-22 株式会社Attc Conversion device, conversion program, and program conversion method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230063250A (en) * 2021-11-01 2023-05-09 부산대학교 산학협력단 System and Method for Protecting Indirect Call in WebAssembly

Also Published As

Publication number Publication date
WO2021201433A1 (en) 2021-10-07
KR102351663B1 (en) 2022-01-17

Similar Documents

Publication Publication Date Title
Williams-King et al. Egalito: Layout-agnostic binary recompilation
Dang et al. The performance cost of shadow stacks and stack canaries
Zeng et al. Combining control-flow integrity and static analysis for efficient and validated data sandboxing
US8434064B2 (en) Detecting memory errors using write integrity testing
Niu et al. Modular control-flow integrity
Zhang et al. A platform for secure static binary instrumentation
Niu et al. Monitor integrity protection with space efficiency and separate compilation
Castro et al. Securing software by enforcing data-flow integrity.
Arnold et al. Ksplice: Automatic rebootless kernel updates
EP3069254B1 (en) Improved control flow integrity system and method
US20090282393A1 (en) Securing Software By Enforcing Data Flow Integrity
US8060812B2 (en) Methods, systems, and computer program products for class verification
US11188470B2 (en) Dynamic identification of stack frames
US20220107827A1 (en) Applying security mitigation measures for stack corruption exploitation in intermediate code files
Saito et al. A survey of prevention/mitigation against memory corruption attacks
Kiaei et al. Rewrite to reinforce: Rewriting the binary to apply countermeasures against fault injection
US20120117550A1 (en) Method, computer program and device for providing security for intermediate programming code for its execution by a virtual machine
US11176060B2 (en) Dynamic memory protection
US20100169969A1 (en) Functional patching/hooking detection and prevention
KR102351663B1 (en) Cfi-based protection device and method for defending against got overwrite attacks
Jeong et al. A cfi countermeasure against got overwrite attacks
Muench et al. Taming transactions: Towards hardware-assisted control flow integrity using transactional memory
US11113392B2 (en) Executable binary code insertion
DuVarney et al. SELF: a transparent security extension for ELF binaries
US11055202B1 (en) Compilation scheme for tagged global variables

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant