A fake WinUI 3 take-home assessment carries its own NuGet packages. Build the Windows starter project, and one package runs code from an MSBuild target; open its sample window, and a button control tries to launch the file that build step staged. Socket’s investigation ties this assessment to 13 malicious package IDs published under four NuGet accounts. Developers asked to build an unfamiliar .NET project on their everyday workstation face the immediate exposure.
The bait is unusually specific. The assessment asks candidates to work on a “Mini File Vault & Tracker” in Visual Studio on native Windows. It also instructs them, “Do not alter the inner workings or styles of the external FileButton itself”. That control is the runtime trigger. Socket found package archives in the assessment repository’s first two commits, even after NuGet removed the corresponding gallery packages. The latest commit no longer restores those packages, but old checkouts still carry the build and window-open triggers.
The local feed survives deletion
The starter project’s RestoreAdditionalProjectSources property points NuGet at a committed Packages folder containing VS_Builder.MSBuildAnalyzer version 1.2.7 and VS_Builder.WinUI3Controls version 1.0.7. Those archives have no NuGet gallery signatures, according to Socket. The project also sets DisableFastUpToDateCheck to true, causing Visual Studio to rely on MSBuild’s rebuild decision. The committed archives and developer caches can still supply the packages after gallery deletion; inspect both before building.
Microsoft’s NuGet documentation explains that a package can supply a build/<package_id>.targets file and that restore generates the imports consumed by a PackageReference project. In this case, Socket found a target named ExecuteInlineCSharpTarget that runs after Build for net8.0-windows and net10.0 targets. It starts MSBuildAnalyzer.dll from the package’s lib folder through dotnet. Its declared output, ForceExecuteNonExistenFile.txt, is never produced, so the target runs again on later builds; error-tolerant settings let the build continue if that step fails. The target file’s SHA-256 is 33510d8e48c26279c0c212b4e6e5f95b7f0a116061eae7f50241f81903be5b6b.
Socket’s analysis says the DLL attempts to download a file hosted on GitHub into %LOCALAPPDATA%\osk\OskSupport.dll, then copies the legitimate Windows osk.exe beside it. The downloader stages those files; it does not launch them. The attacker used GitHub as shared hosting; investigate the staged files and process trail instead of blocking GitHub wholesale. Socket could not retrieve the hosted file during its analysis, so its contents remain unknown. The first control created when the sample window opens supplies the next action.
Opening the window triggers launch
FileButton in VS_Builder.WinUI3Controls version 1.0.7 tries to start %LOCALAPPDATA%\osk\osk.exe from its constructor, with a hidden window. Socket describes that file layout as a known osk.exe/OskSupport.dll side-loading pair. The researcher did not test whether the copied Windows executable will side-load from that location on current Windows builds; investigate the attempted launch and the staged files even when a defender sees no successful DLL execution. The build and window-open events are separate: inspecting only package installation misses both.
A second package in the same operation, WinUI.Button version 1.0.0, takes a different route. Socket found that creating its WUIButton control starts a background download from an attacker-owned GitHub repository, saves an executable as %TEMP%\Launcher.exe, and attempts to run it. The NuGet Gallery page, captured on November 24, says its content is hidden and the package has been deleted, making it unavailable for gallery install or restore. Socket observed it listed when its November 23 report was written. Existing developer caches and checked-out projects still need inspection.
Check projects before build
For an assessment or unfamiliar repository, inspect NuGet.config, RestoreAdditionalProjectSources, committed .nupkg files, PackageReference entries and imported build/*.targets or buildTransitive/*.targets before restore or build. Restrict restores with NuGet package source mapping so a repository-local feed cannot satisfy a dependency unexpectedly. Use a disposable Windows VM without browser sessions, cloud credentials or developer tokens for a take-home exercise.
Search project manifests, Directory.Packages.props, lock files, obj/project.assets.json and %USERPROFILE%\.NuGet\packages for these 13 IDs named by Socket: VS_Builder.MSBuildAnalyzer, VS_Builder.WinUI3Controls, HappyOne.MSBuildAnalyzer, HappyOne.WinUI3Controls, WinUI.Button, Web3TotalButton, RevertButtonIcon, WinUI3IconButton, WindowsAccentColorName, SetButtonColor, InitializeCustomButton, StyledAppButton and StyledComponent. Remove affected dependencies and their cached copies; compare the recorded version and origin, since the two bundled assessment archives were separate from the gallery.
On developer endpoints, look for dotnet.exe started by MSBuild with a NuGet-package DLL as its argument, writes to %LOCALAPPDATA%\osk\OskSupport.dll, a copied %LOCALAPPDATA%\osk\osk.exe, or %TEMP%\Launcher.exe. The source’s target marker ForceExecuteNonExistenFile.txt and assembly strings _environmentProbeKeyFragment and _diagnosticHostSourceKeyFragment can help a static hunt. Presence of staged files calls for investigation even when process telemetry has no DLL-load event.
Remove packages and protect credentials
If a developer built or ran the assessment or an affected project, isolate that Windows machine, preserve the project and endpoint evidence, and follow Socket’s recommendation to reimage it. Rotate browser-saved passwords, session cookies, GitHub tokens, registry credentials and cloud credentials from a clean device. Check the repaired project with only approved package sources, and verify that its dependency graph and local package directory contain none of the 13 IDs. A clean public NuGet search is a poor substitute for checking what the project already carries.