Rating:

Proble Statement:

Wow, he made the exponent really large so the encryption MUST be safe, right?! Connect with nc 2018shell2.picoctf.com 29661.

Solution :
I got the following things :

c: 1778673018511075140350698252891639557906407090250539057221806340768776705763113815373271713598206734943304136885307657644746166557801527614555955063613958550715606102502660768573300084767410478866161295739179626743292839204862654148472896949835346074323716667404949929701903737872090588147698250826373180618

n: 77531969503748326589677418948315140870584015245386763633241518845356850979564402923266696704186567270006361208862086254527576010412135230279553684940635956656649728134893874567619948675304052482720430367748612708917105846534082863042823913166120865362252479206576942147071396319459112580853771742537940112457

e: 56172436577459725698934391359139104915041430213184221292301658571726414059411889155782982024019814564512291421932489731563519296372873415080546379424619308859152360214209740169135159761234894923144971372974038021945201954600238994209605035703317119192844975463915465725406543097929017637859019950590916533609

Since e is very large we can crack this using Wiener's attack.I used this repository https://github.com/pablocelayes/rsa-wiener-attack .I made changes in tryhack.py

And got d= 65537

as i got the private key i decoded the message in python3 using :

hex(print(pow(d,c,n))

which resulted

0x7069636f4354467b77407463685f793075725f5870306e336e74245f6340723366753131795f353439353632377d

after converting it resulted:

picoCTF{w@tch_y0ur_Xp0n3nt$_c@r3fu11y_5495627}

Original writeup (https://github.com/d4rkvaibhav/PICOCTF-2018/tree/master/Cryptography/Super%20Safe%20RSA%202).