Return-Oriented Programming (ROP) is considered a highly threatening exploit technique. For mitigating ROP attacks, many researchers have proposed fine-grained Address Space Layout Randomization (ASLR). And it is considered as an efficient defense mechanism for ROP attacks. However, new advanced ROP attack called the JIT-ROP circumvents the fine-grained ASLR by disassembling the code pages repeatedly in runtime. For Mitigating the JIT-ROP attack, many researchers have proposed leakage-resilient defenses.
In this paper, we introduce Twisted-Stack, a new kind of approach; that randomizes the stack pointer which plays a role as the program counter in ROP attacks. More specifically, for mitigating the JIT-ROP attack, our solution places multiple stacks and randomly switches the stack at each call and ret site. By randomly switching the stacks, the adversary loses the control of the stack pointer at the ret site. If the stack pointer is lost, it makes it harder for the adversary to run the gadget. Even if one gadget is executed, the adversary loses the control of the stack pointer. Thus he will fail to execute the gadgets reliably. It is in effect equivalent to breaking the gadget chain. We have implemented Twisted-Stack as a compiler-based solution. And, we have evaluated Twisted-Stack using SPEC CPU2006 benchmark suites which measure the CPU-bound performance overhead. In our experiments, Twisted-Stack imposes a run-time overhead of 28% and a file-size overhead of 44%.
리턴 지향형 프로그래밍 (ROP)은 매우 위협적인 익스플로잇 기술로 간주된다. ROP 공격을 막기 위해 제안된 fine-grained ASLR은 정적 분석을 통해 가젯을 찾을 수 없게 만들었고, 이것은 매우 효율적으로 ROP 공격을 막을 수 있게 보였다. 하지만, 새로운 공격은 Just-in-time ROP 공격은 동적으로 가젯들을 찾음으로써, fine-grained ASLR의 보안성을 약화한 후, 익스플로잇에 성공하였다. 이 JIT-ROP 공격을 막기 위해, 많은 논문이 제안되고 있다.
이 논문에서는 ROP 공격을 막기 위해, 새로운 방어 방법인 Twisted-Stack을 제안한다. Twisted-Stack은 함수 호출과 반환 시에 함수를 랜덤하게 바꿈으로써, 공격자가 스택 포인터를 제대로 제어할 수 없게 하는 방어 방법이다. 스택 포인터는 ROP 공격에서 프로그램 카운터 역할을 하는데, Twisted-Stack은 공격자가 스택 포인터를 사용하지 못하게 하여 ROP 페이로드를 구성하기 어렵게 만들었다. 이 방어 방법은 평균 28% 오버헤드를 가지고 있다.