BlueBird

Category: Misc - Points: 310 - Solves: 14

Description:

Your text

Solution:

Un objet imprimé en 3D nous a été remis au début du CTF.

Your text

Sur cet objet, on peut y voir #54CE91, petite recherche sur Internet pour voir à quoi cela fait allusion. On tombe sur une couleur, mais cela ne nous aide pas beaucoup. Après réflexion, le titre du Challenge nous donne un indice sur Twitter. Allons voir ce que ce hashtag cache sur Twitter.

Your text

Les tweets sont numérotés, nous pouvons donc en faire un texte :

48 b8 aa aa af be ef b4 fb a7 50 48 b8 97 98 a1 94 85 89 b2 eb 50 4d 31 c9 46 8a 04 0c 45 84 c0 74 2a 49 ff c1 41 80 f0 da 44 88 44 24 ff 48 31 c0 48 83 c0 01 48 31 ff 48 83 c7 01 48 8d 74 24 ff 48 31 d2 48 83 c2 01 0f 05 eb cd 48 31 c0 48 83 c0 3c 48 31 ff 0f 05

Maintenant, il nous faut comprendre à quoi cela fait référence. Avec l'aide de ChatGPT, celui-çi nous indique un shellcode via certains patterns comme le 0f 05 qui signifie un syscall Allons sur https://defuse.ca/online-x86-assembler.htm

Your text

Via un petit script, nous allons recréer un binaire de ce shellcode.

#include <stdio.h> #include <string.h> #include <sys/mman.h> #include <unistd.h> int main() { unsigned char shellcode[] = { 0x48, 0xb8, 0xaa, 0xaa, 0xaf, 0xbe, 0xef, 0xb4, 0xfb, 0xa7, 0x50, 0x48, 0xb8, 0x97, 0x98, 0xa1, 0x94, 0x85, 0x89, 0xb2, 0xeb, 0x50, 0x4d, 0x31, 0xc9, 0x46, 0x8a, 0x04, 0x0c, 0x45, 0x84, 0xc0, 0x74, 0x2a, 0x49, 0xff, 0xc1, 0x41, 0x80, 0xf0, 0xda, 0x44, 0x88, 0x44, 0x24, 0xff, 0x48, 0x31, 0xc0, 0x48, 0x83, 0xc0, 0x01, 0x48, 0x31, 0xff, 0x48, 0x83, 0xc7, 0x01, 0x48, 0x8d, 0x74, 0x24, 0xff, 0x48, 0x31, 0xd2, 0x48, 0x83, 0xc2, 0x01, 0x0f, 0x05, 0xeb, 0xcd, 0x48, 0x31, 0xc0, 0x48, 0x83, 0xc0, 0x3c, 0x48, 0x31, 0xff, 0x0f, 0x05 }; void *mem = mmap(NULL, sizeof(shellcode), PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_PRIVATE, -1, 0); memcpy(mem, shellcode, sizeof(shellcode)); ((void(*)())mem)(); // Appel direct du shellcode return 0; }

On run le binaire :

Your text

FLAG ``` MB{N_Sh1ppud5n!} ```