constWORLDant

suninatas FORENSICS 19번 문제 본문

0x02 Reverse Engineer/0x03. Etc

suninatas FORENSICS 19번 문제

data type ConS_tanT 2017.12.31 03:47

이 녀석도 Chiper다 이번엔 이진수다. 


0100111001010110010000110101010001000110010001000101
0110001000000100101101000110001000000100101001001100
0100010101011010010001010101001001001011010100100100
1010001000000101001001000101010101010010000001001011
0100011001010101010100100101000000100000010110100100
1010001000000101001000100000010110000100011001000110
0101010100100000010101010101001001010000001000000101
0010010001010101010100100000010100100100110001001011
0101100101000010010101100101000000100000010110100100
1010001000000100011101000011010100100101101001010101
0101010001001011010101110101101001001010010011010101

0110010010010101000001011001010100100100100101010101


8비트씩 끊자.


파이썬으로 짰다.


#-*-coding:utf-8-*-

target = "010011100101011001000011010101000100011001000100010101100010000001001011010001100010000001001010010011000100010101011010010001010101001001001011010100100100101000100000010100100100010101010101001000000100101101000110010101010101001001010000001000000101101001001010001000000101001000100000010110000100011001000110010101010010000001010101010100100101000000100000010100100100010101010101001000000101001001001100010010110101100101000010010101100101000000100000010110100100101000100000010001110100001101010010010110100101010101010100010010110101011101011010010010100100110101010110010010010101000001011001010100100100100101010101"


tmp=[]

count=0

cov=list(target)

result=[]

for i in range(0,len(cov)):

if(i%8==0):

result+=" "

result+=target[i]


result="".join(result)

print result 


python code를 txt로 옮겼다.


01001110 01010110 01000011 01010100 01000110 01000100 01010110 00100000 01001011 01000110 00100000 01001010 01001100 01000101 01011010 01000101 01010010 01001011 01010010 01001010 00100000 01010010 01000101 01010101 00100000 01001011 01000110 01010101 01010010 01010000 00100000 01011010 01001010 00100000 01010010 00100000 01011000 01000110 01000110 01010101 00100000 01010101 01010010 01010000 00100000 01010010 01000101 01010101 00100000 01010010 01001100 01001011 01011001 01000010 01010110 01010000 00100000 01011010 01001010 00100000 01000111 01000011 01010010 01011010 01010101 01010100 01001011 01010111 01011010 01001010 01001101 01010110 01001001 01010000 01011001 01010010 01001001 01010101  


아스키로 바꾸면 다음과 같다.


N V C T F D V   K F   J L E Z E R K R J   R E U   K F U R P   Z J   R   X F F U   U R P   R E U   R L K Y B V P   Z J   G C R Z U T K W Z J M V I P Y R I U


카이사르 암호 같다. Chiper니까 카이사르가 한번 쯤은 나올 것으로 생각했다.


엄청나게 많은 경우의 수가 있으니까 파이썬 공부 할겸 파이썬 코드를 조사했다.


다음에 CTF에서도 카이사르 나오게 되면 충분히 활용 가능할 듯 하다. 

kai.py


#-*-coding:utf-8-*-


# 카이사르 복호화 코드 


def decoding(encode_str,n):

decode_str =""


#D_str의 글자수만큼 반복 

for i in encode_str:

if(ord(i)>=65 and ord(i)<=90): #capital letter

if(ord(i)-n<65): #not capital letter

x = chr(ord(i)+(26-n))

else:

x = chr(ord(i)-n)


elif (ord(i)>=97 and ord(i) <= 122): #small letter

if(ord(i)-n < 97): #not small letter

x= chr(ord(i)+(26-n))

else:

x=chr(ord(i)-n)


decode_str += x


else:

decode_str +=i


return decode_str

#NVCTFDV KF JLEZERKRJ REU KFURP ZJ R XFFU URP REU RLKYBVP ZJ GCRZUTKWZJMVIPYRIU



text = raw_input("input >>")


for i in range(1,26): #ROT 0~25

print(str(i)+","+"=> "+decoding(text,i)+" ROT="+str(i))




input >>



1,=> mubsecu je ikdydqjqi qdt jetqo yi q weet tqo qdt qkjxauo yi fbqytsjvyiluhoxqht ROT=1

