CH10-CompSec5e Accessible
CH10-CompSec5e Accessible
Practice
Fifth Edition
Chapter 10
Buffer Overflow
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.1
A Brief History of Some Buffer Overflow Attacks
1988 The Morris Internet Worm used a buffer overflow exploit in “fingerd” as one of its attack
mechanisms.
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.1
A Brief History of Some Buffer Overflow Attacks
1988 The Morris Internet Worm used a buffer overflow exploit in “fingerd” as one of its attack
mechanisms.
1995 A buffer overflow in N C S A httpd 1.3 is discovered and published on the Bugtraq
Mailing list by Thomas Lopatic.
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.1
A Brief History of Some Buffer Overflow Attacks
1988 The Morris Internet Worm used a buffer overflow exploit in “fingerd” as one of its attack
mechanisms.
1995 A buffer overflow in N C S A httpd 1.3 is discovered and published on the Bugtraq
Mailing list by Thomas Lopatic.
1996 Aleph One publishes “Smashing the Stack for Fun and Profit” in Phrack magazine, giving
a step-by-step introduction to exploiting stack-based buffer overflow vulnerabilities.
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.1
A Brief History of Some Buffer Overflow Attacks
1988 The Morris Internet Worm used a buffer overflow exploit in “fingerd” as one of its attack
mechanisms.
1995 A buffer overflow in N C S A httpd 1.3 is discovered and published on the Bugtraq
Mailing list by Thomas Lopatic.
1996 Aleph One publishes “Smashing the Stack for Fun and Profit” in Phrack magazine, giving
a step-by-step introduction to exploiting stack-based buffer overflow vulnerabilities.
2001 The Code Red worm exploits a buffer overflow in Microsoft I I S
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.1
A Brief History of Some Buffer Overflow Attacks
1988 The Morris Internet Worm used a buffer overflow exploit in “fingerd” as one of its attack
mechanisms.
1995 A buffer overflow in N C S A httpd 1.3 is discovered and published on the Bugtraq
Mailing list by Thomas Lopatic.
1996 Aleph One publishes “Smashing the Stack for Fun and Profit” in Phrack magazine, giving
a step-by-step introduction to exploiting stack-based buffer overflow vulnerabilities.
2001 The Code Red worm exploits a buffer overflow in Microsoft I I S
2003 The Slammer worm exploits a buffer overflow in Microsoft S Q L Server 2000.
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.1
A Brief History of Some Buffer Overflow Attacks
1988 The Morris Internet Worm used a buffer overflow exploit in “fingerd” as one of its attack
mechanisms.
1995 A buffer overflow in N C S A httpd 1.3 is discovered and published on the Bugtraq
Mailing list by Thomas Lopatic.
1996 Aleph One publishes “Smashing the Stack for Fun and Profit” in Phrack magazine, giving
a step-by-step introduction to exploiting stack-based buffer overflow vulnerabilities.
2001 The Code Red worm exploits a buffer overflow in Microsoft I I S
2003 The Slammer worm exploits a buffer overflow in Microsoft S Q L Server 2000.
2004 The Sasser worm exploits a buffer overflow in Microsoft Windows 2000/X P Local Security
Authority Subsystem Service (L S A S S).
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow
A buffer overflow, also known as a buffer overrun, is defined
in the N I S T Glossary of Key Information Security Terms
as follows:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow
• A very common attack mechanism
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow
• A very common attack mechanism
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow
• A very common attack mechanism
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow
• A very common attack mechanism
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Basics
• Programming error when a process attempts to store data
beyond the limits of a fixed-sized buffer
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Basics
• Programming error when a process attempts to store data
beyond the limits of a fixed-sized buffer
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Basics
• Programming error when a process attempts to store data
beyond the limits of a fixed-sized buffer
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Basics
• Consequences:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Basics
• Consequences:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Basics
• Consequences:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Basics
• Consequences:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.1
Basic Buffer Overflow Example
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.2
Basic Buffer Overflow Stack Values
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Attacks
• To exploit a buffer overflow an attacker needs:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Attacks
• To exploit a buffer overflow an attacker needs:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Attacks
• Identifying vulnerable programs can be done by:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Attacks
• Identifying vulnerable programs can be done by:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Attacks
• Identifying vulnerable programs can be done by:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Programming Language History
• At the machine level, data manipulated by machine
instructions and executed by the computer processor are
stored in either the processor’s registers or in memory
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Programming Language History
• At the machine level, data manipulated by machine
instructions and executed by the computer processor are
stored in either the processor’s registers or in memory
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Programming Language History
• Modern high-level languages have a strong notion of type
and valid operations
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Programming Language History
• Modern high-level languages have a strong notion of type
and valid operations
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Programming Language History
• C and related languages have high-level control
structures, but allow direct access to memory
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Programming Language History
• C and related languages have high-level control
structures, but allow direct access to memory
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Buffer Overflows
• Occur when buffer is located on stack
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Buffer Overflows
• Occur when buffer is located on stack
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Buffer Overflows
• Occur when buffer is located on stack
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Buffer Overflows
• Occur when buffer is located on stack
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Buffer Overflows
• Stack frame
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Buffer Overflows
• Stack frame
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.3
Example Stack Frame with Functions P and Q
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.4
Program Loading into Process Memory
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.5
Basic Stack Overflow Example
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.6
Basic Stack Overflow Stack Values
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.7a
Another Stack Overflow Example
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.7b
Another Stack Overflow Example
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.2
Some Common Unsafe C Standard Library Routines
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.2
Some Common Unsafe C Standard Library Routines
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.2
Some Common Unsafe C Standard Library Routines
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.2
Some Common Unsafe C Standard Library Routines
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.2
Some Common Unsafe C Standard Library Routines
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Shellcode
• Code supplied by attacker
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Shellcode
• Code supplied by attacker
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Shellcode
• Machine code
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Shellcode
• Machine code
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Shellcode
• Machine code
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Shellcode
• Metasploit Project
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.8
Example U N I X Shellcode
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.3
Some Common x86 Assembly Language Instructions
M O V s r c, dest copy (move) value from s r c into dest
L E A s r c, dest copy the address (load effective address) of s r c into dest
ADD / SUB s r c, dest add / sub value in s r c from dest leaving result in dest
AND / OR / XOR s r c, dest logical and / or / x o r value in s r c with dest leaving result in dest
C M P val1, val2 compare val1 and val2, setting C P U flags as a result
J M P / J Z / J N Z addr jump / if zero / if not zero to addr
PUSH s r c push the value in s r c onto the stack
POP dest pop the value on the top of the stack into dest
CALL addr call function at addr
LEAVE clean up stack frame before leaving function
RET return from function
I N T num software interrupt to access operating system function
NOP no operation or do nothing instruction
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Table 10.4
Some x86 Registers
32 bit 16 bit 8 bit (high) 8 bit (low) Use
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.9
Example Stack Overflow Attack
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Overflow Variants
• Targets:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Overflow Variants
• Targets:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Overflow Variants
• Targets:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Overflow Variants
• Shellcode functions:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Overflow Variants
• Shellcode functions:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Overflow Variants
• Shellcode functions:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Overflow Variants
• Shellcode functions:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Stack Overflow Variants
• Shellcode functions:
– Compile-time
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Buffer Overflow Defenses
• Two broad defense approaches
– Run-time
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Programming
Language
• Use a modern high-level language
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Programming
Language
• Use a modern high-level language
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Programming
Language
• Disadvantages
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Programming
Language
• Disadvantages
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Programming
Language
• Disadvantages
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Programming
Language
• Disadvantages
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Safe Coding
Techniques
• C designers placed much more emphasis on space
efficiency and performance considerations than on type
safety
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Safe Coding
Techniques
• Programmers need to inspect the code and rewrite any
unsafe coding
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Safe Coding
Techniques
• Programmers have audited the existing code base,
including the operating system, standard libraries, and
common utilities
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.10
Examples of Unsafe C Code
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Language
Extensions/Safe Libraries
• Handling dynamically allocated memory is more
problematic because the size information is not available
at compile time
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Language
Extensions/Safe Libraries
• Handling dynamically allocated memory is more
problematic because the size information is not available
at compile time
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Language
Extensions/Safe Libraries
• Handling dynamically allocated memory is more
problematic because the size information is not available
at compile time
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Language
Extensions/Safe Libraries
• Handling dynamically allocated memory is more
problematic because the size information is not available
at compile time
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Language
Extensions/Safe Libraries
• Concern with C is use of unsafe standard library routines
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Language
Extensions/Safe Libraries
• Concern with C is use of unsafe standard library routines
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Language
Extensions/Safe Libraries
• Concern with C is use of unsafe standard library routines
▪ Libsafe is an example
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Language
Extensions/Safe Libraries
• Concern with C is use of unsafe standard library routines
▪ Libsafe is an example
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Stack Protection
• Add function entry and exit code to check stack for signs
of corruption
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Stack Protection
• Random canary:
– Unpredictable value
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Stack Protection
• Random canary:
– Unpredictable value
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Stack Protection
• Stackshield and Return Address Defender (R A D):
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Stack Protection
• Stackshield and Return Address Defender (R A D):
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Stack Protection
• Stackshield and Return Address Defender (R A D):
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Compile-Time Defenses: Stack Protection
• Stackshield and Return Address Defender (R A D):
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Executable
Address Space Protection
• Make regions of memory non-executable:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Executable
Address Space Protection
• Make regions of memory non-executable:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Executable
Address Space Protection
• Make regions of memory non-executable:
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Executable
Address Space Protection
• Issues
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Executable
Address Space Protection
• Issues
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Address Space
Randomization
• Manipulate location of key data structures
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Address Space
Randomization
• Manipulate location of key data structures
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Address Space
Randomization
• Manipulate location of key data structures
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Address Space
Randomization
• Manipulate location of key data structures
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Address Space
Randomization
• Manipulate location of key data structures
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Guard Pages
• Place guard pages between critical regions of memory
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Guard Pages
• Place guard pages between critical regions of memory
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Run-Time Defenses: Guard Pages
• Place guard pages between critical regions of memory
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Replacement Stack Frame
• Variant that overwrites buffer and saved frame pointer
address
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Replacement Stack Frame
• Variant that overwrites buffer and saved frame pointer
address
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Replacement Stack Frame
• Variant that overwrites buffer and saved frame pointer
address
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Replacement Stack Frame
• Off-by-one attacks
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Replacement Stack Frame
• Defenses
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Replacement Stack Frame
• Defenses
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Replacement Stack Frame
• Defenses
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Return to System Call
• Stack overflow variant replaces return address with
standard library function
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Return to System Call
• Stack overflow variant replaces return address with
standard library function
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Return to System Call
• Stack overflow variant replaces return address with
standard library function
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Return to System Call
• Stack overflow variant replaces return address with
standard library function
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Return to System Call
• Stack overflow variant replaces return address with
standard library function
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Return to System Call
• Stack overflow variant replaces return address with
standard library function
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Heap Overflow
• Attack buffer located in heap
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Heap Overflow
• No return address
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Heap Overflow
• No return address
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Heap Overflow
• No return address
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Heap Overflow
• Defenses
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Heap Overflow
• Defenses
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.11 (1 of 2)
Example Heap Overflow Attack
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.11 (2 of 2)
Example Heap Overflow Attack
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Global Data Overflow
• Defenses
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Global Data Overflow
• Defenses
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Global Data Overflow
• Defenses
– Guard pages
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Global Data Overflow
• Can attack buffer located in global data
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Global Data Overflow
• Can attack buffer located in global data
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Global Data Overflow
• Can attack buffer located in global data
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Global Data Overflow
• Can attack buffer located in global data
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.12 (1 of 2)
Example Global Data Overflow Attack
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Figure 10.12 (2 of 2)
Example Global Data Overflow Attack
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Summary
• Stack overflows
– Shellcode
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Summary
• Defending against buffer overflows
– Compile-time defenses
– Run-time defenses
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Summary
• Other forms of overflow attacks
– Heap overflows
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved
Copyright
This work is protected by United States
copyright laws and is provided solely for
the use of instructors in teaching their
courses and assessing student learning.
Dissemination or sale of any part of this
work (including on the World Wide Web)
will destroy the integrity of the work and is
not permitted. The work and materials from
it should never be made available to
students except by instructors using the
accompanying text in their classes. All
recipients of this work are expected to
abide by these restrictions and to honor the
intended pedagogical purposes and the
needs of other instructors who rely on
these materials.
Copyright © 2024, 2018, 2015 Pearson Education, Inc. All Rights Reserved