SlideShare a Scribd company logo
Cross-Site Request Forgery “The Sleeping Giant of Website Vulnerabilities” Jeremiah Grossman | WhiteHat Security | 04/09/08 | Session Code: HT1-20304
Jeremiah Grossman ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Symantec Qualys Nessus nCircle WhiteHat Security “ well-known” vulnerabilities Vulnerability Stack Focus on “custom web applications”
Target #1 ,[object Object],[object Object],[object Object],[object Object]
The big 3! Cross-Site Scripting (XSS) -  forcing malicious content to be served by a trusted website to an unsuspecting user. Cross-Site Request Forgery (CSRF) -  forcing an unsuspecting user’s browser to send requests they didn’t intend. (wire transfer, blog post, etc.)  JavaScript Malware -  payload of an XSS or CSRF attack, typically written in JavaScript, and executed in a browser.
What's in a name? 2000 Client-Side Trojans  Zope discovers Web version of Confused  Deputy Cross Site Request Forgery  Peter Watkins discovers Client-Side Trojans, CSRF, pronounces it "sea surf" 2001 Session Riding Thomas Schreiber discovers CSRF, writes a white paper, changes the name 2004 XSRF Jesse Burns (iSec), writes a white paper, likes this acronym better 2005 Intranet Hacking WhiteHat Security discovers JavaScript can use CSRF to perform browser port scanning 2006 MITRE CVE Trends Says CSRF is under reported and predicts stats increase 2007 OWASP CSRF CSRF added as #5  on the OWASP Top Ten project 2007 Domain Stealing CSRF used to hi-jack Gmail accounts and take control over domain names 2007 Drive-by-Pharming CSRF used to target DSL Routers to modify DNS settings to a popular bank in Mexico. 2008 1988 Confused Deputy Original CSRF theory Samy Worm  Web Worm infects 1 millon MySpace profiles using XSS/CSRF 2005 Cross-Site Request Forgeries Session Riding Client-Side Trojans Confused Deputy Web Trojans Confused? Timeline
How prevalent is CSRF? No statistics exist, no one can scan for it, and nearly all issues are found by hand
Ask the Experts ,[object Object],[object Object],[object Object]
Getting infected with JavaScript Malware ,[object Object],[object Object],[object Object],[object Object],“ ...estimated that 51 percent of websites hosting malicious code over the past six months were legitimate destinations that had been hacked, as opposed to sites specifically set up by criminals. Compromised websites can pose a greater risk because they often come with a degree of trust.” Websense
The Anatomy of a CSRF Attack A user is logged-in to a Web bank with a “Transfer Funds” feature.  After specifying the “From” account, “To” account, and dollar amount, the user clicks the “Continue” button.  Let’s say the “From” account is “314159265,” the “To” account is “011235813,” and we’re transferring $5,000.  The Web browser issues an HTTP request to the Web server executing the process. The form values are located within the POST body and the  session credential (Cookie)  in the headers. If the request was successful, $5,000 would be transferred from account “314159265” to account “01123581.”  POST  http://webbank/transfer_funds.cgi  HTTP/1.1 Host: webbank User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O;) Firefox/1.4.1 Cookie: JSPSESSIONID=4353DD35694D47990BCDF36271740A0C from= 314159265 &to= 011235813 &amount= 5000 &date=11072006
POST is NOT a Solution Many Web applications, such as transfer_funds.cgi, do not distinguish between parameters sent using GET or POST. Transfer Funds could be initiated using GET.  In Figure 3, the POST method is replaced by GET and the parameters in the HTTP body have been added to the query string.  GET  http://webbank/transfer_funds.cgi? from= 314159265 &to= 011235813 &amount= 5000 &date=11072006 HTTP/1.1  Host: webbank  User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;) Firefox/1.4.1  Cookie: JSPSESSIONID= 4353DD35694D47990BCDF36271740A0C  Converting POST to GET is not required, JavaScript can issue POSTs through Web Forms.
The Hack When bank customers are still logged-in, they may stumble across a Web page containing the HTML.  A customer may find this link in a phishing email, message board post, instant message spam, etc.  The SRC attribute of the IMG tag has a similar URL value to that of Figure 3, but has been updated with another account number.  <IMG SRC= http://webbank/transfer_funds.cgi? from= 314159265 &to= 1618 &amount= 5000 &date=11072006> The IMG tag forces a “forged” request and  if the customer is still logged-in, $5,000 from account “314159265” will be sent to account “1618,” belonging to the hacker . To the online bank the request completely legitimate. CSRF attacks succeed because the customer is the one who is actually making the request by automatically sending the session credentials (cookies).
CSRF Can and Can Not Do Can: Force a user to make any HTTP request to anywhere. Can’t: Read the web page that is returned in the browser. attacker.com attacker.com Same-Origin Policy bank.com Read OK Read Error
Make Someone Buy Now with Amazon 0-Click ,[object Object],[object Object],[object Object]
Force Google Searches ,[object Object],[object Object]
GMail E-mail Hijack Technique ,[object Object],[object Object],[object Object]
Attacks can penetrate the intranet by controlling/hijacking a user’s browser and using JavaScript Malware, which is on the inside of the network. Intranet Hacking
Cross-Site Scripting (Printer Spamming)  “ By using only JavaScript, an Internet web site can remotely print to an internal network based printer by doing an HTTP Post. The web site initiating the print request can print full text, enter PostScript commands allowing the page to be formatted, and in some cases send faxes. For the attack to succeed the user needs to visit a web site that contains this JavaScript. ” - Aaron Weaver <img src=”myprinter:9100/Printed_from_the_web”>
Intranet Hacking Exploited in the Wild ,[object Object],[object Object],[object Object],Drive-by-Pharming
Click A Link, Go To Jail (10 years) ,[object Object],[object Object],[object Object],If you want to give someone a really bad day, put something like this in your web pages. <META HTTP-EQUIV=&quot;refresh&quot; CONTENT=&quot;0;url=http://child-porn-site&quot;> Consider forcing users from China to access “illegal” content, initating hacking attempts against government systems, participate in a DDoS attack, etc. The list is endless.
CSRF Solutions (Secrets) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
XSS vulnerabilities bypass all CSRF protections
Web Worms ,[object Object],[object Object],[object Object],MySpace (Samy Worm)  First major XSS/CSRF worm 24 hours, 1 million users affected CROSS-SITE SCRIPTING WORMS AND VIRUSES  “ The Impending Threat and the Best Defense” http://www.whitehatsec.com/downloads/WHXSSThreats.pdf Samy used XSS to bypass CSRF (secret token) protections
Code Security ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Web Browser Security ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
For more information visit:  www.whitehatsec.com Jeremiah Grossman, founder and CTO blog:  http://jeremiahgrossman.blogspot.com email: jeremiah@whitehatsec.com Thank You!
References The Cross-Site Request Forgery (CSRF/XSRF) FAQ http://www.cgisecurity.com/articles/csrf-faq.shtml The Confused Deputy - Original Cross-Site Request Forgery Theory http://www.cap-lore.com/CapTheory/ConfusedDeputy.html Zope discovers a Web version of the Confused Deputy, calls it Client-Side Trojans http://www.zope.org/Members/jim/ZopeSecurity/ClientSideTrojan Peter Watkins discovers Client-Side Trojans, calls it (CSRF, pronounced &quot;sea surf&quot;) http://www.tux.org/~peterw/csrf.txt Thomas Schreiber discovers CSRF, doesn't like the name, calls it Session Ridinghttp://www.securenet.de/papers/Session_Riding.pdf  Jesse Burns discovers CSRF, doesn't like the acronym, changes it to XSRF.http://www.isecpartners.com/files/XSRF_Paper_0.pdf Intranet Hacking from the Outside and JavaScript Port Scanninghttp://jeremiahgrossman.blogspot.com/2006/09/video-hacking-intranet-websites-from.html MITRE - Vulnerability Type Distributions in CVE http://cve.mitre.org/docs/vuln-trends/index.html OWASP Top Ten 2007 http://www.owasp.org/index.php/Top_10_2007-A5

More Related Content

What's hot

Data Science vs. the Bad Guys: Defending LinkedIn from Fraud and Abuse
Data Science vs. the Bad Guys: Defending LinkedIn from Fraud and AbuseData Science vs. the Bad Guys: Defending LinkedIn from Fraud and Abuse
Data Science vs. the Bad Guys: Defending LinkedIn from Fraud and Abuse
David Freeman
 
Cross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesCross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesMarco Morana
 
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Capgemini
 
5 SEO trends that won’t quit in 2017!
5 SEO trends that won’t quit in 2017!5 SEO trends that won’t quit in 2017!
5 SEO trends that won’t quit in 2017!
Tyler Rundle
 
Server-Side Second Factors: Approaches to Measuring User Authenticity
Server-Side Second Factors: Approaches to Measuring User AuthenticityServer-Side Second Factors: Approaches to Measuring User Authenticity
Server-Side Second Factors: Approaches to Measuring User Authenticity
David Freeman
 
What Makes Web Applications Desirable For Hackers
What Makes Web Applications Desirable For HackersWhat Makes Web Applications Desirable For Hackers
What Makes Web Applications Desirable For Hackers
Jaime Manteiga
 
Lessons Learned From the Yahoo! Hack
Lessons Learned From the Yahoo! HackLessons Learned From the Yahoo! Hack
Lessons Learned From the Yahoo! Hack
Imperva
 
HallTumserFinalPaper
HallTumserFinalPaperHallTumserFinalPaper
HallTumserFinalPaper
Daniel Tumser
 
CSRF Attacks and its Defence using Middleware
CSRF Attacks and its Defence using MiddlewareCSRF Attacks and its Defence using Middleware
CSRF Attacks and its Defence using Middleware
ijtsrd
 
Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...
Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...
Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...
IRJET Journal
 
Online Brand Protection: Fighting Domain Name Typosquatting, Website Spoofing...
Online Brand Protection:Fighting Domain Name Typosquatting, Website Spoofing...Online Brand Protection:Fighting Domain Name Typosquatting, Website Spoofing...
Online Brand Protection: Fighting Domain Name Typosquatting, Website Spoofing...
WhoisXML API
 
The Web Hacking Incidents Database Annual
The Web Hacking Incidents Database AnnualThe Web Hacking Incidents Database Annual
The Web Hacking Incidents Database Annualguest376352
 
Web Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The WebWeb Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The Web
Zero Science Lab
 
State of the Art Analysis Approach for Identification of the Malignant URLs
State of the Art Analysis Approach for Identification of the Malignant URLsState of the Art Analysis Approach for Identification of the Malignant URLs
State of the Art Analysis Approach for Identification of the Malignant URLs
IOSRjournaljce
 
2014 Threat Detection Checklist: Six ways to tell a criminal from a customer
2014 Threat Detection Checklist: Six ways to tell a criminal from a customer2014 Threat Detection Checklist: Six ways to tell a criminal from a customer
2014 Threat Detection Checklist: Six ways to tell a criminal from a customer
EMC
 
4774.projectb.securitysquad
4774.projectb.securitysquad4774.projectb.securitysquad
4774.projectb.securitysquad
Josh Howell
 
IRJET- Phishing Website Detection based on Machine Learning
IRJET- Phishing Website Detection based on Machine LearningIRJET- Phishing Website Detection based on Machine Learning
IRJET- Phishing Website Detection based on Machine Learning
IRJET Journal
 
Hackers versus Developers and Secure Web Programming
Hackers versus Developers and Secure Web ProgrammingHackers versus Developers and Secure Web Programming
Hackers versus Developers and Secure Web ProgrammingAkash Mahajan
 
IRJET- Detecting the Phishing Websites using Enhance Secure Algorithm
IRJET- Detecting the Phishing Websites using Enhance Secure AlgorithmIRJET- Detecting the Phishing Websites using Enhance Secure Algorithm
IRJET- Detecting the Phishing Websites using Enhance Secure Algorithm
IRJET Journal
 

What's hot (20)

Data Science vs. the Bad Guys: Defending LinkedIn from Fraud and Abuse
Data Science vs. the Bad Guys: Defending LinkedIn from Fraud and AbuseData Science vs. the Bad Guys: Defending LinkedIn from Fraud and Abuse
Data Science vs. the Bad Guys: Defending LinkedIn from Fraud and Abuse
 
Cross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesCross Site Request Forgery Vulnerabilities
Cross Site Request Forgery Vulnerabilities
 
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
 
5 SEO trends that won’t quit in 2017!
5 SEO trends that won’t quit in 2017!5 SEO trends that won’t quit in 2017!
5 SEO trends that won’t quit in 2017!
 
Server-Side Second Factors: Approaches to Measuring User Authenticity
Server-Side Second Factors: Approaches to Measuring User AuthenticityServer-Side Second Factors: Approaches to Measuring User Authenticity
Server-Side Second Factors: Approaches to Measuring User Authenticity
 
What Makes Web Applications Desirable For Hackers
What Makes Web Applications Desirable For HackersWhat Makes Web Applications Desirable For Hackers
What Makes Web Applications Desirable For Hackers
 
Lessons Learned From the Yahoo! Hack
Lessons Learned From the Yahoo! HackLessons Learned From the Yahoo! Hack
Lessons Learned From the Yahoo! Hack
 
HallTumserFinalPaper
HallTumserFinalPaperHallTumserFinalPaper
HallTumserFinalPaper
 
CSRF Attacks and its Defence using Middleware
CSRF Attacks and its Defence using MiddlewareCSRF Attacks and its Defence using Middleware
CSRF Attacks and its Defence using Middleware
 
Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...
Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...
Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...
 
Online Brand Protection: Fighting Domain Name Typosquatting, Website Spoofing...
Online Brand Protection:Fighting Domain Name Typosquatting, Website Spoofing...Online Brand Protection:Fighting Domain Name Typosquatting, Website Spoofing...
Online Brand Protection: Fighting Domain Name Typosquatting, Website Spoofing...
 
The Web Hacking Incidents Database Annual
The Web Hacking Incidents Database AnnualThe Web Hacking Incidents Database Annual
The Web Hacking Incidents Database Annual
 
Web Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The WebWeb Vulnerabilities And Exploitation - Compromising The Web
Web Vulnerabilities And Exploitation - Compromising The Web
 
State of the Art Analysis Approach for Identification of the Malignant URLs
State of the Art Analysis Approach for Identification of the Malignant URLsState of the Art Analysis Approach for Identification of the Malignant URLs
State of the Art Analysis Approach for Identification of the Malignant URLs
 
2014 Threat Detection Checklist: Six ways to tell a criminal from a customer
2014 Threat Detection Checklist: Six ways to tell a criminal from a customer2014 Threat Detection Checklist: Six ways to tell a criminal from a customer
2014 Threat Detection Checklist: Six ways to tell a criminal from a customer
 
4774.projectb.securitysquad
4774.projectb.securitysquad4774.projectb.securitysquad
4774.projectb.securitysquad
 
IRJET- Phishing Website Detection based on Machine Learning
IRJET- Phishing Website Detection based on Machine LearningIRJET- Phishing Website Detection based on Machine Learning
IRJET- Phishing Website Detection based on Machine Learning
 
Hackers versus Developers and Secure Web Programming
Hackers versus Developers and Secure Web ProgrammingHackers versus Developers and Secure Web Programming
Hackers versus Developers and Secure Web Programming
 
IRJET- Detecting the Phishing Websites using Enhance Secure Algorithm
IRJET- Detecting the Phishing Websites using Enhance Secure AlgorithmIRJET- Detecting the Phishing Websites using Enhance Secure Algorithm
IRJET- Detecting the Phishing Websites using Enhance Secure Algorithm
 
Shiv seminar final
Shiv seminar finalShiv seminar final
Shiv seminar final
 

Viewers also liked

The Global Horticulture Initiative
The Global Horticulture Initiative The Global Horticulture Initiative
The Global Horticulture Initiative
2020resilience
 
Protect you site from CSRF
Protect you site from CSRFProtect you site from CSRF
Protect you site from CSRFAcquia
 
Chris Auricht - overview of population undernutrition
Chris Auricht - overview of population undernutritionChris Auricht - overview of population undernutrition
Chris Auricht - overview of population undernutrition
ACIAR
 
Building institutional capacity for information, monitroting and measurement ...
Building institutional capacity for information, monitroting and measurement ...Building institutional capacity for information, monitroting and measurement ...
Building institutional capacity for information, monitroting and measurement ...
2020resilience
 
You Are On Facebook And Linkedin, Now What
You Are On Facebook And Linkedin, Now WhatYou Are On Facebook And Linkedin, Now What
You Are On Facebook And Linkedin, Now What
Arizona Association of REALTORS®
 
Understanding resilience and coping with a world of shocks
Understanding resilience and coping with a world of shocksUnderstanding resilience and coping with a world of shocks
Understanding resilience and coping with a world of shocks
2020resilience
 

Viewers also liked (7)

The Global Horticulture Initiative
The Global Horticulture Initiative The Global Horticulture Initiative
The Global Horticulture Initiative
 
Protect you site from CSRF
Protect you site from CSRFProtect you site from CSRF
Protect you site from CSRF
 
Chris Auricht - overview of population undernutrition
Chris Auricht - overview of population undernutritionChris Auricht - overview of population undernutrition
Chris Auricht - overview of population undernutrition
 
Building institutional capacity for information, monitroting and measurement ...
Building institutional capacity for information, monitroting and measurement ...Building institutional capacity for information, monitroting and measurement ...
Building institutional capacity for information, monitroting and measurement ...
 
AAR Homeowner Affordability And Stability Program
AAR Homeowner Affordability And Stability ProgramAAR Homeowner Affordability And Stability Program
AAR Homeowner Affordability And Stability Program
 
You Are On Facebook And Linkedin, Now What
You Are On Facebook And Linkedin, Now WhatYou Are On Facebook And Linkedin, Now What
You Are On Facebook And Linkedin, Now What
 
Understanding resilience and coping with a world of shocks
Understanding resilience and coping with a world of shocksUnderstanding resilience and coping with a world of shocks
Understanding resilience and coping with a world of shocks
 

Similar to CSRF_RSA_2008_Jeremiah_Grossman

Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)
Jeremiah Grossman
 
Are you fighting_new_threats_with_old_weapons
Are you fighting_new_threats_with_old_weaponsAre you fighting_new_threats_with_old_weapons
Are you fighting_new_threats_with_old_weapons
Bhargav Modi
 
Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008
Jeremiah Grossman
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
Chris Hillman
 
Security risks awareness
Security risks awarenessSecurity risks awareness
Security risks awareness
Janagi Kannan
 
bh-usa-07-grossman-WP.pdf
bh-usa-07-grossman-WP.pdfbh-usa-07-grossman-WP.pdf
bh-usa-07-grossman-WP.pdf
cyberhacker7
 
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
abhijitapatil
 
Phishing Attacks - Are You Ready to Respond?
Phishing Attacks - Are You Ready to Respond?Phishing Attacks - Are You Ready to Respond?
Phishing Attacks - Are You Ready to Respond?
Splunk
 
Steve Kosten - Exploiting common web application vulnerabilities
Steve Kosten - Exploiting common web application vulnerabilities Steve Kosten - Exploiting common web application vulnerabilities
Steve Kosten - Exploiting common web application vulnerabilities
Trish McGinity, CCSK
 
Rich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeRich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeJeremiah Grossman
 
Cross-site request forgery (also known as CSRF) is a web vulnerability that a...
Cross-site request forgery (also known as CSRF) is a web vulnerability that a...Cross-site request forgery (also known as CSRF) is a web vulnerability that a...
Cross-site request forgery (also known as CSRF) is a web vulnerability that a...
Varun Mithran
 
Million Browser Botnet
Million Browser BotnetMillion Browser Botnet
Million Browser Botnet
Source Conference
 
Cross Site Scripting
Cross Site ScriptingCross Site Scripting
Cross Site ScriptingAli Mattash
 
Web application security
Web application securityWeb application security
Web application securityJin Castor
 
Grey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request ForgeryGrey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request Forgery
Christopher Grayson
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )
Jay Nagar
 
Renaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clientsRenaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clientsnooralmousa
 
Amazon & E Bay
Amazon & E BayAmazon & E Bay
Amazon & E Bay
Sabyasachi Dasgupta
 
Web Site vulnerability Sales and Consulting
Web Site vulnerability Sales and ConsultingWeb Site vulnerability Sales and Consulting
Web Site vulnerability Sales and Consultingguest4cee27ac
 

Similar to CSRF_RSA_2008_Jeremiah_Grossman (20)

Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)Top Ten Web Hacking Techniques (2010)
Top Ten Web Hacking Techniques (2010)
 
Starwest 2008
Starwest 2008Starwest 2008
Starwest 2008
 
Are you fighting_new_threats_with_old_weapons
Are you fighting_new_threats_with_old_weaponsAre you fighting_new_threats_with_old_weapons
Are you fighting_new_threats_with_old_weapons
 
Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008Top Ten Web Hacking Techniques – 2008
Top Ten Web Hacking Techniques – 2008
 
Web Application Security
Web Application SecurityWeb Application Security
Web Application Security
 
Security risks awareness
Security risks awarenessSecurity risks awareness
Security risks awareness
 
