The Take-Home Test Was the Trap: Malicious NuGet Packages Turned .NET Job Assessments Into Malware Installers
Researchers found 13 malicious NuGet packages disguised as WinUI 3 and WPF controls and tied to a fake take-home job assessment. Simply building the project could download and run malware. Here is how the scheme worked and how layered defenses protect developer machines and the business behind them.
Here Is How Layered Defenses Keep One Build From Becoming a Breach
The assignment looked ordinary: improve a button control in a Windows desktop app and tidy up the error handling, all within three to four hours. The instructions even allowed AI coding assistants such as GitHub Copilot, ChatGPT or Claude, as long as the candidate understood the result. What the candidate would not see was that compiling the project was enough to start installing malware. The Hacker News reported Socket’s research into 13 malicious NuGet packages behind the scheme, and Dark Reading also covered the campaign.
How the trap was built
The decoy project lived in a GitHub repository created on November 3. Its project file pulled in two packages from NuGet, the package gallery .NET developers use every day. Most of the 13 packages Socket identified posed as WinUI 3 and Windows Presentation Foundation (WPF) button controls. One of them shipped an MSBuild targets file that runs a bundled DLL after every build. That DLL downloaded a file from GitHub into a folder under the user’s local app data and placed a copy of the Windows On-Screen Keyboard program (osk.exe) next to it. A second package then launched that copy through the “file button” control, which loaded the attacker’s DLL instead of the real one, a technique known as DLL sideloading. Other packages in the set simply downloaded a Windows executable to the temp folder and ran it.
The campaign was patient. The first package appeared on NuGet on July 23, 2026. When NuGet removed two of them on November 2, replacements under a new name were uploaded on November 4. All of the identified packages have since been deleted from the gallery.
A wider web
Socket connected the same activity to fake copies of the popular axios JavaScript library, a loader that used a GitHub repository for command and control, a tool that steals Chrome browser profiles, and a payload that reported basic computer details to a Telegram bot. A related lure was posted on a Web3 freelance marketplace on November 7 as a C# WPF job paying $8,500 to $10,000. It is not clear how targets were led to the decoy projects. Socket has not attributed the campaign; it says the tradecraft resembles recruitment-themed schemes linked to North Korea and Iran, but it found no code or indicators shared with known North Korean campaigns.
The defenses, layer by layer
Layer 1: Treat outside code as untrusted until proven otherwise
A build is not a passive step. Package references, build scripts and targets files can all run code. Any project from outside the company, whether a job test, a sample from a vendor or a contractor’s handoff, should be opened and built only in a disposable environment such as a virtual machine, a sandbox or a cloud development box, never on the laptop that holds company email and passwords.
Layer 2: Control where packages come from
Limit internal projects to approved package sources, use lock files so versions do not change silently, and review new dependencies before they are added. An unfamiliar package with a generic name and few downloads deserves a second look.
Layer 3: Decide what is allowed to run
Application control policies can stop unknown executables from running out of temp folders and user profile folders, which is exactly where these payloads landed. Attack surface reduction rules and endpoint detection can flag a system program like osk.exe being copied and launched from an odd location.
Layer 4: Separate developer access from everything else
Developers often hold powerful access to source code, cloud consoles and deployment pipelines. Keep those credentials out of the everyday browser profile, use separate accounts for administrative work, and require phishing-resistant multi-factor sign-in so a stolen browser profile is not enough to get in.
Layer 5: Watch and respond
Monitor for new processes reaching out to code-hosting or messaging services from places they normally would not, and have a plan to isolate a machine, rotate its credentials and review recent access if a developer reports running something suspicious.
Tools such as Microsoft Defender for Endpoint with attack surface reduction rules, App Control for Business, Windows Sandbox or Microsoft Dev Box are examples of ways to put these layers in place in a Microsoft environment. Comparable tools from other vendors do the same jobs; what matters is that the layers exist.
What this means for your company
You do not need a software team to be exposed. Contractors, freelancers and in-house staff who write scripts, build reports or customize line-of-business apps may download packages and run other people’s code, sometimes on the same computer they use to approve invoices. Set a clear rule that outside code is only opened in an isolated environment, keep administrative rights off everyday accounts, and make sure your endpoint protection is actually blocking, not just logging. If anyone on your team is job hunting or freelancing, a work laptop is the wrong place to run a take-home test.
If you want help setting up safe build environments, application control or endpoint policies that protect the people who touch your code, we can design it around how your team really works. Reach out to Layer 7 Data Solutions to discuss how we’ve helped companies similar to yours.
