From: <Microsoft Internet Explorer 5¡Æ¢® AuAa>
Subject: A Comparative Analysis of Methods of Defense against Buffer Overflow Attacks
Date: Mon, 5 Nov 2001 23:13:33 +0900
MIME-Version: 1.0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.mcs.csuhayward.edu/~simon/security/boflo.html
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>A Comparative Analysis of Methods of Defense against =
Buffer Overflow Attacks</TITLE>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR><!-- Comment: =
Header Information --><!-- Comment: if file is searchable include here =
an 'isindex' tag --><LINK=20
href=3D"mailto:simon@csuhayward.edu (Istvan Simon)" rev=3Dmade></HEAD>
<BODY bgColor=3D#ffffff>
<CENTER>
<H2>A Comparative Analysis of Methods of Defense against Buffer Overflow =

Attacks</H2></CENTER>
<CENTER><FONT size=3D+2>Istvan Simon</FONT> <BR>California State =
University,=20
Hayward <BR>Hayward, CA 94542 <BR>simon@csuhayward.edu<BR><A=20
href=3D"http://www.mcs.csuhayward.edu/~simon/security/boflo.html">http://=
www.mcs.csuhayward.edu/~simon/security/boflo.html</A><!-- Comment: Body =
of Document --><BR>January,=20
31 2001 <BR>&nbsp;=20
<P><B>Abstract</B></CENTER><FONT face=3DArial,Helvetica size=3D-1>For =
the past=20
several years Buffer Overflow attacks have&nbsp; been the main method of =

compromising a computing system's security.&nbsp;&nbsp; Many of these =
attacks=20
have been devastatingly effective,&nbsp; allowing the attacker to attain =

administrator privileges on the attacked system.&nbsp; We review the =
anatomy of=20
these attacks and the reasons why conventional methods of defense have =
been=20
ineffective, and likely to remain so in the foreseeable future.&nbsp; =
Recently,=20
however, several promising methods of defense have been proposed. We =
compare the=20
strengths and weaknesses of these defense methods.</FONT> <BR>&nbsp; =
<BR>&nbsp;=20
<H3>1. Introduction</H3>
<P><BR>Buffer Overflows have been successfully used as a method of=20
penetrating&nbsp; systems' security for&nbsp; over 12 years. One of the=20
first&nbsp; buffer overflow attacks which attracted&nbsp; widespread =
attention=20
due to its spectacular success was Robert Morris's Internet Worm. In =
1988 Morris=20
released a program which succeeded&nbsp; in&nbsp; infecting thousands of =
Unix=20
hosts on the Internet.&nbsp;&nbsp; One of the methods Morris used to =
gain access=20
to a vulnerable system was a buffer overflow bug in the&nbsp; <I>fingerd =

</I>daemon [&nbsp;9, 29 ].&nbsp; Once it gained access to a vulnerable =
system,=20
Morris's program installed itself on the machine, and used several =
methods to=20
attempt to spread itself to other machines.&nbsp; The original intent of =
Morris=20
was to spread to other systems relatively slowly and undetected, =
without&nbsp;=20
causing&nbsp; a significant disruption on any of the affected=20
machines.&nbsp;&nbsp; However,&nbsp; his attack failed completely in =
this.=20
Morris made a programming error which caused his worm to spread at a =
much higher=20
rate than originally intended. Because&nbsp; of this error, machines =
were=20
infected and reinfected&nbsp; so&nbsp; rapidly that&nbsp; the worm&nbsp; =

ended&nbsp; up overwhelming&nbsp; the attacked systems.&nbsp; Of course =
this=20
caused his program to be detected immediately,&nbsp; and&nbsp; =
transformed&nbsp;=20
it into the most&nbsp;&nbsp; devastating denial of service attack&nbsp; =
until=20
that time.&nbsp; Morris's program usually did not gain administrative =
root=20
access,&nbsp; and&nbsp; did not destroy any information on the =
penetrated=20
system,&nbsp; nor leave time bombs or other malicious code behind [9].=20
<P>From 1988 to 1996 the number of&nbsp; buffer overflow attacks =
remained=20
relatively low [&nbsp; 2, 30 ]. The known vulnerabilities were fixed, =
and=20
because the attack method was little&nbsp; known&nbsp; and thought to =
be&nbsp;=20
difficult&nbsp; to&nbsp; execute few new vulnerabilities were =
discovered.&nbsp;=20
This changed dramatically in 1996 when Levy&nbsp; published a very well =
written=20
paper&nbsp; [ 17 ] which simultaneously showed that it was very likely =
that many=20
programs harbored&nbsp; buffer overflow vulnerabilities, and also=20
demonstrated&nbsp; techniques of constructing buffer overflow attacks =
which were=20
likely to succeed against a target program suspected of being =
vulnerable,&nbsp;=20
even if the attacker had no access to the actual source code of the =
target=20
program.&nbsp;&nbsp; The combination of these two factors =
stimulated&nbsp;=20
attackers to a flurry of research activity which lead to many =
discoveries=20
of&nbsp; new vulnerabilities.&nbsp; In addition, many of the attacks =
were=20
automated, which permitted&nbsp; the attack to be carried out&nbsp; =
even&nbsp;=20
by people&nbsp; with little or no knowledge.&nbsp;&nbsp; People who are=20
relatively unsophisticated but interested in such attacks are often =
called=20
<I>Script Kiddies.</I>&nbsp;&nbsp; Unfortunately,&nbsp; there are far =
too many=20
script kiddies, who seem to have plenty of time&nbsp; on their hands, =
and also=20
the energy, patience and persistence to keep hacking systems this =
way.&nbsp; The=20
unhappy result is&nbsp; that these automated attacks have become a =
serious=20
nuisance to the overworked system administrators&nbsp; responsible for=20
maintaining the integrity of their&nbsp; systems&nbsp; under =
continuous&nbsp;=20
attack.=20
<P>In this paper we review&nbsp; the anatomy of&nbsp; buffer overflow =
attacks=20
and&nbsp; discuss the reasons why they are so prevalent and =
deadly.&nbsp; We=20
then examine the traditional methods of defense and show why they are =
unlikely=20
to succeed in stopping these attacks effectively in the near =
future.&nbsp; We=20
also discuss more recent approaches of defense,&nbsp;&nbsp; and discuss =
their=20
relative weaknesses and strengths.&nbsp; While no method of defense is =
100%=20
effective,&nbsp; we show why these newer&nbsp; methods are more likely =
succeed=20
than&nbsp; their predecessors. <BR>&nbsp;=20
<H3>2. What is a Buffer Overflow Attack?</H3>
<P>A buffer overflow occurs in a program when the program stores&nbsp; =
more=20
information in an array,&nbsp; the <I>buffer,</I>&nbsp; than the space =
reserved=20
for it.&nbsp; This causes the&nbsp; areas adjacent to the buffer to be=20
overwritten, corrupting the values previously stored there. Buffer =
overflows are=20
always programming errors which are typically introduced into a program=20
because&nbsp; the programmer failed to anticipate that&nbsp; the =
information=20
copied into the buffer by the program may exceed its size.&nbsp;&nbsp;=20
Unfortunately,&nbsp; as we shall soon see, buffer overflow programming =
errors=20
are quite common because of certain widely used&nbsp; and dangerous C=20
programming practices.&nbsp;&nbsp; Once a buffer overflow vulnerability =
is=20
present in a program inadequate testing may not uncover it,&nbsp; so =
that the=20
vulnerability may lurk in the program hidden , undiscovered and silent =
for=20
years.&nbsp; This potentially opens up the program to be the target=20
of&nbsp;&nbsp; a sudden attack which exploits the vulnerability to gain=20
unauthorized access to a system.=20
<P>A buffer overflow may happen accidentally during the execution of a=20
program.&nbsp; When this happens,&nbsp; however, it is&nbsp; very =
unlikely that=20
it will lead to a security compromise of the system.&nbsp; Most often =
the=20
clobbering of information in areas adjacent to the buffer will cause the =
program=20
to crash or produce obviously incorrect results.&nbsp; In a buffer =
overflow=20
attack, on the other hand, the objective of the attacker is to use the=20
vulnerability to corrupt information in a carefully designed way&nbsp; =
in=20
order&nbsp; to execute <I>attack code&nbsp; </I>previously planted by =
the=20
attacker. If this succeeds, the attacker effectively hijacked the =
control of the=20
program.&nbsp; Once control is transferred to the attack code, it grants =

