|
| 1 | +# Decomphose - 325 points |
| 2 | + |
| 3 | +Image arithmetic is super neat until there's more than two images involved. |
| 4 | + |
| 5 | +file 1 |
| 6 | + |
| 7 | +file 2 |
| 8 | + |
| 9 | +file 3 |
| 10 | + |
| 11 | +file 4 |
| 12 | + |
| 13 | +### Solution |
| 14 | + |
| 15 | +To begin, I decompressed `file 1` and noticed that it contained images with seemingly random pixel noise: |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +Upon closer inspection, some pixels seem to be surrounded on all sides by black pixels: |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +The other three folders contained similar images. |
| 24 | + |
| 25 | +Perhaps if I could isolate those bordered pixels from each image and overlay them, I could find some clue. |
| 26 | + |
| 27 | +I opened the first photo in GIMP (a free, open-source photo editing application). |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +After a bit of mucking around trying to find a way to isolate those pixels, I figured out a method: |
| 32 | + |
| 33 | +#### 1. Set black pixels transparent |
| 34 | + |
| 35 | +Do `Layers > Transparency > Color to Alpha...` and set the color selection to `#000000`: |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +I obtained this: |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +#### 2. Fill noisy pixels |
| 44 | + |
| 45 | +Select the paint-bucket tool and set the threshold to `200` and the color to `#000000`. |
| 46 | + |
| 47 | +Then click on any of the noisy pixels and they will all turn black. (the paint bucket won't cross alpha borders) |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +#### 3. Remove noisy pixels |
| 52 | + |
| 53 | +Now we can simply repeat step 1 again to remove the noisy pixels. (There are a few artifacts but it won't matter) |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +#### Combine all the images |
| 58 | + |
| 59 | +In order to combine all the images, I simply opened the images as layers in GIMP and repeated the process above for each layer. |
| 60 | + |
| 61 | +*Note: a handy shortcut is CMD-F or CTRL-F to repeat the last filter (eg. Color to Alpha)* |
| 62 | + |
| 63 | +My final image looked like this: |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | +And zooming in on the flag, we obtain: |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | +`easyctf{wh4t_a_5weet_fFLag_2b04e1}` |
| 72 | + |
| 73 | +### External Writeups |
| 74 | + |
| 75 | +* \(none\) |
0 commit comments