Lab 3
Task 1:
1) Set up prefix
2) Generates 2 output.bin files with the same prefix
Question 1. If the length of your prefix file is not multiple of 64, what is going to
happen? (use hexdump to see)
Start with a prefix of length 57
We can see that there exists some, despite a few, differences between the two
binary files
Question 2. Create a prefix file with exactly 64 bytes, and run the collision tool
again, and see what happens.
Next, modify to add extra length to 64
The data are also different
Task 2: Understanding MD5’s Property
Their hashing values are the same.
Task 3: Generating Two Executable Files with
the Same MD5 Hash
1) Create a program containing 200 ‘A’
2) Locate “A” in the program
3) Split into 3 pieces: prefix, 200-block and suffix:
Verify 200-block file
4) Generate with md5collgen:
- Now both will have the same hash value after adding the suffix and prefix
Task 4: Making the Two Programs Behave
Differently
1) Making a benign and malicious program
2) Split the benign program into 3 parts
3) Generate collision based on the prefix
However, the generated output files have different array X, therefore we have to
add P block to array Y in the suffix, so that both new array X and array Y are the
same.
4) Add P block to Y array:
5) Concatenate the output file with suffix and check MAC
We can see that despite having different behaviors, both program has the same
hash value