반응형
반응형
반응형

files  Crypto  HardCrypto


system32.kr의 HardCrypto 문제 풀이입니다.



HardCrypto.md

Do you know Hard Crypto? 
Find the Flag!! 
Ex)FLAG{ABCEDFG} 

Make my pental



Do_you_know_Crypto.txt

c075121115114075121115114075121115114075049115043075122052114075121115043075121115114075121115114075122052114075121115114075121115114075121115114080068119056080067049100080106052043076105115114075121115114075121052116076083048116076083048116076083048116076083052114075121115114075121115117080105115114075121115114075121115114075121115114075121115114075121115114075121115114075121115114076106119116076083048116076083052043076083048116076083048116076083048116076105048116076083048116076083048116076083048116076083048116076083048116076106119116076083048116076083048116076083048116076083048116076083048116076083052043075121115114075121115114075121115114075121115114075121052056075121115114075121115114075121115114075121115114075121115114075121115114075121115114076106052114075121115114075121115114076105048116076083048116076083048116076083048116076083048116076083048116076083052114075121115114075121115114075121052116076083048116076083048116076083048116076083048117080068119114075121115114075121115114075121115114075121115114075121115114075121115114076106052043075121115114075121115114075121115114075121115114075121115114075121115114075121115117076083048116076083048116076083048116076083048116076083048116076083048116076083048117080067052043075121115114075121115114075121115114075121115114075121115114075121115114075121115114075121052116076083048116076083048116076105052114075121115114075121115114075121115114075121052056075121115114075121115114075121115114075121115114075121115114075121115114075121115114075121115114075121052056075121115114075121115114075121115114075121115114075121115114075121115114076106052043076083048116076083048116076083052114075121115114075121115114076105048116076083048116076083048116076083052114075121115114076106119056076083048116076083048116076083048116076083048116076083048116076083048116076083052043080105115114075121115114075121115114075121052061


으어.... 일단 dec 2 string을 해보았습니다.


아스키로 보니 


KysrKysrKysrK1s+Kz4rKys+KysrKysrKz4rKysrKysrKysrPDw8PC1dPj4+LisrKysrKy4tLS0tLS0tLS0tLS4rKysrKysuPisrKysrKysrKysrKysrKysrKysrKysrLjwtLS0tLS4+LS0tLS0tLS0tLi0tLS0tLS0tLS0tLS0tLS0tLjwtLS0tLS0tLS0tLS0tLS0tLS4+KysrKysrKysrKysrKy48KysrKysrKysrKysrKysrKysrKysrLj4rKysrKysrLi0tLS0tLS0tLS0tLS0tLS0tLS4rKysrKysrKy4tLS0tLS0tLS0tLS0uPDwrKysrKysrKysrKysrKysrKysrLj4+KysrKysrKysrKysrKysrKysrKysuLS0tLS0tLS0tLS0tLS0tLS0tLS0uPC4+KysrKysrKysrKysrKysrKysrKysrKy4tLS0tLS0tLi4rKysrKysrKysrKy48KysrKysrKysrKysrKysrKysrKysrKysrKy48KysrKysrKysrKysrKysrKysrLj4+LS0tLS0tLS4rKysrKysrLi0tLS0tLS0tLS4rKysrLjw8LS0tLS0tLS0tLS0tLS0tLS0tLS4+PisrKysrKysrKy4=



처음엔 이 루트가 아닌줄 알았으나.. 마지막에 =을 보고 base64로 디코딩~


++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>.++++++.-----------.++++++.>+++++++++++++++++++++++.<-----.>---------.-----------------.<-----------------.>+++++++++++++.<+++++++++++++++++++++.>+++++++.------------------.++++++++.------------.<<+++++++++++++++++++.>>++++++++++++++++++++.--------------------.<.>++++++++++++++++++++++.-------..+++++++++++.<+++++++++++++++++++++++++.<++++++++++++++++++.>>-------.+++++++.---------.++++.<<-------------------.>>+++++++++.


이건...예전에 어떤 CTF에서 나왔던 문제였다는게 기억났는데...


뭐지뭐지 하다가 brainfuck 언어라는게 기억나서 바로 디코딩했습니다!


FLAG : FLAG{Bra1nFuck_1s_Funny_Crypt0}


반응형

'WAR GAME > System32.kr' 카테고리의 다른 글

System32.kr [BigImage] 풀이  (0) 2018.08.31
System32.kr [PPT] 풀이  (3) 2018.07.29
System32.kr [Easy Crypto] 풀이  (0) 2018.07.29
System32.kr [RSA102] 풀이  (0) 2018.07.29
System32.kr [RSA101] 풀이  (0) 2018.07.29
반응형

files  Crypto  EasyCrpyto


system32.kr의 EasyCrpyto 문제 풀이 입니다. 아마 EasyCrypto 인데 Crpyto로 오타내신듯 하네요.


EasyCrypto.md

How about This Crypto? 
It is Very Easy Crypto! 

Find the Crpyto FLAG!


Ex) FLAG{ABC} <= FLAG(upper) 

