T1204.003: Malicious Image
Adversaries may rely on a user running a malicious image to facilitate execution. Amazon Web Services (AWS) Amazon Machine Images (AMIs), Google Cloud Platform (GCP) Images, and Azure Images as well as popular container runtimes such as Docker can be backdoored. Backdoored images may be uploaded to a public repository via Upload Malware, and users may then download and deploy an instance or container from the image without realizing the image is malicious, thus bypassing techniques that specifically achieve Initial Access. This can lead to the execution of malicious code, such as code that executes cryptocurrency mining, in the instance or container.
Adversaries may also name images a certain way to increase the chance of users mistakenly deploying an instance or container from the image (ex: Match Legitimate Name or Location).
Detection
ID | DS0007 | Data source and component | Image: Image Creation | Description | Monitor the local image registry to make sure malicious images are not added. |
---|
ID | DS0015 | Data source and component | Application Log: Application Log Content | Description | Monitor for third-party application logging, messaging, and/or other artifacts that may rely on a user running a malicious image to facilitate execution. |
---|
ID | DS0030 | Data source and component | Instance: Instance Start | Description | Monitor for the activation or invocation of an instance (ex: instance.start within GCP Audit Logs) |
---|
ID | DS0032 | Data source and component | Container: Container Start | Description | Monitor the behavior of containers within the environment to detect anomalous behavior or malicious activity after users deploy from malicious images. |
---|
ID | DS0032 | Data source and component | Container: Container Creation | Description | Track the deployment of new containers, especially from newly built images. |
---|
ID | DS0017 | Data source and component | Command: Command Execution | Description | Monitor executed commands and arguments that may attempt to take advantage of a weakness in an Internet-facing computer or program using software, data, or commands in order to cause unintended or unanticipated behavior. |
---|
ID | DS0030 | Data source and component | Instance: Instance Creation | Description | Monitor for newly constructed instances that may attempt to take advantage of a weakness in an Internet-facing computer or program using software, data, or commands in order to cause unintended or unanticipated behavior. |
---|
Mitigation
ID | M1045 | Name | Code Signing | Description | Utilize a trust model such as Docker Content Trust with digital signatures to ensure runtime verification of the integrity and publisher of specific image tags. |
---|
ID | M1031 | Name | Network Intrusion Prevention | Description | Network prevention intrusion systems and systems designed to scan and remove malicious downloads can be used to block activity. |
---|
ID | M1017 | Name | User Training | Description | Train users to be aware of the existence of malicious images and how to avoid deploying instances and containers from them. |
---|
ID | M1047 | Name | Audit | Description | Audit images deployed within the environment to ensure they do not contain any malicious components. |
---|