Progress urged its customers to update to the latest version of the application as the vulnerability was reportedly exploited as a 0-day, dating back at least 30 days.
However, various threat intelligence companies indicated that the exploitation dated further back, with GreyNoise noticing activity 90 days prior and Kroll tracing similar activity back to 2021. The attacks were attributed to the cl0p ransomware gang, which is known for several other recent 0-day ransomware campaigns.
After analyzing the differences between the vulnerable and patched versions, Horizon3 researcher founds three key areas of interest emerged:
- UserGetUsersWithEmailAddress(): The function had an updated SQL query from a concatenated string of several arguments passed in, to a safer looking SQL builder utility. Interestingly, this function was reachable from several unauthenticated paths.
- SetAllSessionVarsFromHeaders(): The patched version removed this entire function and its only caller from the machine2.aspx handler.
- GetFileUploadInfo(): The patched version introduced a statement that changes the way the uploadState is set.
Python script excerpt to perform SQL injection |
Exploiting the SQL injection vulnerability, leading to the ability to manipulate data within the MOVEit database, the attackers aimed for elevated permissions. The attackers targeted the session_grant=external_token authentication flow, used when MOVEit Transfer is configured for federated logins. Using the SQL injection from the previous paths, they manipulated the database to accept their identity provider URL, ultimately obtaining an access token for the sysadmin user.
Achieving Remote Code Execution
The attackers targeted file upload handlers within MOVEit.DMZ.WebApi, eventually reaching the function GetFileUploadInfo(). A combination of a classic .NET deserialization vulnerability and the SQL injection allowed the attackers to manipulate the field from which a crucial variable (_uploadState) was set.
This resulted in remote code execution. The Horizon3 team has shared the Python PoC code on GitHub, which you can get from here.
Post Exploitation by Horizon3
Interestingly, on some MOVEit Transfer servers deployed via the Azure Marketplace, cleartext credentials for the provisioned sysadmin account, database credentials, and service credentials were found. This reveals additional vulnerabilities for potential lateral movement.
CVE-2023-34362 is not alone
The Progress Software Corporation announced on June 9, 2023, that multiple SQL injection vulnerabilities have been identified in the MOVEit Transfer web application that could allow an unauthenticated attacker to gain unauthorized access to the MOVEit Transfer database.
In the meantime, the CVE id for the newly discovered vulnerabilities is been pending and credited to Cybersecurity firm Huntress for their help to uncover additional vulnerabilities that could potentially be used by a bad actor to stage an exploit.