Varonis Demonstrates NotC2 AI-Powered C2 Framework Built on AWS

· Original article ↗

Summary

Varonis Threat Labs presents NotC2, a proof-of-concept using SQS, Lambda, SNS and Amazon Bedrock for post-compromise AWS command and control, detailing its permissions, cloud-log detection signals and defensive controls.

Key points

  • NotC2 is a proof-of-concept that assumes an attacker already has AWS credentials and uses native AWS services for command delivery, execution and results.
  • SQS delivers commands to a Lambda function, which performs operations using its execution role; SNS sends results to an external endpoint.
  • Amazon Bedrock translates natural-language prompts into AWS API operations and can help chain reconnaissance tasks, without exceeding the identity's permissions.
  • Deployment requires permissions to create or configure the infrastructure and attach an execution role; runtime activity also depends on the role's access to Bedrock and target resources.
  • The framework reduces conventional network indicators, but related activity may appear across CloudTrail, Lambda, SNS and Bedrock logs; message content requires additional logging to inspect.
  • The article recommends least-privilege IAM, restricting external SNS subscriptions and correlating activity across the queue, function, model and topic.

Article Details

Attack Vectors
  • Use compromised AWS credentials to create or reuse SQS, Lambda, and SNS resources for a cloud-native command-and-control loop.
  • Deliver commands through an SQS queue, trigger a Lambda function to execute AWS API operations, and use Amazon Bedrock to translate natural-language requests into those operations.
  • Publish command results through SNS to an attacker-controlled external HTTP or HTTPS endpoint.
  • Use the Lambda execution role's permissions to enumerate AWS resources, including EC2 instances, DynamoDB tables, databases, and Lambda functions.
  • The article describes privilege escalation or discovery of more privileged credentials as possible prerequisites when compromised credentials lack permissions to deploy the infrastructure.
Defensive Notes
  • Enforce IAM least privilege for identities and Lambda execution roles; restrict queue and function creation, event-source mapping configuration, role passing, Bedrock invocation, and access to unrelated AWS resources.
  • Restrict creation and modification of external SNS HTTP/HTTPS subscriptions, allow only approved destinations, and limit functions to publishing through intended topics.
  • Limit unrestricted internet egress from Lambda functions where it is not required; this reduces some delivery and exfiltration paths but does not by itself block SNS-based result delivery.
  • Enable and correlate CloudTrail management and data events, Lambda execution logs, SNS delivery-status logs, and Bedrock model invocation logs. CloudTrail management events are recorded by default, while data events require explicit configuration.
  • Investigate external SNS subscriptions created by Lambda execution roles, unusual Bedrock Converse or InvokeModel activity, and sequences linking unexpected SQS messages, Lambda execution, Bedrock calls, AWS API activity, and SNS publishing.

MITRE ATT&CK

People

Vendors

Products

Tools

Related Articles