Skip to content

AWS X-Ray Exploited for Command and Control Communication

AWS X-Ray, a powerful tracing tool, can be exploited for covert bidirectional C2 communication. Be aware of this security risk.

In this image we can see the information board, buildings, shed, trees, electric cables and sky...
In this image we can see the information board, buildings, shed, trees, electric cables and sky with clouds.

AWS X-Ray Exploited for Command and Control Communication

AWS X-Ray, a legitimate cloud tracing tool, has been found to be vulnerable to abuse for command and control (C2) communication. Dhiraj Mishra's analysis on Medium details this technique, highlighting the potential threat to AWS users.

The technique involves creating a custom policy with specific JSON and attaching it to the 'XRay' user for access. This allows the implant, run on the victim's machine, to manage callbacks from the controller. Unlike traditional C2 infrastructure, this method uses AWS X-Ray as a covert bidirectional C2 channel, reducing detection opportunities.

To execute this, an AWS IAM user named 'XRay' with the 'AWSXRayDaemonWriteAccess' policy needs to be created. The toolkit 'XRayC2', available for download at https://github.com/RootUp/XRayC2, implements custom AWS SigV4 authentication manually and uses HMAC-SHA256 for API requests to X-Ray. The service's ability to store arbitrary key-value data via annotations facilitates this covert communication.

AWS users should be aware of this potential security risk. While AWS X-Ray is a powerful tool for tracing and debugging applications, its capabilities can be exploited for malicious purposes. Regular security audits and monitoring of AWS services are recommended to mitigate such threats.

Read also:

Latest