CSC-405 Computer Security

Assignment 2 - Shellcode writing

Assignment 2 is due 3/30/18 on or before 11:59:59pm EDT.


Your goal is to develop four attack vectors in the form of x86 Linux shellcode using the full range of your hacking skills.

  1. This shellcode must print out your Unity ID username
  2. This shellcode must print out your Unity ID username but it should not have your username in cleartext in the payload. So if your username is akaprav there should be no sequence of \x61\x6b\x61\x70\x72\x61\x76 in the payload.
  3. This shellcode must execute the program ls
  4. This shellcode must execute the program ls, but it should not have any zero bytes in it.
  5. (BONUS) This shellcode must contact a remote server and do a GET HTTP request. The response is going to be a plaintext bash command with no arguments which your shellcode is going to execute and exit. The URL we are going to use for this is


You will need to sharpen your Linux hacking toolbelt. You will probably need to become familiar with the following tools to understand the binaries that you want to break:

If you don’t have a Linux machine available you can quickly get one up and running via VCL.


You will be awarded 25 points for each working shellcode and 10 points for the bonus shellcode. Notice that your shellcode has to be as minimalistic as possible. If you submit a 3MB shellcode that is working you are not going to receive all the points.

Submission Instructions

You will need to submit all source code written for this assignment, and a README file in the form of a tar.gz archive. Your README file must contain your name, Unity ID, and a description of the basic logic behind every shellcode. The description is important and will affect how we grade your assignment. Additionally, your escaped shellcode in the form \xbb\x2a[..] needs to be in files named shellcode1-shellcode5 in the root directory of your archive. The submission server will be announced on Piazza.