This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2 | |
| # pylint: skip-file | |
| """ | |
| When performing a chunked transfer, realloc doesnt take into account the size of the headers allowing an overflow. | |
| As the initial heap (0x100) is located inline we can overwrite the current heap location. | |
| * overwrite __malloc_heap to point to our fake heap | |
| * our fake heap size is huge so that memory os returned near the GOT | |
| * overwrite memchr got with shellcode address | |
| * win |