[Reverse] 3DS - Scared Flag


Scared Flag - 479 Points

ヽ(゚Д゚)ノ

After unzipping the file we can see that we have a .hex which according to Wikipedia:

Intel HEX is a file format that conveys binary information in ASCII text form. It is commonly used for programming microcontrollers, EPROMs, and other types of programmable logic devices. In a typical application, a compiler or assembler converts a program’s source code (such as in C or assembly language) to machine code and outputs it into a HEX file.

So after finding out what the hell was this I searched in the web a way to convert this into a binary format or assembly, and I found a post in stack overflow recommending to use this

After downloading, I made the conversion:

1
2
3
4
5
6
7
8
9
10
11
12
13
$ ./hex2bin -b ../ea137e7356e566945e51bbece00a22ad.hex 
hex2bin v2.5, Copyright (C) 2017 Jacques Pelletier & contributors

Allocate_Memory_and_Rewind:
Lowest address: 00000000
Highest address: 00000BC5
Starting address: 00000000
Max Length: 3014

Binary file start = 00000000
Records start = 00000000
Highest address = 00000BC5
Pad Byte = FF

The program outputs a ea137e7356e566945e51bbece00a22ad.bin, I used radare2 to reverse it, after checking the code I saw the initials of the flag in this routine at fcn.000005de (You need to scroll down a little in radare2 the function is quite big).

The flag was 3DS{youareabully}