# [ASIS CTF] SecuPrim Writeup

Standard

Description:
secuprim.asis-ctf.ir 42738

Who doesn’t love a good PPC challenge? We provided with only a URL and Port so I ran Netcat and faced a bot detection system asking me for ‘X’. The message said that |X|=4. I gave the 2 possible options for absolute value of 4 and those were wrong answers.

```[Megabeets]\$ nc secuprim.asis-ctf.ir 42738
ASIS needs proof of work to start the Math challenge.
X is a string of alphanumeric and |X| = 4
Enter X: 4

[Megabeets]\$ nc secuprim.asis-ctf.ir 42738
ASIS needs proof of work to start the Math challenge.
X is a string of alphanumeric and |X| = 4
Enter X: -4

Well, if |X| isn’t for ‘absolute value of()’ then it must be ‘length of()’. You can notice that both the string appended to X and the SHA256 result are changing in every connection. I wrote a python code to calculate the answer. You can find it in the script embedded below.  After answering I got another test which I’ve been asked to solve 30 times (with a different value each time):

```Good work, let's Go!

In each stage tell us the number of primes or perfect power integers in given range
-----------------------------------------------------------------------------------
What's the number of primes or perfect powers like n such that: 938663777872425905508901094461658229700971384281663171048305722544018188212593585457097324115543346387856004047801971862171751790325297281452399266743172190627763744903214644942745803882444165938580204577049548534754135264523 <= n <= 938663777872425905508901094461658229700971384281663171048305722544018188212593585457097324115543346387856004047801971862171751790325297281452399266743172190627763744903214644942745803882444165938580204577049548534754135266078```

I wrote the following script and got the flag:

# [ASIS CTF] Sky Blue Writeup

Standard

Description
Why is the sky blue?

We are given a PCAP file containing some Bluetooth traffic. The flag has probably been transmitted between the devices. Let’s see what files has been sent.

```[Megabeets]\$: binwalk -e blue.pcap

--------------------------------------------------------------------------------
40535         0x9E57          PNG image, 1400 x 74, 8-bit colormap, non-interlaced```

Binwalk found a PNG image but couldn’t export it. I opened Wireshark and searched for the string “PNG” in the packet bytes. I found the 7 packets containing the PNG and exported their packet bytes (i.e Only the DATA, without the header bytes of each packet: 02 0C 20 FC 03 F8 03 47 00 63 EF E6 07). I then concatenated the output files using HxD,

and deleted the extra data preceding the PNG file header.

We now have the PNG file which is the flag:

# [ASIS CTF] Smallest MD5 Writeup

Standard

Description
I have lied that I have found the smallest MD5 hash possible, to win a bet.
Now the other guy is pissed off and wants to know where have I got this hash from. What results to this hash? Please help!

# [ASIS CTF] CTF 101 Writeup

Standard

```\$ echo QVNJU3szMWE0ODM5MDBiODU3NjQyNmNjY2RmNTU0MDJiOWRkNn0K | base64 --decode