Researchers have discovered a new technique that lets an attacker to build and deploy an image on a victim's host. The attack exploits a misconfigured Docker API port to build and run a malicious container image on the host.
In the observed attack, the adversary used a Docker SDK for Python package to send commands to a misconfigured Docker API. The aim, in the observed instance, was to execute a resource-hijacking attack using a cryptominer.
Assaf Morag of Team Nautilus, Aqua's cybersecurity research team, observed this technique. He points out that because the attack builds and executes malicious code on the victim's host, most defense tools are ineffective because they tend to scan malicious code coming in from outside the network perimeter. Morag says network-level detection/prevention security scanning could be effective in stopping the attack by disrupting communications with the C2 server. Ongoing dynamic threat analysis is another recommended strategy for defense.
For more, read here.