02.03.2018 Views

Sybex CEH Certified Ethical Hacker Version 8 Study Guide

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Understanding DoS 267<br />

Buffer Overflow<br />

Buffer overflow is a DoS technique that takes advantage of a flaw in a program’s coding<br />

by inputting more data than the program’s buffer, or memory space, has room for. Once<br />

the buffer of a program is an overflow state, all further input that is written to the buffer<br />

can have negative consequences, such as crashes, security issues, or other problems. As<br />

with many DoS attacks, the intent is to place the program or system in an unpredictable or<br />

unexpected state. This ties in with buffer overflow in that once a program is in an unexpected<br />

state, the potential for a DoS condition is extremely high.<br />

Some C functions do not perform bounds checking, which means they are<br />

prime candidates for allowing a buffer overflow to occur. Be on the lookout<br />

for gets(), scanf(), strcpy(), and strcat() functions. Any of these in<br />

the code should make you suspect a buffer overflow.<br />

The Heap and Stack<br />

The stack and the heap are two areas of memory a program uses for storage:<br />

Heap The heap is a dynamic storage location that does not have sequential constraints or<br />

an organizational scheme. It is considered the larger pool of free storage for programs to<br />

use as needed. Once the dynamic memory space is no longer needed and the program has<br />

retrieved the needed data, the occupied space in the heap is freed up for future use.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!