Question: Finding Crashes Setup Details - Provided source code files are intended to be compiled under Linux (tested under Ubuntu 20.04 LTS ). (Not sure if
Finding Crashes
Setup Details - Provided source code files are intended to be compiled under Linux (tested under Ubuntu 20.04 LTS). (Not sure if this requirement really matters; I am using VS Code on windows)
The goal is to do find 'bug' - find vulnerabilities that can lead to crashes, reason about the input that will trigger the vulnerabilities found and crash the program. Provide the input.
Also is it possible to hijack the control flow, make the program print out "Great job" to stdout, and exit with an exit code 0?
Following is the main.c code -
#include
#include
int win()
{
printf("Great Job ");
exit(0);
}
int main()
{
char buffer[40];
unsigned long long target;
scanf("%s", buffer);
printf("You sent: %s ", buffer);
exit(1);
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