unauthorized access to the attacker.&nbsp; Typically the attack&nbsp; =
code just=20
spawns a shell, which allows the&nbsp; attacker to execute arbitrary =
commands on=20
the system.=20
<P>When a new shell&nbsp; is spawned in a Unix system,&nbsp; it&nbsp; =
inherits=20
the access privileges of&nbsp; the process that spawned it.&nbsp; =
Consequently,=20
if the attacked&nbsp; process containing the buffer overflow =
vulnerability runs=20
with root privileges, the attacker&nbsp; will also get a root&nbsp; =
shell.&nbsp;=20
We remark that though we limited our discussion&nbsp; to UNIX systems, =
buffer=20
overflows are applicable to most&nbsp; Operating Systems .&nbsp;&nbsp; =
In=20
particular,&nbsp; many attacks have been successful against&nbsp; =
Windows NT and=20
Windows 2000 systems [ 8, 12, 13, 21, 22, 26 ]. Axelsson [ 1 ] compared =
the=20
security of Windows NT and UNIX systems against known types of attack, =
and found=20
them to be roughly equally vulnerable.=20
<P>A buffer overflow attack may be&nbsp; local or remote.&nbsp; In a =
local=20
attack the attacker already has access to the system and may be =
interested in=20
escalating his/her access privilege. A&nbsp; remote&nbsp; =
attack&nbsp;&nbsp;=20
is&nbsp; delivered through&nbsp; a network port, and may achieve =
simultaneously=20
both&nbsp; gaining unauthorized access and&nbsp; maximum access =
privilege.=20
<P>Summarizing ,&nbsp;&nbsp; we see that a buffer overflow&nbsp; attack =
usually=20
consists of&nbsp; three parts:=20
<P>1. The planting of&nbsp; the attack code into the target program;=20
<P>2. The&nbsp; actual copying into&nbsp; the buffer which overflows =
it&nbsp;=20
and corrupts adjacent data structures;=20
<P>3. The hijacking of control&nbsp; to execute the attack code;=20
<P>We now examine in more detail&nbsp; the main type of buffer overflow =
attacks.=20

<H3>3. Smashing the Stack</H3>
<P><BR>One classification of buffer overflow attacks depends on where =
the buffer=20
is allocated.&nbsp; If the buffer is a local variable of a function, the =
buffer=20
resides on the run-time stack.&nbsp; This is the type of attack examined =
in=20
Levy's article [ 17 ], and it is by far the most prevalent form of =
buffer=20
overflow attack.=20
<P>When a function is called in a C program,&nbsp; before the execution =
jumps to=20
the actual code of the called function ,&nbsp;&nbsp; the <I>activation =
record=20
</I>of the function must be&nbsp; pushed on the run-time stack.&nbsp; In =
a C=20
program the activation record&nbsp; consists of the following fields: =
<BR>&nbsp;=20

<OL>
  <LI>space allocated for each parameter of the function;=20
  <LI>the <I>return address;</I>=20
  <LI>the <I>dynamic link;</I>=20
  <LI>space allocated to each local variable of the function. =
</LI></OL>For=20
convenience we will consider the address of the dynamic link field to be =
the=20
base&nbsp; address&nbsp; of the activation record.&nbsp; The function =
must be=20
able to access it's parameters and local variables.&nbsp; This requires=20
that&nbsp; during the execution of the function&nbsp; a register hold =
the base=20
address of the activation record of the function., i.e. the address of =
the=20
dynamic link field.&nbsp; Parameters are below this address on the =
stack, and=20
local variables above.&nbsp; When the function returns, this register =
must be=20
restored to its previous value, to point to the activation record of the =
calling=20
function. To be able to do this, when the function is called the value =
of this=20
register is saved&nbsp; in the dynamic link field.&nbsp;&nbsp; Thus the =
dynamic=20
link field of each activation record points to the dynamic link field of =
the=20
previous activation record on the stack,&nbsp; which in turn points to =
the=20
dynamic link field of the previous activation record, and so on, all the =
way to=20
the bottom of the stack. The first activation record on the stack is =
that of=20
<I>main</I>().&nbsp; This chain of pointers is called the <I>dynamic =
chain.</I>=20
<P>In many C compilers the buffer grows towards the bottom of the stack. =
Thus=20
if&nbsp; the buffer overflows and the overflow is long enough the return =
address=20
will be corrupted, (as well&nbsp; as everything else in =
between,&nbsp;&nbsp;=20
including the dynamic link.)&nbsp; If the return address is =
overwritten&nbsp; by=20
the buffer overflow so as to point to the attack code, this will be =
executed=20
when the function returns. Thus, in this type of attack, the return =
address on=20
the stack is used to hijack the control of the program.=20
<P>Overwriting the return address, as explained above, gives the =
attacker the=20
means of hijacking the control of the program, but where should the =
attack code=20
be stored? Most commonly it is stored in the buffer itself.&nbsp; Thus =
the&nbsp;=20
<I>payload</I> string which is copied into the buffer will contain both =
the=20
binary machine language attack&nbsp; code&nbsp; as well as the address =
of this=20
code which will overwrite the return address.=20
<P>There are a few difficulties that the attacker must overcome to carry =
out=20
this plan.&nbsp;&nbsp; If the attacker has the source code of the =
attacked=20
program it may be possible to determine&nbsp; exactly how big the buffer =
is=20
and&nbsp; how far it is from the return address, determining how big the =
payload=20
string must be.&nbsp;&nbsp; Also, the payload string cannot contain the =
null=20
character since this would abort the copying of the payload into the=20
buffer.&nbsp; Some copying routines of the C library use carriage =
returns and=20
new lines as a delimiter instead, so these characters should also be =
similarly=20
avoided in the payload string. &nbsp;&nbsp;=20
<P>Access to the&nbsp; source code is&nbsp; nowadays quite common&nbsp; =
for many=20
Operating Systems, e.g. Linux, OpenBSD,&nbsp; Free BSD, and even =
Solaris.&nbsp;=20
Levy [ 17 ] shows, however, that there is no need&nbsp; to have access =
to the=20
source, or even knowledge of the exact details of how the&nbsp; attacked =
program=20
works.&nbsp; The&nbsp; address of the attack code can be guessed,&nbsp;=20
and&nbsp; through various techniques an approximate guess will do.&nbsp; =
For=20
example, the attack code could start with a long list of&nbsp; <I>no=20
operation</I> instructions, so that control could be passed to any of =
these in=20
order&nbsp; to correctly execute the crucial part of the attack code =
which=20
spawns the shell and comes after the no ops. This technique was already =
used in=20
the Morris worm. &nbsp;&nbsp; Similarly, the&nbsp; tail of the payload=20
string&nbsp; could consist of a repeated list of the guessed address of =
the=20
attack code that we want to overwrite the return address =
with.&nbsp;&nbsp; These=20
techniques increase considerably the chances of guessing the address of =
the=20
attack code close enough for the attack to work. For more details check =
Levy's=20
article [ 17 ].=20
<P>We&nbsp; now examine why buffer overflows are so common.&nbsp; =
Suppose that=20
the buffer is a character array used to store strings. Most programs =
have string=20
inputs or environment variables which can be used by the attacker to =
deliver the=20
attack.&nbsp; The program must read this input and parse it in order to =
make the=20
appropriate response to the input. Often, to parse the input,the program =
will=20
first copy it into a local variable of a function and then parse it. To =
do this=20
the programmer reserves a large enough buffer for any <I>reasonable=20
</I>input.&nbsp; To copy the input into the buffer&nbsp; the program =
will=20
typically use a string copying function of the standard C library such =
as=20
<I>strcpy</I>().&nbsp; If done carelessly, this introduces a buffer =
overflow=20
vulnerability.&nbsp;&nbsp; This pattern is&nbsp; so&nbsp; well =
established in=20
the&nbsp; C programmer's&nbsp; repertoire&nbsp; that it makes very =
likely=20
that&nbsp; many programs will contain buffer overflow vulnerabilities.=20
<P>The problem arises partly because C&nbsp; represents strings in a =
dangerous=20
way. The length of&nbsp; a&nbsp; string is determined by terminating the =

