Format String - archie-archana/securecodinglab GitHub Wiki

Task 1: Crashing the Program

image

image

Task 2: Printing Out the Server Program’s Memory

image

image

Task 2.A: Stack Data

image

image

Task 2.B: Heap Data

image

image

Task 3: Modifying the Server Program’s Memory Task 3.A: Change the value to a different value. From the server printout, we get the address of the target variable as 0x080e5086. Similar to the previous task we place this address in the intial position of the stack. Then instead of printing the value of the current position of the va_list pointer, we reaplace the %s with %n, so that the number of characters printed so far by the printf statement would be updated. Changing the value to a different value.

image

image