12.07.2015 Views

Bug Hunter Diary

Bug Hunter Diary

Bug Hunter Diary

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.3 Memory ErrorsThe vulnerabilities described in this book have one thing in common:They all lead to exploitable memory errors. Such memory errors occurwhen a process, a thread, or the kernel is• Using memory it does not own (e.g., NULL pointer dereferences,as described in Section A.2)• Using more memory than has been allocated (e.g., buffer overflows,as described in Section A.1)• Using uninitialized memory (e.g., uninitialized variables) 2• Using faulty heap-memory management (e.g., double frees) 3Memory errors typically happen when powerful C/C++ featureslike explicit memory management or pointer arithmetic are usedincorrectly.A subcategory of memory errors, called memory corruption, happenswhen a process, a thread, or the kernel modifies a memory locationthat it doesn’t own or when the modification corrupts the state of thememory location.If you’re not familiar with such memory errors, I suggest you havea look at Sections A.1, A.2, and A.3. These sections describe the basicsof the programming errors and vulnerabilities discussed in this book.In addition to exploitable memory errors, dozens of other vulnerabilityclasses exist. These include logical errors and web-specificvulnerabilities like cross-site scripting, cross-site request forgery, andSQL injection, to name just a few. However, these other vulnerabilityclasses are not the subject of this book. All the bugs discussed in thisbook were the result of exploitable memory errors.1.4 Tools of the TradeWhen searching for bugs, or building exploits to test them, I need away to see inside the workings of applications. I most often use debuggersand disassemblers to gain that inside view.DebuggersA debugger normally provides methods to attach to user space processesor the kernel, write and read values to and from registers andmemory, and to control program flow using features such as breakpointsor single-stepping. Each operating system typically ships with itsown debugger, but several third-party debuggers are available as well.Table 1-1 lists the different operating system platforms and the debuggersused in this book.6 Chapter 1

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

Saved successfully!

Ooh no, something went wrong!