by Hasib Vhora
As seen in Cybersecurity Insiders.
While investigating CVE-2024-5932, a code injection vulnerability in the GiveWP WordPress plugin, our team encountered a malicious Proof of Concept (POC) targeting cybersecurity professionals. This has become a growing threat to cybersecurity professionals from threat actors to achieve their motives, such as crypto mining, data exfiltration and backdoor installation. We have dissected an instance we encountered and felt it important to share to help bring awareness to this problem. While security researchers are often very well equipped to handle and detect this situation, it is easy to become overconfident, leading to compromise.
Security researchers often need to verify publicly available POCs to accomplish their various tasks, and GitHub is a hotspot for such POCs. POCs on GitHub are widely considered reliable due to their ease of accessibility and the website's reputation. Should defenders execute a script without thoroughly vetting it? The subsequent sections will elaborate on why it is critical for researchers to be extra vigilant while leveraging such scripts. For the specific example used in this blog, SonicWall has created a signature to ensure the protection of our customers’ IPS: 4496 XMRig Crypto Mining Activity. It's important to recognize the larger threat is not one specific example but the technique being used to target security researchers.
Initially, there was only a single instance of POC for CVE-2024-5932 by EQSTLab, which is a legitimate one. However, after a few hours, a couple of similar instances popped up, which looked like replicas of the original repository at first glance. The links of those repositories (taken down at the moment) are as follows.
http://github[.]com/niktoproject/CVE-2024-5932 (malicious repo)
http://github[.]com/sqlmap-projects/CVE-2024-5932 (malicious repo)
A screenshot of one of the instances can be seen in Figure 1.
Figure 1: Screengrab of the malicious POC repository
Although such instances are not unusual, we decided to dig into them out of curiosity. It unveiled the addition of a discreet malicious code in the script, as seen in Figure 2.
Figure 2: Evil code from POC script
This malicious code is executed when the script is run for the first time by the victim and performs the following tasks.
The cloned malicious script that uses XMRig miner to mine Monero can be seen in Figure 3.
Figure 3: Crypto mining code
The above code performs the following tasks.
If someone has (accidentally) executed the malicious script, it can be identified using the indicators below.
Figure 4: Crypto mining process
Figure 5: Network connection originated by mining process
The below steps can be followed to remove the miner.
Following are some established practices that can aid researchers in improving their security posture.
Some researchers also flagged this issue on the social media platform “X,” as seen in the links below.
https://x.com/win3zz/status/1828704644987511107
https://x.com/nav1n0x/status/1828715567785636112
Although researchers will undoubtedly need to use public POCs, their execution ought to be done with utmost caution to avoid dire consequences and severe attacks such as ransomware, data exfiltration, spoofing and botnets.
Resource Development | Initial Access | Execution | Persistence | Defense Evasion | Discovery | Impact |
T1588.005 | T1189 | T1204.002 | T1053.003 | T1070.004 | T1082 | T1496 |
Obtain Capabilities: Exploits | Drive-by Compromise | User Execution: Malicious File | Scheduled Task/Job: Cron | Indicator Removal: File Deletion | System Information Discovery | Resource Hijacking |
Figure 6: MITRE ATT&CK mapping
Share This Article
An Article By
An Article By
Hasib Vhora
Hasib Vhora