@@ -10,13 +10,13 @@ Then we had an idea to find out if the mask was messed up or not. Because we kno
10
10
11
11
Here is "easyctf" encrypted:
12
12
13
- ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/blob/ master/forensics/QR2/first3chars.fw.png )
13
+ ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/master/forensics/QR2/first3chars.fw.png )
14
14
15
15
Which we xored with the original broken QR (scaled down):
16
16
17
17
Original broken QR:
18
18
19
- ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/blob/ master/forensics/QR2/small.png )
19
+ ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/master/forensics/QR2/small.png )
20
20
21
21
Here is the script I used:
22
22
@@ -44,19 +44,19 @@ new.save("test.png")
44
44
45
45
Then here is the result (with a bit of edit to make the real mask more visible):
46
46
47
- ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/blob/ master/forensics/QR2/actualmask.PNG )
47
+ ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/master/forensics/QR2/actualmask.PNG )
48
48
49
49
We can see that this mask is mask #6 , except moved up one pixel! So we manually construct the same mask, offset by one pixel as well:
50
50
51
- ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/blob/ master/forensics/QR2/sicemask.png )
51
+ ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/master/forensics/QR2/sicemask.png )
52
52
53
53
Then we xored this mask with the original messed up QR code to undo the off by one mask.
54
54
55
- ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/blob/ master/forensics/QR2/xor1.PNG )
55
+ ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/master/forensics/QR2/xor1.PNG )
56
56
57
57
Afterwards, we apply the correct mask #6 :
58
58
59
- ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/blob/ master/forensics/QR2/xor2.PNG )
59
+ ![ ] ( https://raw.githubusercontent.com/VoidMercy/EasyCTF-Writeups-2017/master/forensics/QR2/xor2.PNG )
60
60
61
61
Then, the QR is able to be decoded by any QR code reader!
62
62
0 commit comments