sequence of characters by a null character.&nbsp; This representation =
is&nbsp;=20
convenient,&nbsp; because strings can have arbitrary length and yet it =
allows=20
for efficient processing of strings. But at the same time it is also =
dangerous,=20
because the scheme&nbsp; breaks down if a string is not null =
terminated,&nbsp;=20
and&nbsp; because there is no way of knowing the length of the string =
prior to=20
processing all its characters.&nbsp;&nbsp; The&nbsp; typical&nbsp; C =
culture=20
emphasizes efficiency over&nbsp; correctness,&nbsp; prudence or safety, =
which=20
compounds the problem. It would&nbsp; require&nbsp; a massive amount of=20
education to change this well entrenched programming practice.&nbsp; A=20
consequence of this is that it is unlikely that buffer overflow =
vulnerabilities=20
can be eradicated&nbsp; at the source&nbsp; by not introducing them into =
a=20
program&nbsp; in the first place.&nbsp;&nbsp; Not only it will be =
difficult to=20
eliminate the vulnerability from the enormous quantity of software =
already=20
deployed, but it seems likely that programmers will continue to write =
new=20
vulnerable software.=20
<P>Miller [ 20 ] studied the behavior of UNIX utilities when given =
random input=20
in many distributions, both commercial and open source. His study is =
important=20
and relevant to our discussion, because while unexpected input is not=20
necessarily directly related to buffer overflows, the inability of =
programs to=20
handle unexpected input comes from the same tendency of programmers to=20
concentrate only on <I>reasonable </I>input that leads also to buffer =
overflow=20
flaws. Attackers are not reasonable. On the contrary, they wish to =
exploit this=20
blind spot of programmers for unreasonableness, to find a hole in the =
program's=20
logic that they can use for their own purposes. So Miller's study =
provides some=20
evidence on how common buffer overflow problems are likely to be. =
Unfortunately,=20
in almost all distributions more than half of the utilities crashed =
under=20
Miller's experiment.=20
<P>Miller also gives us some insight into the speed with which vendors =
are=20
making progress in improving the quality of their software, if at all, =
because=20
he repeated the study five years later. Indeed, his results show that =
progress=20
is being made. But progress has been very modest.=20
<P>Another interesting result of Miller is the confirmation of the =
widely held=20
anecdotal belief that Open Source provides significantly higher quality =
software=20
than commercial offerings. This seems to suggest the power of somewhat =
chaotic=20
large-scale parallelism over better organization of small-scale =
parallelism. The=20
former is prevalent in the Open Source model, in which many pairs of =
eyes=20
scrutinize the software but relatively uncoordinated. The latter is=20
characteristic of commercial organizations, with fewer pairs of eyes=20
scrutinizing the software but in a much more systematic and organized =
fashion.=20
<BR>&nbsp;=20
<H3>4. Traditional defenses</H3>
<P><BR>We now examine some&nbsp; traditional defenses against buffer =
overflow=20
vulnerabilities such as the ones discussed in the last section. We =
already=20
mentioned&nbsp; the first and most obvious of these which is eliminating =
the=20
error from the target program.&nbsp; We have seen briefly at the end of =
the last=20
section that unfortunately this approach is unlikely to =
succeed.&nbsp;&nbsp;=20
Here we&nbsp; elaborate&nbsp; on further obstacles to this defense.=20
<P>First, there is the magnitude of the problem.&nbsp; To eliminate the=20
bug&nbsp; a very large number of&nbsp; programs must be examined.&nbsp; =
The=20
number of potential targets&nbsp; already deployed&nbsp; is very =
large.&nbsp;=20
There are some tools that one can use to automate the search for the=20
vulnerability [ 11, 12, 30 ].&nbsp;&nbsp; For example,&nbsp; a very =
simple=20
scheme&nbsp; would be to search for the use of the unsafe =
functions&nbsp; in the=20
C library, which like <I>strcpy</I>() have been identified, and replace =
them=20
with safe functions which takes the size of the buffer into account, =
like=20
<I>strncpy</I>().&nbsp; Still, manual auditing of the code must be =
used&nbsp;=20
for each&nbsp; program which&nbsp; makes this a massive and very =
expensive=20
approach.&nbsp;&nbsp; This is not to say that this work should not be=20
undertaken, and indeed there are efforts under way to systematically =
audit the=20
code of&nbsp; at least two free versions of Unix , OpenBSD and Linux [ =
19, 23=20
].&nbsp; In the case of the former this effort seems to have =
already&nbsp;=20
achieved considerable success, accounting for the reputation of OpenBSD =
among=20
the security community as being the most secure Unix distribution =
currently=20
available.&nbsp; One wonders why similar efforts are not under way by =
the=20
commercial vendors of Operating Systems, which one would suppose =
could&nbsp;=20
better afford&nbsp; the cost.&nbsp;&nbsp; While the value of such =
systematic=20
auditing of code&nbsp; has been successfully demonstrated,&nbsp; the =
approach is=20
not guaranteed&nbsp; to produce buffer-overflow-free code.&nbsp; Some =
buffer=20
overflows have been found even in already audited code [ 10 ].=20
<P>Not surprisingly, most installations must rely on the&nbsp; vendor to =
provide=20
them with&nbsp; reliable code.&nbsp; Even if the source code is =
available, they=20
must deploy code which they can't hope to fully understand =
themselves.&nbsp;=20
Unfortunately this reliance on the vendor&nbsp; seems&nbsp; misplaced in =
many=20
cases, as vulnerabilities seem to be all too common. with most=20
vendors.&nbsp;&nbsp; This rather discouraging state of affairs is very=20
frustrating, yet seems to be the main approach traditionally=20
recommended.&nbsp;&nbsp; Security specialists [ 22, 26 ] recommend that =
the=20
administrator of a system follow closely the release of security patches =
by the=20
vendor, so that as soon as they are released they can install them. =
This&nbsp;=20
presumably makes their systems more secure.&nbsp; However, this =
approach&nbsp;=20
has serious shortcomings.&nbsp; The first problem is that it is costly =
in terms=20
of the administrator's time and effort.&nbsp; Many systems are=20
administered&nbsp; not by professional system administrators but by =
people whose=20
primary job is something else. For these systems this approach is simply =
too=20
impractical and untenable.&nbsp; The cure is worse than the disease. =
Thus the=20
high cost of this method of defense guarantees that many systems will =
fail to=20
install the patches in a timely manner, which in turn provides attackers =
with=20
plenty of vulnerable systems, even for vulnerabilities which have =
already been=20
fixed.&nbsp; Furthermore, as we remarked in the last section,&nbsp; =
programmers=20
keep introducing new vulnerabilities with every new release of the =
operating=20
system. <BR>&nbsp;=20
<H3>5. Recent&nbsp; defenses</H3>
<P>Recently new defenses have been discovered that are more promising =
than the=20
traditional approaches discussed above.&nbsp; We examine&nbsp; three =
methods and=20
discuss their strengths and weaknesses.&nbsp; One of the attractive =
features of=20
all these three methods is that they are all relatively low cost =
measures that=20
can be easily implemented&nbsp; by any system administrator =
independently of the=20
vendor and they are&nbsp; all effective to some&nbsp; degree against =
buffer=20
overflow vulnerabilities not yet discovered.&nbsp; So&nbsp; one of the =
common=20
characteristics of these three methods is that they offer valuable=20
protection&nbsp; with current code which is&nbsp;&nbsp; =
vulnerable.&nbsp; The=20
other most significant advantage of these methods is that they are =
proactive=20
methods of defense rather than the reactive methods discussed in the =
previous=20
section.&nbsp; They allow a significant measure of protection without =
forcing=20
the administrator to have to wait for the vendor to do something to =
secure his=20
system. <BR>&nbsp;=20
<H4>5.1 Disabling Stack Execution</H4>
<P><BR>&nbsp;Several vendors now offer this&nbsp; method of defense. [ =
7, 18 ]=20
&nbsp;&nbsp; Most systems do not need code to be ever executed on the =
stack.=20
Since the most common buffer overflows, as seen in Section 3, rely on =
code to be=20
injected into the buffer and then executed,&nbsp; a simple =
solution&nbsp; is the=20
option to install the operating system with stack execution =
disabled.&nbsp; The=20
idea is simple, inexpensive to install, and relatively effective against =

