第一小节:HTTP Basics:使用Proxy软件(例如Webscarab)来截断浏览器(客户端)和Server之间的HTTP通信,之后任意篡改得到预期结果即可。
第二小节:HTTP Splitting:(其实应该为HTTP Response Splitting)
分为两步
1、HTTP Splitting:通过注入HTTP request使得Server返回两个HTTP response(最起码是使得接收到Server返回响应的目标自己认为是接收到了两个HTTP response),而不是一个。通过精心构造这第二个HTTP响应,攻击者可以达到任意目的!该攻击是因为server没有检查非法的数据输入就进行了请求的重定向(code 3x x , "setcookie" 或者 "Location")。
2、Cache Poisoning;
HTTP Response Splitting介绍:
“HTTP Response Splitting” is a new application attack technique which enables various new attacks such as web cache poisoning, cross user defacement, hijacking pages with sensitive user information and an old favorite, cross-site scripting (XSS). This attack technique, and the derived attacks from it, are relevant to most web environments and is the result of the application’s failure to reject illegal user input, in this case, input containing malicious or unexpected characters.
HTTP Response Splitting漏洞成因:
The HTTP response splitting vulnerability is the result of the application’s failure to
reject illegal user input. Specifically, input containing malicious or unexpected CR
and LF characters.
HTTP Response Splitting攻击发生的前提条件是——Server存在安全漏洞时,即Server没有拒绝客户端的非法输入,并且Server脚本将用户输入的数据直接嵌入了HTTP response headers中。
并且,
HTTP1.1允许客户端和服务器在一个相同的TCP会话中交换多个HTTP请求,而HTTP1.0在每个HTTP交换之前都必需建立一个TCP连接。
HTTP Response Splitting攻击中的角色分析:
1、Web Server(具有可促使HTTP Response Splitting的安全漏洞)
2、Victim Target:一个能与Web Server正常交互的客户端(在WebGoat中也由Attacker来扮演)。可以为一个browser(一般具有浏览器cache)或者一个cache server(forward/reverse proxy)
3、Attacker——发启攻击者
HTTP Response Splitting攻击本质:
The essence of HTTP Response Splitting is the attacker’s ability to send a single HTTP request that forces the web server to form an output stream, which is then interpreted by the target as two HTTP responses instead of one response, in the normal case. The first response may be partially controlled by the attacker, but this is less important. What is material is that the attacker completely controls the form of the second response from the HTTP status line to the last byte of the HTTP response body. Once this is possible, the attacker realizes the attack by sending two requests through the target. The first one invokes two responses from the web server, and the second re