there is nothing(i春秋CTF題解)


 

(1)打開頁面,顯示為:there is nothing

 

 

(2)抓包發現提示

 

(3)hint:ip,Large internal network

意為最大的內網網段IP,hint: ip,Large internal network(最大內網ip),內網ip中最大的網段應該就是10.0.0.0了,所以我們偽造ip再一次訪問題目鏈接,我們可以用火狐的插件偽造,(modify headers)隨便偽造10.0.0.0網段的ip

 

 

(4)確定后刷新網頁,發現網頁自動跳轉到別的頁面,根據提示,show me your key;使用post或者get請求進行request

(5)很好的出現了以下語句:
key is not right,md5(key)==="3a7525f5c934d05f8e381a9a8f40cc00",and the key is ichunqiu[a-z]{5}

ichunqiu為md5的前8個字母,后5個字母無告訴,需要根據3a7525f5c934d05f8e381a9a8f40cc00來破解剩下的5個字母。

可以使用:https://www.somd5.com/
也可以自己寫腳本:

 

import hashlib def md5(data): m=hashlib.md5() m.update(data.encode("utf8")) a=m.hexdigest() return a a = 'ichunqiu' b = 'abcdefghigklmnopqrstuvwxyz'
for q in b:
for w in b:
for e in b:
for r in b:
for t in b:
if md5(a+q+w+e+r+t)=='3a7525f5c934d05f8e381a9a8f40cc00':
print(q+w+e+r+t)

 

  

 

(6)然后將ichunqiu與sixok拼接為key再次進行請

 

(7)訪問NextStep.php頁面

 

 

(8)接下來進行解密即可:

 

<?php function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) { $ckey_length = 4; $key = md5($key ? $key : UC_KEY); $keya = md5(substr($key, 0, 16)); $keyb = md5(substr($key, 16, 16)); $keyc = $ckey_length ? ($operation == 'DECODE' ? substr($string, 0, $ckey_length) : substr(md5(microtime()), -$ckey_length)) : ''; $cryptkey = $keya . md5($keya . $keyc); $key_length = strlen($cryptkey); $string = $operation == 'DECODE' ? base64_decode(substr($string, $ckey_length)) : sprintf('%010d', $expiry ? $expiry + time() : 0) . substr(md5($string . $keyb), 0, 16) . $string; $string_length = strlen($string); $result = ''; $box = range(0, 255); $rndkey = array(); for ($i = 0; $i <= 255; $i++) { $rndkey[$i] = ord($cryptkey[$i % $key_length]); } for ($j = $i = 0; $i < 256; $i++) { $j = ($j + $box[$i] + $rndkey[$i]) % 256; $tmp = $box[$i]; $box[$i] = $box[$j]; $box[$j] = $tmp; } for ($a = $j = $i = 0; $i < $string_length; $i++) { $a = ($a + 1) % 256; $j = ($j + $box[$a]) % 256; $tmp = $box[$a]; $box[$a] = $box[$j]; $box[$j] = $tmp; $result .= chr(ord($string[$i]) ^ ($box[($box[$a] + $box[$j]) % 256])); } if ($operation == 'DECODE') { if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26) . $keyb), 0, 16)) { return substr($result, 26); } else { return ''; } } else { return $keyc . str_replace('=', '', base64_encode($result)); } } echo authcode("d04aRj3IDNQMDylF8SRI1gUzQRCIrPKGLMZIN0UEgOk6bElT+K0ghD5h5pv73Vw2S4IKkp1bg77iEnU0228LI9nYwj0U+Og", $operation = 'DECODE', $key = 'ichunqiusixok', $expiry = 0) ?>

 

  

(9)然后進行破解:

 

 

(10)使用php運行代碼即可

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM