SlideShare a Scribd company logo
Cross-site request forgery (CSRF)-Affect,
Development & Prevention
On this part, we’ll clarify what cross-site request forgery is,
describe some examples of widespread CSRF vulnerabilities,
and clarify forestall CSRF assaults.
Cross Site Request Forgery- CSRF
ο‚΄What is CSRF?
ο‚΄Cross-site request forgery (also referred to as CSRF) is an
internet safety vulnerability that enables an attacker to
induce customers to carry out actions that they don’t intend to carry out.
It permits an attacker to partially circumvent the identical origin coverage,
which is designed to forestall completely different web sites from
interfering with one another.
ο‚΄What is the affect of a CSRF assault?
ο‚΄In a profitable CSRF assault, the attacker causes the sufferer person to
hold out an motion unintentionally. For instance, this may be to alter the
mail deal with on their account, to alter their password, or to make a
funds switch. Relying on the character of the motion, the attacker would
possibly be capable to achieve full management over the personβ€˜s
If the compromised person has a privileged position throughout the utility,
then the attacker would possibly be capable to take full management of
all the applyingβ€˜s knowledge and performance.
ο‚΄How does CSRF work?
ο‚΄For a CSRF assault to be attainable, three key situations have to be in place:
ο‚΄A related motion. There’s an motion throughout the utility that the attacker has
a purpose to induce. This may be a privileged motion (comparable to modifying
permissions for different customers) or any motion on user-
specific knowledge (comparable to altering the personβ€˜s personal password).
ο‚΄Cookie-based session dealing with. Performing the motion includes issuing a
number of HTTP requests, and the applying depends solely on session cookies
to establish the person who has made the requests. There isn’t
a different mechanism in place for monitoring periods or
ο‚΄No unpredictable request parameters. The requests that carry
out the motion don’t include any parameters whose values the
attacker can’t decide or guess. For instance, when inflicting a person to alter their
password, the operate just isn’t susceptible if an attacker must know the
prevailing password.
ο‚΄For instance, suppose an utility comprises a operate that lets the person change the
e-mail deal with on their account. When a person performs this motion, they make an
HTTP request like the next:
ο‚΄POST /e mail/change HTTP/1.1
Host: vulnerable-website.com
Content material-Sort: utility/x-www-form-urlencoded
Content material-Size: 30
Cookie: session=yvthwsztyeQkAPzeQ5gHgTvlyxHfsAfE
ο‚΄e mail=wiener@normal-user.com
ο‚΄This meets the situations required for CSRF:
ο‚΄The motion of adjusting the e-mail deal with on a personβ€˜s account is of curiosity to
an attacker. Following this motion, the attacker will sometimes be capable to set off a
password reset and take full management of the personβ€˜s account.
ο‚΄The applying makes use of a session cookie to establish which person issued the
request. There aren’t any different tokens or mechanisms in place to
trace person periods.
ο‚΄The attacker can simply decide the values of the request parameters which
are wanted to carry out the motion.
ο‚΄With these situations in place, the attacker can assemble an internet web
page containing the next HTML:
ο‚΄<html>
<physique>
<kind motion="https://vulnerable-website.com/e mail/change" technique="POST">
<enter kind="hidden" title="e mail" worth="pwned@evil-user.web" />
</kind>
<script>
doc.types[0].submit();
</script>
</physique>
</html>
ο‚΄If a sufferer person visits the attacker’s internet web page, the next will occur:
ο‚΄ The attacker’s web page will set off an HTTP request to the susceptible website.
ο‚΄ If the person is logged in to the susceptible website, their browser
will routinely embrace their session cookie within the request (assuming SameSite
cookies will not be getting used).
ο‚΄ The susceptible website will course of the request within the regular method, deal
with it as having been made by the sufferer person, and alter their e mail deal with.
ο‚΄Note
ο‚΄Though CSRF is often described in relation to cookie-based
session dealing with, it additionally arises in different contexts the
place the applying routinely provides some person credentials to
requests, comparable to HTTP Fundamental authentication and
certificate-based authentication.
ο‚΄Methods to assemble a CSRF assault
ο‚΄Manually creating the HTML wanted for a CSRF exploit may
be cumbersome, notably the place the specified request comprises a lot
or there are different quirks within the request. The simplest technique to assemble a
CSRF exploit is utilizing the CSRF PoC generator that’s in-built to Burp Suite
Professional:
ο‚΄ Choose a request anyplace in Burp Suite Skilled that you just wish to check or
exploit.
ο‚΄ From the right-click context menu, choose Engagement instruments / Generate
CSRF PoC.
ο‚΄ Burp Suite will generate some HTML that may set off the chosen request (minus
cookies, which will likely be added routinely by the suffererβ€˜s browser).
ο‚΄ You’ll be able to tweak varied choices within the CSRF PoC generator to fine-
tune facets of the assault. You would possibly want to do that in
some uncommon conditions to cope with quirky options of requests.
ο‚΄ Copy the generated HTML into an internet web page, view it in a
browser that’s logged in to the susceptible website, and check whether or
not the supposed request is issued efficiently and the specified motion happens.
ο‚΄For More Information Visit this
site: https://cybersecurityresearch.tech/cross-
site-request-forgery-csrf-impact-construction-
prevention/
ttps://cybersecurityresearch.tech/cross-site-
request-forgery-csrf-impact-construction-
prevention/

More Related Content

PDF
Burp documentation
PPTX
Dive in burpsuite
PPTX
Introduction to shodan
PDF
Http Parameter Pollution, a new category of web attacks
PPS
Manindra kishore _incident_handling_n_log_analysis - ClubHack2009
PPT
Static Analysis: The Art of Fighting without Fighting
PDF
Securty Testing For RESTful Applications
PPT
Filter Evasion: Houdini on the Wire
Burp documentation
Dive in burpsuite
Introduction to shodan
Http Parameter Pollution, a new category of web attacks
Manindra kishore _incident_handling_n_log_analysis - ClubHack2009
Static Analysis: The Art of Fighting without Fighting
Securty Testing For RESTful Applications
Filter Evasion: Houdini on the Wire

What's hot (19)

PDF
Api security-testing
PPT
Assessment methodology and approach
PPT
Web 2.0 Application Kung-Fu - Securing Ajax & Web Services
ODP
Attacking REST API
PDF
Testing REST Web Services
PDF
Pentesting RESTful webservices
PPTX
NullCon 2012 - Ra.2: blackbox DOM-based XSS scanner
PDF
A Novel Interface to a Web Crawler using VB.NET Technology
PDF
AMF Testing Made Easy! DeepSec 2012
PPTX
Getting Started with API Security Testing
PPTX
Secure RESTful API Automation With JavaScript
PPT
Ruby Security
Β 
PPT
XPATH, LDAP and Path Traversal Injection
PDF
Owasp top 10 vulnerabilities 2013
PPTX
A8 cross site request forgery (csrf) it 6873 presentation
PPTX
Vulnerabilities in Web Applications
Api security-testing
Assessment methodology and approach
Web 2.0 Application Kung-Fu - Securing Ajax & Web Services
Attacking REST API
Testing REST Web Services
Pentesting RESTful webservices
NullCon 2012 - Ra.2: blackbox DOM-based XSS scanner
A Novel Interface to a Web Crawler using VB.NET Technology
AMF Testing Made Easy! DeepSec 2012
Getting Started with API Security Testing
Secure RESTful API Automation With JavaScript
Ruby Security
Β 
XPATH, LDAP and Path Traversal Injection
Owasp top 10 vulnerabilities 2013
A8 cross site request forgery (csrf) it 6873 presentation
Vulnerabilities in Web Applications
Ad

Similar to Cross Site Request Forgery- CSRF (20)

