Home page logo

basics logo Security Basics mailing list archives

Buffer Overflow Return Addresses
From: <luck___ () hotmail com>
Date: 29 Mar 2004 17:37:20 -0000

Hi hope someone could help me with a question I have. Why do many buffer overflow sploits use the %esp before the 
program has run as the return address? If im not wrong then the idea is to return into the buffer (preferable near the 
start) but the %esp before the program is run becomes %ebp during program execution and this is after the buffer in the 
stack? Would it not be better to return to (%esp before) - (length of buffer) which should place you at the start of 
the buffer assuming buffer is the first local variable to be declared (stack grows to lower addresses) This is really 
confusing me after i thought id got my head round it. 


S Walker

Ethical Hacking at the InfoSec Institute. Mention this ad and get $545 off 
any course! All of our class sizes are guaranteed to be 10 students or less 
to facilitate one-on-one interaction with one of our expert instructors. 
Attend a course taught by an expert instructor with years of in-the-field 
pen testing experience in our state of the art hacking lab. Master the skills 
of an Ethical Hacker to better assess the security of your organization. 
Visit us at: 

  By Date           By Thread  

Current thread:
  • Buffer Overflow Return Addresses luck___ (Mar 30)
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]