platforms. It is shown to be effective against
GOT/PLT exploitation attacks, and has the low
runtime overhead.
The rest of this paper is organized as follows. In
Section 2, we describe several related works, and
Section 3 introduces the motivation and detailed
mechanisms of our idea, followed by the analysis of
experiments in Section 4. Finally, Section 5 provides
conclusion.
2 RELATED WORKS
Address randomizing is an instance of the broader
idea of introducing diversity in nonfunctional
aspects of software, and idea suggested by Forrest,
Somayaji, and Ackley (1997). Their implementation
model was called a randomizing compiler, which
can introduce randomness in several non-functional
aspects of the compiled code without affecting the
language semantics. As a proof of concept, they
developed a modification to the gcc compiler to add
a random amount of padding to each stack allocation
request. This transformation defeats most stack
smashing attacks prevalent today, but does not work
against the overflow attacks with a large amount of
NOPs.
The PaX project has developed an approach for
randomizing the memory regions occupied by a
program code and data, called Address Space
Layout Randomization (ASLR). It have modified the
Linux Kernel so that it randomizes the base address
of different segments of memory, such as the stack,
heap, code, and mapped shared library segments.
There are, however, several weak features to ASLR.
ASLR requires changes to the Linux Kernel. Kernel-
level implementation requires re-installation or even
reboot of the operating system. While the GOT is a
frequent target of many attacks, ASLR doesn't
randomize the location of GOT in the SEGMEXEC
mechanism on i386. The performance impact of
ASLR about the PAGEEXEC based on the fault
mechanism is not yet to be officially evaluated.
Finally, the implementation and detailed
mechanisms are seriously architecture-dependent.
Xu, Kalbarczyk, and Iyer developed transparent
runtime randomization (TRR) (Jun 2003), in which
the dynamic loader is modified to randomize the
base address of stack, heap, dynamically loaded
libraries, and GOT. This mechanism, however,
doesn't consider return-into-PLT (Nergal 2001)
attacks. To allow return-into-PLT attacks can't be
concerned with the complete mechanism for
preventing the illegal operations of shared libraries.
3 SELECTIVE CHECKING OF
SHARED LIBRARY CALLS
(SCC)
3.1 Motivation
While TRR (Jun 2003) has the low initialization
overhead and no runtime overhead, it is imperfect
against return-into-PLT (Nergal 2001) attacks. The
PaX project doesn't randomize the location of GOT
or may allow many fault handling overheads due to
the CODE region relocation to prevent return-into-
PLT attacks. We observe that there are a common
characteristic of return-into-PLT attacks. That is the
fact that the number of libraries selected by attackers
to get the critical authorities (root or administrator)
of target system is a few of hundreds and thousands
of shared libraries. The shared libraries they require
to attack are system calls such as execve, system,
setuid32, chmod, etc. Other shared libraries are not
appropriate to accomplish the purposes of attackers,
root shell acquisition and so on.
To exploit critical system calls, attackers can call
normal libraries that include these system calls.
While return-into-PLT can be exploited by attackers
if there are buffer overflow vulnerabilities in
program code, the way to detour normal libraries is
very difficult to find some libraries satisfying some
attack requirements (e.g. system (“/bin/bash”)
included in normal libraries.) and to manipulate
some arguments of critical system calls in memory
layout randomization mechanisms.
In environments of the stack and heap non-
executable such as Linux Kernel 2.6, if attackers
can't run the inserted shellcode to acquire root
authority through overflowing buffers, those
overflows don't mean serious attacks. We arrived in
one conclusion by the facts that to relocate the
CODE region to prevent return-into-PLT generates
continuously some fault handling overheads and the
number of shared libraries required to succeed
return-into-PLT attacks is within the limit of a few
libraries.
The SCC, our mechanism, is designed through
these facts. The SCC relocates Global Offset Table
(GOT) through a similar idea to TRR (Jun 2003) and
checks whether the accesses via Procedure Linkage
Table (PLT) to call shared libraries such as above
system calls are legal. The 'legal' means that the
shared libraries are called from the call instruction
of CODE region. All PLT accesses except for those
are ‘illegal’.
A NEW MECHANISM FOR OS SECURITY: Selective Checking of Shared Library Calls for Security
383