
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Enable APIs
/ 20
Create a VPC
/ 20
Create a Cloud IDS Endpoint
/ 10
Add firewall rules to the VPC
/ 10
Create a CloudRouter
/ 10
Create Virtual Machine
/ 10
Create and attach the packet mirroring policy
/ 10
Review threats detected by Cloud IDS
/ 10
In this lab, you deploy Cloud Intrusion Detection System (Cloud IDS), a next-generation advanced intrusion detection service that provides threat detection for intrusions, malware, spyware, and command-and-control attacks. You simulate multiple attacks and view the threat details in the Google Cloud console.
In this lab, you learn how to perform the following tasks:
For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.
Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is the Lab Details panel with the following:
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Details panel.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details panel.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
Google Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud.
Google Cloud Shell provides command-line access to your Google Cloud resources.
In Cloud console, on the top right toolbar, click the Open Cloud Shell button.
Click Continue.
It takes a few moments to provision and connect to the environment. When you are connected, you are already authenticated, and the project is set to your PROJECT_ID. For example:
gcloud is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.
Output:
Example output:
Output:
Example output:
This lab will all be done using gcloud
CLI commands inside Cloud Shell.
In this task you set the project ID variable and then enable the APIs required for the lab.
If prompted to authorize the command, click Authorize.
Click Check my progress to verify the objective.
In this task, you create a Google Cloud VPC network and configure private services access.
Private services access is a private connection between your VPC network and a network owned by Google or a third party. Google or the third party, entities who are offering services, are also known as service producers.
The private connection enables virtual machine (VM) instances in your VPC network and the services that you access to communicate exclusively by using internal IP addresses.
If prompted to authorize the command, click Authorize.
Click Check my progress to verify the objective.
In this task you create a Cloud IDS endpoint in us-east1 with a severity set to informational.
Cloud IDS uses a resource known as an IDS endpoint, a zonal resource that can inspect traffic from any zone in its region. Each IDS endpoint receives mirrored traffic and performs threat detection analysis.
If the message Would you like to enable and retry appears, press Y.
The output should be similar to this:
Click Check my progress to verify the objective.
In this task you create two firewall rules: allow-http-icmp and allow-iap-proxy.
To enable standard http port (TCP 80) connections, and ICMP protocol connections to the server VM from all sources in the cloud-ids network, you define the allow-http-icmp rule.
To enable SSH connections to the VMs from the Identity-Aware Proxy IP range, you define the allow-iap-proxy_ rule.
You also configure Cloud Router and then configure Cloud NAT. As a prerequisite for Cloud NAT, a Cloud Router must first be configured in the same region. To provide internet access to VMs that don't have a public IP address, a Cloud NAT must be created in the same region. The VMs will be created without a public IP address to make sure that they are inaccessible from the internet. However, they will need access to the internet to download updates and files.
Click Check my progress to verify the objective.
Click Check my progress to verify the objective.
In this task, you create two virtual machines (VMs). The first virtual machine is your web server, which is mirroring to Cloud IDS. The second virtual machine is the source of your attack traffic.
You establish an SSH connection to your server via Identity-Aware Proxy (IAP), check the status of your web service server, create a benign malware file on the web server, and then add content to the file.
This command creates a Debian server in us-east1 and installs a simple web service.
This command prepares a Debian server in us-east1 to use as your client.
Click Check my progress to verify the objective.
In this procedure, you validate your server and then create a benign malware payload for your client.
This command will prompt you through a series of steps to create an ssh key and the required directories.
To agree to the directory creation prompt, type Y.
When prompted for a passphrase, to use a blank passphrase, press ENTER twice.
You are now in the shell of your server VM.
In this procedure, you check the status of your web service server. You create a benign malware file on the web server and then add content to the file.
The output should be similar to this:
In this task, you create a Cloud IDS packet mirroring policy. This policy determines what traffic is mirrored to the Cloud IDS. You will then attach this policy to the newly created Cloud IDS endpoint.
As mentioned earlier, the Cloud IDS endpoint creation takes some time. Before you can proceed with this lab, the endpoint must be in an active/ready state.
1.To verify that your Cloud IDS endpoint is active, in Cloud Shell, run the following command to show the current state of the Cloud IDS endpoint:
The output should be similar to this:
Continue to run this command every few minutes until the state shows READY.
The output should be similar to this:
Click Check my progress to verify the objective.
This gcloud command lists the packet mirroring policies and shows whether they are enabled/disabled.
The output should be similar to this:
In this task, you establish an SSH connection to your attacked virtual machine and simulate attack traffic from a virtual machine to your server. You do this by running a selection of curl
commands that range from low severity to critical severity.
curl
requests in sequence to simulate low, medium, high, and critical severity alerts on the IDS:Low Severity:
Medium Severity:
High Severity:
Critical Severity:
In this task, you review the various attack traffic captured by the Cloud IDS in the Cloud console. The captured attack traffic profiles provide details of each threat.
In the Google Cloud console, in the Navigation menu (), click Network Security > Cloud IDS.
Click the Threats tab.
The Cloud IDS captured various attack traffic profiles and provided the details on each threat. You may need to click Refresh if you do not see any threats. You now dive a little deeper and view threat details.
Now you view the details of this incident in Cloud Logging. To return to the Threats page, click the left arrow.
Click the Threats tab.
Locate the Bash Remote Code Execution Vulnerability, click More, and then select View threat logs.
A new Cloud Logging tab opens that displays the same details. This enables you to send the logs to Cloud Storage, Chronicle, or any SIEM/SOAR. You can also create custom workflows to take remediation action based on alerts, like creating a Cloud Function that triggers on an alert and creating or updating a firewall rule to block the IP address, or creating or updating a Google Cloud Armor policy.
Click Check my progress to verify the objective.
In this lab, you did the following:
Created a new VPC and deployed a Cloud IDS endpoint.
Deployed two VMs, created a packet mirroring policy, and then sent attack traffic.
Verified that the Cloud IDS captured the threats by viewing the threat details in the Cloud console and the threat logs in Cloud Logging.
Try out these labs to get more Cloud IDS experience:
When you have completed your lab, click End Lab. Google Cloud Skills Boost removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2022 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one