EasyCTF 2017{Tasks_WriteUps}
Task
There's a lot of hex strings here. Maybe they're hiding a message?
Hint: Thankfully you can solve this without even using a website
HexStrings file There's a lot of hex strings here. Maybe they're hiding a message?
Hint: Thankfully you can solve this without even using a website
The first thing that We have hex strings file and we noticed it's MD5 hashes and every 256 char MD5's means one letter so we can make it easy and Solved with https://hashkiller.co.uk/md5-decrypter.aspx
The first thing that Im far too lazy to put anything meaningful here. Instead, here's some information about what you just solved. The MD5 algorithm is a widely used hash function producing a 128-bit hash value. Although MD5 was initially designed to be used as a cryptographic hash function, it has been found to suffer from extensive vulnerabilities. It can still be used as a checksum to verify data integrity, but only against unintentional corruption. Like most hash functions, MD5 is neither encryption nor encoding. It can be cracked by brute-force attack and suffers from extensive vulnerabilities as detailed in the security section below. MD5 was designed by Ronald Rivest in 1991 to replace an earlier hash function MD4.[3] The source code in RFC 1321 contains a "by attribution" RSA license. The abbreviation "MD" stands for "Message Digest." The security of the MD5 has been severely compromised, with its weaknesses having been exploited in the field, most infamously by the Flame malware in 2012. The CMU Software Engineering Institute considers MD5 essentially "cryptographically broken and unsuitable for further use". easyctf{1_h0p3_y0u_d1dn7_d0_7h47_by_h4nd}
the flag is : easyctf{1_h0p3_y0u_d1dn7_d0_7h47_by_h4nd}
RSA1, Cryptography ,50 pt - solved by Chouaib(cho)
The first thing that I found somebody's notes on their private RSA! Help me crack this.
Hint: Go google RSA if you're stuck.
File = ciphertest1.txt p:
p: 33499881069427614105926941260008415630190853527846401734073924527104092366847259 q: 34311544767652906613104559081988349779622789386528780506962212898921316785995851 e: 65537 c: 43465248299278658712013216049003172427898782261990372316282214376041873514481386908793943532363461126240609464283533882761307749486816342864113338277082746552
import gmpy p = 33499881069427614105926941260008415630190853527846401734073924527104092366847259 q = 34311544767652906613104559081988349779622789386528780506962212898921316785995851 e = 65537 c = 43465248299278658712013216049003172427898782261990372316282214376041873514481386908793943532363461126240609464283533882761307749486816342864113338277082746552 f = (p-1) * (q-1) d = gmpy.invert(e,f) print "private key d value is : %d" % d plain = hex(pow(c,d,n))[2:] flag = plain.decode("hex") print "The Flag is %s " % flag
Decode me , Cryptography ,100 pt -solved by Chouaib (cho)
Someone I met today told me that they had a perfect encryption method. To prove that there is no such thing, I want you to decrypt this encrypted flag he gave me.
Hint: Simple decoding :)
The first thing that The input in the end of file is " = " what make me release it is base64. The input in the end of file is " = " what make me released it is base64 but the file file size too long so i need to decrypt it many time until i found the Flag. So I wrote a short python script to do that using the Base64 Module .
import base64 file = open('file.txt').read() dec = lambda x :base64.b64decode(file) flag = dec(file) while 'easyctf' not in flag: flag = base64.b64decode(flag) print flag
the flag is : easyctf{what_1s_l0v3_bby_don7_hurt_m3}
RSA2 , Cryptography , 80 pt - solved by Chouaib(cho)
The first thing that some more RSA : This time, there's no P and Q .. this :
n: 266965481915457805187702917726550329693157 e: 65537 c: 78670065603555615007383828728708393504251
Hint: Simple decoding :)
As you see above there's no P and Q i had only N , so i used http://factordb.com/ to get the Prime Factor of P and Q :
p = 458070420083487550883
q = 582804455845022449879
And then i wrote this script to the flag of RSA challenge also using gmpy Module that supports multiple-precision arithmetic :
import gmpy n = 266965481915457805187702917726550329693157 p = 458070420083487550883 q = 582804455845022449879 e = 65537 c = 78670065603555615007383828728708393504251 f = (p-1) * (q-1) d = gmpy.invert(e,f) plain = hex(pow(c,d,n))[2:] flag = plain.decode("hex") print "The Flag is %s " % flag
the is flag : flag{l0w_n_0eb6}
RSA3, Cryptography , 135 pt -solved by chouaib(cho)
We can across another message that follows the same cryptographic schema as those other RSA message. Take a look and see if you can crack it .
Hint: You might want to read up on how RSA works.
File:
{N : e : c} {0x27335d21ca51432fa000ddf9e81f630314a0ef2e35d81a839584c5a7356b94934630ebfc2ef9c55b111e8c373f2db66ca3be0c0818b1d4eda7d53c1bd0067f66a12897099b5e322d85a8da45b72b828813af23L : 0x10001 : 0x9b9c138e0d473b6e6cf44acfa3becb358b91d0ba9bfb37bf11effcebf9e0fe4a86439e8217819c273ea5c1c5acfd70147533aa550aa70f2e07cc98be1a1b0ea36c0738d1c994c50b1bd633e3873fc0cb377e7L}
import gmpy n = int('0x27335d21ca51432fa000ddf9e81f630314a0ef2e35d81a839584c5a7356b94934630ebfc2ef9c55b111e8c373f2db66ca3be0c0818b1d4eda7d53c1bd0067f66a12897099b5e322d85a8da45b72b828813af23',16) e = int('0x10001',16) c = int('0x9b9c138e0d473b6e6cf44acfa3becb358b91d0ba9bfb37bf11effcebf9e0fe4a86439e8217819c273ea5c1c5acfd70147533aa550aa70f2e07cc98be1a1b0ea36c0738d1c994c50b1bd633e3873fc0cb377e7',16) """ p and q find on FactorDB """ p = 3423616853305296708261404925903697485956036650315221001507285374258954087994492532947084586412780869 q = 3423616853305296708261404925903697485956036650315221001507285374258954087994492532947084586412780871 n=p*q f = (p-1) * (q-1) d = gmpy.invert(e,f) plain = hex(pow(c,d,n))[2:] flag = plain.decode("hex") print "The Flag is %s " % flag
The Flag is easyctf{tw0_v3ry_merrry_tw1n_pr1m35!!_417c0d}
Flip my letters , Cryptography ,50 pt -solved by Chouaib (cho)
We have given a flag :easyctf{r_wlmg_vevm_mvvw_zm_zhxrr_gzyov}
Hint : What happens if you turn the alphabet upside down?
Hummm alphabet upside down it is means decode the flag with Reverse Alphabet , I feel too lazy to write script so with simple search on Google for Atbash Cipher
The flag is easyctf{i_dont_even_need_an_ascii_table}
Let Me Be Frank , Cryptography ,50 pt -solved by S0ld1er
Here we have the following text given:
Nwh whdjwh qm uepen, T tjb fsmt tixgi jsrsh sigm gs mpzp xwqf iahxpv iw fslkt. pehgpxf{qtextz_glacz_elt_neinrw_qsg_bums_dcp}
That might be Vigenère cipher , decoding the flag using Cryptool.
Lowercase the flag
the flag is easyctf{better_thank_the_french_for_this_one}
Phunky Python ,reverse ,50 pt -solved by S0ld1er
x = 0 # REDACTED digs = [117734844603869328, 117734844603869324, 117734844603869342, 117734844603869348, 117734844603869326, 117734844603869343, 117734844603869329] out = "" for letter in reversed(digs): out = chr(letter - x) + out print out
The flag is easyctf{117734844603869227L }
luckyguess, reverse engineering 200 pt
0 comments: