Google Gruyere

From Embedded Lab Vienna for IoT & Security
Jump to navigation Jump to search


Google Gruyere is an educational codelab developed by Bruce Leban, Mugdha Bendre, and Parisa Tabriz to demonstrate common security vulnerabilities in web applications and provide solutions to these problems. It serves as a practical platform for learning how to identify and avoid security risks.


  • Operating system: Not specific, as it is web-based
  • Additional software: An up-to-date web browser


The Codelab is organized by types of vulnerabilities. In each section you will find a short description of a vulnerability and a task to find an example of this vulnerability in Gruyere. Our task now is to slip into the role of a malicious hacker and find and exploit the vulnerabilities.

If needed, there are further hints. There are also solutions on how to eliminate these security gaps.

In the Codelab, we will use both black-box hacking and white-box hacking. Black-box hacking involves trying to find vulnerabilities by experimenting with the application and manipulating input fields and URL parameters, trying to cause application errors, and looking at the HTTP requests and responses to guess the server behavior. You do not have access to the source code.

With white-box hacking, you have access to the source code and can perform automated or manual analysis to find errors. You can therefore treat Gruyere as if it were open source: read through the source code and try to find errors. Gruyere is written in Python, so a certain familiarity with Python can be helpful. However, the vulnerabilities covered are not Python-specific, and you can do most of the exercise without having to look at the code.


To access Google Gruyere follow the following Steps:

Step 1

Visit the Google Gruyere website and follow the instructions to start the exercises.

Step 2

After that, click "Continue". This will lead you to Part1 of the Website, where you lern how to access Gruyere, view the code and you will be given a few tasks to familiarize yourself with Gruyere. If you proceed to click "Continue" you will get to Part 2 - 5 of the Gruyere Website, where the challenges will be listed.

Step 3

Now you can open the Start link to access the codelab.

Concepts used

  • Cross-Site Scripting (XSS)
 ➥ An attack in which malicious code is injected into a trusted website. The code is then executed by unsuspecting users, which can lead to data leaks or other security problems.

  • Client-State Manipulation
 ➥ An attacker manipulates the state of the client application (such as a web browser), often to circumvent security mechanisms or to fake false information.

  • Cross-Site Request Forgery (XSRF)
 ➥ An attack in which the attacker performs an action on behalf of an authenticated user, often without the user's knowledge or consent.

  • Cross Site Script Inclusion (XSSI)
 ➥ A variant of XSS in which malicious scripts from an external source are integrated into a website.

  • Path Traversal
 ➥ An attack that is exploited to access files and directories located outside the intended web directory, often to obtain or manipulate sensitive data.

  • Denial of Service (DoS)
 ➥ Attacks aimed at making a service, such as a website, inaccessible, often by overloading the server.

  • Code Execution
 ➥ A vulnerability that allows an attacker to execute arbitrary code on a target device or server, which can lead to a complete takeover.

  • Configuration Vulnerabilities
 ➥ Security vulnerabilities that arise due to misconfigurations in software or systems.

  • AJAX Vulnerabilities
 ➥ Vulnerabilities in Asynchronous JavaScript and XML (AJAX) applications that often lead to problems such as insufficient validation of input data or insecure API endpoints.

Similar Codelabs