Reversing challenge

I came across a reverse engineering challenge ;

when i tried to run the comand file i got this :
$ file cast.bin
cast.bin: ELF 64-bit MSB unknown arch 0x3e00 (SYSV)

lets run readelf;
$ readelf -h cast.bin
ELF Header:
Magic: 7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2’s complement, big endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: : 300
Machine: : 0x3e00
Version: 0x1000000
Entry point address: 0xc9c4010000000000
Start of program headers: 4611686018427387904 (bytes into file)
Start of section headers: -3417382194685935616 (bytes into file)
Flags: 0x0
Size of this header: 16384 (bytes)
Size of program headers: 14336 (bytes)
Number of program headers: 3328
Size of section headers: 16384 (bytes)
Number of section headers: 9728
Section header string table index: 9472
readelf: Warning: The e_shentsize field in the ELF header is larger than the size of an ELF section header
readelf: Error: Reading 159383552 bytes extends past end of file for section headers
readelf: Warning: The e_phentsize field in the ELF header is larger than the size of an ELF program header
readelf: Error: Reading 47710208 bytes extends past end of file for program headers

i edited the 5 bit and rerun the command ;
$ file cast.bin
cast.bin: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped

when i run objdump and readelf i get this :
$ objdump -d cast.bin
BFD: warning: cast.bin has a corrupt string table index
$ readelf -h cast.bin
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2’s complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Position-Independent Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1c4c9
Start of program headers: 64 (bytes into file)
Start of section headers: 365520 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 13
Size of section headers: 64 (bytes)
Number of section headers: 38
Section header string table index: 37
readelf: Error: no .dynamic section in the dynamic segment

any ressources or solution that can help
this is the link for the unpatched binary :

Hello that looks sick, wish you the best in your career!!! :heart:

1 Like

Do you have a TG account?