[Assignment-6] setup task 8 (return-to-libc)

This commit is contained in:
Sascha Tommasone 2024-06-14 15:57:52 +02:00
parent 185ca930bc
commit d3b2ded31a
Signed by: saschato
GPG key ID: 751068A86FCAA217
3 changed files with 23 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

View file

@ -0,0 +1,23 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int vuln(char* input) {
char buff[100];
strcpy(buff, input);
return 0;
}
int main(int argc, char *argv[])
{
if(argc < 2)
{
printf("Syntax: %s <input string>\n", argv[0]);
exit (0);
}
vuln(argv[1]);
return 0;
}