Gruyere Learn Web Application Exploits Defenses Top
Avoid passing raw user input directly to file-system functions. Use a strict whitelist of allowed characters for filenames, or assign randomly generated, non-sequential IDs to uploaded files while mapping them safely in a secure database. 5. Denial of Service (DoS)
Named after the holey Swiss cheese, Gruyere is a deliberately insecure web application developed by Google’s information security team. It is, bar none, one of the resources available for developers, penetration testers, and security enthusiasts to learn web application exploits and defenses hands-on.
In Gruyère, you can find XSS vulnerabilities in areas that display user-generated content, like snippets or profiles. An attacker might input a script like: alert('Your session cookie is: ' + document.cookie); When another user views this content, the script runs, potentially stealing their session data. The Defense: gruyere learn web application exploits defenses top
The application allows users to change their password or update profile information without confirming the old password, enabling attackers to hijack sessions. Defense: Implementing anti-CSRF tokens. 3. Injection Flaws (SQL Injection)
CSRF forces an authenticated end-user to execute unwanted actions on a web application in which they are currently authenticated. The Exploit Avoid passing raw user input directly to file-system
Try to find bugs just by interacting with the site.
Gruyere uses a database to store user preferences and snippets. Denial of Service (DoS) Named after the holey
DoS attacks attempt to make a machine or network resource unavailable to its intended users.
Understanding Google Gruyere: A Hands-On Guide to Web Application Exploits and Defenses