[H4CK1T 2016] HellMath – Mongolia Writeup

Standard

Description:

HellMath – Mongolia – 100 – PPC – NEW

EN: Somebody thinks that you are able to calculate well. Is it true? Pass this task, prove the abilities and maybe we will recommend you to one of the most secret missions in this war.

# nc ctf.com.ua 9988 #

This one was a tricky question. Sometime we tend to think too complicated that we forget the basics of the basics.

Let’s begin. We are given with a netcat command. Let’s run it and see what will happen:

Well, We are given with a number C and we need to find numbers A and B that A^B (Power, not XOR) gives C.

At the beginning I tried to find algorithms online, “Such algorithms must exist!” I thought to myself. I found nothing and gave up for the day because it was late and I wanted to sleep. I was in my bed while message a friend the question and he simply answered:
“Did you tried 1?”
– “What 1?”
 “You know, every number power 1 equals the number” (i.e C = C^1)
– “OMG! It is so simple! You are the smartest person on earth!”

 

So I ran to my computer and wrote this short python script that gave me the flag:

Flag: h4ck1t{R4ND0M_1S_MY_F4V0UR1T3_W34P0N}

 

Share

4 thoughts on “[H4CK1T 2016] HellMath – Mongolia Writeup

  1. dakine

    I knew it will be a super easy answer but I just could not figure it out. I tried doing a loop and mat.log(C, i) but was getting stuck at round 7 to 10 🙁
    I need such a friend who can give me tips like you got

Leave a Reply

Your email address will not be published. Required fields are marked *