the&nbsp; current crop of attacks.=20
<P>There are some serious weaknesses to this approach.&nbsp;&nbsp; =
First, though=20
rare, some programs do rely on the stack to be executable.&nbsp; More=20
importantly, the defense&nbsp; is weak.&nbsp; Though the code in the =
current=20
crop of stack based buffer overflows is often stored into the =
buffer,&nbsp; a=20
little reflection will immediately reveal that this is not really =
essential. The=20
attacker does not care where the attack code is. All the attacker needs =
is that=20
this code be <I>somewhere </I>in memory and that&nbsp; it's address or=20
approximate address be known to the attacker so he can overflow the =
return=20
address with it to hijack control. We think that it is only a matter of =
time=20
before a new crop of buffer overflow attacks will appear that do not =
store the=20
code on the stack and which will become immune to this =
defense.&nbsp;&nbsp;=20
Wojtczuk explores&nbsp; methods to bypass&nbsp; the&nbsp; non executable =
stack=20
defense in&nbsp;&nbsp; [ 31 ] <BR>&nbsp;=20
<H4>5.2&nbsp; Safer C&nbsp; library support</H4>
<P>A much more robust alternative would be if we could provide a safe =
version to=20
the C library functions on which the attack relies to overwrite the =
return=20
address.&nbsp;&nbsp; This idea seems to have occurred independently to =
several=20
people.&nbsp; Alexander Snarskii seems to have been the first one to =
think of it=20
[ 28 ].&nbsp; He implemented it for the FreeBSD version of Unix and =
offered it=20
to the development group of FreeBSD.&nbsp; His explanation of the =
method&nbsp;=20
was unfortunately a little obscure,&nbsp; and either he may not have =
fully=20
realized the true power of his method, or if he did, he certainly did =
not=20
elaborate on it&nbsp;&nbsp; in his note.&nbsp;&nbsp; Thus Snarskii's =
idea had=20
less impact than it should have had.&nbsp;&nbsp; Baratloo, Tsai , and =
Singh=20
from&nbsp; Bell Labs independently rediscovered&nbsp; the&nbsp; idea , =
and wrote=20
a&nbsp; much more substantial&nbsp; white paper about it [ 2 ].&nbsp; =
This=20
author also rediscovered this defense independently.&nbsp;&nbsp; The =
Bell Labs=20
group implemented the vulnerable functions in a library called =
<I>LibSafe</I>,=20
which can be freely downloaded&nbsp; from their site.=20
<P>Can we replace a vulnerable function in the C library by a safer=20
version?&nbsp; We will discuss the idea in terms of <I>strcpy(</I>), but =
it will=20
become readily apparent that the method generalizes to any of the other=20
vulnerable string manipulation functions.&nbsp;&nbsp; At first =
sight&nbsp; a=20
safer version of <I>strcpy</I>() appears impossible because =
<I>strcpy</I>() does=20
not know the size of the buffer that it is copying into. So complete =
avoidance=20
of overflowing the buffer is not possible.&nbsp; Nonetheless, =
<I>strcpy</I>()=20
has access to the dynamic chain on the stack, and successive dynamic =
links are=20
like bright markers delimiting the activation records of all the =
currently=20
active functions.&nbsp; The idea is to use this information to prevent=20
<I>strcpy</I>() from corrupting the return address or the dynamic link =
fields.=20
<P>Using these markers and the address of the buffer itself&nbsp;=20
<I>strcpy</I>()&nbsp; can&nbsp; first determine which activation record =
contains=20
the buffer, or else that the buffer is not on the stack at =
all.&nbsp;&nbsp; To=20
do this <I>strcpy</I>() finds the interval&nbsp; [<I>a</I>,<I>b</I>] of=20
consecutive dynamic links which contains the buffer.&nbsp;&nbsp; The =
cases in=20
which the buffer is either below the first activation&nbsp; record on =
the stack,=20
or above the last activation record can be handled as special cases with =

