picoCTF - Advanced Potion Making


Hey there, cyber wanderers👀! It's Hammaz, your guide through the digital maze of ones and zeros. Get ready for a cool journey into the mysteries of "Advanced Potion Making." Buckle up, we're diving into the enchanting world where tech and magic collide! 👽
This is what the challenge looks like


Write-up💤

  1. I started by checking out the file with a hex editor to see what was going on. After digging into the raw data, I spotted something familiar at the end: "IEND." Bingo, it's a PNG file! I figured I'd try adding .png to the file name, thinking it might reveal the flag. Well, turns out, it didn't work as expected. The flag stayed hidden, keeping me on the chase.😐
  2. I consulted the wisdom of "ChatGPT" to learn about the PNG file header format, which is typically represented by the hex values 89 50 4E 47 0D 0A 1A 0A. However, the file I was dealing with had a slightly different header: 89 50 42 11 0D 0A 1A 0A. 💀

  3. I took a straightforward approach and modified the file's binary digits to match the correct PNG header (89 50 4E 47 0D 0A 1A 0A). Saving the edited file with a .png extension, I eagerly opened it, anticipating the appearance of the coveted flag. However, to my dismay, the file remained visibly corrupted, and my pursuit for the flag hit another dead end.😾

  4. In my ongoing quest for a solution, I decided to compare the hex files of my corrupted file with that of a pristine PNG. A noticeable discrepancy emerged: while the genuine PNG displayed the sequence 00 00 0D at a certain point, my file exhibited the values 09 0A 0B. It became clear that these variations might hold the key to unraveling the persistent corruption in my file. 👲

  5. Our journey is progressing, and upon saving the file with the correct format, a PNG file emerged. However, there was a twist—a red screen dominated the image. The flag remained elusive, but I persisted. When I opened this peculiar PNG file in Paint, the display presented itself in a manner akin to the following description.☝

  6. Eager for a breakthrough, I considered the possibility of the flag hiding in the background. Taking a chance, I opted for the "Fill" option, flooding the entire image with white. Suddenly, success struck like a revelation—there it was, the flag, unveiled from its concealed realm. 💪
  7. In conclusion  I initially identified it as a PNG through a hex editor, only to encounter disappointment when the anticipated flag remained elusive. Seeking guidance from "ChatGPT," I discovered a header discrepancy, leading me to tweak the file's binary digits. Despite my efforts, the file persisted in its corrupted state. A closer examination, comparing hex values with a pristine PNG, hinted at a potential solution. Upon saving the corrected file, a red screen greeted me, further complicating the quest. However, a creative move in Paint, where I filled the image with white, finally revealed the concealed flag, marking the culmination of a persistent and multi-step exploration.
           












        

     









Comments

Popular Posts