SlideShare uma empresa Scribd logo
1 de 15
By Sharath Unni 
@haxorhead
 Involved parties 
 Root problem 
 Example 
 Web cache poisoning 
 XSS 
 Other derived attacks 
 Recommendations
 There are always 3 parties (atleast) involved 
 Web server: hosts the application, with the 
vulnerability. (Tomcat, Apache, IIS etc.) 
 Target: An entity that interacts with the web 
server on behalf of the client. Eg: squid proxy 
 Attacker: initiates the attack
 Failure to reject illegal user input 
 Specifically input containing CR and LF 
characters 
 Carriage Return and Line Feed - %0d%0a 
(rn) 
 The data (user input) is included in an HTTP 
response header without any validation. 
 HTTP connection sharing 
 Caching – less control over the site content, 
improve performance, speed etc.
 Normal request: 
http://www.the.site/new_page.asp?lang=german 
 Normal response: 
HTTP/1.0 302 Redirect 
Location: 
http://www.the.site/new_page.asp?lang=german 
Connection: Keep-Alive 
Content-Length: 0
 Request (attacker): 
http://www.the.site/welcome.asp?lang=Foo%0d%0aConnection:%20Keep- 
Alive%0d%0aContent- 
Length:%200%0d%0a%0d%0aHTTP/1.0%20200%20OK%0d%0aContent- 
Type:%20text/html%0a%0aContent- 
Length:%2020%0d%0a%0d%0a<html>Pwned!</html> 
 Response: 
HTTP/1.0 302 Redirect 
Location: http://www.the.site/new_page.asp?lang=Foo 
Connection: Keep-Alive 
Content-Length: 0 
HTTP/1.0 200 OK 
Content-Type: text/html 
Content-Length: 20 
<html>Pwned!</html>Connection: Keep-Alive 
Content-Length: 0
 Attack overview: 
 Attacker sends 2 requests: 
 1. HTTP response splitter (with %0d%0a) 
 2. An innocent request 
 Proxy will match 1st request -> 1st reponse 
 2nd request (innocent) -> 2nd response in 
cache (Pwned!)
9 
1st attacker request 
(response splitter) 1st attacker request 
302 
302 
200 
(Pwned!) 
(response splitter) 
2nd attacker request 
(innocent /index.html) 
2nd attacker request 
(innocent /index.html) 
200 
(Pwned!) 200 
(Welcome)
 XSS: The second response is controlled by the 
attacker and JavaScript or HTML code can be 
inserted.
 Evade CSP – Content Security Policy – instructs 
the client browser from which location and/or 
which type of resources are allowed to be loaded 
 Certain browsers will interpret the first 
occurrence of HTTP header 
 HTTP Response header 
Content-Security-Policy: 
X-Content-Security-Policy 
Lang=en_US%0d%0aX-Content-Security-Policy: allow *
 For developers: 
◦ Validate user input and remove CRLF characters 
(particularly when setting cookie and redirecting) 
 For proxy vendors: 
◦ Avoid sharing server TCP connections among 
different virtual hosts. 
◦ Maintain request host header correctly from the URL 
and not from the Host header.
Thank you 
@haxorhead

Mais conteúdo relacionado

Mais procurados

OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application Vulnerabilities
Software Guru
 
PHISHING PROJECT REPORT
PHISHING PROJECT REPORTPHISHING PROJECT REPORT
PHISHING PROJECT REPORT
vineetkathan
 
Module 6 Session Hijacking
Module 6   Session HijackingModule 6   Session Hijacking
Module 6 Session Hijacking
leminhvuong
 

Mais procurados (20)

Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protection
 
Secure Coding 101 - OWASP University of Ottawa Workshop
Secure Coding 101 - OWASP University of Ottawa WorkshopSecure Coding 101 - OWASP University of Ottawa Workshop
Secure Coding 101 - OWASP University of Ottawa Workshop
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
Api security-testing
Api security-testingApi security-testing
Api security-testing
 
Secure coding practices
Secure coding practicesSecure coding practices
Secure coding practices
 
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
 
Broken access control
Broken access controlBroken access control
Broken access control
 
Infocyte - Digital Forensics and Incident Response (DFIR) Training Session
Infocyte - Digital Forensics and Incident Response (DFIR) Training SessionInfocyte - Digital Forensics and Incident Response (DFIR) Training Session
Infocyte - Digital Forensics and Incident Response (DFIR) Training Session
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
OWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application VulnerabilitiesOWASP Top 10 Web Application Vulnerabilities
OWASP Top 10 Web Application Vulnerabilities
 
Introduction To CodeIgniter
Introduction To CodeIgniterIntroduction To CodeIgniter
Introduction To CodeIgniter
 
PHISHING PROJECT REPORT
PHISHING PROJECT REPORTPHISHING PROJECT REPORT
PHISHING PROJECT REPORT
 
XSS - Attacks & Defense
XSS - Attacks & DefenseXSS - Attacks & Defense
XSS - Attacks & Defense
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
OAuth2 + API Security
OAuth2 + API SecurityOAuth2 + API Security
OAuth2 + API Security
 
SQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint PresentationSQL Injections - A Powerpoint Presentation
SQL Injections - A Powerpoint Presentation
 
Broken access controls
Broken access controlsBroken access controls
Broken access controls
 
Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)
 
OWASP Top 10 - 2017
OWASP Top 10 - 2017OWASP Top 10 - 2017
OWASP Top 10 - 2017
 
Module 6 Session Hijacking
Module 6   Session HijackingModule 6   Session Hijacking
Module 6 Session Hijacking
 

