Generating Shellcode

Worth 75 points

Description

Create shellcode that prints your username.

If you went through the lab by copying and pasting without understanding this will likely be difficult. If you followed the lab closely you will have a much easier time.

# on vicious machine, outside the student container
# please note, you do not need to run `bash student_environment.bash` for this project
git clone https://github.com/cs354/CS-354.git
cd /mnt/projects

Replace the shellcode in name.h with shellcode that will print your NetID. Your code should compile and run in the student container and should print your own NetID regardless of what user runs it (i.e. not the same behavior as whoami).

Example:

# this project has the same problem as project reverse engineering part2, please run the fix program before testing after the `make` command
$ /fix_part2 ./name
$ ./name
abc123

Tools to use

Tips