
״Defenders assume in lists, attackers assume in graphs,” mentioned John Lambert from Microsoft, distilling the basic distinction in mindset between those that defend IT methods and people who attempt to compromise them.
The normal method for defenders is to record safety gaps immediately associated to their property within the community and remove as many as attainable, beginning with essentially the most essential. Adversaries, in distinction, begin with the top purpose in thoughts and deal with charting the trail towards a breach. They may usually search for the weakest hyperlink within the safety chain to interrupt in and progress the assault from there all the way in which to the crown jewels.
Safety groups should embrace the attacker’s perspective to make sure their group’s cybersecurity defenses are ample. Drawing an analogy to a day by day life instance, the usual approach to defend our home from intrusion is to make sure all of the doorways are locked. However to validate that your own home is protected requires testing your safety like a burglar: making an attempt to choose the locks, climb by way of home windows, and on the lookout for locations the place home keys is likely to be “safely” saved.
Penetration testing serves this want exactly: it offers an attacker’s view into what may be compromised. The follow of penetration testing has been round for many years, serving to to disclose how resilient our networks are in opposition to malicious assaults. Nevertheless, with trendy enterprises growing their utilization of cloud companies, it’s simply as mandatory to use the idea of conventional penetration testing to the cloud.
The Cloud’s Not a Protected Haven – Know What You Have to Shield
Cloud architectures comprise sources, identities, and configurations which can be outlined programmatically and alter at a fast tempo. Consequently, the cloud generally is a pandora’s field of added cybersecurity complexity. Whereas the main cloud service suppliers implement rigorous safety practices, this may increasingly generate a false sense of safety for organizations, who will not be conscious of their duty for securing their cloud property, as outlined by the cloud shared duty mannequin. For these causes, pentesting within the cloud is simply as vital as conventional community penetration testing – in some instances, much more so.
On this weblog submit, we discover the essential cloud pentesting constructing blocks, specializing in how attackers search for and exploit safety gaps in your cloud.
What Your Cloud Pentest Ought to Cowl
Relying in your chosen cloud companies’ supply mannequin, the bounds of your duty for safety might range. Usually phrases, the cloud service suppliers’ duty ends the place your duty begins. The cloud supplier is answerable for securing the {hardware} and the underlying software program that permits its companies. You’re answerable for defending every thing you create within the cloud – your information, keys, property, companies, functions, and configurations. Think about an instance of utilizing Lambda capabilities to develop cloud-native functions in Amazon Internet Companies (AWS). Whereas AWS addresses safety for the compute and storage infrastructure and the Lambda service itself, it’s your duty to make sure that entry to your group’s code and sources is safe. So it is as much as you to make sure that your builders aren’t storing credentials within the capabilities’ code or atmosphere variables that might be used to compromise delicate information or laterally transfer within the community if intercepted by malicious actors.
To arrange for numerous breach situations, penetration exams ought to use completely different beginning factors:
- Black Field – the tester has no preliminary entry inside the cloud atmosphere.
- Grey Field – the tester has the credentials of a particular person or position as preliminary enter to indicate the potential impression (aka “blast radius”) if an identification is compromised.
For organizations with hybrid cloud and on-premises networks, an entire and correct understanding of threat publicity can solely be achieved with the power to check assault paths that cross between these environments. For instance, an On-Prem machine is compromised, and the attacker runs an RCE to reap credentials from the machine. Utilizing browser password extraction, the attacker features the credentials of a developer with privileges on an Azure VM. From there, the highway to breach the cloud is paved, and this course of is repeated on completely different machines till the attacker will get a maintain of the very best privileges within the atmosphere and may leverage any useful resource at will. Subsequently, cloud penetration exams ought to cowl situations the place preliminary entry on-premises may lead an attacker to compromise cloud sources and vice-versa.
Listed below are 5 key constructing blocks for cloud penetration testing:
1. Reconnaissance & Discovery
This primary step entails mapping all of the property inside your group’s cloud atmosphere; workloads, storage, databases, and identities. The knowledge gathered on this section offers the scope of property that can be utilized or focused inside a take a look at and a baseline for initiating assault actions.
In conventional community pentesting, the take a look at scope is usually outlined by the IP addresses of the endpoints to be included within the take a look at. Cloud sources, in distinction, are recognized by distinctive identifiers, and entry to them is enabled by way of APIs. Subsequently, the standard method for reconnaissance in cloud pentests is to assemble the asset info in the beginning of a take a look at by connecting to the group’s cloud API.
2. Vulnerability Evaluation
Cloud configuration evaluations and vulnerability scans needs to be carried out to uncover misconfigurations and recognized software program vulnerabilities throughout your cloud property. As an example, cloud community safety needs to be evaluated by assessing the configuration of controls like firewalls, digital non-public networks (VPNs), entry, and community segmentation settings. This course of is required to determine weaknesses corresponding to publicly accessible sources or insecure Digital Non-public Cloud (VPC) peering connections, which may permit unauthorized entry, lateral motion, privilege escalation, and information exfiltration.
One other useful resource at excessive threat is net functions, that are generally focused by hackers as, by design, they’re open to the Web. To validate that the safety controls and software program safety implementations do not permit unauthorized entry to companies and delicate information, penetration testing ought to cowl cloud-hosted net functions. Testing ought to embody OWASP High 10 safety dangers, corresponding to enter validation, SQL injection, cross-site scripting (XSS), and Server-Aspect Request Forgery (SSRF).
Nevertheless, vulnerability scans are only the start. Detected misconfigurations and vulnerabilities should be examined for exploitability, aiming to propagate an assault precisely like an adversary would. For instance, if a publicly accessible cloud storage bucket is detected, it might probably then be examined by scanning its content material for useful secrets and techniques or making an attempt to exfiltrate information.
3. Privilege Escalation
Privilege escalation strategies can grant adversaries entry to extra delicate information, functions, and companies. Attackers try to achieve greater privileges by:
- Exploiting vulnerabilities and misconfigurations which can be designed to achieve greater privileges within the community
- Gaps in identification and entry administration (IAM), corresponding to customers which can be in teams they shouldn’t be in and roles which can be overly permissive
- Compromising identities with greater privileges by way of credential harvesting – a set of methods that entails finding and exposing credentials, keys, and session tokens improperly saved throughout numerous sources, together with however not restricted to information, shell historical past, registry, atmosphere variables, deployment instruments, and browsers.
Whereas privilege escalation is a standard assault approach utilized in conventional networks, the problem of securing identities and entry to forestall such assaults within the cloud is exponentially better.
First, the complexity of cloud IAM architectures is far better. The abundance of human and machine identities and complicated entry management insurance policies put in place to assist automated orchestration of cloud sources are more likely to introduce dangers that attackers can simply exploit. Not solely that, however the mixture of Cloud and On-Prem Entry controls can result in a really advanced rule system, and attackers thrive on complexity.
Second, builders utilizing cloud infrastructure to create their functions usually place hardcoded secrets and techniques of their code and will overlook or neglect to take away them, exposing them to malicious actors.
4. Lateral Motion
Testing ought to determine attainable paths between cloud sources, which adversaries can leverage to assemble extra delicate information or secrets and techniques and advance their assaults.
In hybrid atmosphere testing situations, lateral motion methods may be tried as a method to pivot from on-premises to cloud or vice versa. Subsequently defending the cloud atmosphere as a silo will not work. Organizations could also be impacted by assaults propagating throughout all the assault floor – the interior community, external-facing property, and cloud environments. Adversaries do not view the organizational assault surfaces as disconnected entities however quite as one floor, so defenders have to take an analogous method, working throughout domains to intercept assaults. To safe the cloud, one should validate all of the inroads that result in it.
5. Knowledge Assortment and Exfiltration
Knowledge assortment in cloud computing refers back to the gathering of information from a number of sources, primarily delicate in nature, corresponding to bank cards, private info, passwords and many others. That is the principle cause attackers break right into a community, to come up with delicate info. Typically the adversaries will retailer the information in a centralized location, as a preliminary step to pay attention the information they wish to exfiltrate.
A cloud pentest ought to assess the power to gather after which exfiltrate information to an exterior location and validate the community safety controls to check whether or not they stop exfiltration to recognized IOCs.
Cloud Pentesting: Keys to Success
As you start the cloud penetration testing journey, it’s essential that you simply spend a while understanding the scope of your cloud companies and property, and what components of the assault floor are in your arms to guard in line with the shared duty mannequin. It’s then attainable to make knowledgeable choices on cloud-pentesting investments inside the context of your group’s threat publicity.
As a remaining observe, the effectiveness of a cloud pentesting program shouldn’t be solely decided by the depth and breadth of testing, but additionally by the testing frequency. The tempo of change in on-premises networks is serving as a blow to the effectiveness of prolonged guide penetration testing cycles. Within the cloud, it is a knockout. Identical to cloud and R&D groups are automating their cloud operations and deployments, safety groups should shift gears to automating their cloud penetration testing actions and, finally, complement the Steady Integration/Steady Deployment loop with Steady Validation.

To confidently validate your organization’s resilience to cloud-native assaults, be taught extra about Pentera Cloud, and take heed to the On-demand recording about Placing Cloud Safety to the Stress Check.