f-viktor@github.io%

Task - 3: heap.c

Before going trying the tasks, please read this, it will help a lot.

Sidenote: The tasks are all compiled with emscripten, which takes input in a popup window before the task starts. After sending in your input, it will pop up again until you press cancel. To use it correctly, you’ll need to enter your input in the first popup, and cancel the second one.

Your task is to get the Wow, you're cool! welcome message. This task is somewhat more complicated than the previous two.

Open Task - 3 heap.c

Hint 1 Function pointers in web assembly are indexes to a table, the first function is indexed 1, the second 2 etc...
Hint 2 Read up on the unlink exploit.
Hint 3 Create a dummy free heap object in the memory allocated for the `two` variable, use it to overwrite the function pointer on the stack upon free().