bh-usa-07-grossman-WP.pdf
bh-usa-07-grossman-WP.pdfbh-usa-07-grossman-WP.pdf
bh-usa-07-grossman-WP.pdf
 
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
 
Phishing Attacks - Are You Ready to Respond?
Phishing Attacks - Are You Ready to Respond?Phishing Attacks - Are You Ready to Respond?
Phishing Attacks - Are You Ready to Respond?
 
Steve Kosten - Exploiting common web application vulnerabilities
Steve Kosten - Exploiting common web application vulnerabilities Steve Kosten - Exploiting common web application vulnerabilities
Steve Kosten - Exploiting common web application vulnerabilities
 
Rich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeRich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safe
 
Cross-site request forgery (also known as CSRF) is a web vulnerability that a...
Cross-site request forgery (also known as CSRF) is a web vulnerability that a...Cross-site request forgery (also known as CSRF) is a web vulnerability that a...
Cross-site request forgery (also known as CSRF) is a web vulnerability that a...
 
Million Browser Botnet
Million Browser BotnetMillion Browser Botnet
Million Browser Botnet
 
Cross Site Scripting
Cross Site ScriptingCross Site Scripting
Cross Site Scripting
 
Web application security
Web application securityWeb application security
Web application security
 
Grey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request ForgeryGrey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request Forgery
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )
 
Renaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clientsRenaud Bido & Mohammad Shams - Hijacking web servers & clients
Renaud Bido & Mohammad Shams - Hijacking web servers & clients
 
Amazon & E Bay
Amazon & E BayAmazon & E Bay
Amazon & E Bay
 
Web Site vulnerability Sales and Consulting
Web Site vulnerability Sales and ConsultingWeb Site vulnerability Sales and Consulting
Web Site vulnerability Sales and Consulting
 

Recently uploaded

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 

Recently uploaded (20)

Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 

