Chinese threat actors are targeting ThinkPHP applications vulnerable to CVE-2018-20062 and CVE-2019-9082 to install a persistent web shell named Dama. The web shell enables further exploitation of the breached endpoints, enlisting them as part of the attackers’ infrastructure to evade detection in subsequent operations. This malicious activity, which dates back to October 2023, has recently expanded and intensified, according to Akamai analysts.
ThinkPHP is an open-source web application development framework particularly popular in China. CVE-2018-20062, fixed in December 2018, allows remote attackers to execute arbitrary PHP code via the filter parameter in NoneCMS 1.3. CVE-2019-9082 impacts ThinkPHP 3.2.4 and older versions, allowing remote command execution, and was addressed in February 2019. These flaws are exploited in the campaign to enable remote code execution, affecting the underlying content management systems on the target endpoints.
The attackers download a text file named “public.txt,” which is actually the obfuscated Dama web shell saved as “roeter.php,” from compromised servers in Hong Kong. This payload provides the attackers with remote control of the server following a simple authentication step using the password “admin.” Akamai reports that the servers delivering these payloads are themselves infected with the same web shell, indicating that compromised systems are being turned into nodes in the attacker’s infrastructure.
Dama web shell has advanced capabilities, allowing threat actors to navigate the file system, upload files, gather system data, and escalate privileges. It can perform network port scanning, access databases, and bypass disabled PHP functions for shell command execution. However, it lacks a command-line interface, which would allow a more hands-on approach to executing commands. Exploiting these old vulnerabilities highlights the persistent problem of poor vulnerability management, and organizations are advised to update to the most recent ThinkPHP version to mitigate these risks.