PPTX
Cyber security 2.pptx
PPT
Cross Site Request Forgery Vulnerabilities
PPTX
PENETRATION TEST ( CLIENT-SIDE ) CSRF / CORS MISCONFIGURATION
PDF
Cross-site request forgery (also known as CSRF) is a web vulnerability that a...
PDF
Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...
PPTX
PPTX
Example my ppt
PDF
A4 A K S H A Y B H A R D W A J
PPTX
Cyber Security-Ethical Hacking
PPTX
Its all about CSRF - null Mumbai Meet 10 January 2015 Null/OWASP Chapter
DOCX
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
PPTX
Understanding Cross-site Request Forgery
PPTX
Mitigating CSRF with two lines of codes
PDF
Advanced xss
PDF
Web 13 | REST API
PPT
CSRF_RSA_2008_Jeremiah_Grossman
PDF
CSRF: ways to exploit, ways to prevent
PPT
Web Application Security
PPTX
Security Testing Training With Examples
Cyber security 2.pptx
Cross Site Request Forgery Vulnerabilities
PENETRATION TEST ( CLIENT-SIDE ) CSRF / CORS MISCONFIGURATION
Cross-site request forgery (also known as CSRF) is a web vulnerability that a...
Prevention Against CSRF Attack using Client Server Mutual Authentication Tech...
Example my ppt
A4 A K S H A Y B H A R D W A J
Cyber Security-Ethical Hacking
Its all about CSRF - null Mumbai Meet 10 January 2015 Null/OWASP Chapter
CROSS-SITE REQUEST FORGERY - IN-DEPTH ANALYSIS 2011
Understanding Cross-site Request Forgery
Mitigating CSRF with two lines of codes
Advanced xss
Web 13 | REST API
CSRF_RSA_2008_Jeremiah_Grossman
CSRF: ways to exploit, ways to prevent
Web Application Security
Security Testing Training With Examples
Ad

Recently uploaded (20)

PPT
tcp ip networks nd ip layering assotred slides
PDF
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
PPTX
Internet___Basics___Styled_ presentation
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPTX
innovation process that make everything different.pptx
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
Β 
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
Introduction to the IoT system, how the IoT system works
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PDF
Testing WebRTC applications at scale.pdf
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PDF
Paper PDF World Game (s) Great Redesign.pdf
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PPTX
Introduction to Information and Communication Technology
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Β 
tcp ip networks nd ip layering assotred slides
How to Ensure Data Integrity During Shopify Migration_ Best Practices for Sec...
Internet___Basics___Styled_ presentation
presentation_pfe-universite-molay-seltan.pptx
innovation process that make everything different.pptx
522797556-Unit-2-Temperature-measurement-1-1.pptx
Power Point - Lesson 3_2.pptx grad school presentation
Β 
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Introduction to the IoT system, how the IoT system works
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Testing WebRTC applications at scale.pdf
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Introuction about WHO-FIC in ICD-10.pptx
Paper PDF World Game (s) Great Redesign.pdf
SASE Traffic Flow - ZTNA Connector-1.pdf
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Introduction to Information and Communication Technology
Module 1 - Cyber Law and Ethics 101.pptx
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Β 

