Winja CTF Reverse Engineering

Written in

by

Honestly, this was a very easy CTF rev challenge. One of them had a flaw with there being more than 1 possible flag, while another was straight out leaking the whole flag with ltrace.

So this is the only writeup worth writing, even though it was extremely easy

Matriarcado

Opening the binary, we see that it asks us for a password

When we run ltrace on it and enter “aaaaa” we see that it compares an empty string to “m4triaRchy”. But oddly, any strings we enter become empty.

Instead, we try to enter numbers 12345. We see now that strings appear! So its clear that its taking number, and mapping those numbers to strings, to which the final string must be “m4triaRchy”.

We see that the numbers are being mapped deterministically, meaning 1111 will always translate to “rrrr”

By trying numbers 0-9, we can get the mapping

1 = r

2 = 4

3 = c

4 = t

5 = i

6 = m

7 = a

8 = y

9 = h

0 = R

So to spell “m4triaRchy”, we need to enter 6241570398

bingo!

Tags

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: