`
zhubin215130
  • 浏览: 142391 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

【转】XST Strikes Back

阅读更多
Amit Klein, January 2006

Introduction
============

About three years ago, the concept of "Cross Site Tracing" [1]
was introduced to the web application security community. In
essence, the classic XST is about amplifying an existing XSS
vulnerability such that HttpOnly cookies and HTTP authentication
credentials can be compromised. This is done using a client side
XmlHttpRequest object that sends a TRACE request back to the
server, receives the request echoed back by the server's TRACE
function, and extracts the information from the echoed back
request.
The recommendation in [1] is to turn off TRACE support in the web
server, which indeed takes care of the attack as described.

However, let us now consider a situation wherein there is a proxy
server somewhere between the client (browser) and the server. In
such case, it is possible to force the proxy server (at least, in
theory) to respond to the TRACE request, rather than the origin
server itself. Thus, HTTP TRACE can still be used to compromise
the credentials of the user, even if the server does not support
the TRACE request.

The technique
=============

Forcing the first proxy server in the chain to respond to the
TRACE request (rather than forward it) is as simple as including
an HTTP request header "Max-Forwards: 0" ([2], section 14.31).

So, for IE (up to and including 6.0 SP1) and for Mozilla/Firefox
(up to and including Firefox 1.0.6), the XSS payload should be
(IE code, Mozilla/Firefox modifications commented):

var x = new ActiveXObject("Microsoft.XMLHTTP"); 
// var x = new XMLHttpRequest();
x.open("TRACE","/",false);
x.setRequestHeader("Max-Forwards","0");
x.send(); 
// x.send("");
alert(x.responseText);


In IE 6.0 SP2, it seems that Microsoft silently removed support
for TRACE in the XmlHttpRequest object. That is, no method
starting with "TRACE" is allowed. However, a simple trick,
involving a technique similar to the one used in [3] and [4] can
be used to bypass this protection. Instead of using "TRACE" for
the method, one can simply use "\r\nTRACE". To quote from [2]
(section 4.1):

"In the interest of robustness, servers SHOULD ignore any
empty line(s) received where a Request-Line is expected. In
other words, if the server is reading the protocol stream
at the beginning of a message and receives a CRLF first, it
should ignore the CRLF."

So the XSS payload for IE 6.0 SP2 would be:

var x = new ActiveXObject("Microsoft.XMLHTTP");
x.open("\r\nTRACE","/",false);
x.setRequestHeader("Max-Forwards","0");
x.send();
alert(x.responseText);


Squid (2.5stable10/NT) ,Apache (2.0.54 mod_proxy) and other
popular proxy servers were found to support TRACE and Max-
Forwards.

Recommendations
===============

Proxy server vendors
--------------------

1. Ship proxy servers with default secure configuration, namely

no TRACE support disabled.

2. In the least, enable turning off support for TRACE via a
configuration option.

Proxy server owners/maintainers
-------------------------------

Disable support for TRACE.

1. For Squid, add the following to the Squid configuration file
(squid.conf):

acl TRACE method TRACE
...
http_access deny TRACE

2. For Apache, use mod_rewrite to prevent support for TRACE (see
[1]). Make sure to place the directive in the <proxy> section of
the httpd.conf file. Also, It would be a good idea to append the
"[nocase]" flag to the RewriteCond directive, to ensure case
insensitive comparison (though it seems that Apache will only
serve fully uppercase HTTP methods).

Browser vendors
--------------

Disable support for TRACE in the XmlHttpRequest object. Make sure
you do it right though.

Web site owners
---------------

As a workaround (perhaps not too practical), enable SSL traffic
only to your site.

Summary
=======

This is yet another example of peripheral web security issue,
such as the ones discussed in [5]. A web application may be
compromised through issues that are beyond the control of the web
site owner - in this case, support for TRACE in browsers and
proxy servers. In fact, in many cases the site owner has no way
of even knowing that the attack took place, because the TRACE
request is answered at the proxy server, and never arrives at the
web server (of course, if the first proxy server is the site's
reverse proxy server, or if no proxy server at all is present,
then the site owner may find out).

It seems that the TRACE method should be disabled across the
board - not just in web servers, but also in proxy servers and in
browsers (and possibly in other web devices).

References
==========

[1] "Cross-Site Tracing (XST)", Jeremiah Grossman, January 20th,
2003
http://www.cgisecurity.com/whitehat-mirror/WhitePaper_screen.pdf

[2] "Hypertext Transfer Protocol -- HTTP/1.1" RFC 2616
http://www.ietf.org/rfc/rfc2616.txt

[3] "XS(T) attack variants which can, in some cases, eliminate
the need for TRACE", Amit Klein, WebAppSec mailing list submission,
January 26th, 2003
http://www.securityfocus.com/archive/107/308433

[4] "Exploiting the XmlHttpRequest object in IE - Referrer
spoofing, and a lot more...", Amit Klein, BugTraq mailing list
submission, September 24th, 2005
http://www.securityfocus.com/archive/1/411585

[5] "Meanwhile, at the other side of the web server", Amit Klein,
BugTraq mailing list submission, June 9th, 2005
http://www.securityfocus.com/archive/1/401866</proxy>
分享到:
评论

相关推荐

    ISE Synthese_xst file

    由于提供的文件内容非常有限,并且片段中包含大量与文档授权和使用声明相关的信息,这些信息并不是关于ISE Synthese_xst工具的实际技术内容。考虑到这一点,我将基于标题和描述中提及的主题“ISE Synthese_xst user ...

    XST仪表手册.doc

    【XST仪表手册】是关于XST系列单输入通道数字式智能仪表的详细技术文档,主要涵盖该仪表的概述、型号规格、技术规格、安装与接线、操作、功能及参数说明、调校、故障处理、抗干扰措施、非标准功能等方面的信息。...

    XST-User-Guide.zip_xst user guide

    《XST用户指南》是Xilinx公司为FPGA开发者提供的一份详尽的参考资料,主要针对Virtex-6和Spartan-6系列设备。这份文档深入浅出地介绍了如何在Xilinx FPGA环境下使用高级Verilog语言进行设计,帮助开发者理解和掌握...

    SPB-XST单通道智能数显仪表.zip

    SPB-XST单通道智能数显仪表是一款广泛应用在工业自动化领域的高级测量设备,它集成了数据采集、处理和显示功能,能实时反映被测物理量的变化。这款仪表以高精度、稳定性强和用户友好的界面著称,是现代工业生产线...

    苏州迅鹏仪表SPB-XST系列单输入通道数字式智能仪表.zip

    苏州迅鹏仪表SPB-XST系列单输入通道数字式智能仪表是工业自动化领域中常见的一种设备,主要用于数据采集和过程控制。该仪表以其精准、高效和智能化的特点,广泛应用于电力、化工、冶金等多个行业。下面将详细介绍这...

    xst.zip_typical8qo_xst user guide

    XST User Guide Xilinx is disclosing this user guide, manual, release note, and/or specification (the "Documentation") to you solely for use in the development of designs to operate with ...

    帅仪XST-A智能自整定PID调节仪说明书.pdf

    1. 帅仪XST-A智能自整定PID调节仪是一款具有自整定功能的PID调节设备。PID调节是一种常见的反馈控制方式,它通过比例(Proportional,P)、积分(Integral,I)和微分(Derivative,D)三个环节的组合,对控制对象...

    Points XST-开源

    "Points XST-开源"是一款基于开源理念设计的积分逻辑游戏。开源软件意味着该程序的源代码对公众开放,允许用户自由查看、使用、修改和分发。这种开放性不仅鼓励社区成员参与到软件的开发与改进中,还为用户提供了一...

    xst19900809

    【标题】"xst19900809" 暗示这可能是一个由用户"xst"在1990年8月9日分享的资源,很可能是指Visual FoxPro的一个精简版本。 【描述】提到“精简版VF”,意味着这个软件包是Visual FoxPro的轻量化版本,它在保持核心...

    xst basic-开源

    【XST Basic 开源项目详解】 XST Basic 是一个开源的MS-DOS Basic解释器,其版本号为1.x。这个项目特别之处在于它包含了C语言发射器,使得程序能够被编译为C代码,从而提高了执行效率和可移植性。主要由C语言编写,...

    给您聊聊XST 和Synplify Pro 综合结果的区别

    ### XST与Synplify Pro综合结果的区别分析 在数字逻辑设计领域,XST与Synplify Pro作为两款主流的逻辑综合工具,被广泛应用于FPGA/CPLD的设计流程之中。尽管它们的目标都是将高层次的设计描述转化为底层的硬件实现...

    XST班级动态网站源码 XSTDynamicClass.rar

    XST班级动态网站源码 源码描述: 一、源码特点 班级动态管理网站,分前后台,可添加相册、新闻留言管理等,适用于毕业设计和学习使用,欢迎下载 二、菜单功能 前台页面 1、首页 2、班级动态 3、班级相册 4、...

    单通道智能数显仪表|数显仪表|XST智能数显仪.zip

    这款XST智能数显仪具备高精度、高稳定性以及多功能性,是现代工厂监控系统中的重要组成部分。 数显仪表的核心特性包括: 1. **数据采集与处理**:通过内部的A/D转换器,数显仪表能够接收并处理各种模拟信号,如4-...

    帅仪XST-M手操器说明书.pdf

    根据提供的文件内容,帅仪XST-M手操器说明书包含了手操器的电气参数、规格尺寸、功能特点等关键技术信息,尽管文档内容有些许OCR扫描错误和不连贯,但我们可以从中提炼出以下知识点: 1. 电气参数: - 手操器支持...

    XstReader:Xst Reader是Microsoft Outlook的.ost和.pst文件的开源查看器,完全用C#编写。 要下载当前版本的可执行文件,请转到发布标签

    Xst阅读器Xst Reader是Microsoft Outlook的.ost和.pst文件的开源查看器,完全用C#编写,仅需要.Net Framework 4,并且不依赖于任何Microsoft Office组件。 它呈现为一个简单,经典的三窗格邮件查看器: Xst Reader...

    XST单输入通道仪表 产品介绍.doc

    XST系列单输入通道数字式仪表是一款专门设计用于工业环境中的测量、控制和监测设备。该仪表能够与各种模拟量传感器和变送器配合工作,适用于处理多种物理量的测量,包括但不限于温度、压力、流量、液位、成分分析...

    帅仪XST-AY外给定PID调节仪说明书.pdf

    帅仪XST-AY外给定PID调节仪是一款工业自动化控制领域的调节设备,主要用于进行过程控制,以实现对温度、压力、流量、液位等物理量的精确控制。PID调节仪通过调节输入信号,将其转换为相应的控制输出,以达到调节目标...

    北京帅仪XST-C智能时间程序PID调节仪说明书.pdf

    北京帅仪XST-C智能时间程序PID调节仪是工业自动化领域中常用的控制设备,用于控制温度、压力、流量等过程变量。根据给出的部分内容,该调节仪具有以下特点和功能: 1. 电源要求:调节仪支持宽电压输入,可适应从12V...

Global site tag (gtag.js) - Google Analytics