appropriate values of&nbsp;&nbsp; either <I>a</I> or <I>b.&nbsp;&nbsp; =
</I>Once=20
the values of&nbsp; <I>a</I> and <I>b</I> are determined, we can compute =
an=20
upper bound on the size of buffer.&nbsp; For example,&nbsp; if the =
buffer grows=20
towards the bottom of the stack then&nbsp;&nbsp; |<I>buffer =
-a&nbsp;</I>| &nbsp;=20
is an upper bound on the size of the buffer.&nbsp;&nbsp; This can be =
used=20
by&nbsp; <I>strcpy</I>()&nbsp;&nbsp; to limit the length of the copied =
string so=20
that&nbsp; neither&nbsp; the dynamic link nor the return address are=20
overwritten.&nbsp;&nbsp; Furthermore, <I>strcpy</I>()&nbsp; can detect =
an=20
attempt to do so, report the problem to syslog, and&nbsp; safely =
terminate the=20
application.=20
<P><I>LibSafe</I> does not replace the standard C library. The method =
relies=20
instead on the loader searching <I>LibSafe</I> before the standard C =
library, so=20
that the safe functions are used instead of the standard library=20
functions.&nbsp; This scheme is&nbsp; more flexible than replacing the =
functions=20
in the C library itself.&nbsp; For example, it is possible to have one =
program=20
use the C library functions and another use the <I>LibSafe</I> =
versions.&nbsp;=20
By setting appropriate environment variables <I>LibSafe</I> can be =
installed as=20
the default library.&nbsp; But from a security perspective, there seems =
to be=20
little&nbsp; reason to keep&nbsp; the vulnerable functions installed on =
the=20
system, so the usefulness of this extra flexibility is somewhat =
questionable.=20
<P>This defense has several advantages. It is effective against all =
buffer=20
overflow attacks that attempt to smash the stack in which the target =
program=20
uses one of the vulnerable C library functions to copy into the =
buffer.&nbsp;=20
The method does not totally prevent buffer overflows. It can't, =
because&nbsp; it=20
does not know the true size of the buffer. It is still possible to =
overflow=20
areas between the buffer and the dynamic link. But the critical return =
address=20
and the dynamic link fields&nbsp; are protected from being overwritten.=20
<P>The method fails to provide any protection against heap based buffer =
overflow=20
attacks (see below),&nbsp; or attacks which do not need to hijack =
control by=20
overwriting the return address. &nbsp; Both of these&nbsp; kinds of =
attack,=20
however,&nbsp; are much harder to pull off, and consequently much rarer. =
The=20
method would also fail to protect a program that does not use the =
standard C=20
library functions to copy into the buffer.&nbsp; For example,&nbsp; if =
the&nbsp;=20
target program&nbsp; contains custom code to copy the string into the=20
buffer&nbsp; it will not be protected.&nbsp; However, it seems clear =
that few=20
programs will have such custom code.&nbsp; Generally speaking it is =
considered=20
to be bad programming practice to "reinvent the wheel", so programmers =
are=20
encouraged to use the standard libraries.&nbsp;&nbsp;=20
<P>Though programs that rely on custom code may contain buffer overflow=20
vulnerabilities just as much as those that use the standard C library, =
they will=20
be less likely to be detected. Because of this they will enjoy some =
immunity=20
from attack. This is security through obscurity, which in general is not =
a good=20
way to secure a system. Nonetheless it is of some security value.=20
<P>The overhead of the safe functions is negligible, and the cost of =
installing=20
the library and configure the system to use it is very low.&nbsp; =
Another=20
advantage is that it works with the binaries of the target program, and =
does not=20
require access to their source code.&nbsp; Finally, it can be deployed =
without=20
having to wait for the vendor to react to security threats, which is a =
very=20
desirable feature.&nbsp; It is a much more robust defense than disabling =
stack=20
execution. Though we have discussed variants of attacks against which it =
will=20
offer no protection, it is&nbsp; very effective against the class of =
attacks=20
that it is designed for, and it cannot be easily circumvented.&nbsp; The =

attacker has no way of interfering with the detection of the buffer =
overflow=20
attack, because this occurs before the attacker has a chance to hijack=20
control.&nbsp; We conclude that overall, this defense&nbsp; offers a =
very=20
significant improvement of the security of a system at very low cost. In =
our=20
opinion it is a sure winner.=20
<P>We also mention Andrey Kolishak's BOWall protection [ 16 ]. This is =
available=20
for Windows NT systems, with full source. This solution has some =
similarities to=20
both the safer Library approach, and to the methods to be presented in =
the next=20
Section.=20
<P>Kolishak's approach is similar to the others in this Section, because =
it=20
works by replacing the DLL's that contain the vulnerable library =
functions with=20
a safer library version. However, unlike <I>LibSafe</I> or Snarskii's =
method, it=20
seems to be a buffer overflow detection system, which is more similar to =
the=20
methods of the next Section. It works by saving the return address when =
the=20
function enters, and checking it before actually returning. If =
corruption of the=20
return address is detected it does not return, so hijacking of control =
is=20
prevented. Kolishak also has a second component of BOWall which relies =
on some=20
specific Windows NT security features. <BR>&nbsp;=20
<H4>5.3 Compiler Techniques</H4>
<P><BR>Range checking of indices is a defense that is 100% effective=20
against&nbsp; buffer overflow attacks.&nbsp;&nbsp; For example, buffer =
overflow=20
attacks are impossible in a Java program, because Java&nbsp; =
automatically=20
checks that an array index is within the proper bounds.&nbsp;=20
Unfortunately,&nbsp; full-blown range checking in C is&nbsp; impossible, =
because=20
of the dichotomy between arrays and pointers.&nbsp; Some compilers will =
offer=20
protection if the array is accessed with&nbsp; an indexing =
operation,&nbsp; like=20
in the expression&nbsp; <I>buffer</I>[<I>i</I>]&nbsp; but not&nbsp; in =
an=20
expression like <I>buffer</I> + <I>i&nbsp; .&nbsp;&nbsp;&nbsp; </I>When =
the=20
compiler compiles a function like <I>strcpy</I>(char* <I>dest</I> , =
char*=20
<I>src</I>)&nbsp;&nbsp; the two arguments are just pointers, and it is=20
impossible for the compiler to know the lengths of the corresponding=20
arrays.&nbsp; So the compiler cannot generate code to&nbsp; do range =
checking=20
inside of the function.&nbsp;&nbsp; Jones and Kelly implemented some =
range=20
checking techniques in C [ 14, 15 ].=20
<P>C programmers do not always appreciate range checking because of the=20
associated overhead,&nbsp; but this excessive preoccupation with=20
performance&nbsp; is often only justified in the most demanding=20
applications.&nbsp; Snappy performance is always a desirable feature, =
but for=20
most applications it is much less of a critical issue than programmers =
tend to=20
assume. For example, the calendar manager daemon in Solaris has been =
shown&nbsp;=20
to be vulnerable to a buffer overflow attack which compromises =
root,&nbsp; yet=20
there seems to be no reason why such an application could not&nbsp; have =
been=20
written in Java, which would have rendered the attack impossible.&nbsp; =
We=20
believe that performance would not have been a critical issue in this =
case. Some=20
security flaws have been uncovered in Java and quickly fixed. These =
flaws did=20
not invalidate Java's security model, which appears to be sound, but =
usually=20
were implementation problems of the Java Virtual Machine, which of =
course is=20
just another C program, so subject to the same programmer errors as any =
other=20
program [ 6 ]. <BR>&nbsp;=20
<P>Cowan, Wagle, Pu, Beattie and Walpole&nbsp; [ 4 ] devised a =
fresh&nbsp;&nbsp;=20
approach&nbsp; to the problem.&nbsp;&nbsp; Their method does not =
prevent&nbsp;=20
the&nbsp; corruption of the return address and dynamic link, but instead =

