EZ RSA
Diberikan source code python task.py
yang mengimplementasikan kriptosistem RSA.
Challenge
from Crypto.Util.number import *
import gmpy2
flag = '**REDACTED**'
p1 = getPrime(512)
p3 = gmpy2.next_prime(p1)
q1 = getPrime(512)
q3 = gmpy2.next_prime(q1)
p2 = getPrime(512)
p4 = gmpy2.next_prime(p2)
q2 = getPrime(512)
q4 = gmpy2.next_prime(q2)
e = 65537
n1 = p1*p3*q1*q3
n2 = p2*p4*q2*q4
phi1 = (p1-1)*(p3-1)*(q1-1)*(q3-1)
phi2 = (p2-1)*(p4-1)*(q2-1)*(q4-1)
d1 = gmpy2.invert(e,phi1)
d1 = gmpy2.invert(e,phi2)
c1 = pow(bytes_to_long(flag[0:16]),e,n1)
c1 = pow(c1,e,n1)
c1 = pow(c1,e,n1)
c2 = pow(bytes_to_long(flag[16:32]),e,n2)
c2 = pow(c2,e,n2)
c2 = pow(c2,e,n2)
print pow(p1+q3,65537,n1)
# 2716470887383700912025302124756638877079514015459719265795972589344992566952455298597389606104821087895516983639420976252616680796606735372353379773499974308475410079911643970916661913374023148541727244866521056996496836879151456345910942816878941002026121935028767147314106303135071477080803144640610324149525572799763398059797882036348456442719407594232037001832662661583800211109616457848055424917080717598667924120905358829556831258720187651752395859049219360376890171257052335463626723541800407685461449333405826339730428854302794392325983730172809464733029295792379446017853648202601484258544592666749076731063
print pow(p3+q1,65537,n1)
# 454675022048600002230757063981858747241092867712699117375776383004405026815887205699337788423912391230101141814715352667001091798390630717786561980856556437340681661923198015631082366039926409030402161695704470494725784595703992842882871363549601046313977960186674413849847074233789255413715830966722277989010362883389175158655923958612331679897795903578288902702644850409013952459848354916952677604031678874246334917840105723354762287985424845205296627648072511021334828633397007963458590483452960091956700261220490368041679041475696787618214694906949410993610740231064876951101303455802791862697489809375467558444
print pow(p2+q4,65537,n2)
# 25432937636478257787852114712991596087550392774955838547421402774411846309399609833028759032569391368662752237046585805390746955665315755541002082447847921217402372631279398195145957318868353124919819816208501929431245110034035878656466054069627696377346615018206180812258924032020321284922767344924342405215896654374044097610739848533610827186937689165572154136448003086248568674237425263282887257540090143303309991502353518077963761507324428976993183246632776897452739751649552188205514735431483861621647548504607228559429890669182213894945045011270065917975409199806436103731339383538216964368850312266112855016207
print pow(p4+q2,65537,n2)
# 22886233041203498785723632479325407085563721172628532756333622511477353618651022923647618944298175652535706184461842063199261723492424764968255110417844917219127037588566467943476866238424093194279835552521462333378588185844300096537565253888069969987629382966056595627270035397498493480694974379186482072889997216398686370676186481506638961657563491606859224491744221697973043771429416119501200381961667498345114431993841787571405754303617603157280060076793314809394169458616702155098867399067070665853040174536270957851445833926092617177557770085434018435170297201561033968959024878032259787243392691713054356192197
print n1
# 11192469765780440204354233455893473450533469383686665706422403112172097246450777072828343247766272805210120052388873019126888121624414884048321141662657816148988467149089129782689977244100965006565974742398894926513457381565214235961647579456211358817083612529285968641527654660820358939303277892793176958617368112980843966922616621609880081326026092237626099342722014979476660862031715199461192910967192090443200975692142670841179692492037321269374979159833840953956304512988575163835782673510563969472119205213827392297434855623657731022931266885327072597755289375600880318990472522152581939268870701104919633244539
print n2
# 28573652978019841861061786203670665264025513759087100068358817929247495316642747761476775862618112289934754065650917442936482736085132024825507394391677881451366841967814626818341088343437407234932382374203541121792617138012549793730198041467793219211901334036761643738891590703635821408495786976676885624229347078886924799394938612243713974412216914952581192475496377379766454473746215090107339210222891843547105937023705680581996693347774350977629235280802603235119553888105396853028380849556140958735793133261644485764687619705363493191386618180673889236350482420056659633956284985294396946405528199089314344606103
print c1
# 5461530437054219344844349526730287404441695304882655098424741258137952059718382030687520057460517100741455411505362684965517589738745892799254390331926030691673389274333832481127775033629528462885005671370508652498338831645045197169495350203954608771055704474868835251629081524353356888413269805063802791742681874528539613636473360663228144274685487218584165641313251434301625345482340181762888294612344860211142610361125225392945230654151976168718893304635139982601212779931378559506753945421163856924113274506185508238737611444709774510133289411173671917115085338150689463009516850945695570455192612871296059254518
print c2
# 8879087744046910771488308902729286475689022048409584490745757290495011624614149802012984373145345920794412141611188037576423366982037288214171476839579531706215858425784220505376410055708328005168191520342722977293943145399260541081202111154185766431348861741029353594232371006637185080715776864052351301043677575406125475293473512470691526955549467974928790030857405680197032916313849708479913228654260184167962788876270165195677427492927763800743768115156692952366736598270150443418630164431223543746504909674687881584796206916999821348824874155403752575221826086980552093952400953944892556541578092265497754443170
Solution
Alur program cukup jelas. Modulus n1 terdiri dari 4 faktor prima, yaitu p1, p3, q1, dan q3. Nilai p1 cukup dekat dengan p3 dikarenakan nilai p3 merupakan next_prime
dari p1, hal ini memungkinkan modulus dapat dipecah menggunakan algoritme Fermat. Begitu juga nilai modulus n2 yang terdiri dari p2, p4, q2, dan q4.
Idenya, kita dapat menemukan nilai p1q1 dan p1q3 dengan sedikit memodifikasi algoritme Fermat, dengan demikian kita dapat mengembalikan nilai p1 dengan menghitung FPB dari p1q1 dan p1q3.
Lakukan hal tersebut hingga seluruh prima didapatkan. Setelah itu, lakukan dekripsi RSA seperti biasa (dengan menghitung nilai phi dan didapat d).
Implementation
import gmpy2
import libnum
def fermat(n):
factor = []
a = gmpy2.isqrt(n)
b = a*a - n
while not gmpy2.is_square(b):
b += 2*a + 1
a += 1
p = a - gmpy2.isqrt(b)
q = a + gmpy2.isqrt(b)
factor.append(p)
factor.append(q)
a += 1
b = a*a - n
while not gmpy2.is_square(b):
b += 2*a + 1
a += 1
p = a - gmpy2.isqrt(b)
q = a + gmpy2.isqrt(b)
factor.append(p)
factor.append(q)
return factor
n1 = 11192469765780440204354233455893473450533469383686665706422403112172097246450777072828343247766272805210120052388873019126888121624414884048321141662657816148988467149089129782689977244100965006565974742398894926513457381565214235961647579456211358817083612529285968641527654660820358939303277892793176958617368112980843966922616621609880081326026092237626099342722014979476660862031715199461192910967192090443200975692142670841179692492037321269374979159833840953956304512988575163835782673510563969472119205213827392297434855623657731022931266885327072597755289375600880318990472522152581939268870701104919633244539
n2 = 28573652978019841861061786203670665264025513759087100068358817929247495316642747761476775862618112289934754065650917442936482736085132024825507394391677881451366841967814626818341088343437407234932382374203541121792617138012549793730198041467793219211901334036761643738891590703635821408495786976676885624229347078886924799394938612243713974412216914952581192475496377379766454473746215090107339210222891843547105937023705680581996693347774350977629235280802603235119553888105396853028380849556140958735793133261644485764687619705363493191386618180673889236350482420056659633956284985294396946405528199089314344606103
p1q3, p3q1, p1q1, p3q3 = fermat(n1)
p2q4, p4q2, p2q2, p4q4 = fermat(n2)
p1 = gmpy2.gcd(p1q1, p1q3)
p2 = gmpy2.gcd(p2q2, p2q4)
p3 = gmpy2.gcd(p3q3, p3q1)
p4 = gmpy2.gcd(p4q4, p4q2)
q1 = p1q1 / p1
q2 = p2q2 / p2
q3 = p3q3 / p3
q4 = p4q4 / p4
e = 65537
phi1 = (p1-1)*(p3-1)*(q1-1)*(q3-1)
phi2 = (p2-1)*(p4-1)*(q2-1)*(q4-1)
d1 = gmpy2.invert(e**3, phi1)
d2 = gmpy2.invert(e**3, phi2)
c1 = 5461530437054219344844349526730287404441695304882655098424741258137952059718382030687520057460517100741455411505362684965517589738745892799254390331926030691673389274333832481127775033629528462885005671370508652498338831645045197169495350203954608771055704474868835251629081524353356888413269805063802791742681874528539613636473360663228144274685487218584165641313251434301625345482340181762888294612344860211142610361125225392945230654151976168718893304635139982601212779931378559506753945421163856924113274506185508238737611444709774510133289411173671917115085338150689463009516850945695570455192612871296059254518
c2 = 8879087744046910771488308902729286475689022048409584490745757290495011624614149802012984373145345920794412141611188037576423366982037288214171476839579531706215858425784220505376410055708328005168191520342722977293943145399260541081202111154185766431348861741029353594232371006637185080715776864052351301043677575406125475293473512470691526955549467974928790030857405680197032916313849708479913228654260184167962788876270165195677427492927763800743768115156692952366736598270150443418630164431223543746504909674687881584796206916999821348824874155403752575221826086980552093952400953944892556541578092265497754443170
m1 = libnum.n2s(pow(c1, d1, n1))
m2 = libnum.n2s(pow(c2, d2, n2))
flag = m1 + m2
print flag
Flag
KKSI2019{4tt4cK_RSA_MuLtI_pr1m3}
Nayeon Jago Matematika
Diberikan servis ke 202.148.2.243 11331
.
Challenge
$ nc 202.148.2.243 11331
Im Nayeon Matrix Encryption Here
1. Encrypt Key
2. Key For Flag
3. Validate Key
Option : 1
Plain key : abcdefghijklmno
Start from [0,0]->[... , ...]
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o']
['o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o']
['o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o']
['o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o']
['o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o']
['o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o']
['o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o']
['o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o']
['o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o']
oaoaoaoaoaoaoaonbnbnbnbnbnbnbnmcmcmcmcmcmcmcmldldldldldldldlkekekekekekekekjfjfjfjfjfjfjfjigigigigigigigihhhhhhhhhhhhhhhgigigigigigigigfjfjfjfjfjfjfjfekekekekekekekedldldldldldldldcmcmcmcmcmcmcmcbnbnbnbnbnbnbnbaoaoaoaoaoaoaoa
Start from [14,14]->[... , ...]
['b', 'n', 'b', 'n', 'b', 'n', 'b', 'n', 'b', 'n', 'b', 'n', 'b', 'n', 'o']
['n', 'f', 'j', 'f', 'j', 'f', 'j', 'k', 'e', 'k', 'e', 'k', 'e', 'k', 'a']
['m', 'j', 'g', 'i', 'g', 'i', 'g', 'h', 'h', 'h', 'h', 'h', 'h', 'e', 'o']
['c', 'f', 'i', 'e', 'k', 'e', 'k', 'e', 'k', 'e', 'k', 'e', 'h', 'k', 'a']
['m', 'j', 'g', 'k', 'c', 'm', 'c', 'm', 'c', 'm', 'c', 'k', 'h', 'e', 'o']
['c', 'f', 'i', 'e', 'm', 'n', 'b', 'n', 'b', 'n', 'm', 'e', 'h', 'k', 'a']
['m', 'j', 'g', 'k', 'c', 'b', 'a', 'o', 'a', 'b', 'c', 'f', 'h', 'e', 'o']
['c', 'f', 'i', 'e', 'm', 'a', 'o', 'a', 'o', 'n', 'd', 'j', 'h', 'k', 'a']
['m', 'j', 'g', 'd', 'c', 'o', 'a', 'o', 'a', 'b', 'l', 'f', 'h', 'e', 'o']
['c', 'f', 'i', 'l', 'm', 'a', 'o', 'a', 'o', 'n', 'd', 'j', 'h', 'k', 'a']
['m', 'j', 'g', 'd', 'c', 'b', 'n', 'b', 'n', 'b', 'l', 'f', 'h', 'l', 'o']
['c', 'i', 'i', 'l', 'd', 'l', 'd', 'l', 'd', 'l', 'd', 'j', 'h', 'd', 'a']
['m', 'g', 'g', 'f', 'j', 'f', 'j', 'f', 'j', 'f', 'j', 'f', 'i', 'l', 'o']
['c', 'i', 'g', 'i', 'g', 'i', 'g', 'i', 'g', 'i', 'g', 'i', 'g', 'd', 'a']
['m', 'c', 'm', 'l', 'd', 'l', 'd', 'l', 'd', 'l', 'd', 'l', 'd', 'l', 'o']
bnbnbnbnbnbnbnomjgigighhhhhheomjgkcmcmcmckheomjgkcbaoabcfheomjgdcoaoablfheomjgdcbnbnblfhlomggfjfjfjfjfilomcmldldldldldlonfjfjfjkekekekacfiekekekekehkacfiemnbnbnmehkacfiemaoaondjhkacfilmaoaondjhkaciildldldldjhdacigigigigigigda
Start from [0,14]->[... , ...]
['m', 'g', 'd', 'a', 'c', 'm', 'c', 'e', 'g', 'm', 'b', 'b', 'n', 'n', 'b']
['n', 'c', 'g', 'c', 'o', 'f', 'j', 'm', 'o', 'h', 'j', 'n', 'n', 'b', 'b']
['a', 'f', 'm', 'f', 'b', 'a', 'h', 'g', 'c', 'm', 'h', 'g', 'b', 'b', 'n']
['h', 'c', 'j', 'l', 'j', 'n', 'b', 'e', 'k', 'm', 'j', 'h', 'i', 'n', 'n']
['n', 'k', 'f', 'f', 'd', 'f', 'b', 'l', 'o', 'c', 'c', 'g', 'h', 'g', 'o']
['a', 'm', 'a', 'i', 'j', 'l', 'j', 'n', 'f', 'm', 'b', 'k', 'k', 'h', 'i']
['c', 'o', 'e', 'c', 'e', 'f', 'd', 'f', 'b', 'h', 'j', 'a', 'h', 'c', 'h']
['n', 'f', 'a', 'h', 'f', 'k', 'j', 'l', 'j', 'l', 'e', 'g', 'o', 'e', 'm']
['i', 'd', 'i', 'o', 'k', 'i', 'e', 'k', 'd', 'f', 'f', 'o', 'd', 'a', 'o']
['l', 'l', 'j', 'l', 'n', 'a', 'e', 'k', 'e', 'l', 'j', 'h', 'm', 'c', 'b']
['c', 'd', 'd', 'h', 'm', 'd', 'c', 'm', 'e', 'k', 'd', 'f', 'l', 'j', 'o']
['i', 'i', 'j', 'l', 'k', 'a', 'j', 'f', 'n', 'k', 'e', 'l', 'i', 'o', 'g']
['i', 'g', 'g', 'h', 'd', 'a', 'o', 'h', 'i', 'b', 'e', 'k', 'd', 'l', 'm']
['g', 'g', 'i', 'i', 'd', 'l', 'c', 'a', 'k', 'e', 'n', 'k', 'e', 'l', 'o']
['a', 'd', 'i', 'g', 'g', 'a', 'd', 'i', 'o', 'a', 'm', 'b', 'e', 'k', 'o']
Encrypted Key :
mgdncgafmhcjnkfamacoenfaidilljcddiijiggggiadiacmcoffbaljnfdfijlcefhfkokilnahmdlkahdaidlggacegjmohgcbekblojnfdfbjljekdekecmejfnohicakdiombbhjnmhgmjhccgmbkhjalegffoljhkdfkelbekenkambnnbnbbbbninnhgokhihchoemdaomcbljoiogdlmeloeko
Solution
Servis tersebut menyediakan tiga opsi:
- enkripsi input dari user
- hasil enkripsi pesan rahasia
- validasi input dari user
Supaya lebih mudah memahami seperti apa alur input dari user dienkripsi, kami mencoba memasukkan input karakter lowercase dan amati cara kerja enkripsi.
Plain key :
abcdefghijklmnopqrstuvwxyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Encrypted Key :
zzznrgpzmzzzzzzzzzzzzzuaxzzzzzzzzzzzzzzvzzzzzzzzczfzzzzzzzzzzzzzzzzzzzzzzzzzzdzzzzzzzszzzzzzzzzzzzzzzzzzzzzzzzzzzzzkzzztzzzyzzzzzzzzzzzzzzhzzzwzzzzzzzzbzzzzzzzzzzzzzzzzzzzzzzezzzzzzzqzzzzzzzzzzzozzzzzzzzzzzzzzzljzizzzzzzzzzzz
Terlihat 25 karakter pertama tersebar di berbagai indeks pada encrypted key
. Setelah melihat behaviour enkripsi seperti diatas dan pesan rahasia yang rahasia menampilkan hasil encrypted yang sama, kami berhipotesis dan mencoba melakukan mapping untuk tiap indeks pesan yang dienkripsi dengan posisi karakter pesan rahasia yang dienkripsi, sehingga kami dapat mengembalikan pesan rahasia secara utuh dengan indeks perhuruf yang telah kami miliki.
Implementation
from pwn import *
import string
HOST, PORT = "202.148.2.243 11331".split()
deom = []
for i in range(9):
kirim = 'z'*(25*i) + string.lowercase[:25] + 'z'*(200-25*i)
p = remote(HOST, PORT)
p.sendlineafter('Option : ', '1')
p.sendlineafter('Plain key : ', kirim)
p.recvuntil('Encrypted Key : \n')
enc = p.recv(255)
p.close()
print enc
for i in string.lowercase[:25]:
deom.append(enc.index(i))
print deom
$ python solve.py
[+] Opening connection to 202.148.2.243 on port 11331: Done
[*] Closed connection to 202.148.2.243 port 11331
zzznrgpzmzzzzzzzzzzzzzuaxzzzzzzzzzzzzzzvzzzzzzzzczfzzzzzzzzzzzzzzzzzzzzzzzzz
zdzzzzzzzszzzzzzzzzzzzzzzzzzzzzzzzzzzzzkzzztzzzyzzzzzzzzzzzzzzhzzzwzzzzzzzzb
zzzzzzzzzzzzzzzzzzzzzzezzzzzzzqzzzzzzzzzzzozzzzzzzzzzzzzzzljzizzzzzzzzzzz
[+] Opening connection to 202.148.2.243 on port 11331: Done
[*] Closed connection to 202.148.2.243 port 11331
rzzzzzzzzzzzzzzzzuzzzzzzzizzzzwzzzzzzzzzzzzxnfzzzezzzzzzzzzzzzzzzzzzzzzzzzzz
czzzzzzzzzzzzzzzzzztzzzzzazbzzzkzzzzzzzzzjzzzzzzzdzzzzzzzzzzzzzzzzzzzzmzzzzz
zzozzzzzzzzzzpzzzyzgzzzzzzzzzszzzvzzzzzzzzzzzzzzzzzzzzzzhzzzzzzlzqzzzzzzz
[+] Opening connection to 202.148.2.243 on port 11331: Done
[*] Closed connection to 202.148.2.243 port 11331
zzzzzzzzzzzzzzzzzzzjzzzzzzdzzeznzzzzszzzbzzzzzzzzzzzzzzzzzzzzzzzozzzzzzzzzzz
zzzzzzzzzzzzzzzzztzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzazzzzzzzzzzzzzzzzzzzzzzmzzzz
zzzkgzqzpzzzzzzzzzzzzuzizzhlxzzzzzzzzzzzczzfrzzzzzzzzzyzzzzzzzzzzzwzvzzzz
[+] Opening connection to 202.148.2.243 on port 11331: Done
[*] Closed connection to 202.148.2.243 port 11331
zzzzzzzzzwzznzzzzzzzzzzzzzzlzzzzzzzjzzzzzxzzzzzzzzzzzzzzzzzzzzzzzzzfkzzzzzaz
zzzzzzzzzzzgzzzzzzzzzvzzzzzzzzzzzzzzzztzzzzzzmzzzzzziczzszzzzzzzzzzzzyzzzzzz
zzzzzzzzzzzzzzzuzzzzzzzzzzzzzzzzbzzzzzzzzzzzzzzrhozzzpzzzqzzzzzzdzzezzzzz
[+] Opening connection to 202.148.2.243 on port 11331: Done
[*] Closed connection to 202.148.2.243 port 11331
zzzzzzzzzzzzzzkzzzhzzzzzzzzzzzzzzzzzzlzzzzzzzzzzzzzzzuzzzzzzzzzzzzzzztznzszz
zzzzzzxzzzqzzzwjzzzzzzzvzzzzezzzzzzzzzzzzzpzzzyzzzzzzzzzzzzzzgzzzzzzzzzzzzzz
zzzzzzzzzzzozzizzzbzzzzzzfzzzzzzzzzzdzzzzzzzzzmzzzzrzzzczzzzzzzzzzzzzzzaz
[+] Opening connection to 202.148.2.243 on port 11331: Done
[*] Closed connection to 202.148.2.243 port 11331
zzzzzzzpzzzzzfzzzzzzzxzzzzzzzzzzzdzzzzzzzzzzzzzzzzzzzzzzzzzzszzzzzczzzzzzzzz
zzvzzzzkzzzzqzzzzzwzrzzzzzzzzzzzzzzzztzznzzzmzzzzzzzzzzzzzyzzzzezzzzzzzzzbhz
zzzzzzzazjgzzzzzuzzzzzzzzzzzzzzizzzlzzzzzzzzzzzzzzozzzzzzzzzzzzzzzzzzzzzz
[+] Opening connection to 202.148.2.243 on port 11331: Done
[*] Closed connection to 202.148.2.243 port 11331
zzzzzzzzzzzjzzzzzzzzzzzzzzzzzzzzdzzzzzvzzzzzzzzmzzzzzzzzzuzzzzzrzzzzzzkzzzzz
zzzzzzzzizzzzpzzzzzzzzcztzzzzyzzsfbzlzzzzzzzzzzzzzzhzzazzzzzqzzzzzzgzzzzzzzz
zwzzzzzzzzzzzzzzzzzzezzzzzzzzzzzzzzzzxznzzzzzzzzzzzzzzzzzzzzzzozzzzzzzzzz
[+] Opening connection to 202.148.2.243 on port 11331: Done
[*] Closed connection to 202.148.2.243 port 11331
zzizzzzzzzwzzzzzzzzzzzzzzzzzbzzzzznzzzzzzzuzzzzzzzzzzzzzzzxkzoqzzzzzzzzzzzzm
zzzzfzzzzzzzzzzzzzzzzzzzzzgzzzdzzzzzzzzzzzzzzzzzzzezzzzpzzzzzzzzsrzzczzzhzzz
zzzzzyzzzzzzzzzzzzzzzzzzazzzzzzzzzvzzzzzzlzzzzzzzzzzzzzzzzzzzzzzzzzzztjzz
[+] Opening connection to 202.148.2.243 on port 11331: Done
[*] Closed connection to 202.148.2.243 port 11331
zbzzzzzzzzzzzzzkhzzzozzzzzzzzzzzzzzzzzzzzzzzzzmzzzzplzveizzzzzzzzazzzzzzgzzz
zzzuzrzzzzzzzzzzqzzzzzzzzzzzzzzzzzztzzzzzzzzzzzzzzzzzzzzzszwzzzzzzzzzzzzzzzz
fzzzzzzzzzzzczzzzzzzzzzzzzzzzzzzzzzzzzxzzzzzzdzzzzzznzzzzzzzjzzzzzzzzzzzy
[23, 151, 48, 77, 174, 50, 5, 138, 213, 211, 115, 210, 8, 3, 194, 6, 182, 4,
85, 119, 22, 39, 142, 24, 123, 101, 103, 76, 125, 49, 45, 171, 208, 25, 117,
107, 215, 146, 44, 154, 165, 217, 0, 181, 95, 17, 185, 30, 43, 169, 124, 40,
192, 26, 29, 195, 156, 178, 175, 19, 155, 179, 147, 31, 64, 160, 158, 196,
36, 93, 173, 220, 218, 180, 206, 74, 184, 129, 216, 219, 67, 87, 200, 128,
35, 68, 27, 121, 12, 201, 205, 209, 199, 132, 114, 167, 97, 9, 41, 145, 223,
170, 207, 188, 104, 177, 137, 18, 166, 91, 14, 37, 198, 71, 163, 118, 86,
203, 73, 69, 53, 99, 90, 82, 122, 159, 149, 66, 33, 139, 13, 162, 150, 183,
161, 83, 187, 120, 116, 202, 7, 88, 96, 60, 113, 168, 78, 94, 21, 134, 130,
110, 98, 32, 172, 109, 143, 127, 84, 11, 70, 112, 47, 191, 214, 89, 136, 63,
108, 100, 57, 38, 153, 189, 105, 176, 28, 144, 106, 126, 80, 102, 148, 2,
222, 59, 193, 75, 34, 61, 131, 62, 141, 140, 221, 42, 186, 10, 58, 157, 65,
1, 164, 197, 55, 152, 72, 16, 56, 212, 15, 52, 46, 204, 20, 51, 92, 81, 133,
111, 79, 54, 135, 190, 224]
Mapping array tersebut ke pesan rahasia yang telah terenkripsi.
enc = '8tpZcA1lFWzEny8gYzKUr8yNqPpKaUzZjYVMYhdhXdfrCQWhh84voFuJZHMFn9EBACWqYwZoH6FqhlOO0amNfXwD5iEUrmJ424QIgajQ6qZWyrpfSW66T1UhEOPwGBAKHbG3icy3tDWeEyuPZpNAogTt39o2JgU5UR9KMzz4dPrilq8QrAkB2asNxrE2KGNKiQizUamlfSdSnXeP5Vt3geqYKtgaw6fz1'
deom = [23, 151, 48, 77, 174, 50, 5, 138, 213, 211, 115, 210, 8, 3, 194, 6, 182, 4, 85, 119, 22, 39, 142, 24, 123, 101, 103, 76, 125, 49, 45, 171, 208, 25, 117, 107, 215, 146, 44, 154, 165, 217, 0, 181, 95, 17, 185, 30, 43, 169, 124, 40, 192, 26, 29, 195, 156, 178, 175, 19, 155, 179, 147, 31, 64, 160, 158, 196, 36, 93, 173, 220, 218, 180, 206, 74, 184, 129, 216, 219, 67, 87, 200, 128, 35, 68, 27, 121, 12, 201, 205, 209, 199, 132, 114, 167, 97, 9, 41, 145, 223, 170, 207, 188, 104, 177, 137, 18, 166, 91, 14, 37, 198, 71, 163, 118, 86, 203, 73, 69, 53, 99, 90, 82, 122, 159, 149, 66, 33, 139, 13, 162, 150, 183, 161, 83, 187, 120, 116, 202, 7, 88, 96, 60, 113, 168, 78, 94, 21, 134, 130, 110, 98, 32, 172, 109, 143, 127, 84, 11, 70, 112, 47, 191, 214, 89, 136, 63, 108, 100, 57, 38, 153, 189, 105, 176, 28, 144, 106, 126, 80, 102, 148, 2, 222, 59, 193, 75, 34, 61, 131, 62, 141, 140, 221, 42, 186, 10, 58, 157, 65, 1, 164, 197, 55, 152, 72, 16, 56, 212, 15, 52, 46, 204, 20, 51, 92, 81, 133, 111, 79, 54, 135, 190, 224]
kicer = ''.join(enc[x] for x in deom)
print kicer
Nthl84AWe36tFZi1scXhyhuqwaQhB8Qi5P1WYNCozt8a4zrzrPGXipUzJkQU2BAZAUUUYmqwg2eFxbKaqDfHMYKOnSXVli644WdpzrPK6ADKzU8hmoKUwS6wFIEmP5gWYey9TNRN2ETdl52nWdOJ8yGpQjlrPKfEZShKqitBygHd9GqraZZA0jopfFQqV93EyE6fEzMgCtMaJ3HYZggoWnrvracfOu3N1
$ nc 202.148.2.243 11331
Im Nayeon Matrix Encryption Here
1. Encrypt Key
2. Key For Flag
3. Validate Key
Option : 3
Plain Key :
Nthl84AWe36tFZi1scXhyhuqwaQhB8Qi5P1WYNCozt8a4zrzrPGXipUzJkQU2BAZAUUUYmqwg2eF
xbKaqDfHMYKOnSXVli644WdpzrPK6ADKzU8hmoKUwS6wFIEmP5gWYey9TNRN2ETdl52nWdOJ8yGp
QjlrPKfEZShKqitBygHd9GqraZZA0jopfFQqV93EyE6fEzMgCtMaJ3HYZggoWnrvracfOu3N1
Flag : KKSI2019{Playin_Math_Matrix_With_Nayeon}
Flag
KKSI2019{Playin_Math_Matrix_With_Nayeon}