NahamCon2021 CTF - Esab64 - Writeup

Introduction

Today we're doing a CTF writeup for the esab64 challenge from the NahamCon2021 CTF. esab64 is a cryptography challenge and after we started the challenge we downloaded the associated file and read it: 


cat esab64


With a filename that includes the number 64 in it, we would suspect that it's base64 encoded, but just to make sure, we'll check the number of characters in the string. If it's a multiple of 4, then we can try using base64 decode on it:

wc esab64


52 is a multiple of 4, so let's try the base64 decode:

base64 -d esab64


That's not an answer, but looking closer at the filename, esab is the word base reversed. So let's rev the file, and pipe it into base64 decode:

rev esab64 | base64 -d


We're definitely on the right track, because we see galf, the reverse of flag, in the output. Now let's do the same thing as before, but pipe an extra rev at the end:

rev esab64 | base64 -d | rev


Summary

The file we downloaded contained a string that we suspected was base64 encoded, based on context clues. When reversed, then base64 decoded, then reversed again, the flag string was revealed to us.

Finish












Comments

Popular posts from this blog

TryHackMe - Windows PrivEsc - Walkthrough

TryHackMe - Reversing Elf - Walkthrough

TryHackMe - Web Enumeration - Walkthrough