Challenge
This program is quite short, but has got printf
and gets
in it! This shouldn't be too hard, right?
Connect at nc shell.2019.nactf.com 31283
We are given the libc used, the binary, and the source code.
#include <stdio.h>
void vuln()
{
char buf[64];
fputs("Type something>", stdout);
gets(buf);
fputs("You typed: ", stdout);
printf(buf);
}
int main()
{
/* Disable buffering on stdout */
setvbuf(stdout, NULL, _IONBF, 0);
vuln();
return 0;
}