Notepad++ Plugins Allow Attackers to Infiltrate Systems, Achieve Persistence

Written by

Threat actors may abuse Notepad++ plugins to circumvent security mechanisms and achieve persistence on their victim machine, new research from security company Cybereason suggests.

“Using an open–source project, Notepad++ Plugin Pack, a security researcher that goes by the name RastaMouse was able to demonstrate how to build a malicious plugin that can be used as a persistence mechanism,” the company wrote in an advisory on Wednesday.

The plugin pack itself is just a .NET package for Visual Studio that provides a basic template for building plugins. However, advanced persistent threat (APT) groups have leveraged Notepad++ plugins for nefarious purposes in the past.

“The APT group StrongPity is known to leverage a legitimate Notepad++ installer accompanied with malicious executables, allowing it to persist after a reboot on a machine,” the Cybereason advisory reads.

“This backdoor enables this threat actor to install a keylogger on the machine and communicate with a C2 server to send the output of this software.”

In their advisory, the Cybereason team analyzed the Notepad++ plugin loading mechanism and drafted an attack scenario based on this vector.

Using the C# programming language, the security experts created a dynamic link library (DLL) running a PowerShell command on the first initial press of any key inside Notepad++. 

“In our attack scenario, the PowerShell command will execute a Meterpreter payload,” the company wrote.

Cybereason then ran Notepad++ as ‘administrator’ and re–ran the payload, effectively managing to achieve administrative privileges on the affected system.

To mitigate this threat, the security experts said companies should monitor unusual child processes of Notepad++ and pay special attention to shell product types.

For more information about the attack scenario, the original Cybereason advisory is available at this link.

More generally, plugins are often exploited as attack vectors by malicious actors. For instance, last week, Wordfence reported a zero–day flaw in a WordPress plugin called BackupBuddy with five million installations.

What’s hot on Infosecurity Magazine?