Cybersecurity researchers from Palo Alto Networks Unit 42 disclosed details of a new security flaw affecting Microsoft’s Service Fabric that could be exploited to obtain elevated permissions and seize control of all nodes in a cluster.
Azure Service Fabric is Microsoft’s platform-as-a-service and a container orchestrator solution used to build and deploy microservices-based cloud applications across a cluster of machines.
“The vulnerability enables a bad actor, with access to a compromised container, to escalate privileges and gain control of the resource’s host SF node and the entire cluster,” Microsoft said as part of the coordinated disclosure process.
A Service Fabric cluster is a network-connected set of several nodes, each of which are designed to manage and execute applications that consist of microservices or containers.
“While this behavior can be observed on both Linux containers and Windows containers, it is only exploitable in Linux containers because in Windows containers unprivileged actors cannot create symlinks in that environment,” Unit 42 researcher Aviv Sasson said.
Code execution is subsequently achieved by taking advantage of the flaw to override the “/etc/environment” file on the host, followed by exploiting an internal hourly cron job that runs as root to import malicious environment variables and load a rogue shared object on the compromised container that grants the attacker a reverse shell in the context of root.