Skip to content

Cross-Site Request Forgery (CSRF) is a web security vulnerability that explores CSRF attack techniques, vulnerability analysis, and mitigation strategies. It includes hands-on demonstrations of how CSRF attacks work, how to identify weak implementations, and how to secure web applications against such threats.

Notifications You must be signed in to change notification settings

Priyabug/Cross-Site-Request-Forgery-Vulnerability-Exploration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementation of packet sniffing and spoofing in software

Description

The goal of this lab environment is to familiarize with Cross-Site Request Forgery (CSRF) attacks. In a CSRF attack, a victim user, a trusted website, and a malicious site are involved. The victim, who has an active session with a trusted site, visits a malicious site that then sends an unauthorized HTTP request to the trusted site within the victim's session, leading to potential harm.

Here we will carry out a CSRF attack on a social networking application called Elgg, which is an open-source platform pre-installed on our virtual machine. While Elgg includes built-in protections against CSRF, these defenses have been disabled for the purpose of this exercise. This session will cover the following topics:

  • Cross-Site Request Forgery attack
  • CSRF countermeasures: Secret token and Same-site cookie
  • HTTP GET and POST requests
  • JavaScript and Ajax

image

Languages and Utilities Used

  • Python
  • Ubuntu 20.04 VM
  • Docker

Environments Used

  • Windows 11 Home (21H2)

Program walk-through:

Task 1: Observing HTTP Request.
Task 2: CSRF Attack using GET Request.
Task 3: CSRF Attack using POST Request.
Task 4: Enabling Elgg’s Countermeasures

About

Cross-Site Request Forgery (CSRF) is a web security vulnerability that explores CSRF attack techniques, vulnerability analysis, and mitigation strategies. It includes hands-on demonstrations of how CSRF attacks work, how to identify weak implementations, and how to secure web applications against such threats.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published