2,=> ltardbt id hjcxcpiph pcs idspn xh p vdds spn pcs pjiwztn xh eapxsriuxhktgnwpgs ROT=2

3,=> kszqcas hc gibwbohog obr hcrom wg o uccr rom obr oihvysm wg dzowrqhtwgjsfmvofr ROT=3

4,=> jrypbzr gb fhavangnf naq gbqnl vf n tbbq qnl naq nhguxrl vf cynvqpgsvfireluneq ROT=4

5,=> iqxoayq fa egzuzmfme mzp fapmk ue m saap pmk mzp mgftwqk ue bxmupofruehqdktmdp ROT=5

6,=> hpwnzxp ez dfytyleld lyo ezolj td l rzzo olj lyo lfesvpj td awltoneqtdgpcjslco ROT=6

7,=> govmywo dy cexsxkdkc kxn dynki sc k qyyn nki kxn kedruoi sc zvksnmdpscfobirkbn ROT=7

8,=> fnulxvn cx bdwrwjcjb jwm cxmjh rb j pxxm mjh jwm jdcqtnh rb yujrmlcorbenahqjam ROT=8

9,=> emtkwum bw acvqvibia ivl bwlig qa i owwl lig ivl icbpsmg qa xtiqlkbnqadmzgpizl ROT=9

10,=> dlsjvtl av zbupuhahz huk avkhf pz h nvvk khf huk hbaorlf pz wshpkjampzclyfohyk ROT=10

11,=> ckriusk zu yatotgzgy gtj zujge oy g muuj jge gtj gaznqke oy vrgojizloybkxengxj ROT=11

12,=> bjqhtrj yt xzsnsfyfx fsi ytifd nx f ltti ifd fsi fzympjd nx uqfnihyknxajwdmfwi ROT=12

13,=> aipgsqi xs wyrmrexew erh xshec mw e kssh hec erh eyxloic mw tpemhgxjmwzivclevh ROT=13

14,=> zhofrph wr vxqlqdwdv dqg wrgdb lv d jrrg gdb dqg dxwknhb lv sodlgfwilvyhubkdug ROT=14

15,=> ygneqog vq uwpkpcvcu cpf vqfca ku c iqqf fca cpf cwvjmga ku rnckfevhkuxgtajctf ROT=15

16,=> xfmdpnf up tvojobubt boe upebz jt b hppe ebz boe bvuilfz jt qmbjedugjtwfszibse ROT=16

17,=> welcome to suninatas and today is a good day and authkey is plaidctfisveryhard ROT=17

18,=> vdkbnld sn rtmhmzszr zmc snczx hr z fnnc czx zmc ztsgjdx hr okzhcbsehrudqxgzqc ROT=18

19,=> ucjamkc rm qslglyryq ylb rmbyw gq y emmb byw ylb ysrficw gq njygbardgqtcpwfypb ROT=19

20,=> tbizljb ql prkfkxqxp xka qlaxv fp x dlla axv xka xrqehbv fp mixfazqcfpsbovexoa ROT=20

21,=> sahykia pk oqjejwpwo wjz pkzwu eo w ckkz zwu wjz wqpdgau eo lhwezypbeoranudwnz ROT=21

22,=> rzgxjhz oj npidivovn viy ojyvt dn v bjjy yvt viy vpocfzt dn kgvdyxoadnqzmtcvmy ROT=22

23,=> qyfwigy ni mohchunum uhx nixus cm u aiix xus uhx uonbeys cm jfucxwnzcmpylsbulx ROT=23

24,=> pxevhfx mh lngbgtmtl tgw mhwtr bl t zhhw wtr tgw tnmadxr bl ietbwvmybloxkratkw ROT=24

25,=> owdugew lg kmfafslsk sfv lgvsq ak s yggv vsq sfv smlzcwq ak hdsavulxaknwjqzsjv ROT=25

 


여기에 정답이 있다 ~ 

'0x02 Reverse Engineer > 0x03. Etc' 카테고리의 다른 글

suninatas 28번 FORENSICS  (0) 2018.01.02
suninatas 21번 문제 FORENSICS  (0) 2017.12.31
suninatas FORENSICS 19번 문제  (0) 2017.12.31
suninatas 18번 FORENSICS  (0) 2017.12.31
suninatas FORENSIC 15  (0) 2017.12.31
suninatas MISC 17번 문제  (0) 2017.12.31
0 Comments
댓글쓰기 폼