[Assignment-6] setup task 8 (return-to-libc)
This commit is contained in:
parent
185ca930bc
commit
d3b2ded31a
3 changed files with 23 additions and 0 deletions
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
BIN
Assignment 6 - Software Security - Teil 2/ret2libc/ret2libc
Executable file
BIN
Assignment 6 - Software Security - Teil 2/ret2libc/ret2libc
Executable file
Binary file not shown.
|
@ -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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue