Actually this week, I’m busy migrating servers on campus. But I still took the time to play HackIM CTF.
At HackIM CTF competition, I completed all cryptographic challenge. The challenge is quite easy and enjoyable, although they had to guess something in advance to get the Flag.
Problem
Now you are one step away from knowing who is that WARRIOR. The Fighter who will deci
de the fate of war between the 2 countries. The Pride of One and Envey of the Other..
. You have got the secrete file which has the crucial information to identify the fig
hter. But the file is encrypted with a RSA-Private key. Good news you have its corres
ponding public key in a file. Bad news there are 49 other keys. Whos is the Fighter.
Completion
Given file crypto5.zip that containing:
all_keys.txt warrior.txt
In all_keys.txt file is containing 49 RSA-2048 public keys and warrior.txt file is containing cipher. To accomplish this I use OpenSSL and the following script:
# To split all_keys.txt, use this command: split -l 9 all_keys.txt import os signed_msg = 'warrior.txt' keys = ['xaa', 'xad', 'xag', 'xaj', 'xam', 'xap', 'xas', 'xav', 'xay', 'xbb', 'xbe', 'xbh', 'xbk', 'xbn', 'xbq', 'xbt', 'xbw', 'xab', 'xae', 'xah', 'xak', 'xan', 'xaq', 'xat', 'xaw', 'xaz', 'xbc', 'xbf', 'xbi', 'xbl', 'xbo', 'xbr', 'xbu', 'xbx', 'xac', 'xaf', 'xai', 'xal', 'xao', 'xar', 'xau', 'xax', 'xba', 'xbd', 'xbg', 'xbj', 'xbm', 'xbp', 'xbs', 'xbv'] for i in xrange(len(keys)): pub_key = 'keys/{0}'.format(keys[i]) cmd = 'openssl rsautl -in {0} -verify -inkey {1} -pubin'.format(signed_msg, pub_key) os.system(cmd)
Output
This fighter is a designation for two separate, heavily upgraded derivatives of the Su-35 'Flanker' jet plane. They are single-seaters designed by Sukhoi(KnAAPO).
After looking for it on google, this leads to Sukhoi Su-35.
Flag: Sukhoi Su-35
Thanks for sharing this information. Such simple, much helping
LikeLike