Google Cloud Blog
Follow
The Risk of Exposed Cloud Functions and How to Harden
Mandiant security assessments have identified publicly exposed serverless applications that lack authentication, often due to specific business requirements. Serverless deployments typically run custom-developed code that incorporates third-party packages, making them targets for a wide range of application-level attacks. Successful exploitation of these vulnerabilities can grant an attacker full control over the underlying container instance, which can serve as a foothold for a full compromise of the victim's cloud environment. Serverless applications, also known as Function-as-a-Service, allow the deployment of individual blocks of code as microservices within a flexible, decoupled, and event-driven cloud architecture. The rapid expansion of generative AI adoption is driving the increased use of serverless architecture, making securing serverless environments a pressing challenge for enterprise security teams. Publicly exposed serverless workloads can serve as an initial access point for threat actors, who can exploit vulnerabilities in the code, imported packages, or underlying runtime environment. Attackers can extract secrets stored directly within the application code, review application logic and sensitive data, and exfiltrate service account bearer tokens from the metadata server. To secure serverless environments, Mandiant recommends implementing parallel approaches, including a secure software development lifecycle, compensating runtime controls, and defense-in-depth measures such as segregating public services, using custom service accounts, and implementing a Layer 7 Application Load Balancer architecture. Additionally, organizations should use a Web Application Firewall, such as Cloud Armor, to filter malicious traffic and block common local file inclusion attacks. By following these recommendations, organizations can effectively harden their serverless environments and prevent attacks.