【问题标题】:IBM AppScan - Blind SQL Injection (Time Based) - JSF 2.2 & Primefaces - JBOSS 7.2 EAPIBM AppScan - 盲 SQL 注入(基于时间) - JSF 2.2 和 Primefaces - JBOSS 7.2 EAP
【发布时间】:2020-08-25 13:44:20
【问题描述】:

原帖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

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 注入的第三种情况(基于时间)

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

寻求反馈和一些见解。

【问题讨论】:

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

标签: primefaces sql-injection jsf-2.2 bluemix-app-scan


【解决方案1】:

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

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

【讨论】:

  • 这里的问题是,测试是由客户完成的,客户'needs',一份干净的测试报告。所以 OP 不能简单地进行手动检查(客户不会相信这一点,但他们确实推出了奇怪的工具)。所以只是“继续前进”有点困难。
猜你喜欢
  • 2021-08-16
  • 2014-09-24
  • 2021-06-07
  • 2020-03-29
  • 2020-04-29
  • 2015-09-26
  • 2023-03-28
  • 2020-01-20
  • 2020-11-04
相关资源
最近更新 更多