prevents the hijacking of control&nbsp; by detecting that an attack took =
place=20
before the control is hijacked.&nbsp; Just as was the case with the safe =
library=20
approach, the key idea is simple and elegant. It is based on the =
assumption that=20
if a buffer overflow attack took place then everything between the =
buffer and=20
the return address is likely to be corrupted.&nbsp; They propose to =
modify the=20
compiler so that it protects the critical return address and dynamic =
link part=20
of the activation record by allocating an extra field aptly called =
the&nbsp;=20
<I>canary&nbsp;&nbsp; </I>after the dynamic link and before the local =
variables=20
in the activation record.&nbsp; When the activation record is pushed on =
the=20
stack a value is stored in the canary field. Before the function returns =
the=20
integrity of the canary is checked. If it was corrupted the canary sings =
and the=20
attack is detected. (Equivalently, another possible metaphor, is to say =
that the=20
attack makes the canary die. This is analogous to the use of canaries in =
mines.)=20
In this case, the program is gracefully terminated with an <I>syslog</I> =
error=20
message alerting about the buffer overflow thus thwarting the =
attack.&nbsp;=20
These ideas were implemented in the <I>StackGuard</I>&nbsp;&nbsp; =
project and=20
used in some experiments to protect an entire Linux distribution =
recompiled with=20
this technique.=20
<P>To avoid the&nbsp; possibility of&nbsp; the attacker&nbsp; forging =
the value=20
stored in the canary they propose either&nbsp; storing terminator =
symbols, like=20
the null character, carriage return , line feed, and&nbsp; eof, whose =
inclusion=20
in the payload string would stop the copying operation by the various =
vulnerable=20
functions of the C library,&nbsp; or to choose a random canary value, =
chosen=20
independently each time the program is started,&nbsp; which would make =
its=20
forging very difficult for the attacker.=20
<P>"Bulba" and "Kil3r" explored ways that&nbsp; <I>StackGuard</I> could =
be=20
circumvented [ 3 ].&nbsp; For example, they reasoned that if a pointer =
variable=20
were between the buffer and the return address, then a first buffer =
overflow=20
could corrupt this pointer variable, without corrupting anything else, =
so as to=20
make it point to the return address field. A second copying operation =
then could=20
overwrite the return address without&nbsp; corrupting the canary.&nbsp; =
This=20
would&nbsp; defeat the <I>StackGuard</I> protection by avoiding the =
basic=20
assumption that <I>everything</I> between the buffer and the return =
address must=20
have been corrupted by a buffer overflow.&nbsp; To deal with such an=20
attack&nbsp; Cowan proposed an even better choice&nbsp; to be stored in =
the=20
canary, namely he proposed to store a&nbsp; value that depended both on =
a random=20
value and the correct return address.&nbsp; Specifically, he proposed to =
compute=20
the XOR of these two values.&nbsp; This countermeasure was easy to =
implement,=20
and it would detect the attack even if the canary was not changed. =
<BR>&nbsp;=20
<P>"Bulba" and "Kil3r" demonstrate that their techniques work with =
examples of=20
vulnerable code.&nbsp; But in our opinion these attacks&nbsp; are =
somewhat=20
optimistic about the&nbsp; conditions that must be present in the target =
program=20
for the attack to work, so that their techniques currently seem more a =
proof of=20
concept than a serious and immediate threat to defeat the =
<I>StackGuard</I>=20
defense.&nbsp; It is quite possible that such target programs exist and =
are=20
deployed widely enough for their techniques to become a serious breach =
of the=20
defense,&nbsp; but that has not been demonstrated yet.&nbsp; Of =
course,&nbsp;=20
one must be always vigilant when dealing with security, and the =
prudent&nbsp;=20
approach&nbsp; is always to assume that no defense is foolproof. =
<BR>&nbsp;=20
<P>The performance overhead of <I>StackGuard</I> is worse than&nbsp; =
that of the=20
<I>LibSafe&nbsp; </I>defense,&nbsp; in part because =
<I>StackGuard</I>&nbsp;=20
imposes an overhead&nbsp; on&nbsp; every function called,&nbsp; but =
better than=20
the overhead of range checking which incurs a small extra cost on every =
array=20
access.&nbsp; In any event,&nbsp; this overhead is still&nbsp; =
small.&nbsp;=20
<I>StackGuard</I>&nbsp; is effective even against custom code, since=20
<I>StackGuard</I> is a buffer overflow detection method, so it does not =
care how=20
the buffer overflow happened.&nbsp; However we noted that custom code =
attacks=20
seem to be&nbsp;&nbsp; less likely than those that rely on the standard =
library=20
functions.&nbsp;&nbsp; On the other hand,&nbsp; assuming that an =
administrator=20
has access to the modified compiler,&nbsp; the cost of protection is =
much larger=20
than that of the <I>LibSafe</I> approach, because it requires =
recompilation of=20
every target program to be protected.&nbsp; This also means that one has =
to have=20
access to the source code of the target program,&nbsp; or put another =
way,=20
<I>StackGuard</I> cannot protect a program for which we have no source =
code,=20
whereas <I>LibSafe</I> can.=20
<P>In some ways the three methods discussed in this section are =
complementary,=20
so they can be applied independently and simultaneously. By doing so =
the&nbsp;=20
robustness against future attacks circumventing the defenses is also=20
enhanced.&nbsp;&nbsp; Given&nbsp; the very low cost of deployment and =
overhead=20
of the first two methods, and moderate cost of deployment and low =
overhead&nbsp;=20
for the last one, &nbsp; deploying these methods should be recommended.=20
<BR>&nbsp;=20
<H3>6.&nbsp; Buffer Overflow Variants</H3>
<P>We mentioned earlier that the Morris worm used several methods to try =
to=20
infect a machine, one of which&nbsp; was essentially a&nbsp; stack=20
smashing&nbsp; attack on <I>fingerd.&nbsp;</I> This part of the=20
worm<I>&nbsp;</I> sent a&nbsp; TCP/IP packet to port 79, the&nbsp; =
finger port .=20
The packet consisted of 400&nbsp; VAX&nbsp; <I>nop</I> instructions, =
followed by=20
code that <I>exec</I>'d&nbsp; a shell,&nbsp; followed by&nbsp; a part =
that would=20
overflow the return address to point to this code.&nbsp; The worm also =
attacked=20
&nbsp;Sun machines with a similarly constructed packet,&nbsp; but there =
was an=20
error in the&nbsp; part that was supposed to overwrite the return =
address in the=20
Sun version, which caused it to fail, even though the Suns were also=20
vulnerable.&nbsp;&nbsp; <I>fingerd&nbsp; </I>parsed its input by reading =
it=20
into&nbsp; a local&nbsp; buffer of 512 bytes with <I>gets</I>(). The =
above=20
packet had 536 bytes, so this caused it to overflow and corrupt the =
return=20
address. Once&nbsp; the control was hijacked, the shell would read its =
input=20
from the network connection and write it's output to the network =
connection. The=20
client side that had sent this packet&nbsp; would then&nbsp; send over a =
C=20
program of the worm, which was compiled and then run on the&nbsp; newly =
infected=20
machine [ 9 ].=20
<P>Though the <I>fingerd</I> attack was a straightforward&nbsp; stack =
smashing=20
attack, exactly as described in Section 3, initially it found few =
imitators.=20
Perhaps it was not realized for a while how widespread the vulnerability =
was in=20
other targets as well. Another factor may have been that the worm was =
fairly=20
complex, and the <I>fingerd</I> attack was just one of several methods =
used by=20
it. Because of this it may have been understood by a relatively small =
number of=20
people. It was not until the publication of Levy's paper in Phrack that =
the=20
hacker community seem to have realized that&nbsp; many programs were =
likely to=20
harbor a stack smashing vulnerability.=20
<P>Once the stack smashing attack was well understood variants started =
to=20
appear.&nbsp; We discuss some of these variants in this section. Looking =
at=20
the&nbsp; general&nbsp; steps of a buffer overflow attack&nbsp; that we=20
discussed in Section&nbsp; 2, we may see&nbsp; the possible variants. In =
some=20
programs there is no need for Step 1 (planting the attack code)&nbsp; =
because=20
the code might be already present in the target program.&nbsp; In such=20
cases&nbsp; Step 2 (overflowing the buffer) might seek to corrupt not =
the return=20
address but another resource. For example, the string that the code =
would=20
<I>exec</I>. In this case&nbsp; the&nbsp; hijacking of control works=20
differently.=20
<P>&nbsp;In the stack smashing examples, Step 1 (planting the attack =
code) might=20
be&nbsp; accomplished&nbsp; in several ways: through an input to the =
target=20
program, or an environment variable, or a network port on which the =
target=20
program listens (as in <I>fingerd, </I>basically just another form of =
input).=20
&nbsp; The buffer overflow of Step 2 copies the planted code into the =
buffer and=20
overwrites the return address on the stack. The hijacking of control =
occurs when=20
the function returns to the wrong return address, and executes the =
attack code=20
instead. <BR>&nbsp;=20
<P>While the stack is convenient for Steps 2 and 3 of the attack,&nbsp; =
we may=20
look at other ways that a program may hijack control not involving the =
stack.=20
These will then lead to a different class of&nbsp; potential=20
attacks.&nbsp;&nbsp; Any structure in which function pointers are =
stored, or=20
addresses to which the program will jump are potential targets for Step =
3.&nbsp;=20
If these structures can be corrupted by&nbsp; a &nbsp; buffer=20
overflow,&nbsp;&nbsp; we have a potential new technique for an attack. =
If the=20
pattern necessary to carry this out is also sufficiently widespread we =
have=20
another dangerous variant.=20
<P>For example, heap based attacks are possible in C++ targets[ 24=20
].&nbsp;&nbsp; Each object&nbsp; has a&nbsp; virtual function table =
where each=20
entry points to the corresponding&nbsp; member function of the=20
object.&nbsp;&nbsp; By corrupting the virtual function table of an =
object ,=20
control can be hijacked when any of the object's operations is invoked. =
Instead=20
of executing the object's intended operation, the attack code will be=20
executed.&nbsp; Every object-oriented program will have this pattern, so =
in=20
theory this looks quite promising.&nbsp;&nbsp; But the difficulty here =
is=20
finding an application in which an adjacent object has a buffer that can =
be=20
overflown.&nbsp; The order in which objects are allocated on the heap =
depends on=20
the particular run-time conditions present, so might be frequently =
difficult or=20
impossible to predict. Consequently, the chances of a successful attack =
through=20
heap based buffer overflows that corrupt the virtual function table are =
much=20
more difficult to carry out than the stack smashing attack. <BR>&nbsp;=20
<H3>7. Conclusions</H3>
<P>We have&nbsp; analyzed&nbsp; the characteristics of several buffer =
overflow=20
attacks, the reasons for their popularity, and the effectiveness and =
costs of=20
various defenses against them.&nbsp; Until recently the attackers seemed =
to have=20
the upper hand, and the traditional defenses seemed largely impotent to =
stop=20
these attacks. We analyzed the reasons for this. Among the reasons we =
cited are=20
the cost of deployment of the traditional defenses, the&nbsp; reactive =
nature of=20
the methods of defense, and the dependence of the average installation =
on=20
the&nbsp; operating system vendor to provide the solutions to the=20
attacks.&nbsp;&nbsp; The recent appearance of&nbsp; effective defenses =
that=20
break some of these obstacles give reason for hope that finally the =
defenders=20
might&nbsp; have a chance to gain the upper hand&nbsp; against this type =
of=20
attack. <BR>&nbsp; <BR>&nbsp;=20
<H3>8. References</H3>
<OL>
  <LI>Stefan Axelsson, A Comparison of the Security of Windows NT and =
