Chapter 6 - Exploit Development
Last updated
Was this helpful?
Last updated
Was this helpful?
Security risks at the application level are among the most significant, pervasive categories of security problems impacting organizations today. But traditional IT security focuses on network and perimeter-based protection, not on the application code itself.And while most development teams test their applications for functionality, performance, and integration, the lack of security testing early in the development process can have serious consequences. Failure to address security throughout the application lifecycle can result in embarrassment—or catastrophic damages like the loss of intellectual property, money, or data.
— Buffer Overflow Attacks: Detect, Exploit, Prevent, page 403
Registers
Instructions
Check ASLR/DEP
Disable/Enable ASLR/DEP
See what shared libs a program uses
Find hex addresses of functions/libs within a program
Integer-based
Stack-based
Overflow input to overwrite EIP with return address that leads to payload
SEH-based
Overflow input to overwrite SEH -> next SEH -> Pop pop ret
Heap-based
Overflow input to overwrite heap with dummy data, 2nd chunk overwrite forward link with destination and backwards link with value
Double-free
Memory freed twice. corrupts heap memory manager.
1) chunk must be isolated ( no freed adjacent chunks )
2) destination free list bin must be empty
Forward/Backward pointers both point to base of heap, and the heap points back to the node (self referential) infinite loop. (unlink fails)
deprecated but still works with some creativity
If heap falls into this state you may be able to use after free or another buffer overflow.
Memory Corruption
Using memory corruption to leak sensitive data Fuzz the inputs and observe all possible changes in the program Note any oddities and changes (Especially a dump of bytes! ;))
Return to libc
Bitflip
SIGRETURN Oriented Programming
Jump Oriented Programming
Return Oriented Programming
EggHunting
The art of searching memory
Stack Canaries/Cookies
NX/DEP
ASLR
Resources
Resources
Resources
Resources