Investigadores estão a alertar de uma vaga de ataques que estão a abusar de uma vulnerabilidade nas versões desatualizadas de um plug-in de migração chamado Duplicator no CMS WordPress, permitindo assim a execução remota de código por parte dos criminosos.
Todos os plugins Duplicator anteriores à versão 1.2.42 estão vulneráveis ao ataque. Como o nome sugere, o plug-in facilita a migração de um website baseado em WordPress para outro host, ou mesmo a criação de um website duplicado – um clone.
O plugin depois de utilizado, não remove ficheiros sensíveis como p.ex., o ficheiro “installer.php” e “installer-backup.php” e que podem ser usados depois da migração para injetar código malicioso, e permitindo a criação de código arbitrário especialmente desenhado.
“WordPress Duplicator does not remove sensitive files after the restoration process,” wrote researchers at Synacktiv (PDF) last month. “Indeed, the installer.php and installer-backup.php files can be reused after the restoration process to inject malicious PHP code in the wp-config.php file. Thus, an attacker could abuse these scripts to execute arbitrary code on the server and take it over.”
Na sexta-feira, investigadores da Sucuri disseram que estavam a notar um aumento no número de casos em que os invasores estavam a reescrever o ficheiro wp-config.php, e que levaria ao takedown do sistema até que o ficheiro fosse revertido.
“These cases are all linked to the same vulnerable software: WordPress Duplicator Plugin,” said Peter Gramantik, a malware researcher with Sucuri. “To eliminate the risk of attack, you can check your site’s root folder and remove the installer.php file. This is not a vital site file and just a leftover after site migration.”
Gramantik disse que a Snap Creek Software abordou uma vulnerabilidade similar de XSS (CVE-2017-16815), que impactava a versão 1.2.30, reportada em novembro de 2017.
Um aviso adicional foi emitido pelo Wordfense no início deste mês. Especialistas notam que o bug não está presente no próprio diretório do plugin Duplicator.
“The flaw becomes exposed when using Duplicator to migrate or restore a backed-up copy of a WordPress site,” wrote Mikey Veenstra, in a Wordfence bulletin.
“We’ve also seen attackers supplying remote database credentials to connect the WordPress site to a database under the attacker’s control. From there, the attacker can login using their own admin user accounts, and upload a malicious plugin or theme in order to fully compromise the site,” wrote Matt Barry, Wordfence engineer in an email interview with Threatpost.
A vulnerabilidade é adicionada ao sistema sempre que o plugin e usado. Dessa maneira é dificil estimar o número de websites afetados, no entanto o plugin foi instalado 1 milhão de vezes.
Sucuri researchers note that the group of impacted users might further be winnowed down by the fact that vulnerable users would have to meet the following conditions:
- The installer.php file must have been generated by Duplicator plugin
- The installer.php file must be left on the site’s root folder
- The installer version must be older than 1.2.42
Os investigadores da Synacktiv endereçaram o bug pela primeira vez à Snap Creek Software em 13 de julho de 2018. Um patch foi implantado em 24 de agosto de 2018. A empresa publicou o primeiro alerta sobre a vulnerabilidade em 29 de agosto.
Pedro Tavares is a professional in the field of information security working as an Ethical Hacker/Pentester, Malware Researcher and also a Security Evangelist. He is also a founding member at CSIRT.UBI and Editor-in-Chief of the security computer blog seguranca-informatica.pt.
In recent years he has invested in the field of information security, exploring and analyzing a wide range of topics, such as pentesting (Kali Linux), malware, exploitation, hacking, IoT and security in Active Directory networks. He is also Freelance Writer (Infosec. Resources Institute and Cyber Defense Magazine) and developer of the 0xSI_f33d – a feed that compiles phishing and malware campaigns targeting Portuguese citizens.
Read more here.