All You Need To Know About Cross-Site Request Forgery (CSRF)

Use Netsparker


Cross-Site Request Forgery is a term you’ve properly heard in the context of web security or web hacking, but do you really know what it means? The OWASP definition is as follows:

Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they’re currently authenticated. CSRF attacks specifically target state-changing requests, not theft of data, since the attacker has no way to see the response to the forged request.

All You Need To Know About Cross-Site Request Forgery (CSRF)

CSRF is often underrated on the risk spectrum but we’ve actually covered some pretty nasty incidents involving CSRF attacks:

CSRF Vulnerability in Twitter Allows Forced Following
Password Manager Security – LastPass, RoboForm Etc Are Not That Safe
Ubiquiti Wi-Fi Gear Hackable Via 1997 PHP Version

And some tools to help test for CSRF vulnerabilities:

IronWASP – Open Source Web Security Testing Platform
Hcon Security Testing Framework (HconSTF) v0.4 – Fire Base
xssless – An Automated XSS Payload Generator Written In Python

Acunetix has come out with a great article explaining it in more depth and also how you can prevent it, it contains information about:

  • Cross-site Request Forgery in GET requests
  • Cross-site Request Forgery in POST requests
  • Preventing CSRF Vulnerabilities
    • Anti-CSRF tokens
    • Same-site Cookies

For developers, you should pay special attention to the prevention part and make sure whatever you are building is safe.

There are two approaches by which Cross-site Request Forgery (CSRF) may be prevented – synchronizing the Cookie with an anti-CSRF token that has already been provided to the browser, or preventing the browser from sending Cookies to the web application in the first-place.

Check it out in full here: What is Cross-site Request Forgery?

Posted in: Exploits/Vulnerabilities

, ,


Latest Posts:


testssl.sh - Test SSL Security Including Ciphers, Protocols & Detect Flaws testssl.sh – Test SSL Security Including Ciphers, Protocols & Detect Flaws
testssl.sh is a free command line tool to test SSL security, it checks a server's service on any port for the support of TLS/SSL ciphers, protocols as well as recent cryptographic flaws and more.
Four Year Old libSSH Bug Leaves Servers Wide Open Four Year Old libssh Bug Leaves Servers Wide Open
A fairly serious 4-year old libssh bug has left servers vulnerable to remote compromise, fortunately, the attack surface isn't that big as neither OpenSSH or the GitHub implementation are affected.
CHIPSEC - Platform Security Assessment Framework CHIPSEC – Platform Security Assessment Framework For Firmware Hacking
CHIPSEC is a platform security assessment framework for PCs including hardware, system firmware (BIOS/UEFI), and platform components for firmware hacking.
How To Recover When Your Website Got Hacked How To Recover When Your Website Got Hacked
The array of easily available Hacking Tools out there now is astounding, combined with self-propagating malware, people often come to me when their website got hacked and they don't know what to do, or even where to start.
HTTrack - Website Downloader Copier & Site Ripper Download HTTrack – Website Downloader Copier & Site Ripper Download
HTTrack is a free and easy-to-use offline browser utility which acts as a website downloader and a site ripper for copying websites and downloading them for offline viewing.
sshLooter - Script To Steal SSH Passwords sshLooter – Script To Steal SSH Passwords
sshLooter is a Python script using a PAM module to steal SSH passwords by logging the password and notifying the admin of the script via Telegram when a user logs in.


One Response to All You Need To Know About Cross-Site Request Forgery (CSRF)

  1. KG July 31, 2017 at 8:33 pm #

    That’s not much that I need to know, apperently