Skip to main content

Posts

Showing posts from August, 2019

Format String Vulnerability 3 - Writing arbitrary data in memory

This is more like a continuation of the series on Format String Exploitation. There are multiple ways to exploit a format string. Here I will show you a method where the exploit might not look very optimized. We are going to cover this topic in later posts.  The main purpose of this post is to demonstrate how to write data at any given address in a memory  in a more controlled fashion at some specified address by exploiting the format string exploit.  We will try to perform the attack in 2 ways Easy case : when we want to write value 0x99887766 Slightly twisted case : we will write value 0x22112211 We will see in details why there they are easy or twisted in details below. Let us look into the 1st Program In this example our target is to rewrite the value of the variable modify with out desired data. Things I have done for compilation, Compiled the binary with -m32 as I am showing example with 32bit version Turned ASLR Off We start testing by lo