format
Performing arbitrary writes using format strings.
Binary Static Analysis
#include <stdio.h>
int auth = 0;
int main() {
char password[100];
puts("Password: ");
fflush(stdout);
fgets(password, sizeof password, stdin);
printf(password);
printf("Auth is %i\n", auth);
if(auth == 10) {
system("cat flag.txt");
}
}Arbitrary Writes
Getting the Necessary Information
Exploiting the Binary
Last updated