A misconfigured EC2 instance

In Chapter 4Setting Up your First EC2 Instances, we learned how to create new VPCs and subnets. We will start by creating a new VPC and subnet and then launching an EC2 instance with all the ports exposed. You may refer to the steps in Chapter 4, Setting Up your First EC2 Instances to do this:

  1. Let's start by going to Services | VPC | Your VPCs.
  2. Click on Create VPC and assign a new IP range:

Creating VPC

Here, we have named the VPC as VulnVPC and have given it a 10.0.0.0/16 IP range.

  1. Create a new subnet within the VPC:

Creating subnet

We are creating a new subnet within the VPC with a 10.0.1.0/24 IP range. 

  1. Go to Internet gateways and create a new gateway; attach this new gateway to the new VPC:

Creating new gateway
  1. Go to Route Tables and select the new VPC. Then, go to the Routes tab and click on Edit routes.
  1. Add a new 0.0.0.0/0 destination and set the target to the internet gateway:

Adding a new destination and setting the target
  1. Create a new security group and allow All traffic from Anywhere:

Editing inbound rules
  1. Now, launch a new EC2 instance in the new VPC and subnet:

Launching a new EC2 instance
  1. Assign it the vulnerable security group, as demonstrated in the following screenshot:

Assigning Security Group ID
  1. Finally, launch the EC2 instance. 

Our vulnerable EC2 infrastructure is ready.Now let's create a vulnerable S3 instance as well.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.59.187