CSE 350/450: Cyber Defense and Offense

Homework1 Shellcode (due Sept 15th):

Description: Create shellcode that prints your last name.

 

name.c:

char shellcode[] = "put your shellcode here"; 

void shell() {  

  int *ret;   

  ret = (int *)&ret + 2;  

  (*ret) = (int)shellcode;

} 

int main() {    

  shell();   

  return 0;

}

 

gcc -g -z execstack -o name name.c

./name

cao

 

Note: Homework is collected at the beginning of class on the due date.
Please submit your homework to cse350450@gmail.com