Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Labs

Blocking SQL Injection (SQLi) Using GCP Cloud Armor

A critical step in securing a web app is to block injection attacks, like SQL injection (SQLi), from modifying or accessing the app's SQL database. In this hands-on lab, you'll use the Cloud Armor and Cloud Load Balancing services to block SQLi attacks against a vulnerable web app.

Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 45m
Published
Clock icon Apr 20, 2023

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Configure Cloud Load Balancing HTTP(S) Settings

    1. Use the Cloud Load Balancing service to create an internet-facing and global (non-classic) HTTP(S) load balancer.
    2. Name the load balancer lb.
    3. Create a frontend service named frontend.
    4. Create a backend service named backend.
    5. Configure the backends of the new backend service to use the recently created instance group.
    6. Create a health check named hc, and set the check interval to 25 seconds and the timeout to 20 seconds.
  2. Challenge

    Create a Cloud Armor Policy to Block SQLi

    1. Create a Cloud Armor security policy named cap with a default rule action of Allow.
    2. Create a rule named SQLi that uses the preconfigured expression for sqli-v33-stable, and set its priority to 1.
    3. Set the target to the recently created backend load balancer.
  3. Challenge

    Enable Container Registry

    Enable the Container Registry service using the GCP console.

  4. Challenge

    Docker Pull, Tag, and Push the Container Image Using Cloud Shell

    Use the Cloud Shell to perform the following actions:

    1. Pull the DVWA Docker image.
    2. Tag the DVWA Docker image.
    3. Push the DVWA Docker image.
  5. Challenge

    Create an Instance Group

    1. Create an instance group using the GCP console.
    2. Create a new instance template based on the container pushed to the Container Registry.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans