We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4d54d1 commit 188ef13Copy full SHA for 188ef13
1 file changed
nxc/protocols/wmi/wmiexec.py
@@ -77,7 +77,7 @@ def execute_WithOutput(self, command):
77
78
commands = [
79
f"{self.__shell} {command} 1> {result_output} 2>&1",
80
- f"{self.__shell} certutil -encodehex -f {result_output} {result_output_b64} 0x40000001",
+ f'{self.__shell} powershell -Command "[Convert]::ToBase64String([IO.File]::ReadAllBytes(\'{result_output}\')) | Out-File -Encoding ASCII \'{result_output_b64}\'"',
81
f'{self.__shell} for /F "usebackq" %G in ("{result_output_b64}") do reg add HKLM\\{self.__registry_Path} /v {keyName} /t REG_SZ /d "%G" /f',
82
f"{self.__shell} del /q /f /s {result_output} {result_output_b64}",
83
]
0 commit comments