Cross Site Request Forgery- CSRF

  • 1. Cross-site request forgery (CSRF)-Affect, Development & Prevention On this part, we’ll clarify what cross-site request forgery is, describe some examples of widespread CSRF vulnerabilities, and clarify forestall CSRF assaults.
  • 3. ο‚΄What is CSRF? ο‚΄Cross-site request forgery (also referred to as CSRF) is an internet safety vulnerability that enables an attacker to induce customers to carry out actions that they don’t intend to carry out. It permits an attacker to partially circumvent the identical origin coverage, which is designed to forestall completely different web sites from interfering with one another. ο‚΄What is the affect of a CSRF assault? ο‚΄In a profitable CSRF assault, the attacker causes the sufferer person to hold out an motion unintentionally. For instance, this may be to alter the mail deal with on their account, to alter their password, or to make a funds switch. Relying on the character of the motion, the attacker would possibly be capable to achieve full management over the personβ€˜s If the compromised person has a privileged position throughout the utility, then the attacker would possibly be capable to take full management of all the applyingβ€˜s knowledge and performance.
  • 4. ο‚΄How does CSRF work? ο‚΄For a CSRF assault to be attainable, three key situations have to be in place: ο‚΄A related motion. There’s an motion throughout the utility that the attacker has a purpose to induce. This may be a privileged motion (comparable to modifying permissions for different customers) or any motion on user- specific knowledge (comparable to altering the personβ€˜s personal password). ο‚΄Cookie-based session dealing with. Performing the motion includes issuing a number of HTTP requests, and the applying depends solely on session cookies to establish the person who has made the requests. There isn’t a different mechanism in place for monitoring periods or ο‚΄No unpredictable request parameters. The requests that carry out the motion don’t include any parameters whose values the attacker can’t decide or guess. For instance, when inflicting a person to alter their password, the operate just isn’t susceptible if an attacker must know the prevailing password.
  • 5. ο‚΄For instance, suppose an utility comprises a operate that lets the person change the e-mail deal with on their account. When a person performs this motion, they make an HTTP request like the next: ο‚΄POST /e mail/change HTTP/1.1 Host: vulnerable-website.com Content material-Sort: utility/x-www-form-urlencoded Content material-Size: 30 Cookie: session=yvthwsztyeQkAPzeQ5gHgTvlyxHfsAfE ο‚΄e mail=wiener@normal-user.com ο‚΄This meets the situations required for CSRF: ο‚΄The motion of adjusting the e-mail deal with on a personβ€˜s account is of curiosity to an attacker. Following this motion, the attacker will sometimes be capable to set off a password reset and take full management of the personβ€˜s account. ο‚΄The applying makes use of a session cookie to establish which person issued the request. There aren’t any different tokens or mechanisms in place to trace person periods. ο‚΄The attacker can simply decide the values of the request parameters which are wanted to carry out the motion.
  • 6. ο‚΄With these situations in place, the attacker can assemble an internet web page containing the next HTML: ο‚΄<html> <physique> <kind motion="https://vulnerable-website.com/e mail/change" technique="POST"> <enter kind="hidden" title="e mail" worth="pwned@evil-user.web" /> </kind> <script> doc.types[0].submit(); </script> </physique> </html> ο‚΄If a sufferer person visits the attacker’s internet web page, the next will occur: ο‚΄ The attacker’s web page will set off an HTTP request to the susceptible website. ο‚΄ If the person is logged in to the susceptible website, their browser will routinely embrace their session cookie within the request (assuming SameSite cookies will not be getting used). ο‚΄ The susceptible website will course of the request within the regular method, deal with it as having been made by the sufferer person, and alter their e mail deal with.
  • 7. ο‚΄Note ο‚΄Though CSRF is often described in relation to cookie-based session dealing with, it additionally arises in different contexts the place the applying routinely provides some person credentials to requests, comparable to HTTP Fundamental authentication and certificate-based authentication.
  • 8. ο‚΄Methods to assemble a CSRF assault ο‚΄Manually creating the HTML wanted for a CSRF exploit may be cumbersome, notably the place the specified request comprises a lot or there are different quirks within the request. The simplest technique to assemble a CSRF exploit is utilizing the CSRF PoC generator that’s in-built to Burp Suite Professional: ο‚΄ Choose a request anyplace in Burp Suite Skilled that you just wish to check or exploit. ο‚΄ From the right-click context menu, choose Engagement instruments / Generate CSRF PoC. ο‚΄ Burp Suite will generate some HTML that may set off the chosen request (minus cookies, which will likely be added routinely by the suffererβ€˜s browser). ο‚΄ You’ll be able to tweak varied choices within the CSRF PoC generator to fine- tune facets of the assault. You would possibly want to do that in some uncommon conditions to cope with quirky options of requests. ο‚΄ Copy the generated HTML into an internet web page, view it in a browser that’s logged in to the susceptible website, and check whether or not the supposed request is issued efficiently and the specified motion happens.
  • 9. ο‚΄For More Information Visit this site: https://cybersecurityresearch.tech/cross- site-request-forgery-csrf-impact-construction- prevention/ ttps://cybersecurityresearch.tech/cross-site- request-forgery-csrf-impact-construction- prevention/