CTF密码学作业题笔记
1.奇怪的字符串
密文:89 51 82 109 89 50 86 122 97 71 107 61
对应的ascii码为 Y3RmY2VzaGk=
有=结尾 试试base64解码
ctfceshi
2.疑惑的汉字
密文:王夫 井工 夫口 由中人 井中 夫夫 由中大
当铺密码 : 67 84 70 123 82 77 125
转ascii :CTF{RM}
3.古典密碼
密文:{79 67 85 123 67 70 84 69 76 88 79 85 89 68 69 67 84 78 71 65 72 79 72 82 78 70 73 69 78 77 125 73 79 84 65}
根据ascii得到:
OCU { CFT
ELXOUYD
ECTNGAH
OHRNFIE
NM } IOTA列置换2764513得到:
CTF{COU
LDYOUEX
CHANGET
HEINFOR
MATION}
4.困在栅栏里的凯撒
密文:NlEyQd{seft}
先栅栏(6)然后凯撒加密( CTF{tianshu})
5.敌军情报
密文:45 46 45 46 32 45 32 46 46 45 46 32 46 45 32
摩斯密码 -.-. - ..-. .-
翻译:CTFA
6.Fair-Play
The quick brown fox jumps over the lazy dog!
ihxo{smzdodcikmodcismzd}
工具网址:http://rumkin.com/tools/cipher/playfair.php
解出:ctfx{playfairisfairplay}
提示:第一行是key 第二行是密文
7.我喜欢培根
密文:-- --- .-. ... . ..--.- .. ... ..--.- -.-. --- --- .-.. ..--.- -... ..- - ..--.- -... .- -.-. --- -. ..--.- .. ... ..--.- -.-. --- --- .-.. . .-. ..--.- -.. -.-. -.-. -.. -.-. -.-. -.-. -.. -.. -.. -.-. -.. -.-. -.-. -.-. -.. -.. -.-. -.-. -.-. -.-. -.-. -.-. -.-. -.-. -.-. -.. -.. -.-. -.. -.-. -.-. -.-. -.-. -.. -.-. -.-. -.-. -.-. -.-. / -.-. -.. -.-. -.-. -.-. -.. -.-. -.-. -.. -.-. / -.-. -.-. -.-. -.. -.-. -.-. -.. -.. -.. -.-. -.-. -.. -.. -.. -.-. -.-. -.. -.-. -.. -..
解摩斯密码:
MORSE..--.-IS..--.-COOL..--.-BUT..--.-BACON..--.-IS..--.-COOLER..--.-DCCDCCCDDDCDCCCDDCCCCCCCCCDDCDCCCCDCCCCC/CDCCCDCCDC/CCCDCCDDDCCDDDCCDCDD
解培根:
CTF{SHIYANBA IS COOL}
8.Decode
0x253464253534253435253335253433253661253435253737253464253531253666253738253464253434253637253462253466253534253662253462253464253534253435253738253433253661253435253737253466253531253666253738253464253434253435253462253464253534253435253332253433253661253435253738253464253531253666253738253464253534253535253462253464253534253431253330253433253661253435253737253465253531253666253738253464253661253435253462253466253534253633253462253464253534253435253737253433253661253662253334253433253661253662253333253433253661253435253738253465253431253364253364
16进制数还原得到:
%4d%54%45%35%43%6a%45%77%4d%51%6f%78%4d%44%67%4b%4f%54%6b%4b%4d%54%45%78%43%6a%45%77%4f%51%6f%78%4d%44%45%4b%4d%54%45%32%43%6a%45%78%4d%51%6f%78%4d%54%55%4b%4d%54%41%30%43%6a%45%77%4e%51%6f%78%4d%6a%45%4b%4f%54%63%4b%4d%54%45%77%43%6a%6b%34%43%6a%6b%33%43%6a%45%78%4e%41%3d%3d
url解码:
MTE5CjEwMQoxMDgKOTkKMTExCjEwOQoxMDEKMTE2CjExMQoxMTUKMTA0CjEwNQoxMjEKOTcKMTEwCjk4Cjk3CjExNA
base64解码:
119
101
108
99
111
109
101
116
111
115
104
105
121
97
110
98
97
114
ascii解码:welcometoshiyanbar
8.凯撒和某某加密
密文:aZZg/x\ZbavpZiEZp+n)o+
先凯撒。在栅栏(3)
flag{Just_4_fun_0.0}
9.你好兔子
U2FsdGVkX197ihEWFWSF8qzdJ/Y1GS6pieLsbQHFUA==
工具:http://www.sojson.com/encrypt_rabbit.html
sImPle_xUe_yuan
10.他的情书
源码中找到:
%3Ccenter%3E%0A%0A%3Cp%3E%u4E0D%u96BE%u7684%uFF0C%u8F93%u5165%u5BC6%u7801%u8FA3%21%3C%2fp%3E%0A%0A%3Cscript%20language%3D%22JScript.Encode%22%3E%23@%7E%5EEwAAAA%3D%3DC%5E%2b.D%60rt%2b%5EVKE%23p@%23@%26EwUAAA%3D%3D%5E%23%7E@%0A%0A%3C%21--%0A%09%2f%2f%2a%2a%2a%28%u3065%uFFE3%203%uFFE3%29%u3065%u6211%u8981%u62B1%u62B1%21%21%21%2a%2a%2a%0Aeval%28function%28p%2Ca%2Cc%2Ck%2Ce%2Cd%29%7Be%3Dfunction%28c%29%7Breturn%28c%3Ca%3F%22%22%3Ae%28parseInt%28c%2fa%29%29%29%2b%28%28c%3Dc%25a%29%3E35%3FString.fromCharCode%28c%2b29%29%3Ac.toString%2836%29%29%7D%3Bif%28%21%27%27.replace%28%2f%5E%2f%2CString%29%29%7Bwhile%28c--%29d%5Be%28c%29%5D%3Dk%5Bc%5D%7C%7Ce%28c%29%3Bk%3D%5Bfunction%28e%29%7Breturn%20d%5Be%5D%7D%5D%3Be%3Dfunction%28%29%7Breturn%27%5C%5Cw%2b%27%7D%3Bc%3D1%3B%7D%3Bwhile%28c--%29if%28k%5Bc%5D%29p%3Dp.replace%28new%20RegExp%28%27%5C%5Cb%27%2be%28c%29%2b%27%5C%5Cb%27%2C%27g%27%29%2Ck%5Bc%5D%29%3Breturn%20p%3B%7D%28%27%3C%21--v%20p%28%29%7B6%208%3Dh.o.e.n%3B6%202%3D%22q%3D%3D%22%3B6%20a%3D%5C%27t.s%3Fe%3D%5C%27%3B6%20d%3Dj.r%3B6%20k%3D%5C%27%5C%27%3B6%20g%3D2.9%28m%2C4%2a4%29%2b2.9%28l%2C5%2a5%29%2b2.9%280%2C1%29%2b2.b%287%2C1%29%2b2.b%28z%2C1%29%2b2.b%28B%2C1%29%2b2.9%283%2b3%2C7%29%3B8%3Dd.b%28d.f%28%5C%27%3F%5C%27%29%2b1%29%3Ba%3Da.9%280%2Ca.f%28%5C%27%3F%5C%27%29%2b1%29%2b%5C%27A%3D%5C%27%3Bw%28i%3D0%3Bi%3C8.y%3Bi%2b%2b%29%7Bx%288.c%28i%29%3D%3Dg.c%28i%29%29%7Bh.u%288.c%28i%29%29%7D%7Dj%3Da%2b8%7D--%3E%27%2C38%2C38%2C%27%7C%7Ccry%7C%7C%7C%7Cvar%7C%7Cpass%7Csubstring%7Caddr%7Csubstr%7CcharAt%7Clocatie%7Cpasswd%7CindexOf%7Cpass2%7Cdocument%7C%7Clocation%7Cout%7C24%7C15%7Cvalue%7Cform%7Czhegejiamiyidiandoubuku%7CRm9yM0re354v5E4FUg5FasDboooo%7Chref%7Cphp%7Csoroki%7Cwrite%7Cfunction%7Cfor%7Cif%7CLen%7C11%7Cl0vau%7C13%27.split%28%27%7C%27%29%2C0%2C%7B%7D%29%29%0A--%3E%0A%3C%2fscript%3E%0A%0A%3Cform%20name%3D%22form%22%3E%0APassword%3A%20%3Cinput%20type%3D%22password%22%20name%3D%22passwd%22%3E%20%3Cinput%20type%3D%22button%22%20value%3D%22boom%21%21%21%21%22%20onClick%3D%22zhegejiamiyidiandoubuku%28%29%22%3E%0A%3C%2fform%3E%0A%0A%3C%2fcenter%3E
enescape解密:js代码解密
function zhegejiamiyidiandoubuku()
{var pass=document.form.passwd.value;
var cry="Rm9yM0re354v5E4FUg5FasDboooo==";
var addr='soroki.php?passwd=';
var locatie=location.href;var out='';
var pass2=cry.substring(15,4*4)+cry.substring(24,5*5)+cry.substring(0,1)+cry.substr(7,1)+cry.substr(11,1)+cry.substr(13,1)+cry.substring(3+3,7);
pass=locatie.substr(locatie.indexOf('?')+1);addr=addr.substring(0,addr.indexOf('?')+1)+'l0vau=';
for(i=0;i<pass.Len;i++)
{
if(pass.charAt(i)==pass2.charAt(i))
{document.write(pass.charAt(i))}
}
location=addr+pass
手动运行的