A candidate restores a NuGet feed, Visual Studio builds the take-home, and malware executes on a laptop that still holds your VPN profile, cloud CLI tokens, and a cached Git credential. Socket researchers this week tied that outcome to 13 malicious NuGet packages sold as a fake .NET job assessment, aimed at Windows developers who think they are shipping a WinUI 3 or WPF control. Your cybersecurity program already permits nuget.org, trusts MSBuild, and files recruiting under HR. Attackers used that gap.

Dotnet graphic accompanying reporting on malicious NuGet packages aimed at Windows developers
Malicious NuGet packages posed as routine WinUI 3 and WPF button controls inside fake take-home tests.

A Take-Home Test Beats Your Cybersecurity Stack

Kush Pandya at Socket described the lure in plain terms.

Most of the packages pose as WinUI 3 and WPF button controls.

That is catnip for a junior hire and for a staff engineer who wants to look fast. The assessment zip lands in email or a coding portal. The README says restore packages and run the sample. Visual Studio does what it always does. Package targets and build scripts run as the user. If that user is on a corporate image, you just executed untrusted code with the same rights they use to push production.

Threat detection is built for a noisier movie. Your firewall still records brute-force noise against VPN and RDP. Threat-protection agents still score random EXEs dropped from a browser. A NuGet restore from a public gallery looks like every other Monday on a .NET team. MSBuild is a signed Microsoft binary. Child processes inherit that trust unless you have told the stack otherwise.

Defense in depth fails here when every layer agrees the developer is supposed to compile strangers’ samples. Recruiting said the test is required. Engineering said NuGet is the source of truth. Laptop policy said local admin is fine for Visual Studio. None of those owners think they own malware delivery.

You will hear that public galleries are moderated. They are, until they are not. Thirteen packages is a small cluster, and that’s the point. The operator didn’t need a worm. They needed a plausible control library and a recruiter script that tells the candidate to build it on a real machine. Cyber security teams that only hunt unknown publishers in the browser will miss a restore that uses the same nuget.org endpoint as Entity Framework.

Hiring Courtesy Creates the Incident Response Queue

The messy part starts after Build succeeds. Maybe the candidate used a personal PC. You still have a problem if they later VPN from that box, copy the project onto a corp share, or reuse a PAT they generated for the homework repo. Maybe an employee completed the assessment on a work laptop because the deadline was Friday and the home desktop was a brick. That’s standard courtesy. It’s also how you import a foothold.

Incident response for this pattern looks like a developer workstation compromise with a recruiting ticket attached. You hunt for unexpected NuGet sources, packages that are not in your lock files, and new scheduled tasks or outbound beacons after a build. You rotate cloud keys, source-control tokens, and SSO sessions on that identity. You assume the take-home README was a delivery note.

Managers will want to treat it as an HR oops. Push back. Anyone who can compile on a domain-joined machine can touch the same file shares, secret stores, and CI agents that identity already allows. If your privileged access model trusts developer laptops, this campaign is a privileged access campaign. The job posting was the spear-phish. The package was the loader.

Expect copies. Once a fake assessment works, every recruiter-themed lure will grow a homework zip. Contract houses and offshore vendors sit in the blast radius because they live in take-home culture. If you bring contractors onto the VPN before you image their gear, you inherited their weekend coding test.

This is a bad look for companies that still email coding tests as open solutions with a public restore. You taught candidates that pulling packages from the internet is how they get hired. Plan for someone to weaponize the assignment.

Run Candidate Code and You Buy the Cleanup

Security hardening for this is operational, not a new SKU. You already have the pieces. Use them on the hiring path the way you use them on production builds.

Do this now, this week:

  • Tell recruiting and engineering that take-home projects run only in a disposable VM or cloud workspace with no corp VPN, no SSO cookies, and no cloned secrets. Candidates who refuse can use a browser-based IDE you provision.
  • Hunt workstations and CI agents for NuGet restores outside your approved feed, especially WinUI and WPF control packages added during recent assessment cycles. Isolate hits, capture the project zip, and rotate tokens for that user.
  • Pin production restores to a private, proxied gallery. Block arbitrary nuget.org on build agents. Developer laptops that still need public packages get them through a logged proxy.
  • Add detections for MSBuild, testhost, and nuget.exe spawning script interpreters, archive tools, or unexpected network clients. Score those as threat detection events.

Keep doing this after the news cycle dies. Review the recruiting runbook the same quarter you review VPN MFA. Put a named owner on candidate compute the way you put a named owner on CI runners. If you don’t have a throwaway environment, you’re asking strangers to compile on the same endpoints that hold production tokens.

Lock files are evidence. Require them in every repo that ships. Diff unexpected package adds in pull requests the way you diff new firewall rules. A WinUI button control that nobody asked for is a signal. So is a package with almost no download count and a README that says complete this assessment.

Tokens die on a timer. Short-lived credentials on developer workstations shrink the blast radius of a homework implant. If a PAT or cloud key can live for 90 days on disk, a weekend assessment has plenty of time to steal it. Rotate on suspicion, and rotate on a calendar so suspicion isn’t your only trigger.

The hiring team will say this slows offers. Good. A slow offer beats a workstation rebuild, a token sweep, and a quiet month of wondering what else that package touched. You already sandboxed production builds. Extend that habit to the people you haven’t hired yet.

Thirteen packages is enough to prove the channel works. Treat the next take-home zip as hostile until your disposable environment says otherwise.

Sources

Take Control of Your Server Security

Don't let brute-force attacks slow you down. Try IPBan Pro risk-free for 30 days.

Secure. Automated. Lightweight.

Stay up to date with the latest news, releases and more.

Take Control of Your Server Security

Don't let brute-force attacks slow you down. Try IPBan Pro risk-free for 30 days.

Secure. Automated. Lightweight.