Book Image

Penetration Testing Azure for Ethical Hackers

By : David Okeyode, Karl Fosaaen
Book Image

Penetration Testing Azure for Ethical Hackers

By: David Okeyode, Karl Fosaaen

Overview of this book

“If you’re looking for this book, you need it.” — 5* Amazon Review Curious about how safe Azure really is? Put your knowledge to work with this practical guide to penetration testing. This book offers a no-faff, hands-on approach to exploring Azure penetration testing methodologies, which will get up and running in no time with the help of real-world examples, scripts, and ready-to-use source code. As you learn about the Microsoft Azure platform and understand how hackers can attack resources hosted in the Azure cloud, you'll find out how to protect your environment by identifying vulnerabilities, along with extending your pentesting tools and capabilities. First, you’ll be taken through the prerequisites for pentesting Azure and shown how to set up a pentesting lab. You'll then simulate attacks on Azure assets such as web applications and virtual machines from anonymous and authenticated perspectives. In the later chapters, you'll learn about the opportunities for privilege escalation in Azure tenants and ways in which an attacker can create persistent access to an environment. By the end of this book, you'll be able to leverage your ethical hacking skills to identify and implement different tools and techniques to perform successful penetration tests on your own Azure infrastructure.
Table of Contents (12 chapters)
1
Section 1: Understanding the Azure Platform and Architecture
5
Section 2: Authenticated Access to Azure

Persisting in an Azure subscription

Persistence in an Azure subscription can be established in multiple different services across the subscription. This is inclusive of Azure AD account access at the subscription (or management group) level, all the way down to the resource level. Since access to the broader subscription will be controlled by your identity (User Account, Service Principal, Managed Identity), you will want to have options at multiple levels to maintain (or regain) your access to these identities.

For starters, we will be looking at how we can gather existing subscription tokens for authenticated users. This can be a very practical way of keeping access through normal administrative user sessions.

Stealing credentials from a system

Depending on what your scope is, you may find yourself in an internal network environment or on an Azure VM, looking to persist in the tenant. While we could easily make an argument to escalate your privileges to a domain administrator...