All hands-on labs

Premium Hands-on labintermediatered teamblue teamAWS

Reduce your AWS attack surface with port scanning

Step into the role of a security professional reviewing a small but realistic AWS environment: a containerized web app fronted by an Application Load Balancer, with a data tier and a leftover legacy bastion host. Using the AWS console and CloudShell, you map the environment's external attack surface with nmap and discover that two things answer the internet that never should, a database and cache tier exposed on ports 3306 and 6379, and a forgotten bastion with SSH wide open to the world. You then remediate each finding, replacing overly broad 0.0.0.0/0 rules with least-privilege security group design, including security group to security group references so the data tier only accepts traffic from the app tier, and narrowing remote access down to a known source instead of the entire internet. You re-scan after each change to prove the exposure is closed without breaking production, finishing with an environment where the load balancer is the only thing facing the internet.

  • 16 guided tasks

Scenario

You just joined a new company, or landed a new client, and one of your first assignments is to look at a small application environment running in AWS and tell them how exposed it is to the internet. Nobody is quite sure what's reachable from the outside anymore. People have come and gone, a few things got launched "just to test," and somewhere along the way the environment drifted. Sound familiar? Figuring out what the internet can actually touch, and then shrinking that down to only what's necessary, is one of the most common and most valuable things a security professional gets asked to do.

In this lab, that's the exact role you're going to step into. We've deployed a realistic little slice of an AWS environment for you: a containerized web application sitting behind a load balancer, a data tier running a database and a cache, and a leftover server that someone spun up a while back and never cleaned up. Your job is to discover what the outside world can reach, decide what should and shouldn't be reachable, and then lock it down using security groups.

What you will learn

  • Find the resources in an AWS account that have a public presence.
  • Scan those resources with nmap to see which ports answer from the internet.
  • Explain why the default nmap scan can miss an exposed service.
  • Replace an open 0.0.0.0/0 security group rule with a security group source.
  • Confirm a fix closed the exposure without breaking the application.
Hands-on lab

Reduce your AWS attack surface with port scanning

Included in Cybr Premium.