Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Hunting for buffer overflows

Name: Assmaster Deluxe 2012-06-03 18:33

Is there a way to use a debugger (immunity preferably but I'll take gdb or any other debugger you know how to do this with) so that any time a piece of memory holds a particular value (say AAAAAAAA) the debugger will make a note of what line it happened and then continue on until it fully crashes.

Not just a simple watch but anytime any register or memory in use by the program contains an A to make a notation of this.  It seems like a really good idea that would take some of the hard work out of exploit development but I have yet to see any straightforward talk of this.

Name: Anonymous 2012-06-03 22:57

>>5
it would be slow, but probably not much slower than valgrind, which is able to detect writes to memory not reserved with a call to malloc, for example.

>>6
I think I would try to use asserts to catch what you are looking for. Or add an equality check to this memory address, and log operations on it. If the value is being changed due to a memory error, it might not be entirely meaningful to know what is setting that value to AAA. The actual error that was responsible might have already happened, and you'd have to continue to back track. Reverse code execution sounds like it could be helpful here, but even then the error might be really far back.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List