- For C and C++ programs: * Does the program use functions like that do not check user input gets, strcpy, or sprintf? * If so, possible buffer overflow vulnerability! * Does the program use printf or snprintf without using a format specifier? * If so, possible format string vulnerability!
Binary exploitation is the process of identifying and taking advantage of vulnerabilities in compiled code. They can be used to read or corrupt memory, crash a program, or gain administrative access to a machine. In CTFs, the source code is usually written in C and the binaries, or executables, are in Linux ELF format.
Example of a buffer overflow vulnerability:
char buffer; gets(buffer); // what if 32 or more bytes are entered?
Example of a format string vulnerability:
printf(argv); // what happens if argv = "%p %p %p %p"?