Varonis Threat Labs has developed a new proof-of-concept command-and-control (C2) framework named NotC2, which operates entirely using native AWS services. This innovative framework leverages Amazon Bedrock to convert plain English into cloud commands, representing a sophisticated method of service abuse rather than a flaw in Bedrock itself. Importantly, the framework can only be utilized after an attacker has obtained AWS credentials.
Innovative Use of AWS Services in C2 Framework
Traditional C2 frameworks rely on custom servers and protocols that can be detected and blocked by security tools. To circumvent these defenses, attackers have shifted to using recognized platforms like Telegram, Discord, and GitHub, which are essential to business operations, making them difficult to block. Cloud storage solutions such as Amazon S3 and Google Drive have similarly been used to carry commands and stolen data.
Researchers have shown that cloud-based C2 traffic often travels over port 443, rendering reputation-based blocking ineffective. The development of NotC2 builds on previous work, such as Dhiraj Mishra’s XRayC2, which disguises commands within AWS X-Ray trace annotations. Additionally, Rhino Security Labs demonstrated using S3 objects for Cobalt Strike beacons, though these methods have limitations like requiring API keys and experiencing delays due to constant polling.
Mechanics of the NotC2 Framework
According to Varonis Threat Labs’ research, NotC2, which stands for “notification” and “C2,” employs four AWS services, each playing a distinct role. Amazon SQS is used for command input, where the attacker’s server places messages in a queue, avoiding continuous connections that could be detected. AWS Lambda functions as the processing engine, executing tasks without leaving lasting processes, though logs of these activities remain in the cloud.
Amazon SNS handles result delivery, sending outputs to an attacker’s HTTPS endpoint without direct contact. Amazon Bedrock acts as the AI interpreter, transforming simple requests into complex AWS API calls. This allows attackers to execute cloud operations efficiently without knowing specific CLI syntax.
Defensive Measures and Future Implications
The NotC2 framework’s success hinges on the permissions associated with compromised credentials. Deploying this system requires specific AWS permissions, and attackers often use open-source tools like Pacu to identify exploitable paths. Real-world incidents show attackers leveraging stolen credentials to run up costs on cloud services or targeting AI gateways linked to Amazon Bedrock.
Defensive strategies should focus on monitoring for unusual cloud activities, such as external SNS subscriptions created by a Lambda role or a sudden increase in specific Bedrock API calls. Implementing least privilege access controls, restricting SNS subscriptions, and monitoring cloud logs for anomalies are critical steps in mitigating these threats.
Overall, NotC2 illustrates the challenges of maintaining security in serverless environments where traditional perimeter defenses are ineffective. Security teams must prioritize securing workload identities and monitoring service interactions to disrupt the NotC2 chain effectively.
