IBM AppScan - Blind SQL Injection (TimeBased) - JSF 2.2 & Primefaces - JBOSS 7.2 EAP

IBM AppScan - Blind SQL Injection (Time Based) - JSF 2.2 & Primefaces - JBOSS 7.2 EAP

提问人:Ravi 提问时间:5/10/2020 最后编辑:Ravi 更新时间:5/20/2020 访问量:604

问:

原始发布 IBM AppScan

我们最近收到了来自 IBM AppScan DAST 的结果,其中一些结果没有多大意义。

高 -- 盲SQL注入(基于时间)

Parameter: form:propertyTree:0:j_idt126
Risk(s): It is possible to view, modify or delete database entries and tables
Fix: Review possible solutions for hazardous character injection

Image

盲SQL注入(基于时间)的第二种情况

URL: https://***/javax.faces.resource/components.js.xhtml
Parameter: v
Risk(s): It is possible to view, modify or delete database entries and tables
Fix: Review possible solutions for hazardous character injection

The following changes were applied to the original request:
- Set the value of the parameter 'v' to '7.0.9%27+where+sleep%280%29%3D0+--+'
- Set the value of the parameter 'v' to '7.0.9%27+where+sleep%28181%29%3D0+limit+1+--+'
- Set the value of the parameter 'v' to '7.0.9%27+where+sleep%280%29%3D0+--+'

Reasoning:
The first and third test responses were timed out and the second test response was received
normally

推理:第一和第三测试响应超时,正常接收第二测试响应

盲SQL注入的第3种情况(基于时间)

URL: https:/**/externalcasestart.xhtml
Parameter: javax.faces.source
Risk(s): It is possible to view, modify or delete database entries and tables
Fix: Review possible solutions for hazardous character injection

The following changes were applied to the original request:
- Set the value of the parameter 'javax.faces.source' to
'form%3AmainGridBodyTable+and+sleep%280%29'
- Set the value of the parameter 'javax.faces.source' to
'form%3AmainGridBodyTable+and+1%3D2+or+sleep%28181%29%3D0+limit+1+--+'
- Set the value of the parameter 'javax.faces.source' to
'form%3AmainGridBodyTable+and+sleep%280%29'
Reasoning:
The first and third test responses were timed out and the second test response was received
normally
Request/Response:

Request/Response:
POST /***/externalcasestart.xhtml HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 9.0; Win32)
Connection: keep-alive
Faces-Request: partial/ajax
X-Requested-With: XMLHttpRequest
Accept: application/xml, text/xml, */*; q=0.01
Accept-Language: en-US,en;q=0.9
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
javax.faces.partial.ajax=true& javax.faces.source=form%3AmainGridBodyTable+and+sleep%280%29 &javax
.faces .parti al.exe cute=f orm%3A mainGr idBody Table& javax. faces. partia l.rend er=for m%3Ama
inGrid BodyTa ble&fo rm%3Am ainGri dBodyT able=f orm%3A mainGr idBody Table& form%3 AmainG ridBod
yTable _pagin ation= true&f orm%3A mainGr idBody Table_ first= 0&form %3Amai nGridB odyTab le_r

寻找反馈和一些见解。

primefaces sql 注入 jsf-2.2 bluemix-app-scan

评论

0赞 Ravi 5/10/2020
我们的最终客户与不同的供应商一起测试了我们的应用程序 Pen,但这是我们第一次遇到 AppScan 报告。我们没有 ORM ,但是我们用于数据访问的核心模块已经进行了超过 12 年的渗透测试,没有任何问题。我们仍然不排除第一种情况,并试图确保我们有证据将其报告为误报,但第二种情况是完全错误的。
1赞 Ravi 5/11/2020
primefaces 中 v= 后面的 URL 只是一个版本标志,用于使 URL unqiue 因此,当新版本出现时,您的浏览器会加载新的 JS 或 CSS。forum.primefaces.org/viewtopic.php?f=3&t=61941 .它不是应用程序参数。
1赞 Melloware 5/11/2020
@Ravi是对的,它只是一个使 URL 唯一的版本参数,因此当 PF 7.0 我更新到 8.0 时,浏览器会强制刷新 CSS/JS。更改该 V 参数对 PrimeFaces 绝对没有影响。v
1赞 Ravi 5/11/2020
@Melloware修改javax.faces.source - 另一种误报情况。
1赞 Kukeltje 5/11/2020
听起来也像是误报。再一次在ajax调用中......因此,也许这里也预计不会有 200 个响应(顺便说一句,我在这个问题中添加了 bluemix-app-scan 标签。也许也可以将其添加到其他内容中

答:

0赞 Egret 5/20/2020 #1

我不能说这个特定的发现是否是误报,但我们看到很多这样的误报 - 当扫描以使系统过载的速率运行时,它会在响应中产生很多变化。对于某些参数,正确的注入将超时,因此它看起来像是测试人员的 SQL 注入。

这种类型的结果应该通过手动检查、单独的工具(例如SQLmap)或至少使用同一工具进行第二次运行,以查看它是否复制。如果这是不可能的,请通过代码审查来验证它,然后继续你的生活。

评论

1赞 Kukeltje 5/20/2020
这里的问题是测试是由客户完成的,客户“需要”一份干净的测试报告。因此,OP 不能简单地进行手动检查(客户不会相信这一点,但他们确实会推出奇怪的工具)。因此,仅仅“继续前进”就有点困难。