Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On AWS Penetration Testing with Kali Linux

You're reading from   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
Product type Paperback
Published in Apr 2019
Publisher Packt
ISBN-13 9781789136722
Length 508 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Benjamin Caudill Benjamin Caudill
Author Profile Icon Benjamin Caudill
Benjamin Caudill
Karl Gilbert Gupta Karl Gilbert Gupta
Author Profile Icon Karl Gilbert Gupta
Karl Gilbert Gupta
Arrow right icon
View More author details
Toc

Table of Contents (28) Chapters Close

Preface 1. Section 1: Kali Linux on AWS FREE CHAPTER
2. Setting Up a Pentesting Lab on AWS 3. Setting Up a Kali PentestBox on the Cloud 4. Exploitation on the Cloud using Kali Linux 5. Section 2: Pentesting AWS Elastic Compute Cloud Configuring and Securing
6. Setting Up Your First EC2 Instances 7. Penetration Testing of EC2 Instances using Kali Linux 8. Elastic Block Stores and Snapshots - Retrieving Deleted Data 9. Section 3: Pentesting AWS Simple Storage Service Configuring and Securing
10. Reconnaissance - Identifying Vulnerable S3 Buckets 11. Exploiting Permissive S3 Buckets for Fun and Profit 12. Section 4: AWS Identity Access Management Configuring and Securing
13. Identity Access Management on AWS 14. Privilege Escalation of AWS Accounts Using Stolen Keys, Boto3, and Pacu 15. Using Boto3 and Pacu to Maintain AWS Persistence 16. Section 5: Penetration Testing on Other AWS Services
17. Security and Pentesting of AWS Lambda 18. Pentesting and Securing AWS RDS 19. Targeting Other Services 20. Section 6: Attacking AWS Logging and Security Services
21. Pentesting CloudTrail 22. GuardDuty 23. Section 7: Leveraging AWS Pentesting Tools for Real-World Attacks
24. Using Scout Suite for AWS Security Auditing 25. Using Pacu for AWS Pentesting 26. Putting it All Together - Real - World AWS Pentesting 27. Other Books You May Enjoy

Using Metasploit for automated exploitation

For this demonstration, we will use Metasploit to exploit the Jenkins server and get a meterpreter shell on it. Jenkins has its own script console where a user can type in and run arbitrary code. This is dangerous if the user's credentials are stolen, as anyone can then run arbitrary code using the script console. The Metasploit module we will be using, takes advantage of this and attempts to run code that would create a connection to the remote machine.

Let's see how the exploitation is done:

  1. SSH into the Kali machine and load the Metasploit framework by issuing the following command:
msfconsole
  1. Next, we will search Metasploit for any exploits related to Jenkins:
search jenkins

The output of the preceding command is as follows:

We are presented with a number of modules that are related to Jenkins.

  1. We will use the jenkins_script_console...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime