Corrupted File
70 points Hard

Help! I can't open this file. Something to do with the file header… Whatever that is. https://mega.nz/#!aKwGFARR!rS60DdUh8-jHMac572TSsdsANClqEsl9PD2sGl-SyDk

Flag
Rating 4.57
5
4
3
2
1

Discussion

Check file - file unopenable.gif : File isn't recognized as GIF

Chck file header - xxd unopenable.gif | head : head - output the first part of files

} What's wrong: File starts with 39 61 Valid GIF should start with 47 49 46 38 39 61 ("GIF89a") Missing first 4 bytes: 47 49 46 38 ("GIF8")

Fix the header

Create fixed GIF by prepending missing bytes

echo -n "47494638" | xxd -r -p > fixed.gif cat unopenable.gif >> fixed.gif == [ header bytes ] + [ original file data ]

Verify the fix - file fixed.gif : Output: fixed.gif: GIF image data = to make sure it's a gif file

Open, decode, next challenge

0

Why even when I correct the header, the gif still doesn't open ?

2

not just file signature br

0

nice :)

0

fix the header and convert it.

0

Honestly gave me a new perspective to look at hex problems, w question

0

echo ZmxhZ3tnMWZfb3JfajFmfQ== | base64 --decode

-4

echo ZmxhZ3tnMWZfb3JfajFmfQ== | base64 --decode

-4
0

Pretty cool but this should be a medium one, or even easy.

1
Protected
0