Description
Can you try to get the flag? Beware we have PIE!
We're given both the source code and the binary
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
Challenge 0xA
For this challenge, I'll be using Genymotion as my Android emulator. Before we start reversing, let's install the app and check out what it looks like.
Pasted image 20240505145949
It looks like there isn't much to interact with in the application; it just has a text view with "Hello Hackers" in the center of the screen.
Let's dig deeper. I'm going to use jadx to explore the inner workings of the app.
img1 1
Description
I've hidden the flag very carefully, you'll never manage to find it! Please note that the goal is to find the flag, and not to obtain a shell.
We are provided with a 32-bit ELF binary. So, for this challenge, it's not about obtaining a shell, as the challenge description states; our task is going to be finding the flag hidden inside the binary.
Now, let's analyze the binary in Binary Ninja
Pasted image 20231129203505
In the main function, the program registers a signal handler for SIGALRM and uses mmap to create a random address where it copies the flag. Then, it creates another mmap for user input, reads 60 bytes, and calls it.