Last active
February 17, 2026 18:24
-
-
Save derekxmartin/7368d20f02af37085412dca4cd2e6376 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <Target Name="Build"> | |
| <Message Text="Standard build target" /> | |
| </Target> | |
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.Build.Framework; | |
| using System; | |
| using System.IO; | |
| // Benign test logger — writes to a temp file to prove execution | |
| // Implements ILogger which MSBuild loads via /logger: switch | |
| public class TestLogger : ILogger | |
| { | |
| public LoggerVerbosity Verbosity { get; set; } | |
| public string Parameters { get; set; } | |
| public void Initialize(IEventSource eventSource) | |
| { | |
| // This executes immediately when MSBuild loads the logger | |
| string output = "[MSB-11 TEST] Logger DLL loaded at {DateTime.Now} by {Environment.UserName}"; | |
| File.WriteAllText(@"C:\Temp\logger_dll_test_output.txt", output); | |
| // Simulate discovery command (benign — whoami to file) | |
| var psi = new System.Diagnostics.ProcessStartInfo("cmd.exe", "/c whoami /all >> C:\\Temp\\logger_dll_test_output.txt") | |
| { | |
| CreateNoWindow = true, | |
| UseShellExecute = false | |
| }; | |
| System.Diagnostics.Process.Start(psi); | |
| } | |
| public void Shutdown() { } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment