From 65d3723e7b5c7d9971bdf9302e061e3ec0073ecb Mon Sep 17 00:00:00 2001 From: Alexander Neff Date: Thu, 24 Jul 2025 09:21:39 -0400 Subject: [PATCH] Remove string from testing, also increase characters for registry path --- nxc/protocols/wmi/wmiexec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nxc/protocols/wmi/wmiexec.py b/nxc/protocols/wmi/wmiexec.py index 8ac7ed4c..1218e72d 100644 --- a/nxc/protocols/wmi/wmiexec.py +++ b/nxc/protocols/wmi/wmiexec.py @@ -81,7 +81,7 @@ class WMIEXEC: result_output = f"C:\\windows\\temp\\{uuid.uuid4()!s}.txt" result_output_b64 = f"C:\\windows\\temp\\{uuid.uuid4()!s}.txt" keyName = str(uuid.uuid4()) - self.__registry_Path = f"Software\\Classes\\test_nxc_{gen_random_string(6)}" + self.__registry_Path = f"Software\\Classes\\{gen_random_string(8)}" # 1. Run the command and write output to file self.execute_remote(f'{self.__shell} {command} 1> "{result_output}" 2>&1') @@ -122,7 +122,7 @@ class WMIEXEC: result_output = f"C:\\windows\\temp\\{uuid.uuid4()!s}.txt" result_output_b64 = f"C:\\windows\\temp\\{uuid.uuid4()!s}.txt" keyName = str(uuid.uuid4()) - self.__registry_Path = f"Software\\Classes\\{gen_random_string(6)}" + self.__registry_Path = f"Software\\Classes\\{gen_random_string(8)}" # 1. Run the command and write output to file if not command.lower().startswith("powershell"):