• caglararli@hotmail.com
  • 05386281520

Questions on GLIBC Heap Exploitation (House of Force)

Çağlar Arlı      -    11 Views

Questions on GLIBC Heap Exploitation (House of Force)

This is with reference to Max Kamper's video on GLIBC heap exploitation and these articles I read

I have a few questions about the video and articles.

  • Why is the formula for calculating the wrap around address the following?
def diff(x, y):
    return (0xffffffffffffffff - x) + y

Why use 0xffffffffffffffff to minus x and then plus y? How does this give us the difference in the distance? Why use 0xffffffffffffffff?

  • When using __malloc_hook to execute the system function, how does the binary knows where is the argument for the function call? The pointer to the argument is located at malloc((heap + 0x30) "") but how does the function knows that its there and why heap + 0x30?