About
- This level should be done in less than 10 bytes of input.
- "Exploiting format string vulnerabilities"
#include <unistd.h%gt;
#include <stdio.h%gt;
#include <string.h%gt;
void vuln(char *string)
{
volatile int target;
char buffer[64];
target = 0;
sprintf(buffer, string);
if(target == 0xdeadbeef) {
printf("you have hit the target correctly :)\n");
}
}
int main(int argc, char **argv)
{
vuln(argv[1]);
}
you have hit the target correctly :)