The way in which malicious code is introduced continues to evolve by taking the old methods and improving the way in which the victims are deceived.
It seems that the idea of the Trojan horse is still quite useful today , and in such subtle ways that many of us can go unnoticed. Recently, researchers from Leiden University (Netherlands) studied the problem of publishing prototypes of fictitious exploits on GitHub.
The idea of using these to attack curious users who want to try and learn how to exploit certain vulnerabilities with the offered tools makes these situations ideal for introducing malicious code to attack users.
The study reportedly analyzed a total of 47.313 exploit repositories, covering known vulnerabilities identified from 2017 to 2021. An analysis of exploits showed that 4893 (10,3%) of them contain code that performs malicious actions.
That is why users who decide to use published exploits are advised to first examine them for suspicious insertions and to run exploits only on virtual machines isolated from the main system.
Proof of concept (PoC) exploits for known vulnerabilities are widely shared in the security community. They help security analysts learn from each other and facilitate security assessments and network teaming.
Over the last few years, it has become quite popular to distribute PoCs for example through websites and platforms, and also through public code repositories like GitHub. However, public code repositories do not provide any guarantee that any given PoC comes from a trusted source or even that it simply does exactly what it is supposed to do.
In this paper, we investigate shared PoCs on GitHub for known vulnerabilities discovered in 2017–2021. We discovered that not all PoCs are trustworthy.
Two main categories of malicious exploits have been identified regarding the problem : exploits that contain malicious code, for example, to leave a backdoor in the system, download a Trojan horse, or connect a machine to a botnet, and exploits that collect and send confidential information about the user.
In addition, a separate class of harmless fake exploits was also identified that do not perform malicious actions, but also do not contain the expected functionality , for example, designed to deceive or warn users who are running unverified code from the network.
Some proofs of concept are bogus (i.e. they don't actually offer PoC functionality), or
even malicious: for example, they try to exfiltrate data from the system they are running on, or try to install malware on that system.To address this issue, we have proposed an approach to detect whether a PoC is malicious. Our approach is based on detecting the symptoms that we have observed in the collected data set, for
example, calls to malicious IP addresses, encrypted code, or included trojanized binaries.Using this approach, we have discovered 4893 malicious repositories out of 47313
repositories that have been downloaded and verified (that is, 10,3% of the repositories studied present malicious code). This figure shows a worrying prevalence of dangerous malicious PoCs among the exploit code distributed on GitHub.
Various checks were used to detect malicious exploits:
- The exploit code was analyzed for the presence of wired public IP addresses, after which the identified addresses were further verified against blacklisted databases of hosts used to control botnets and distribute malicious files.
- The exploits provided in compiled form have been checked with anti-virus software.
- The presence of atypical hexadecimal dumps or insertions in base64 format was detected in the code, after which said insertions were decoded and studied.
It is also recommended for those users who like to perform the tests on their own, take sources such as Exploit-DB to the fore, since these try to validate the effectiveness and legitimacy of PoCs. Since, on the contrary, the public code on platforms such as GitHub do not have the exploit verification process.
Finally, if you are interested in learning more about this , you can consult the details of the study in the following file, the link to which I am sharing with you .