Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Hands-On AWS Penetration Testing with Kali Linux
Hands-On AWS Penetration Testing with Kali Linux

Hands-On AWS Penetration Testing with Kali Linux: Set up a virtual lab and pentest major AWS services, including EC2, S3, Lambda, and CloudFormation

Arrow left icon
Profile Icon Karl Gilbert Gupta Profile Icon Benjamin Caudill
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7 (15 Ratings)
Paperback Apr 2019 508 pages 1st Edition
eBook
€20.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Karl Gilbert Gupta Profile Icon Benjamin Caudill
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7 (15 Ratings)
Paperback Apr 2019 508 pages 1st Edition
eBook
€20.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€20.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Hands-On AWS Penetration Testing with Kali Linux

Setting Up a Pentesting Lab on AWS

This chapter aims to help penetration testers who don't have direct access to targets for penetration testing set up a vulnerable lab environment within AWS. This lab will allow testers to practice various exploitation techniques using Metasploit and rudimentary scanning and vulnerability assessment using multiple tools within Kali. This chapter focuses on setting up a vulnerable Linux VM and a generic Windows VM on AWS, putting them on the same network.

In this chapter, we will cover the following topics:

  • Setting up a personal pentesting lab for hacking on the cloud
  • Configuring and securing the virtual lab to prevent unintended access

Technical requirements

In this chapter, we are going to use the following tools:

  • Damn Vulnerable Web Application
  • Very Secure File Transfer Protocol Daemon (vsftpd) version 2.3.4

Setting up a vulnerable Ubuntu instance

As the first of the two vulnerable machines that we will be creating, the vulnerable instance of Ubuntu will contain a single vulnerable FTP service, as well as some other services.

Provisioning an Ubuntu EC2 instance

The very first step in setting up our vulnerable lab in the cloud will be to provision an instance that will be running a vulnerable operating system. For this purpose, we can use an Ubuntu LTS version. This can be accessed from the AWS Marketplace for quick deployment.

We will use Ubuntu 16.04 for this purpose:

Once we click on the Continue to Subscribe button, we are prompted to configure the instance that we are going to launch. Since this is a pretty standard image...

Setting up a vulnerable Windows instance

With a vulnerable Linux Server set up, we now set up an attack vector through a Windows server that's running a vulnerable web application. This application shall provide two environments that readers without an actual test environment can try their hand at.

Provisioning a vulnerable Windows server instance

For the purpose of this lab host, we will be using a Server 2003 instance from the AWS Marketplace:

The provisioning steps are pretty much identical to what we used to set up the Linux instance earlier. Care should be taken that the VPC settings are similar to what we used for the previous instance. This will later allow us to configure the VMs to be on the same network.

After...

Configuring security groups within the lab

Now that we have set up two vulnerable servers, the next step is to configure network so that our web application isn't accessible to outsiders and, at the same time, so that the other lab machines can communicate with each other.

Configuring security groups

We had originally set all of the EC2 instances to be on the same VPC. This implied that the EC2 instances would be on the same subnet and would be able communicate with each other through internal IP addresses. However, AWS doesn't want to allow all 4,096 addresses on the same VPC to be communicating with each other. As a result, the default security groups don't allow communication between EC2 instances.

To allow...

Summary

In this chapter, we have set up a lab that can prove useful to beginner penetration testers who do not have access to a test environment or hands-on exposure to a lab. In our lab, we have set up one Ubuntu host with a vulnerable service running on it, and we also set up a Windows server host that is running a vulnerable web application. This represents the two biggest surface areas for an attack in any environment. Additionally, we also went through the process of establishing a network connection between the various instances that we have set up so far. With these steps taken care of, the user can set up any operating system instances in the cloud, set up security groups to configure networking, and protect against unauthorized access as well.

In the next chapter, we will be looking at setting up a Kali PentestBox, using which we can perform scanning, enumeration, and...

Further reading

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Efficiently perform penetration testing techniques on your public cloud instances
  • Learn not only to cover loopholes but also to automate security monitoring and alerting within your cloud-based deployment pipelines
  • A step-by-step guide that will help you leverage the most widely used security platform to secure your AWS Cloud environment

Description

The cloud is taking over the IT industry. Any organization housing a large amount of data or a large infrastructure has started moving cloud-ward — and AWS rules the roost when it comes to cloud service providers, with its closest competitor having less than half of its market share. This highlights the importance of security on the cloud, especially on AWS. While a lot has been said (and written) about how cloud environments can be secured, performing external security assessments in the form of pentests on AWS is still seen as a dark art. This book aims to help pentesters as well as seasoned system administrators with a hands-on approach to pentesting the various cloud services provided by Amazon through AWS using Kali Linux. To make things easier for novice pentesters, the book focuses on building a practice lab and refining penetration testing with Kali Linux on the cloud. This is helpful not only for beginners but also for pentesters who want to set up a pentesting environment in their private cloud, using Kali Linux to perform a white-box assessment of their own cloud resources. Besides this, the book covers a large variety of AWS services that are often overlooked during a pentest — from serverless infrastructure to automated deployment pipelines. By the end of this book, you will be able to identify possible vulnerable areas efficiently and secure your AWS cloud environment.

Who is this book for?

If you are a security analyst or a penetration tester and are interested in exploiting Cloud environments to reveal vulnerable areas and secure them, then this book is for you. A basic understanding of penetration testing, cloud computing, and its security concepts is mandatory.

What you will learn

  • Familiarize yourself with and pentest the most common external-facing AWS services
  • Audit your own infrastructure and identify flaws, weaknesses, and loopholes
  • Demonstrate the process of lateral and vertical movement through a partially compromised AWS account
  • Maintain stealth and persistence within a compromised AWS account
  • Master a hands-on approach to pentesting
  • Discover a number of automated tools to ease the process of continuously assessing and improving the security stance of an AWS infrastructure

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 30, 2019
Length: 508 pages
Edition : 1st
Language : English
ISBN-13 : 9781789136722
Vendor :
Amazon
Category :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Apr 30, 2019
Length: 508 pages
Edition : 1st
Language : English
ISBN-13 : 9781789136722
Vendor :
Amazon
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 128.97
Mastering Kali Linux for Advanced Penetration Testing
€54.99
Kali Linux 2018: Assuring Security by Penetration Testing
€36.99
Hands-On AWS Penetration Testing with Kali Linux
€36.99
Total 128.97 Stars icon
Banner background image

Table of Contents

27 Chapters
Section 1: Kali Linux on AWS Chevron down icon Chevron up icon
Setting Up a Pentesting Lab on AWS Chevron down icon Chevron up icon
Setting Up a Kali PentestBox on the Cloud Chevron down icon Chevron up icon
Exploitation on the Cloud using Kali Linux Chevron down icon Chevron up icon
Section 2: Pentesting AWS Elastic Compute Cloud Configuring and Securing Chevron down icon Chevron up icon
Setting Up Your First EC2 Instances Chevron down icon Chevron up icon
Penetration Testing of EC2 Instances using Kali Linux Chevron down icon Chevron up icon
Elastic Block Stores and Snapshots - Retrieving Deleted Data Chevron down icon Chevron up icon
Section 3: Pentesting AWS Simple Storage Service Configuring and Securing Chevron down icon Chevron up icon
Reconnaissance - Identifying Vulnerable S3 Buckets Chevron down icon Chevron up icon
Exploiting Permissive S3 Buckets for Fun and Profit Chevron down icon Chevron up icon
Section 4: AWS Identity Access Management Configuring and Securing Chevron down icon Chevron up icon
Identity Access Management on AWS Chevron down icon Chevron up icon
Privilege Escalation of AWS Accounts Using Stolen Keys, Boto3, and Pacu Chevron down icon Chevron up icon
Using Boto3 and Pacu to Maintain AWS Persistence Chevron down icon Chevron up icon
Section 5: Penetration Testing on Other AWS Services Chevron down icon Chevron up icon
Security and Pentesting of AWS Lambda Chevron down icon Chevron up icon
Pentesting and Securing AWS RDS Chevron down icon Chevron up icon
Targeting Other Services Chevron down icon Chevron up icon
Section 6: Attacking AWS Logging and Security Services Chevron down icon Chevron up icon
Pentesting CloudTrail Chevron down icon Chevron up icon
GuardDuty Chevron down icon Chevron up icon
Section 7: Leveraging AWS Pentesting Tools for Real-World Attacks Chevron down icon Chevron up icon
Using Scout Suite for AWS Security Auditing Chevron down icon Chevron up icon
Using Pacu for AWS Pentesting Chevron down icon Chevron up icon
Putting it All Together - Real - World AWS Pentesting Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7
(15 Ratings)
5 star 60%
4 star 6.7%
3 star 0%
2 star 13.3%
1 star 20%
Filter icon Filter
Top Reviews

Filter reviews by




Alvarigno Sep 27, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a good way to learn what you can do to hack cloud services, in this case, AWS Services. For me, it was a good book to learn about hacking some cloud services.
Amazon Verified review Amazon
Nick from Chicago May 03, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a must have for any AWS security professional. Its geared towards the advanced security admin, but contains easy to follow examples and sample code. This book covers all the tools you need to audit and help secure your AWS account. At 500 pages its very in depth, and probably the best and most valuable book I've ever bought.
Amazon Verified review Amazon
H3 Feb 07, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is by far the best book about AWS security. It is full of practical examples of how to perform Penetration testing activities against AWS environments. The chapter on permissions and role assumption is exemplary.I have reread this book 3 times on various engagements. If you touch aws, this is the book for you.
Amazon Verified review Amazon
Andy Jun 22, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I received the book earlier this week and am on the final chapter now. I've been following the Rhino team's AWS research for a while, so when I saw Ben (their CEO) was helping write an AWS book I had to check it out.The only 'negative' thing I could say is that I ended up skimming a lot of earlier sections that were fairly basic and weren't security specific. Aside from that, I enjoyed the book and how they provided specific steps on attacking different AWS services.
Amazon Verified review Amazon
Beatrice Fleming Jun 21, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Extremely happy with purchase.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.