Make my pental


어... crypto인지 crpyto인지 으어어어어ㅓㅓㅓㅓㅓㅓㅓ


혀튼 문제파일을 봅시다.



Crypto.txt

WKHUH LV D GLIIHUHQFH EHWZHHQ YROXQWDUB VLPSOLFLWB DQG YROXQWDUB SRYHUWB. YROXQWDUB VLPSOLFLWB VHHPV YHUB PXFK WR PH D PRYHPHQW DEVRUEHG LQWR WKH PBWK RI WKH VXVWDLQDEOH PLGGOH FODVV. SRYHUWB ZDV QRW VHHQ DV SDUWLFXODUOB DWWUDFWLYH, VR LQVWHDG LW EHFDPH VLPSOLFLWB. WKHUH LV D ILQH, FRPSHOOLQJ, EXW KRUULEOB GHVWUXFWLYH VWRUB. LW’V D VWRUB WKDW SURYLGHV HDVH RI PLQG WR HYHUB RQH RI XV ZKR KDV D ZHDNQHVV IRU DOO WKH FRPIRUWV WKDW WKH GRPLQDQW VBVWHP JUDQWV XV ZKLOH VLPXOWDQHRXVOB FUHDWLQJ WKH LOOXVLRQ RI SHUVRQDO UHVSRQVLELOLWB EB WHOOLQJ XV WKDW ZH QHHG D PDVVLYH HIIRUW WR HOHFW D JRYHUQPHQW WKDW ZLOO SURPLVH XV D XWRSLDQ IXWXUH DQG D VXVWDLQDEOH, EURDG-EDVHG SHULRG RI HFRQRPLF JURZWK. BRX FDQ VWLOO EXB BRXU ZDB WR KDSSLQHVV, ZKLFK LV MXVW VOLJKWOB GLIIHUHQW IURP ZKDW WKH PDLQVWUHDP SUHVFULEHV. YROXQWDUB SRYHUWB, RQ WKH RWKHU KDQG, LV EUXWDOOB KRQHVW. WKHUH’V QR JHWWLQJ DURXQG WKH ZRUG “SRYHUWB”?LW PHDQV OHVV PRQHB, OHVV HQHUJB, OHVV UHVRXUFHV. LW PHDQV WKDW BRX FDQ’W EXB BRXU ZDB RXW RI BRXU SUHGLFDPHQW, DQG WKDW LQVWHDG BRX KDYH WR OHDUQ KRZ WR OLYH LQ D IXQGDPHQWDOOB GLIIHUHQW ZDB. LW PHDQV OHVV FRPIRUW DQG OXAXUB, DQG OHDUQLQJ KRZ WR OLYH ZHOO ZLWK WKDW. LQ RWKHU ZRUGV, LI YROXQWDUB VLPSOLFLWB LV WKH HOHFWULF FDU, YROXQWDUB SRYHUWB LV ZDONLQJ WR ZKHUH BRX QHHG WR JR. ZDONLQJ LV KRQHVWB. WKH HOHFWULF FDU LV VWRUBWHOOLQJ. IODJ{MXOLXV_FDHVDU_FUBSWR_VFRUH_1}


매우 긴 문자열이지만 우리가 살펴볼 곳은 오직 맨 마지막입니다.


IODJ{MXOLXV_FDHVDU_FUBSWR_VFRUH_1}


플래그 형식임을 확인할 수 있습니다.



IODJ가 FLAG가 되어야 합니다.

일단 매우매우 쉬운 암호라고 했으니 카이사르로 풀어보겠습니다.



23회 shift 한 결과 I가 F에 맞춰지면서 복호화가 되었습니다. (사실 처음에 치환암호인줄 알고 삽질하다가 힌트가 너무 없어서 엇 카이사르 아닐까 하고 시도해보니 맞았던...)


there is a difference between voluntary simplicity and voluntary poverty. voluntary simplicity seems very much to me a movement absorbed into the myth of the sustainable middle class. poverty was not seen as particularly attractive, so instead it became simplicity. there is a fine, compelling, but horribly destructive story. it’s a story that provides ease of mind to every one of us who has a weakness for all the comforts that the dominant system grants us while simultaneously creating the illusion of personal responsibility by telling us that we need a massive effort to elect a government that will promise us a utopian future and a sustainable, broad-based period of economic growth. you can still buy your way to happiness, which is just slightly different from what the mainstream prescribes. voluntary poverty, on the other hand, is brutally honest. there’s no getting around the word “poverty”?it means less money, less energy, less resources. it means that you can’t buy your way out of your predicament, and that instead you have to learn how to live in a fundamentally different way. it means less comfort and luxury, and learning how to live well with that. in other words, if voluntary simplicity is the electric car, voluntary poverty is walking to where you need to go. walking is honesty. the electric car is storytelling. flag{julius_caesar_crypto_score_1}



플래그는 대문자라고 했으니 대문자로 바꿔주었습니다.


FLAG : FLAG{JULIUS_CAESAR_CRYPTO_SCORE_1}

반응형

'WAR GAME > System32.kr' 카테고리의 다른 글

System32.kr [BigImage] 풀이  (0) 2018.08.31
System32.kr [PPT] 풀이  (3) 2018.07.29
System32.kr [HardCrypto] 풀이  (0) 2018.07.29
System32.kr [RSA102] 풀이  (0) 2018.07.29
System32.kr [RSA101] 풀이  (0) 2018.07.29
반응형

files  Crypto  RSA  RSA101


system32.kr의 rsa101 풀이입니다.



문제내용입니다.


p : 11820547749265118607908336189140061659994883367758644383099900753008997316272341754974105712436833864387373302687964986221522289414610698068230842231006759

q : 2076478388690715447644222392295584753007140199740835763821170999934221864895193172716587341806099928941239417181782165665806324184552950128351328886814107

e : 65537

c : 15175007508230661949213125841853820919948368859221761481847700530363990883761097704372435675552656459480039957857925187102590466676354015036181849182155680399350099015532296504916485091012255771133872737687990897080899160898509685794777509104691093814282101492973637294053730555124794841034604131492169339102


p, q, e를 이용해 개인키를 생성하고 c를 복호화 하면 될 것으로 보입니다.



rsatool.py를 이용해 개인키를 생성했습니다.


python rsatool.py -p 11820547749265118607908336189140061659994883367758644383099900753008997316272341754974105712436833864387373302687964986221522289414610698068230842231006759 -q 2076478388690715447644222392295584753007140199740835763821170999934221864895193172716587341806099928941239417181782165665806324184552950128351328886814107 -o private.pem


Using (p, q) to initialise RSA instance

n =

22f411ffb9af2f9a00c69a748d13175e23c56414b7b89ca0f3664e94960b5a144933f0ec92dbe2f9

b302d356c9f05a05cd7529bdb5a0e1ac3bbc0acc06d5847335114e0436090c829515321173e4eb44

ad5d538f4333981c7518ad2e8909372be0b0a1438026ac91ac66a6e7ab5974ea20e7423a63de228b

5ca70d0fc26a6c9d


e = 65537 (0x10001)


d =

1bb6e2be9d806681f9b37fac825f6cdbdc091b3dc21ec3326b4be76ab13df702b6b85483803e914d

e3be8dcbf6fa78a6b92df916cef8ed771f360e698fd1a4ded205086eff52626529cd3394508ae2cb

cd7d5f96f25b1212b4752232cb01ebc6cd85a2fc621c16905dce7c415a3336fe8bb98a3f9f1eda26

2a5589f531803091


p =

e1b1a243eff5356b26ffa41b8ad3b2781fcd81d148cf921ab2c31e3adc78108ff3fd25667e661634

3769a8271bada71d0284aa224397f5f4db3a7cde8fcfa627


q =

27a59d6cb8c26315b6f1f572e28c6d3e372a44ebfb5db7279502e608661851e644cde326e615338e

a426774b568f7b070f7cacd1b5c05339ecb468e292d7759b


Saving PEM as private.pem


e는 값을 자동으로 잡아주었네요 ㅇㅅㅇ



이제 생성된 private.pem을 가지고 openssl을 이용해 c를 복호화 하면 되나.... 자꾸 오류가 나서 온라인 복호화툴을 이용하겠습니다... :(


제가 복호화에 이용한 사이트입니다 : http://extranet.cryptomathic.com/rsacalc/index



위에 표시된 n, d, e를 차례로 입력해줍니다.

input data에는 c값을 입력해 주면 되는데, hex값으로 넣어달라고 하기 때문에.. hex로 변환해주어야 합니다.


이 과정도 온라인 툴의 도움을... : https://www.mobilefish.com/services/big_number/big_number.php



변환하면 이런 값이 나옵니다.


159C243DE63E52D8C6F5F37040A43788061847824AADCFC8B26DA05992C5C3DD5D344915F69DCE6961BD199761962CF706BF7D93CA1DC941C42F5302FF1A8F8853A20C591F2C28266502377710B66B44B8701BE4D1A471D0136FCF8BD3EA1813D4BB2C3D6A7C9C9A7A5B2148E52AA386C29887934F53A89F73CD467B3D4950DE



이 값을 input data란에 채워주고 decrypt에 체크한후 calculate해주면 복호화된 값이 출력됩니다.


464c41477b77336c63306d653273797374656d33325f5253415f6330757273657d



이 값도 hex이기 때문에 string형태로 바꿔주겠습니다. https://codebeautify.org/hex-string-converter




FLAG : FLAG{w3lc0me2system32_RSA_c0urse}




반응형

'WAR GAME > System32.kr' 카테고리의 다른 글

System32.kr [BigImage] 풀이  (0) 2018.08.31
System32.kr [PPT] 풀이  (3) 2018.07.29
System32.kr [HardCrypto] 풀이  (0) 2018.07.29
System32.kr [Easy Crypto] 풀이  (0) 2018.07.29
System32.kr [RSA102] 풀이  (0) 2018.07.29

+ Recent posts