What is a buffer overflow?

Introduction

Buffer overflow happens when more data is written to a buffer, then it is allocated to hold. This extra data is translated to memory direction numbers, which is executed by a computer. A buffer overflow could crash the application, and also could be exploited by an attacker to execute any command they want.

Types of Buffer Overflow

  • Stack Overflow
  • Heap Overflow

Prevention Mechanisms

  • Use higher level programming languages that are strongly typed and disallow direct memory access
  • Canary (stack cookie) is a data pattern that is written to the stack just before EIP register (EIP contains the address of the next instruction)
  • Address Space Layout Randomization (ASLR)
  • Data Execution Protection
  • Stack Canary/Cookie
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s