← All stories

MOVEit Transfer's logins were supposed to guard its files. An unauthenticated SQL injection reached the database.

MOVEit Transfer: a SQL injection zero-day let CL0P plant a web shell and drain file-transfer servers

CL0P exploited an unauthenticated SQL injection in Progress MOVEit Transfer to install the LEMURLOOT web shell on internet-facing servers, then used it to pull files, Azure storage keys and database records, and to create admin accounts that survived a web server rebuild.

Progress· May 27, 2023
Impact
Internet-facing MOVEit Transfer servers were infected with a web shell used to steal data from their underlying databases, in a campaign the FBI and CISA expected to become widespread.
Stack
moveit-transfer · asp-net · sql-server · mysql · azure-sql

According to a joint FBI and CISA advisory, beginning on 27 May 2023 the CL0P ransomware gang, also known as TA505, started exploiting a previously unknown SQL injection vulnerability in Progress Software's MOVEit Transfer. MOVEit Transfer is a managed file transfer product: organizations use it to move files to and from partners, usually through a web application exposed to the internet.

The vulnerability, CVE-2023-34362, let an unauthenticated attacker reach MOVEit Transfer's database. CL0P used it to install a web shell, named LEMURLOOT by the advisory, on internet-facing servers, and then used the web shell to steal data from the underlying MOVEit Transfer databases.

This post explains the mechanism, which is old and well understood. What's instructive is how much damage one injectable query does in a product whose whole job is to hold other people's files.

What happened

From the CISA advisory AA23-158A, released 7 June 2023, and the NVD record:

  1. From 27 May 2023, per open source information cited by the advisory, CL0P exploits a SQL injection zero-day in the MOVEit Transfer web application.
  2. The exploit is used to install a web shell on MOVEit Transfer web applications. It was first seen named human2.aspx, to masquerade as the legitimate human.aspx that ships with the product.
  3. The web shell is used to read files, query the database, pull Azure storage settings and keys, and create or delete admin accounts.
  4. Progress announces the vulnerability with guidance on affected versions, upgrades and patching. CISA adds it to the Known Exploited Vulnerabilities catalog on 2 June 2023.
  5. On 7 June, the FBI and CISA publish a joint advisory with indicators of compromise and detection rules, warning that given the "speed and ease" of exploitation, they expect widespread exploitation of unpatched systems.

The NVD entry lists affected versions as those before 2021.0.6, 2021.1.4, 2022.0.4, 2022.1.5 and 2023.0.1, and says all earlier versions are affected too, including older unsupported ones. It notes exploitation of unpatched systems can occur over HTTP or HTTPS.

The advisory places this in a pattern. TA505 had run similar zero-day campaigns against Accellion File Transfer Appliance devices in 2020 and 2021 and against Fortra GoAnywhere MFT in early 2023, where the group claimed to have hit approximately 130 victims over 10 days.

What the engineers believed

The sources don't describe Progress's internal design decisions, so this section is about the general assumption, labeled as such.

A file transfer product sits on the internet edge by necessity: partners have to reach it. The usual mental model is that authentication protects it. Files are behind logins, admin features are behind admin logins, and an anonymous visitor can reach only a login page and a few public endpoints.

SQL injection breaks that model, because the database doesn't know about the login page. If any request path, even an unauthenticated one, builds a query from attacker-controlled input, the attacker talks to the database with the application's own privileges. The NVD description confirms that's what was possible here: an unauthenticated attacker could gain access to the database, infer its structure and contents, and execute SQL statements that alter or delete database elements.

What was actually going on

SQL injection in one paragraph

Background: SQL injection happens when an application builds a SQL statement by concatenating strings that include user input. If the input contains SQL syntax, such as a quote that closes a string literal followed by more SQL, the database parses the attacker's text as part of the statement. The fix has been known for decades: parameterized queries, where the statement and the values are sent separately so values can never be parsed as SQL. The vulnerability class is CWE-89, which is how NVD classifies CVE-2023-34362.

The public sources used here don't identify which request parameter or code path was injectable, so this post doesn't guess.

From database access to a web shell

Reading the database is bad. Running code on the server is worse. The advisory says the SQL injection was used to install LEMURLOOT, a web shell written in C#. It doesn't spell out the steps from injection to file write, so neither does this post.

Once installed, LEMURLOOT works like this, per the advisory:

  • On installation it generates a random 36-character password.
  • It waits for HTTP requests with a header named X-siLock-Comment whose value equals that password. Requests without it get nothing unusual.
  • Authenticated requests can then make it:
    • retrieve Azure system settings, Azure Blob Storage account, key and container;
    • enumerate the underlying SQL database;
    • fetch a file from the MOVEit Transfer system by name;
    • create a new administrator account with LoginName and RealName set to "Health Check Service", or delete such an account.
  • It returns responses gzip-compressed.

It imports MOVEit's own libraries (MOVEit.DMZ.ClassLib, MOVEit.DMZ.Application.Files, MOVEit.DMZ.Application.Users) to use the product's own code paths for files and users. In other words, it doesn't need to understand MOVEit's storage format; it asks MOVEit.

from one query to persistent accessunauth requestSQL injectiondatabase accessweb shellfiles + Azure keysstolen dataadmin row in DBsurvives rebuildback doorthe database is part of the attack surface

Why rebuilding the server isn't enough

The most useful line in the advisory for engineers is a short one: "If a victim rebuilds the web server but leaves the database intact, the CL0P user accounts will still exist" and can be used for persistent access.

That follows from where the backdoor lives. The web shell is a file on the web server; delete it, or rebuild the server from a clean image, and it's gone. But the "Health Check Service" admin accounts are rows in the application's database. A clean web server connected to the same database will happily authenticate them. The usual incident-response instinct, "nuke the box and redeploy", cleans the compute and leaves the persistence intact.

The advisory gives a query to audit for active administrative accounts and says to verify only intended ones exist:

SELECT * FROM [<database name>].[dbo].[users] WHERE Permission=30 AND Status='active' and Deleted='0'

How they fixed it

The sources available here record the fix at the level of "patch": Progress issued guidance on affected versions, software upgrades and patching, and NVD lists the fixed releases (2021.0.6, 2021.1.4, 2022.0.4, 2022.1.5 and 2023.0.1). For organizations that had been hit, the advisory supplies YARA rules for the web shell and its compiled DLLs, file hashes, the human2.aspx filename, the X-siLock-Comment header as an indicator, and the database query above.

What changed afterwards

The advisory's mitigations are general hygiene rather than MOVEit-specific: maintain an asset inventory, grant admin privileges only when necessary and use application allowlisting, monitor network ports and services, and patch regularly. It also notes CL0P's shift, in campaigns since 2021, toward relying mostly on data exfiltration rather than encryption, which matches this campaign: the goal was the files on the transfer servers.

The rule

Every query that touches request data must be parameterized, including on unauthenticated endpoints, because SQL injection runs with the application's database privileges no matter what the login page says. And when you respond to a compromise, remember that the database is part of the system an attacker can modify: check for accounts, settings and stored credentials they may have added before you declare a rebuilt server clean.

Sources