Setting up for the Lab
- We will need some tools, so let's install those first.
- Boot your image and log in as bob.
- Perform the following
-
sudo apt update
-
sudo apt install git
-
sudo apt install bless
- Set up to work
- Create a directory where we will work
- Make sure you are in your home directory
- create a working directory : md5collision
-
mkdir md5collision
-
cd md5collision
- Download and compile md5collgen
- zhijieshi maintains a easy to compile version
- Download this with
git clone https://github.com/zhijieshi/md5collgen.git
- This will create a directory called
md5collgen
- Change to that directory
cd md5collgen
- The code uses some features from c++17 and beyond, but we can adjust to this.
- Download this main.cpp file into the md5collgen directory.
- use
wget https://mirkwood.cs.edinboro.edu/~bennett/class/cmac2000/labs/md5coll/main.cpp
- If you are working on a computer with a newer compiler, you can skip this step.
- compile this by typing
make
- Test md5collgen
- Move up one directory
cd ..
- Create a file called header, put some text into it.
-
md5collgen/md5collgen -p header -o out1 out2
-
md5sum out1
-
md5sum out2
-
diff out1 out2
- Edit the files with bless, the hex editor
-
bless out1
- start a second window, change to this directory
-
cd md5collision
-
bless out2
- Compare the different blocks.
- Bless
- supports multiple tables, but seems to crash sometimes when using multiple tabs. I just use one instance of bless.
- Spend a little time to explore bless, we will be using it throughout the labl.