UNIX, 1998=20
  <BR><A =
href=3D"http://www.securityfocus.com/data/library/nt-vs-unix.pdf"><FONT=20
  =
face=3DArial,Helvetica>http://www.securityfocus.com/data/library/nt-vs-un=
ix.pdf=20
  </FONT></A><BR><BR>
  <LI>Arash Baratloo, Timothy Tsai, and Navjot Singh, Libsafe: =
Protecting=20
  Critical Elements of Stacks <BR><A=20
  href=3D"http://www.securityfocus.com/library/2267"><FONT=20
  face=3DArial,Helvetica>http://www.securityfocus.com/library/2267=20
  </FONT></A><BR><A =
href=3D"http://www.bell-labs.com/org/11356/libsafe.html"><FONT=20
  face=3DArial,Helvetica>http://www.bell-labs.com/org/11356/libsafe.html =

  </FONT></A><BR><BR>
  <LI>Bulba and Kil3r, Bypassing StackGuard and Stackshield, <I>Phrack =
Magazine=20
  </I>56 No 5, 1999. <BR><A=20
  =
href=3D"http://phrack.infonexus.com/search.phtml?view&amp;article=3Dp56-5=
"><FONT=20
  =
face=3DArial,Helvetica>http://phrack.infonexus.com/search.phtml?view&amp;=
article=3Dp56-5=20
  </FONT></A><BR><BR>
  <LI>Crispin Cowan, Perry Wagle, Calton Pu, Steve Beattie, and Jonathan =

  Walpole, Buffer Overflows: Attacks and Defenses for the Vulnerability =
of the=20
  Decade, in <I>DARPA Information Survivability Conference and Expo</I> =
2000.=20
  <BR><A=20
  =
href=3D"http://www.cse.ogi.edu/DISC/projects/immunix/publications.html"><=
FONT=20
  =
face=3DArial,Helvetica>http://www.cse.ogi.edu/DISC/projects/immunix/publi=
cations.html=20
  </FONT></A><BR><A =
href=3D"http://www.securityfocus.com/library/1674"><FONT=20
  face=3DArial,Helvetica>http://www.securityfocus.com/library/1674=20
  </FONT></A><BR><BR>
  <LI>David Curry, Improving the Security of your Unix System, 1990 =
<BR><A=20
  href=3D"http://www.securityfocus.com/library/1913"><FONT=20
  face=3DArial,Helvetica>http://www.securityfocus.com/library/1913=20
  </FONT></A><BR><BR>
  <LI>Drew Dean, Edward W. Felten, and Dan S. Wallach, Java Security: =
From=20
  HotJava to Netscape and Beyond, in <I>Proc. of the IEEE Symp. on =
Security and=20
  Privacy, 1996 </I><BR><A=20
  href=3D"http://www.cs.princeton.edu/sip/pub/secure96.html"><FONT=20
  =
face=3DArial,Helvetica>http://www.cs.princeton.edu/sip/pub/secure96.html =

  </FONT></A><BR><BR>
  <LI>Casper Dik, Non-Executable Stack for Solaris, posted to=20
  <I>comp.security.unix </I>January 2, 1997. <BR><A=20
  href=3D"http://x10.dejanews.com/"><FONT=20
  face=3DArial,Helvetica>http://x10.dejanews.com/ </FONT></A><BR><BR>
  <LI>DilDog, The TAO of Windows Buffer Overflow, 1998 <BR><A=20
  href=3D"http://www.cultdeadcow.com/cDc_files/cDc-351/"><FONT=20
  face=3DArial,Helvetica>http://www.cultdeadcow.com/cDc_files/cDc-351/=20
  </FONT></A><BR><BR>
  <LI>Mark W. Eichin and Jon A. Rochlis, With Microscope and Tweezers: =
An=20
  Analysis of the Internet Virus of November 1988, 1988. <BR><A=20
  =
href=3D"http://www.mit.edu:8001/people/eichin/www/virus/main.html"><FONT =

  =
face=3DArial,Helvetica>http://www.mit.edu:8001/people/eichin/www/virus/ma=
in.html=20
  </FONT></A><BR><BR>
  <LI>Chris Evans, Nasty Security Hole in <I>lprm</I>, posted in =
<I>BugTraq</I>,=20
  April 18, 1998 <BR><A =
href=3D"http://www.securityfocus.com/archive/1/9023"><FONT=20
  face=3DArial,Helvetica>http://www.securityfocus.com/archive/1/9023=20
  </FONT></A><BR><BR>
  <LI>HalVar Flake, Auditing Binaries for Security Vulnerabilities, in =
<I>Black=20
  Hat Europe Conference</I>, 2000. <BR><A=20
  =
href=3D"http://www.blackhat.com/html/bh-europe-00/bh-europe-00-speakers.h=
tml"><FONT=20
  =
