Crypto-Jackers Target Exposed Kubernetes Workloads
As the Kubernetes cluster orchestrator moves deeper into enterprise infrastructure, cyber criminals continue to probe for weaknesses, frequently targeting application container image repositories.
The latest onslaught involves misconfigured Kubeflow machine learning clusters running in the Microsoft Azure cloud. The company said crypto-currency miners succeeded in deploying a malicious Kubeflow image via an exposed Kubernetes dashboard. It then spread from a single public repository to “tens” of Kubernetes clusters. The image was found to contain crypto-jacking malware used to mine a virtual currency known as XMRIG.
The security threat aimed at the Kubernetes machine learning toolkit was disclosed this week by Microsoft’s Azure Security Center. Once inside, a “backdoor” container wormed its way through the cluster, established itself as a legitimate “container service account” and began hijacking computing resources to mine cryptocurrency.
Kubeflow nodes, widely used to run TensorFlow machine learning tasks on Kubernetes, are proving attractive to crypto-jackers given their substantial processing power often augmented by GPUs. “This fact makes Kubernetes clusters that are used for [machine learning] tasks a perfect target for crypto-mining campaigns, which was the aim of this attack,” Yossi Weizman, a Microsoft Azure security software engineer, noted in a blog post disclosing the threat.
Microsoft said it has previously detected multiple campaigns against Kubernetes clusters running on Azure. The access point was often services exposed to the Internet. “This is the first time that we have identified an attack that targets Kubeflow environments specifically,” Weizman noted.
With misconfigured Kubeflow workloads documented as a security threat, Microsoft said security teams should verify that malicious containers are not deployed in a cluster. Another step is insuring Kubernetes dashboards aren’t exposed to the Internet via, for example, a public Internet Protocol.
The cloud vendor (NASDAQ: MSFT) also recommends tightening authentication and access controls for machine learning and other applications. As with previous exploits against Kubernetes, IT teams are urged to use only trusted container images while scanning others for vulnerabilities before deploying in production.
Still, security vendors said the hijacking of cloud computing resources to mine for cryptocurrency will persist as long as the practice remains profitable. Hence, it’s worth the risk. The Azure exploit is similar to earlier backdoor attacks on Docker Hub images, experts said. The computing horsepower of Kubernetes clusters accelerated by GPUs to run machine learning workloads makes them inviting targets for crypto-jackers, said Wei Lien Dang, co-founder and chief strategy officer at StackRox.
“Organizations must take specific steps to ensure they’re protecting their container and Kubernetes assets across build, deploy and runtime,” Dang added.
Protecting Kubernetes assets remains a challenge because public repositories like Docker Hub are thought to contain many malicious container images. “There needs to be broader awareness that any image out there could be embedded with code used to attack Kubernetes,” said Tsvi Korren, CTO at cloud native protection vendor Aqua Security.
“The only way to defend against that is for organizations to have policies that require both static scanning and dynamic analysis of the images that they accept,” Korren added.