Join us at IRC!
Things are more like they are now than they have ever been before. - Dwight D. Eisenhower
Wednesday, May 23, 2012
Navigation
Members Online
Total Online: 35
Web Spiders: 17
Guests Online: 31
Members Online: 4

Registered Members: 70169
Newest Member: fadzlin
Latest Articles
View Thread

HellBound Hackers | Computer General | Hacking in general

Author

Buffer Overflow and Null Bytes

Adetque
Member

Posts: 3
Location:
Joined: 21.04.10
Rank:
Active User
Posted on 28-06-10 18:05
This is probably a really dumb question, but I've searched for a while and couldn't find anything.

Anyway, if I'm trying to exploit a buffer overflow to change the return address of a function, but the address has a null byte in it, how would I get around that?
Author

RE: Buffer Overflow and Null Bytes

wolfmankurd
Member



Posts: 1519
Location: UK
Joined: 30.05.05
Rank:
God
Posted on 29-06-10 13:22
Don't think it's stupid, idk the answer. But then I'm no expert.
Is there no way you could use a different return address like a non direct route? where is the null byte?

It's the only solution I can foresee.


BY READING MY POST, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE USE OF THIS (MIS)INFORMATION.


Widowmakr@hotmail.com http://LetsHackStuff.com
Author

RE: Buffer Overflow and Null Bytes

Adetque
Member

Posts: 3
Location:
Joined: 21.04.10
Rank:
Active User
Posted on 29-06-10 15:10
I'm trying to change the return address to 004013ef
Author

RE: Buffer Overflow and Null Bytes

stdio
Member

Posts: 375
Location: omnipresent
Joined: 06.04.08
Rank:
God
Posted on 30-06-10 10:12
you can try a partial overwrite

ie overwrite eip with \xef\x13\x40 #Little endian

But it also depends on the structure of the overflow, how much room you have and if you are able to get there. Keep in mind that with partial overwrites thats the end of your code, all needs to be done before that... no room after.



I'm sorry, I cant hear you over the sound of how awesome I am!


Edited by stdio on 30-06-10 10:17
www.thewebsiteisdown.com
Author

RE: Buffer Overflow and Null Bytes

Adetque
Member

Posts: 3
Location:
Joined: 21.04.10
Rank:
Active User
Posted on 30-06-10 16:04
And the partial overwrite worked. It turns out I was actually writing the return address into EBP instead of where I should as well as messing up the return address. Thanks.
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.