From 087f03d2ed3cc704c0bd2d48d8a120966107e028 Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 20 May 2025 09:22:07 -0400 Subject: [PATCH] Minor --- C2Client/C2Client/ConsolePanel.py | 66 +++++++++++++++++----------- core | 2 +- teamServer/teamServer/TeamServer.cpp | 15 ++++++- 3 files changed, 55 insertions(+), 28 deletions(-) diff --git a/C2Client/C2Client/ConsolePanel.py b/C2Client/C2Client/ConsolePanel.py index 6f054bc..e9865f9 100644 --- a/C2Client/C2Client/ConsolePanel.py +++ b/C2Client/C2Client/ConsolePanel.py @@ -71,6 +71,8 @@ WmiInstruction = "wmiExec" SpawnAsInstruction = "spawnAs" EvasionInstruction = "evasion" KeyLoggerInstruction = "keyLogger" +MiniDumpInstruction = "miniDump" +DotnetExecInstruction = "dotnetExec" StartInstruction = "start" StopInstruction = "stop" @@ -193,7 +195,15 @@ completerData = [ ('whoami.x64.o', [('go',[])]), ('windowlist.x64.o', [('go',[])]), ('wmi_query.x64.o', [('go ZZZ system namespace query',[])]), - ]), + ]), + (MiniDumpInstruction, [ + ('dump dump.xor', []), + ('decrypt /tmp/dump.xor', []), + ]), + (DotnetExecInstruction, [ + ('load rub Rubeus.exe', []), + ('runExe rub help', []), + ]), (UnloadModuleInstruction,[ (AssemblyExecInstruction, []), (CdInstruction, []), @@ -217,6 +227,8 @@ completerData = [ (SpawnAsInstruction, []), (WmiInstruction, []), (KeyLoggerInstruction, []), + (MiniDumpInstruction, []), + (DotnetExecInstruction, []), ]), (KerberosUseTicketInstruction,[]), (PowershellInstruction,[ @@ -257,30 +269,34 @@ completerData = [ ('dump', []), ]), (LoadModuleInstruction,[ - ('AssemblyExec', []), - ('ChangeDirectory', []), - ('Coff', []), - ('Download', []), - ('Inject', []), - ('ListDirectory', []), - ('ListProcesses', []), - ('MakeToken', []), - ('PrintWorkingDirectory', []), - ('Rev2self', []), - ('Run', []), - ('Script', []), - ('StealToken', []), - ('Upload', []), - ('Powershell', []), - ('PsExec', []), - ('KerberosUseTicket', []), - ('Chisel', []), - ('SpawnAs', []), - ('Cat', []), - ('Tree', []), - ('Evasion', []), - ('WmiExec', []), - ('KeyLogger', []), + ('changeDirectory', []), + ('listDirectory', []), + ('listProcesses', []), + ('printWorkingDirectory', []), + (CdInstruction, []), + (LsInstruction, []), + (PsInstruction, []), + (PwdInstruction, []), + (AssemblyExecInstruction, []), + (CoffLoaderInstruction, []), + (DownloadInstruction, []), + (InjectInstruction, []), + (MakeTokenInstruction, []), + (Rev2selfInstruction, []), + (RunInstruction, []), + (ScriptInstruction, []), + (StealTokenInstruction, []), + (UploadInstruction, []), + (PowershellInstruction, []), + (PsExecInstruction, []), + (KerberosUseTicketInstruction, []), + (ChiselInstruction, []), + (EvasionInstruction, []), + (SpawnAsInstruction, []), + (WmiInstruction, []), + (KeyLoggerInstruction, []), + (MiniDumpInstruction, []), + (DotnetExecInstruction, []), ]), ] diff --git a/core b/core index db8d5a0..3a537ba 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit db8d5a0bcf1c09d818531aa8937e7e2c2b9bc40f +Subproject commit 3a537ba1b4395ef60878c3dfcd938caaa79e36c2 diff --git a/teamServer/teamServer/TeamServer.cpp b/teamServer/teamServer/TeamServer.cpp index 2783f98..adfbd18 100644 --- a/teamServer/teamServer/TeamServer.cpp +++ b/teamServer/teamServer/TeamServer.cpp @@ -1683,6 +1683,16 @@ grpc::Status TeamServer::SendTermCmd(grpc::ServerContext* context, const teamser } + +std::string toLower(const std::string& str) +{ + std::string result = str; + std::transform(result.begin(), result.end(), result.begin(), + [](unsigned char c) { return std::tolower(c); }); + return result; +} + + int TeamServer::prepMsg(const std::string& input, C2Message& c2Message, bool isWindows) { m_logger->trace("prepMsg"); @@ -1728,7 +1738,7 @@ int TeamServer::prepMsg(const std::string& input, C2Message& c2Message, bool isW moduleName = moduleName.substr(3); // remove lib moduleName = moduleName.substr(0, moduleName.length() - 3); // remove .so - if(param == moduleName) + if (toLower(param) == toLower(moduleName)) { if(isWindows) { @@ -1759,8 +1769,9 @@ int TeamServer::prepMsg(const std::string& input, C2Message& c2Message, bool isW for (auto it = m_moduleCmd.begin(); it != m_moduleCmd.end(); ++it) { - if (instruction == (*it)->getName()) + if (toLower(instruction) == toLower((*it)->getName())) { + splitedCmd[0] = (*it)->getName(); res = (*it)->init(splitedCmd, c2Message); isModuleFound=true; }