Cybersecurity challenges in serverless computing

Serverless infrastructure adoption is growing faster than most people realize. Some studies stated that since 2015 it’s growing by more than 2X compared to virtual containers technology.

Serverless computing is a misnomer. In fact, serverless applications still require physical or virtual servers running somewhere, but serverless computing differs from traditional approaches in that the organization developing the application is not responsible for those resources. That can be better explained comparing serverless with traditional IaaS (Infrastructure as a service): in IaaS developers need to provision and maintain VMs, storage, security and all the management tools needed. Developers may load the applications onto VMs, and use load balance to allocate the traffic efficiently.

In serverless, all these matters are all eliminated: code is written in functions that are triggered by events. There’s no need for load balancing, capacity planning or resource management. From the standpoint of a developer, there are just tasks being executed. This introduced simplicity implies that organizations also offload more security duties to the cloud provider.

Many of the current generation of security tools rely on being able to attach to the underlying servers, virtual machines, guest operating systems, databases, virtual containers, and virtual network interfaces. But once an application developer chooses to build upon a serverless infrastructure, those underlying components are no longer persistent nor readily accessible.

In fact, serverless architectures pose unique security challenges, which need to be addressed. But designing a security solution for serverless architectures and applications is very difficult for a few key reasons:

  • The attack surface is expanded: instead of a small number of entry points with lots of functionality hidden behind each one, you likely have many more entry points, each with a small part of the app behind it. Think motel vs. hotel. Defending your application now requires thinking about each and every individual door, rather than a few main entrances.
  • Additionally, the triggers that launch your function are varied, so an attack might come at you from any direction. You need to consider all the ways an attacker might directly or indirectly cause your resources to do things you didn’t intend.
  • Scanning tools are ineffective: Scanning tools are not adapted to serverless applications, especially when serverless applications use non-HTTP interfaces to consume input.
  • Traditional solutions don’t work: Organizations can’t use endpoint protection or host-based IPS because they don’t have access to the virtual servers or their operating systems.
  • Unique capabilities are required: Cloud API call inspection is required, which is not traditionally part of WAF or other IPS solutions. Furthermore, serverless functions are triggered by a wide range of cloud-native event types, each of which has its own message format and encoding schemes. Traditional application security solutions are incapable of inspecting cloud-native event triggers, either because they cannot be deployed in-line between the service that generates the event and the organization’s functions, or they cannot parse, analyse or understand cloud-native events.

Despite the challenges that serverless computing poses today, we are confident that we will witness a widespread serverless adoption in the next years, as it allows to accelerate development and reduce costs.

References

This blog post was written for the ProTego project by Salvador García (MS).