WSO2 RCE exploited in the wild

Published: 2022-04-26
Last Updated: 2022-04-26 12:55:29 UTC
by Renato Marinho (Version: 1)
0 comment(s)

While investigating a malicious crypto-mining case, I discovered that attackers implanted the payload exploiting a recently patched RCE vulnerability (CVE-2022-29464) affecting multiple WSO2 products, including API Manager. The vulnerability was discovered by Orange Tsai and responsibly disclosed to WSO2.

According to the WSO2 security advisory, “due to improper validation of user input, a malicious actor could upload an arbitrary file to a user-controlled location of the server. By leveraging the arbitrary file upload vulnerability, it is further possible to gain remote code execution on the server” – and this was exactly what happened. After implanting a webshell, attackers executed a shell script (snippet below) to download and run xmrig.

A snippet of the XMRig crypto-mining implant script

The vulnerability was first published on April 1st 2022 and a proof-of-concept exploit was published 6 days ago on Git-Hub.

Affected products:

WSO2 API Manager 2.2.0 and above
WSO2 Identity Server 5.2.0 and above
WSO2 Identity Server Analytics 5.4.0, 5.4.1, 5.5.0, 5.6.0
WSO2 Identity Server as Key Manager 5.3.0 and above
WSO2 Enterprise Integrator 6.2.0 and above
WSO2 Open Banking AM 1.4.0 and above
WSO2 Open Banking KM 1.4.0 and above

If you have vulnerable versions exposed to the internet, I recommend that in addition to protecting against CVE-2022-29464 vulnerability through patches or mitigations recommended by WSO2, check to see if your environment may have already been compromised.

IOCs

http://162[.]144.53.108:8080/ldra.sh
http://162[.]144.53.108:8080/jsp_app

23[.]225.191.74

--
Renato Marinho
Morphus Labs| LinkedIn|Twitter

Keywords:
0 comment(s)
Diary Archives