In this write-up , i will show you how did i solve Blast from the past challenge from picoCTF 2024.
Challenge Description:
The judge for these pictures is a real fan of antiques. Can you age this photo to the specifications?Set the timestamps on this picture to
1970:01:01 00:00:00.001+00:00
with as much precision as possible for each timestamp. In this example,+00:00
is a timezone adjustment. Any timezone is acceptable as long as the time is equivalent. As an example, this timestamp is acceptable as well:1969:12:31 19:00:00.001-05:00
. For timestamps without a timezone adjustment, put them in GMT time (+00:00). The checker program provides the timestamp needed for each.Use this picture.
so after i downloaded the the given picture i used exiftool and i have noticed there is some timestamps
so yeah let’s change all dates to 1970:01:01 00:00:00.001+00:00 with exiftool
exiftool -AllDates='1970:01:01 00:00:00.001' -CreateDate='1970:01:01 00:00:00.001' -DateTimeOriginal='1970:01:01 00:00:00.001' -ModifyDate='1970:01:01 00:00:00.001' -SubSecCreateDate='1970:01:01 00:00:00.001' -SubSecDateTimeOriginal='1970:01:01 00:00:00.001' -SubSecModifyDate='1970:01:01 00:00:00.001' original.jpg
this command will change all the dates to what we want let’s try to upload it
nc -w 2 mimas.picoctf.net 55107 < original.jpg
nc mimas.picoctf.net 59807
so the challenge have started , after some search i found that the Time Stamp that we got in the exif tool is the Samsung:TimeStamp so now let’s edit with exiftool….we can’t.
so after some search again i used strings original.jpg and i have found this
i have found it so now what is this number ? 1700513181420
it’s this date 2023:11:20 15:46:21.420–05:00 but in milisec unix timestamp
so it’s easy now we will convert 1970:01:01 00:00:00.001+00:00 to unix timestamp and replace it
so i used website called Unix Time Stamp — Epoch Converter
i put the date i want then clicked convert and this was the output
0 yeah it’s 0 so now we want to replace the 0 with our old date so i used hexeditor i opened it then CTRL + W then chose search for text string
then search for UTC to quickly go to the data we want to edit
so let’s replace the numbers that after Data to replace it let’s begin after 74 61 from 31 so to write 0 in hex we write 30 and if we want to delete a value we put 00
CTRL + X to exit and save
now there is a problem
it’s all 00000000 ? so after some search i have figuered that we need to put it in milisecs not in seconds so it will be 00001 and this one for the 00:00:00.001 so let’s edit the hex again so we will start after the 74 61 and let’s write 30 30 30 30 31
let’s save and send it to the server
Following these steps should help you successfully complete the challenge.