SlideShare a Scribd company logo
Cross Site Request
Forgery Attack
INSTRUCTOR: PRESENTED BY:
Prof. Dr. Edward Babulak Renu Dongol
Suvash Shah
Uttam Karmacharya
Overview
Introduction
Background
Types of CSRF Attack
Case Scenario
Countermeasure
Tools and Technology
Conclusion
Introduction
Cross-site request forgery is an attack that forces an end user to execute unwanted actions on a
web application in which they're currently authenticated.
A successful CSRF attack can force the user to perform state changing requests like transferring
funds, changing their email address, and so forth.
Background
CSRF Attack is only successful if the user is currently authenticated because browser uses the
session Id.
The attacker from his own site is attacking the user on the trusted site that’s why it is called
cross site attack.
The forged http request is sent by the attacker on behalf of user without user’s consent so it is
forgery request.
It uses the http get and http post method for making the request.
Types of CSRF Attack
Reflected CSRF attacks
 Done using a blog, an email message or an instant message with URL.
 Usually this kind of attack fails.
Local/stored CSRF attacks
 Social sites where users are allowed to post images or links.
 This kind of attack succeeds.
Basic requirement for attack
Trusted Site
Malicious Site
Authenticated
User
Case Scenario
Http Get:
Can be forged easily using HTML tags like img, anchor and so on.
<a href=“http://bank.com/transfer.do?acct=MARIA&amount=10000”>View my
pictures</a>
Http Post:
Use of JavaScript code to perform HTTP POST request.
<form action="http://bank.com/transfer.do" method="POST">
<input type="hidden" name="acct" value="MARIA"/>
<input type="hidden" name="amount" value="100000"/>
<input type="submit" value="View my pictures"/>
</form>
<body onload="document.forms[0].submit()">
Figure 1: Cross Site Request Forgery Attack on Http Get
Figure 2: Cross Site Request Forgery Attack on Http Post
Demo on CSRF Attack
Counter Measure
Referrer Header Approach
 Client side validation.
 Checks the domain name.
Secret Token Approach
 Server side validation.
 Checks the token value sent by server in every http post request.
Counter Measure Flowchart
Demo on CSRF Counter Measure
Tools and Technology
Server: IIS, MS SQL
Coding language: C#, SQL, JavaScript, HTML
Tools: Microsoft Visual Studio, MS SQL Server Management Studio 2012, Firefox, IE 11,
Chrome, SEEDUbuntu9.11 VM
OS: Windows 8.1
Conclusion
Request can be send to the trusted site along with the required cookies using browser's
feature.
Gained knowledge on how to forge the http request into two different ways i.e. Http Get and
Http Post.
We can use secret token approach as it’s counter measure.
References
https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29
http://d2o0t5hpnwv4c1.cloudfront.net/965_csrfCI/flowchart.png
http://www.opensourceforu.com/wp-content/uploads/2010/11/Figure-2-CSRF-attack-on-
POST.png
http://www.opensourceforu.com/wp-content/uploads/2010/11/Figure-1-CSRF-attack-on-
GET.png
Thank you!! Any Questions?

More Related Content

PPTX
Cross Site Request Forgery (CSRF) Scripting Explained
PPT
Cross Site Request Forgery Vulnerabilities
PPTX
A8 cross site request forgery (csrf) it 6873 presentation
PPTX
Introduction to CSRF Attacks & Defense
PPT
Cross Site Request Forgery
PPTX
Understanding Cross-site Request Forgery
ODP
OWASP Secure Coding
Cross Site Request Forgery (CSRF) Scripting Explained
Cross Site Request Forgery Vulnerabilities
A8 cross site request forgery (csrf) it 6873 presentation
Introduction to CSRF Attacks & Defense
Cross Site Request Forgery
Understanding Cross-site Request Forgery
OWASP Secure Coding

What's hot (20)

