Keypoints
- The SugarCRM CVE-2023-22952 zero-day enabled initial access via an unauthenticated remote code execution path in vulnerable SugarCRM deployments.
- Attackers harvested long-term AWS access keys stored on compromised EC2 hosts, enabling ongoing access and discovery.
- They used GetCallerIdentity to learn credentials and identities, then leveraged Pacu and Scout Suite to map AWS resources and account structure.
- They performed lateral movement and exfiltration by manipulating RDS: creating snapshots, adjusting security groups for SSH/MySQL, and making databases public with changed master passwords.
- EC2 lateral movement included creating new AMIs, importing key pairs, launching instances in same/different regions, and opening SSH to any IP address.
- Root login attempts were made to escalate privileges, signaling attempts at high-value target access even as the Root login failed in some cases.
MITRE Techniques
- [T1190] Exploit Public-Facing Application – Initial access via SugarCRM zero-day vulnerability. Quote: ‘The initial attack vector of these AWS account compromises was the zero-day SugarCRM vulnerability, CVE-2023-22952.’
- [T1552.001] Credentials in Files – Plain-text AWS credentials on compromised hosts used for discovery and access. Quote: ‘these plain-text credentials existed on the compromised hosts, which allowed the threat actors to steal them and start using the access keys for discovery activity.’
- [T1087] Account Discovery – GetCallerIdentity reveals user ID, account, and ARN; used to understand the compromised identity. Quote: ‘GetCallerIdentity is the AWS version of whoami… It returns various information about the entity that performed the call such as the user ID, account and Amazon Resource Name (ARN) of the principal associated with the credentials used to sign the request.’
- [T1021.001] Remote Services – SSH – Lateral movement via SSH; modified security groups to permit SSH from any IP and imported keys to enable new EC2 access. Quote: ‘the threat actors then moved to exfiltration, creating brand new databases from the snapshots, making them public and attaching the modified security groups.’
- [T1078] Valid Accounts – Privilege escalation attempts via Root login; attempted to log in as Root, which was noisy in CloudTrail logs. Quote: ‘the threat actors did not attempt to create new IAM users… They instead opted for attempting to login as the Root user. Despite using information they obtained from the Organizations calls… the threat actors still failed to successfully log in as the Root user.’
Indicators of Compromise
- [IP] AWS-related IPs observed – 13.90.77.93, 31.132.2.66
- [User Agent] Common cloud tool user agents observed – Boto3/1.26.45 Python/3.9.2 Linux/6.0.0-2parrot1-amd64 Botocore/1.29.45, Boto3/1.7.61 Python/3.5.0 Windows/ Botocore/1.10.62, aws-cli/1.19.1 Python/3.9.2 Linux/6.0.0-2parrot1-amd64 botocore/1.29.58, aws-cli/1.18.69 Python/3.5.2 Linux/4.4.0-1128-aws botocore/1.16.19, Scout Suite/5.12.0 Python/3.9.2 Linux/6.0.0-2parrot1-amd64 Scout Suite/5.12.0
Read more: https://unit42.paloaltonetworks.com/sugarcrm-cloud-incident-black-hat/