face=3DArial,Helvetica>http://www.blackhat.com/html/bh-europe-00/bh-europ=
e-00-speakers.html=20
  </FONT></A><BR><BR>
  <LI>Nishad Herath, (Joey_) Advanced Windows NT Security, in <I>Black =
Hat Asia=20
  Conference</I>, 2000. <BR><A=20
  =
href=3D"http://www.blackhat.com/html/bh-asia-00/bh-europe-00-speakers.htm=
l#Joey"><FONT=20
  =
face=3DArial,Helvetica>http://www.blackhat.com/html/bh-asia-00/bh-europe-=
00-speakers.html#Joey=20
  </FONT></A><BR><BR>
  <LI>Barnaby Jack, (dark spyrit), Win32 Buffer Overflows (Location,=20
  Exploitation, and Prevention), <I>Phrack Magazine</I> 55,(15), 1999. =
<BR><A=20
  =
href=3D"http://phrack.infonexus.com/search.phtml?view&amp;article=3Dp55-1=
5"><FONT=20
  =
face=3DArial,Helvetica>http://phrack.infonexus.com/search.phtml?view&amp;=
article=3Dp55-15=20
  </FONT></A><BR><BR>
  <LI>Richard Jones, Bounds Checking Patches for gcc. <BR><A=20
  href=3D"http://web.inter.nl.net/hcc/Haj.Ten.Brugge"><FONT=20
  face=3DArial,Helvetica>http://web.inter.NL.net/hcc/Haj.Ten.Brugge=20
  </FONT></A><BR><BR>
  <LI>Richard Jones and Paul Kelly, Bounds Checking for C, 1995 <BR><A=20
  href=3D"http://www-ala.doc.ic.ac.uk/phjk/BoundsChecking.html"><FONT=20
  =
face=3DArial,Helvetica>http://www-ala.doc.ic.ac.uk/phjk/BoundsChecking.ht=
ml=20
  </FONT></A><BR><BR>
  <LI>Andrey Kolishak, BOWall, (Buffer Overflow Protection for Windows =
NT), 2000=20
  <BR><A href=3D"http://developer.nizhny.ru/bo/eng/BOWall/"><FONT=20
  face=3DArial,Helvetica>http://developer.nizhny.ru/bo/eng/BOWall=20
  </FONT></A><BR><BR>
  <LI>Elias Levy (alpha1), Smashing the Stack for Fun and Profit, =
<I>Phrack=20
  Magazine </I>49 (14), 1996. <BR><A=20
  =
href=3D"http://phrack.infonexus.com/search.phtml?view&amp;article=3Dp49-1=
4"><FONT=20
  =
face=3DArial,Helvetica>http://phrack.infonexus.com/search.phtml?view&amp;=
article=3Dp49-14=20
  </FONT></A><BR><BR>
  <LI>The Linux OpenWall Project, Nonexecutable Stack Patch for Linux =
<BR><A=20
  href=3D"http://www.openwall.com/linux/"><FONT=20
  face=3DArial,Helvetica>http://www.openwall.com/linux/ =
</FONT></A><BR><BR>
  <LI>The Linux Security Audit Project, <BR><A =
href=3D"http://lsap.org/"><FONT=20
  face=3DArial,Helvetica>http://lsap.org/ </FONT></A><BR><BR>
  <LI>Barton P. Miller, Fuzz Revisited: A Re-examination of the =
Reliability of=20
  Unix Utilities and Services, 1998 <BR><A=20
  href=3D"http://www.securityfocus.com/library/2087"><FONT=20
  face=3DArial,Helvetica>http://www.securityfocus.com/library/2087=20
  </FONT></A><BR><BR>
  <LI>Mudge, How to Write Buffer Overflows, 1997 <BR><A=20
  href=3D"http://l0pht.com/advisories/buffero.html"><FONT=20
  face=3DArial,Helvetica>http://l0pht.com/advisories/buffero.html=20
  </FONT></A><BR><BR>
  <LI>Ryan Russel, Rain Forest Puppy, Elias Levy, Blue Boar, Dan =
Kaminsky,=20
  Oliver Friedrichs, Riley Eller, Greg Hoglund, Jeremy Rauch, and Georgi =

  Guninski, <I>Hack Proofing Your Network Internet Tradecraft</I>, =
Syngress,=20
  2000. <BR><BR>
  <LI>Theo Raadt, OpenBSD Security <BR><A=20
  href=3D"http://openbsd.org/security.html"><FONT=20
  face=3DArial,Helvetica>http://openbsd.org/security.html =
</FONT></A><BR><BR>
  <LI>rix, Smashing C++ VPTRS, <I>Phrack Magazine</I> 56 (8), 2000. =
<BR><A=20
  =
href=3D"http://phrack.infonexus.com/search.phtml?view&amp;article=3Dp56-8=
"><FONT=20
  =
face=3DArial,Helvetica>http://phrack.infonexus.com/search.phtml?view&amp;=
article=3Dp56-8=20
  </FONT></A><BR><BR>
  <LI>W. Olin Sibert, Malicious Data and Computer Security, 1996. <BR><A =

  href=3D"http://www.securityfocus.com/library/2168"><FONT=20
  face=3DArial,Helvetica>http://www.securityfocus.com/library/2168=20
  </FONT></A><BR><BR>
  <LI>Joel Scambray, Stuart McClure, George Kurtz, <I>Hacking Exposed, =
Network=20
  Security Secrets &amp; Solutions </I>, Second Edition, =
Osborne/McGrawHill ,=20
  2001 <BR><BR>
  <LI>Nathan P. Smith, Stack Smashing Vulnerabilities in the UNIX =
Operating=20
  System, 1997. <BR><A=20
  =
href=3D"http://millcomm.com/nate/machines/security/stack-smashing/nate-bu=
ffer.ps"><FONT=20
  =
face=3DArial,Helvetica>http://millcomm.com/nate/machines/security/stack-s=
mashing/nate-buffer.ps=20
  </FONT></A><BR><BR>
  <LI>Alexander Snarskii, FreeBSD Stack Integrity Patch, 1997 <BR><A=20
  href=3D"ftp://ftp.lucky.net/pub/unix/local/libc-letter"><FONT=20
  face=3DArial,Helvetica>ftp.lucky.net/pub/unix/local/libc-letter=20
  </FONT></A><BR><BR>
  <LI>Eugene Spafford, The Internet Worm Program: Analysis, <I>Computer=20
  Communications Review</I>, 1989<BR><BR>
  <LI>David Wagner, Jeffrey S Foster, Eric A. Brewer, and Alexander =
Aiken, A=20
  First Step towards Automated Detection of Buffer Overrun =
Vulnerabilities, in=20
  <I>Proc. 7th Network and Distributed System Security Symposium</I> =
2000.=20
  <BR><A =
href=3D"http://www.cs.berkeley.edu/~daw/papers/overruns-ndss00.ps"><FONT =

  =
face=3DArial,Helvetica>http://www.cs.berkeley.edu/~daw/papers/overruns-nd=
ss00.ps=20
  </FONT></A><BR><BR>
  <LI>Rafel Wojtczuk, Defeating Solar Designer's Non-Executable Stack =
Patch, in=20
  <I>Bugtraq</I>, January 30 1998 <BR><A=20
  =
href=3D"http://www.securityfocus.com/templates/archive.pike?list=3D1&amp;=
mid=3D8470&amp;fromthread=3D0&amp;date=3D1998-01-30"><FONT=20
  =
face=3DArial,Helvetica>http://www.securityfocus.com/templates/archive.pik=
e?list=3D1&amp;mid=3D8470&amp;fromthread=3D0&amp;date=3D1998-01-30=20
  </FONT></A><BR><BR></LI></OL></BODY></HTML>