Semelhante a Http response splitting

logout.php Session Data after Logout Username Email . $_.docx
logout.php Session Data after Logout  Username  Email  . $_.docxlogout.php Session Data after Logout  Username  Email  . $_.docx
logout.php Session Data after Logout Username Email . $_.docx
smile790243
 
Pentesting web applications
Pentesting web applicationsPentesting web applications
Pentesting web applications
Satish b
 
Presentation (PowerPoint File)
Presentation (PowerPoint File)Presentation (PowerPoint File)
Presentation (PowerPoint File)
webhostingguy
 
Presentation (PowerPoint File)
Presentation (PowerPoint File)Presentation (PowerPoint File)
Presentation (PowerPoint File)
webhostingguy
 

Semelhante a Http response splitting (20)

Cyber Security-Ethical Hacking
Cyber Security-Ethical HackingCyber Security-Ethical Hacking
Cyber Security-Ethical Hacking
 
Browser Security
Browser SecurityBrowser Security
Browser Security
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008Owasp Top 10 - Owasp Pune Chapter - January 2008
Owasp Top 10 - Owasp Pune Chapter - January 2008
 
Xssandcsrf
XssandcsrfXssandcsrf
Xssandcsrf
 
logout.php Session Data after Logout Username Email . $_.docx
logout.php Session Data after Logout  Username  Email  . $_.docxlogout.php Session Data after Logout  Username  Email  . $_.docx
logout.php Session Data after Logout Username Email . $_.docx
 
Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation
 
Webbasics
WebbasicsWebbasics
Webbasics
 
Top 10 Security Vulnerabilities (2006)
Top 10 Security Vulnerabilities (2006)Top 10 Security Vulnerabilities (2006)
Top 10 Security Vulnerabilities (2006)
 
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application Security
 
Module 11 (hacking web servers)
Module 11 (hacking web servers)Module 11 (hacking web servers)
Module 11 (hacking web servers)
 
Cache poisoning
Cache poisoningCache poisoning
Cache poisoning
 
Pentesting web applications
Pentesting web applicationsPentesting web applications
Pentesting web applications
 
Appl layer
Appl layerAppl layer
Appl layer
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingReflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site Scripting
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encoding
 
Presentation (PowerPoint File)
Presentation (PowerPoint File)Presentation (PowerPoint File)
Presentation (PowerPoint File)
 
Presentation (PowerPoint File)
Presentation (PowerPoint File)Presentation (PowerPoint File)
Presentation (PowerPoint File)
 
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
Проксирование HTTP-запросов web-акселератором / Александр Крижановский (Tempe...
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

Http response splitting

  • 1. By Sharath Unni @haxorhead
  • 2.  Involved parties  Root problem  Example  Web cache poisoning  XSS  Other derived attacks  Recommendations
  • 3.  There are always 3 parties (atleast) involved  Web server: hosts the application, with the vulnerability. (Tomcat, Apache, IIS etc.)  Target: An entity that interacts with the web server on behalf of the client. Eg: squid proxy  Attacker: initiates the attack
  • 4.  Failure to reject illegal user input  Specifically input containing CR and LF characters  Carriage Return and Line Feed - %0d%0a (rn)  The data (user input) is included in an HTTP response header without any validation.  HTTP connection sharing  Caching – less control over the site content, improve performance, speed etc.
  • 5.  Normal request: http://www.the.site/new_page.asp?lang=german  Normal response: HTTP/1.0 302 Redirect Location: http://www.the.site/new_page.asp?lang=german Connection: Keep-Alive Content-Length: 0
  • 6.  Request (attacker): http://www.the.site/welcome.asp?lang=Foo%0d%0aConnection:%20Keep- Alive%0d%0aContent- Length:%200%0d%0a%0d%0aHTTP/1.0%20200%20OK%0d%0aContent- Type:%20text/html%0a%0aContent- Length:%2020%0d%0a%0d%0a<html>Pwned!</html>  Response: HTTP/1.0 302 Redirect Location: http://www.the.site/new_page.asp?lang=Foo Connection: Keep-Alive Content-Length: 0 HTTP/1.0 200 OK Content-Type: text/html Content-Length: 20 <html>Pwned!</html>Connection: Keep-Alive Content-Length: 0
  • 7.  Attack overview:  Attacker sends 2 requests:  1. HTTP response splitter (with %0d%0a)  2. An innocent request  Proxy will match 1st request -> 1st reponse  2nd request (innocent) -> 2nd response in cache (Pwned!)
  • 8.
  • 9. 9 1st attacker request (response splitter) 1st attacker request 302 302 200 (Pwned!) (response splitter) 2nd attacker request (innocent /index.html) 2nd attacker request (innocent /index.html) 200 (Pwned!) 200 (Welcome)
  • 10.  XSS: The second response is controlled by the attacker and JavaScript or HTML code can be inserted.
  • 11.  Evade CSP – Content Security Policy – instructs the client browser from which location and/or which type of resources are allowed to be loaded  Certain browsers will interpret the first occurrence of HTTP header  HTTP Response header Content-Security-Policy: X-Content-Security-Policy Lang=en_US%0d%0aX-Content-Security-Policy: allow *
  • 12.
  • 13.
  • 14.  For developers: ◦ Validate user input and remove CRLF characters (particularly when setting cookie and redirecting)  For proxy vendors: ◦ Avoid sharing server TCP connections among different virtual hosts. ◦ Maintain request host header correctly from the URL and not from the Host header.

Notas do Editor

  1. Source: OWASPAppsecEU2006
  2. http://www.securityfocus.com/archive/1/411585