PPTX
Sql injections - with example
PDF
Pentesting Rest API's by :- Gaurang Bhatnagar
PPTX
Cross Site Scripting ( XSS)
PPT
Xss ppt
PPTX
SQL Injection
PDF
Web Application Security 101
PPT
SQL Injection
PPT
Introduction to Web Application Penetration Testing
PPTX
Cross Site Scripting Defense Presentation
PPTX
Client side scripting using Javascript
PPTX
SQL Injections - A Powerpoint Presentation
PDF
Lie to Me: Bypassing Modern Web Application Firewalls
PPTX
Cross Site Scripting: Prevention and Detection(XSS)
PPTX
A2 - broken authentication and session management(OWASP thailand chapter Apri...
PPTX
Secure coding practices
PDF
Building Advanced XSS Vectors
PDF
API Testing
PPTX
Security in NodeJS applications
PDF
Web Application Security and Awareness
PPSX
Sessions and cookies
Sql injections - with example
Pentesting Rest API's by :- Gaurang Bhatnagar
Cross Site Scripting ( XSS)
Xss ppt
SQL Injection
Web Application Security 101
SQL Injection
Introduction to Web Application Penetration Testing
Cross Site Scripting Defense Presentation
Client side scripting using Javascript
SQL Injections - A Powerpoint Presentation
Lie to Me: Bypassing Modern Web Application Firewalls
Cross Site Scripting: Prevention and Detection(XSS)
A2 - broken authentication and session management(OWASP thailand chapter Apri...
Secure coding practices
Building Advanced XSS Vectors
API Testing
Security in NodeJS applications
Web Application Security and Awareness
Sessions and cookies
Ad

Viewers also liked (14)

PPT
[Php Camp]Owasp Php Top5+Csrf
PPTX
Its all about CSRF - null Mumbai Meet 10 January 2015 Null/OWASP Chapter
PDF
Oh no, was that CSRF #Ouch
PPTX
PHISING Y HACKING
PPTX
ethical hacking in the modern times
PDF
Top Cyber Security Trends for 2016
PPTX
Ethical hacking presentation
PPTX
Cyber security presentation
PDF
Ethical hacking & Information Security
PPTX
Cybercrime.ppt
PPTX
Cyber security
PPTX
Cyber crime ppt
PPTX
Cyber crime and security ppt
[Php Camp]Owasp Php Top5+Csrf
Its all about CSRF - null Mumbai Meet 10 January 2015 Null/OWASP Chapter
Oh no, was that CSRF #Ouch
PHISING Y HACKING
ethical hacking in the modern times
Top Cyber Security Trends for 2016
Ethical hacking presentation
Cyber security presentation
Ethical hacking & Information Security
Cybercrime.ppt
Cyber security
Cyber crime ppt
Cyber crime and security ppt
Ad

Similar to CSRF Attack and Its Prevention technique in ASP.NET MVC (20)

PPTX
Cyber security 2.pptx
PDF
CSRF Attacks and its Defence using Middleware
PDF
Lecture #24 : Cross Site Request Forgery (CSRF)
PDF
Cross-site request forgery (also known as CSRF) is a web vulnerability that a...
PDF
A4 A K S H A Y B H A R D W A J
PPTX
Cross site request forgery(csrf)
PDF
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
PDF
Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...
PPTX
Cross Site Request Forgery- CSRF
PPTX
Mitigating CSRF with two lines of codes
PDF
Owasp eee 2015 csrf
PDF
[Lithuania] Cross-site request forgery: ways to exploit, ways to prevent
PDF
CSRF: ways to exploit, ways to prevent
PDF
WAHS-CSRF Attacks
PPTX
JSON based CSRF
PPTX
OWASP Khartoum - Top 10 A5 - 7th meeting - Cross Site Request Forgery
PDF
Csrf
PPTX
Example my ppt
PPTX
CSRF_main_vid.pptx
Cyber security 2.pptx
CSRF Attacks and its Defence using Middleware
Lecture #24 : Cross Site Request Forgery (CSRF)
Cross-site request forgery (also known as CSRF) is a web vulnerability that a...
A4 A K S H A Y B H A R D W A J
Cross site request forgery(csrf)
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...
Cross Site Request Forgery- CSRF
Mitigating CSRF with two lines of codes
Owasp eee 2015 csrf
[Lithuania] Cross-site request forgery: ways to exploit, ways to prevent
CSRF: ways to exploit, ways to prevent
WAHS-CSRF Attacks
JSON based CSRF
OWASP Khartoum - Top 10 A5 - 7th meeting - Cross Site Request Forgery
Csrf
Example my ppt
CSRF_main_vid.pptx

Recently uploaded (20)

PPTX
L1 - Introduction to python Backend.pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
medical staffing services at VALiNTRY
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
ai tools demonstartion for schools and inter college
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Digital Strategies for Manufacturing Companies
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
top salesforce developer skills in 2025.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
System and Network Administraation Chapter 3
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Essential Infomation Tech presentation.pptx
L1 - Introduction to python Backend.pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Internet Downloader Manager (IDM) Crack 6.42 Build 41
wealthsignaloriginal-com-DS-text-... (1).pdf
medical staffing services at VALiNTRY
2025 Textile ERP Trends: SAP, Odoo & Oracle
ai tools demonstartion for schools and inter college
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Digital Strategies for Manufacturing Companies
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
How Creative Agencies Leverage Project Management Software.pdf
Design an Analysis of Algorithms I-SECS-1021-03
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
top salesforce developer skills in 2025.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
System and Network Administraation Chapter 3
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Essential Infomation Tech presentation.pptx

CSRF Attack and Its Prevention technique in ASP.NET MVC