PHP/ASP上傳漏洞探究

來源:互聯網
上載者:User
1:傳漏洞利用的原理只是針對form格式上傳的asp和php指令碼***
nc(netcat)
     用於提交資料包
     dos介面下運行:
     nc -vv www.***.com 80<1.txt
     -vv: 回顯
     80:    www連接埠
     1.txt: 就是你要發送的資料包
    (更多使用方法請查看本區的文章)
wse(wsockexpert)
     對本機連接埠的監視,抓取ie提交的資料包
2:漏洞原理
下面例子假設的前提
www主機:    www.***.com;
bbs路徑 :    /bbs/
漏洞源於對動網上傳檔案的研究,建議有一定編程經驗的
看看dvbbs的upfile.asp檔案,沒有必要全部看懂
upfile是通過產生一個form表上傳,如下
<form name="form" method="post" action="upfile.asp" ...>
<input type="hidden" name="filepath" value="uploadface">
<input type="hidden" name="act" value="upload">
<input type="file" name="file1">
<input type="hidden" name="fname">
<input type="submit" name="submit" value="上傳" ...></form>
用到的變數:
filepath 預設值uploadface 屬性hiden
act        預設值upload     屬性hiden
file1    就是你要傳的那個檔案
關鍵是 filepath 這個變數!
預設情況下我們的檔案上傳到www.***.com/bbs/uploadface/
檔案是用你的上傳時間命名的,就是upfile裡的這一句
filename=formpath&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&rannum&"."&fileext
--------------------------------------
我們知道電腦裡面的資料是一""為標緻的用過c語言的都知道
char data[]="bbs"
這個data數組長度是4: b b s
如果我們構造filepath如下,會怎麼樣呢?
filepath="/newmm.asp"
我們在2004.09.24.08.24傳的檔案就會發生變化

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.