Interesting one, has been rumbling for about a week in my circles.I’ve heard from 3 orgs now who’ve had security incidents on boxes with Notepad++ installed, where it appears Notepad++ processes have spawned the initial access. These have resulted in hands on keyboard threat actors.It is unclear exactly what is happening, and this blog is not to blame the (very good) developer of Notepad++. It’s more just to raise awareness. I should also point out it is based on incomplete information, as a full picture as to what is happening isn’t yet available — this is an evolving situation. It is also a tiny number of organisations impacted so far so other organisations shouldn’t over react.Some backstoryIn mid November, Notepad++ published an update with an interesting change, to harden the Notepad++ Updater from being hijacked to deliver something.. not Notepad++.This wasn’t given a CVE. The change itself is this:Which does this, amongst other things:How GUP worksNotepad++ uses a bespoke software updater called GUP or WinGUP. GUP sends the version in use to https://notepad-plus-plus.org/update/getDownloadUrl.php, which in turn provides a file called gup.xml, which contains a download URL for the update.What GUP retrievesThe file is grabbed, saved in %TEMP%, and then executed.How it can be abusedIf you can intercept and change this traffic, you can redirect the download to any location it appears by changing the URL in the property.This traffic is supposed to be over HTTPS, however it appears you may be to tamper with the traffic if you sit on the ISP level and TLS intercept. In earlier versions of Notepad++, the traffic was just over HTTP.The downloads themselves are signed — however some earlier versions of Notepad++ used a self signed root cert, which is on Github. With 8.8.7, the prior release, this was reverted to GlobalSign. Effectively, there’s a situation where the download isn’t robustly checked for tampering.Because traffic to notepad-plus-plus.org is fairly rare, it may be possible to sit inside the ISP chain and redirect to a different download. To do this at any kind of scale requires a lot of resources.How it is fixedIn Notepad++ 8.8.8, downloads are forced to be from github.com, which is much more difficult to intercept covertly given the amount of GitHub users.VictimsI’ve only talked to a small number of victims. They are orgs with interests in East Asia. Activity appears very targeted. Victims report hands on keyboard recon activity, with activity starting around two months ago.What to watch out forCheck for:gup.exe making network requests for other than: notepad-plus-plus.org, github.com and release-assets.githubusercontent.com.gup.exe for unusual process subspawns — it should only spawn explorer.exe, and npp* themed Notepad++ installers. For 8.8.8 and 8.8.7 they should have valid digital signatures, and be signed by GlobalSign.Files called update.exe or AutoUpdater.exe in user TEMP folder, where gup.exe has written and/or executed the files.Use of curl.exe (bundled with Windows 10 and above) to call out to temp.sh for recon activity. Example:You’ll notice above AutoUpdater.exe — which isn’t a part of Notepad++, Notepad++ doesn’t use that filename at all — executing with the parameter /closeRunningNpp, which is called by the legit Notepad++ updater process — essentially, something else is in the update chain somehow in this example. The cause isn’t known in that case but it may be related to this blog.Additional issuesSearch engines are rammed full of adverts for trojanised versions of Notepad++. If you have an incident with this, it’s worth trying to establish if you’re running a real version of the software.Notepad++ is the victim of security researchers publishing essentially bogus vulnerabilities using Generative AI and then some cyber media outlets publishing AI generated scare stories about said fake vulnerabilities — example: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/17047. The context here is, a few months ago outlets were running stories about a ‘supply chain’ attack against Notepad++.. but it was actually just a nonsense DLL sideloading issue.Notepad++ supports third party extensions, in app, which users can enable with a few clicks. These extensions are pulled remotely and updated, and execute code. You’ll see them being run as subprocesses of notepad++.exe. It’s important to think about the attack surface that generates.SuggestionsDon’t panic.Make sure users are on at least Notepad++ 8.8.8, and that they’re not running unofficial versions. It’s probably worth not using the auto update process to update, but install the latest version manually from notepad-plus-plus.org.If you’re a large enterprise who package manage Notepad++ and update it, you may want to block notepad-plus-plus.org or block the gup.exe process from having internet access. You may also want to block internet access from the notepad++.exe process, unless you have robust monitoring for extensions. For most organisations, this is very much overkill and not practical.UpdatesI’ll update the post if anything particularly interesting happens, but I’ve been tooting about this on Mastodon all week, locked to followers as I wanted to gather more info.Follow me there on @[email protected], or sign up here.Small numbers of Notepad++ users reporting security woes was originally published in DoublePulsar on Medium, where people are continuing the conversation by highlighting and responding to this story.