CSRF_RSA_2008_Jeremiah_Grossman

  • 1. Cross-Site Request Forgery “The Sleeping Giant of Website Vulnerabilities” Jeremiah Grossman | WhiteHat Security | 04/09/08 | Session Code: HT1-20304
  • 2.
  • 3. Symantec Qualys Nessus nCircle WhiteHat Security “ well-known” vulnerabilities Vulnerability Stack Focus on “custom web applications”
  • 4.
  • 5. The big 3! Cross-Site Scripting (XSS) - forcing malicious content to be served by a trusted website to an unsuspecting user. Cross-Site Request Forgery (CSRF) - forcing an unsuspecting user’s browser to send requests they didn’t intend. (wire transfer, blog post, etc.) JavaScript Malware - payload of an XSS or CSRF attack, typically written in JavaScript, and executed in a browser.
  • 6. What's in a name? 2000 Client-Side Trojans Zope discovers Web version of Confused Deputy Cross Site Request Forgery Peter Watkins discovers Client-Side Trojans, CSRF, pronounces it &quot;sea surf&quot; 2001 Session Riding Thomas Schreiber discovers CSRF, writes a white paper, changes the name 2004 XSRF Jesse Burns (iSec), writes a white paper, likes this acronym better 2005 Intranet Hacking WhiteHat Security discovers JavaScript can use CSRF to perform browser port scanning 2006 MITRE CVE Trends Says CSRF is under reported and predicts stats increase 2007 OWASP CSRF CSRF added as #5 on the OWASP Top Ten project 2007 Domain Stealing CSRF used to hi-jack Gmail accounts and take control over domain names 2007 Drive-by-Pharming CSRF used to target DSL Routers to modify DNS settings to a popular bank in Mexico. 2008 1988 Confused Deputy Original CSRF theory Samy Worm Web Worm infects 1 millon MySpace profiles using XSS/CSRF 2005 Cross-Site Request Forgeries Session Riding Client-Side Trojans Confused Deputy Web Trojans Confused? Timeline
  • 7. How prevalent is CSRF? No statistics exist, no one can scan for it, and nearly all issues are found by hand
  • 8.
  • 9.
  • 10. The Anatomy of a CSRF Attack A user is logged-in to a Web bank with a “Transfer Funds” feature. After specifying the “From” account, “To” account, and dollar amount, the user clicks the “Continue” button. Let’s say the “From” account is “314159265,” the “To” account is “011235813,” and we’re transferring $5,000. The Web browser issues an HTTP request to the Web server executing the process. The form values are located within the POST body and the session credential (Cookie) in the headers. If the request was successful, $5,000 would be transferred from account “314159265” to account “01123581.” POST http://webbank/transfer_funds.cgi HTTP/1.1 Host: webbank User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O;) Firefox/1.4.1 Cookie: JSPSESSIONID=4353DD35694D47990BCDF36271740A0C from= 314159265 &to= 011235813 &amount= 5000 &date=11072006
  • 11. POST is NOT a Solution Many Web applications, such as transfer_funds.cgi, do not distinguish between parameters sent using GET or POST. Transfer Funds could be initiated using GET. In Figure 3, the POST method is replaced by GET and the parameters in the HTTP body have been added to the query string. GET http://webbank/transfer_funds.cgi? from= 314159265 &to= 011235813 &amount= 5000 &date=11072006 HTTP/1.1 Host: webbank User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;) Firefox/1.4.1 Cookie: JSPSESSIONID= 4353DD35694D47990BCDF36271740A0C Converting POST to GET is not required, JavaScript can issue POSTs through Web Forms.
  • 12. The Hack When bank customers are still logged-in, they may stumble across a Web page containing the HTML. A customer may find this link in a phishing email, message board post, instant message spam, etc. The SRC attribute of the IMG tag has a similar URL value to that of Figure 3, but has been updated with another account number. <IMG SRC= http://webbank/transfer_funds.cgi? from= 314159265 &to= 1618 &amount= 5000 &date=11072006> The IMG tag forces a “forged” request and if the customer is still logged-in, $5,000 from account “314159265” will be sent to account “1618,” belonging to the hacker . To the online bank the request completely legitimate. CSRF attacks succeed because the customer is the one who is actually making the request by automatically sending the session credentials (cookies).
  • 13. CSRF Can and Can Not Do Can: Force a user to make any HTTP request to anywhere. Can’t: Read the web page that is returned in the browser. attacker.com attacker.com Same-Origin Policy bank.com Read OK Read Error
  • 14.
  • 15.
  • 16.
  • 17. Attacks can penetrate the intranet by controlling/hijacking a user’s browser and using JavaScript Malware, which is on the inside of the network. Intranet Hacking
  • 18. Cross-Site Scripting (Printer Spamming) “ By using only JavaScript, an Internet web site can remotely print to an internal network based printer by doing an HTTP Post. The web site initiating the print request can print full text, enter PostScript commands allowing the page to be formatted, and in some cases send faxes. For the attack to succeed the user needs to visit a web site that contains this JavaScript. ” - Aaron Weaver <img src=”myprinter:9100/Printed_from_the_web”>
  • 19.
  • 20.
  • 21.
  • 22. XSS vulnerabilities bypass all CSRF protections
  • 23.
  • 24.
  • 25.
  • 26. For more information visit: www.whitehatsec.com Jeremiah Grossman, founder and CTO blog: http://jeremiahgrossman.blogspot.com email: jeremiah@whitehatsec.com Thank You!
  • 27. References The Cross-Site Request Forgery (CSRF/XSRF) FAQ http://www.cgisecurity.com/articles/csrf-faq.shtml The Confused Deputy - Original Cross-Site Request Forgery Theory http://www.cap-lore.com/CapTheory/ConfusedDeputy.html Zope discovers a Web version of the Confused Deputy, calls it Client-Side Trojans http://www.zope.org/Members/jim/ZopeSecurity/ClientSideTrojan Peter Watkins discovers Client-Side Trojans, calls it (CSRF, pronounced &quot;sea surf&quot;) http://www.tux.org/~peterw/csrf.txt Thomas Schreiber discovers CSRF, doesn't like the name, calls it Session Ridinghttp://www.securenet.de/papers/Session_Riding.pdf Jesse Burns discovers CSRF, doesn't like the acronym, changes it to XSRF.http://www.isecpartners.com/files/XSRF_Paper_0.pdf Intranet Hacking from the Outside and JavaScript Port Scanninghttp://jeremiahgrossman.blogspot.com/2006/09/video-hacking-intranet-websites-from.html MITRE - Vulnerability Type Distributions in CVE http://cve.mitre.org/docs/vuln-trends/index.html OWASP Top Ten 2007 http://www.owasp.org/index.php/Top_10_2007-A5