Homework 2 Inspecting Running Processes#
The Challenge!#
In the last homework you looked at the symbol table of your own compiled program. This time we'll be watching and interacting with precompiled programs as they execute.
Before you start, please make sure to set up your environment correctly. You have two options for this homework:
- Use
systems[1-4].cs.uic.edu
(e.g. systems1, systems2, etc.), or - Use the
.devcontainer
folder that is included with the skeleton code to set up your Docker container environment. Before opening your workspace in the container, you need to modify both Dockerfile
and devcontainer.json
files and replace the netid
with your UIC NetID (ARG USERNAME=netId
and "remoteUser": "netId"
). After opening the workspace in the container, please install ltrace
and strace
using sudo apt update && sudo apt install ltrace strace -y
.
In either case, when you run whoami
command in the terminal, it should return your UIC NetID. Please note that if the result is different than your NetID, your secrets will not be accepted by the autograder.
The skeleton code for this assignment is available through this GitHub Classroom assignment. You must use GitHub classroom to write your code and keep a commit log on GitHub. You can submit the code via Gradescope.Your task will be to fill out two files in your personal repository called secrets.txt
and howto.txt
.
The format for secrets.txt
should be:
howto.txt
is also required: you must describe in English how to find the secret for that given executable. Each individual howto should be on one more more lines after a line with only the executable number and a period on it, like so:
Your howto.txt
should enable any other CS 361 student to find the password within a minute of reading it.
In the last homework you looked at the symbol table of your own compiled program. This time we'll be watching and interacting with precompiled programs as they execute.
Before you start, please make sure to set up your environment correctly. You have two options for this homework:
- Use
systems[1-4].cs.uic.edu
(e.g. systems1, systems2, etc.), or - Use the
.devcontainer
folder that is included with the skeleton code to set up your Docker container environment. Before opening your workspace in the container, you need to modify bothDockerfile
anddevcontainer.json
files and replace thenetid
with your UIC NetID (ARG USERNAME=netId
and"remoteUser": "netId"
). After opening the workspace in the container, please installltrace
andstrace
usingsudo apt update && sudo apt install ltrace strace -y
.
In either case, when you run whoami
command in the terminal, it should return your UIC NetID. Please note that if the result is different than your NetID, your secrets will not be accepted by the autograder.
Your task will be to fill out two files in your personal repository called secrets.txt
and howto.txt
.
The format for secrets.txt
should be:
howto.txt
is also required: you must describe in English how to find the secret for that given executable. Each individual howto should be on one more more lines after a line with only the executable number and a period on it, like so:
Your howto.txt
should enable any other CS 361 student to find the password within a minute of reading it.
Warning#
You must complete this assignment on systems[1-4].cs.uic.edu
or the specified Docker container. Failure to do so will result in a zero.
You will not be given any other files to complete secret findings except the 5 executable files.
You must complete this assignment on systems[1-4].cs.uic.edu
or the specified Docker container. Failure to do so will result in a zero.
You will not be given any other files to complete secret findings except the 5 executable files.
#
Hints:Open your howto.txt
alongside your shell as you work on each executable file, and use it to take notes. If you don't give a full description of how to arrive at the answer, you may not receive points.
The content of lab section will cover basic usage of gdb
, strace
and ltrace
which will be incredibly helpful for this assignment.
./4
is the "final boss" of this assignment (and is thus worth more points). It tests the implementation of a dynamically linked library, so it will leverage all of your skills that you've developed while studying chapter 7.
Open your howto.txt
alongside your shell as you work on each executable file, and use it to take notes. If you don't give a full description of how to arrive at the answer, you may not receive points.
The content of lab section will cover basic usage of gdb
, strace
and ltrace
which will be incredibly helpful for this assignment.
./4
is the "final boss" of this assignment (and is thus worth more points). It tests the implementation of a dynamically linked library, so it will leverage all of your skills that you've developed while studying chapter 7.
Template#
The executable files are available in the classroom repository and can be accessed using the link above.
The executable files are available in the classroom repository and can be accessed using the link above.