Cyber Security News

New Unique Cloud Breach Detected Using SQL Injection

In a recent development, Microsoft security researchers have issued a stark warning regarding a sophisticated cyber attack campaign that aims to infiltrate cloud environments through an unexpected vector - SQL Server instances.  

This campaign has raised concerns due to its unique approach, as it showcases an attack technique that had previously been observed in other cloud services, such as VMs and Kubernetes clusters, but had not yet surfaced within the realm of SQL Servers.

According to Microsoft, the attackers exploited a SQL injection vulnerability within a targeted application, enabling them to gain unauthorized access and elevated permissions on a Microsoft SQL Server instance deployed in an Azure Virtual Machine (VM). Subsequently, these malicious actors attempted to expand their reach into additional cloud resources by exploiting the server's cloud identity, emphasizing the critical importance of safeguarding cloud identities against unauthorized access. 

This was made possible by the detection of multiple alerts triggered by Microsoft Defender for SQL. These alerts enabled researchers to uncover and analyze the sophisticated lateral movement technique employed by the attackers. Although there is no evidence to suggest that the attackers successfully infiltrated the cloud resources, this incident serves as a stark reminder of the need for enhanced security measures to protect SQL Server instances and associated cloud resources. 

Unmasking the Attack Flow

The attack flow in question unveils a nefarious attempt by cybercriminals to traverse from a SQL Server instance to the cloud. While cloud-based attacks are becoming increasingly prevalent as organizations shift their operations to cloud environments, this particular maneuver highlights a previously unseen method. 

In cloud settings, lateral movement is often accomplished by manipulating cloud identities associated with specific cloud resources. Services like Azure rely on managed identities to streamline authentication between cloud resources and services, offering convenience and efficiency. However, these managed identities also introduce security risks that can serve as potential attack vectors. 

For instance, if an attacker gains control over a virtual machine (VM), they can extract a token for the VM's associated identity by querying the instance metadata service (IMDS) endpoint. Armed with this managed identity access token, attackers can conduct a wide array of malicious activities on the cloud resources linked to that identity. In the case under scrutiny, the attackers attempted identity-based lateral movement within an environment previously untouched by this technique—SQL Server instances.

Familiar Tactic, Uncharted Territory

Although the attempt to perform lateral movement from a SQL Server instance may be considered novel, the attack involved actions that are commonly associated with SQL Server attacks.

The initial breach occurred via a successful SQL injection attack, granting the attackers the ability to execute queries on the SQL Server. They systematically launched multiple SQL statements to gather critical information about the host, databases, and network configuration.

How to Combat This Threat?

This incident underscores the importance of adhering to the principle of least privilege when designing and deploying cloud-based and on-premises solutions. Overprivileged processes, accounts, managed identities, and database connections provide opportunities for attackers to perpetrate malicious activities.  

Organizations are urged to ensure that all applications are updated, secured, and endowed only with the necessary permissions and privileges. This proactive approach is key to mitigating risks associated with connected SQL Server instances and other cloud resources, thereby safeguarding the integrity of their digital infrastructure.

Takeaways

In summary, this attack serves as a stark reminder of the evolving landscape of cyber threats in cloud environments. Attackers are continually adapting known attack techniques to new environments, demonstrating increased sophistication. With the growing adoption of cloud technology, it is imperative that organizations bolster their defenses and secure critical assets within the cloud. 

You can gain more in depth technological knowledge in the Windows blog post.