Typo
parent
4a739a0f32
commit
2119d37e52
|
@ -166,7 +166,7 @@ class WMIEXEC:
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if tries >= self.__tries:
|
if tries >= self.__tries:
|
||||||
self.logger.fail(f'WMIEXEC: Couldn\'t retrieve output-file, maybe got detected by AV. Try the wmi protocol or another exec method')
|
self.logger.fail(f'WMIEXEC: Couldn\'t retrieve output file, maybe got detected by AV. Try the wmi protocol or another exec method')
|
||||||
break
|
break
|
||||||
if str(e).find("STATUS_BAD_NETWORK_NAME") >0 :
|
if str(e).find("STATUS_BAD_NETWORK_NAME") >0 :
|
||||||
self.logger.fail(f'SMB connection: target has blocked {self.__share} access (maybe command executed!)')
|
self.logger.fail(f'SMB connection: target has blocked {self.__share} access (maybe command executed!)')
|
||||||
|
|
|
@ -104,7 +104,7 @@ class WMIEXEC:
|
||||||
retVal = descriptor.GetStringValue(2147483650, self.__registry_Path, keyName)
|
retVal = descriptor.GetStringValue(2147483650, self.__registry_Path, keyName)
|
||||||
self.__outputBuffer = base64.b64decode(retVal.sValue).decode(self.__codec, errors='replace').rstrip('\r\n')
|
self.__outputBuffer = base64.b64decode(retVal.sValue).decode(self.__codec, errors='replace').rstrip('\r\n')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.fail(f'WMIEXEC: Couldn\'t retrieve output-file. Either command timed out or got detected by AV. Try increasing the timeout with "--exec-timeout" option. If it\'s still failing, try the smb protocol or another exec method')
|
self.logger.fail(f'WMIEXEC: Couldn\'t retrieve output file. Either command timed out or got detected by AV. Try increasing the timeout with "--exec-timeout" option. If it\'s still failing, try the smb protocol or another exec method')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.logger.debug(f"Removing temporary registry path: HKLM\\{self.__registry_Path}")
|
self.logger.debug(f"Removing temporary registry path: HKLM\\{self.__registry_Path}")
|
||||||
|
|
|
@ -190,7 +190,7 @@ class WMIEXEC_EVENT:
|
||||||
record = dict(command_ResultObject.getProperties())
|
record = dict(command_ResultObject.getProperties())
|
||||||
self.__outputBuffer = base64.b64decode(record['ScriptText']['value']).decode(self.__codec, errors='replace')
|
self.__outputBuffer = base64.b64decode(record['ScriptText']['value']).decode(self.__codec, errors='replace')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.fail(f'WMIEXEC-EVENT: Couldn\'t retrieve output-file. Either command timed out or got detected by AV. Try increasing the timeout with "--exec-timeout" option. If it\'s still failing, try the smb protocol or another exec method')
|
self.logger.fail(f'WMIEXEC-EVENT: Couldn\'t retrieve output file. Either command timed out or got detected by AV. Try increasing the timeout with "--exec-timeout" option. If it\'s still failing, try the smb protocol or another exec method')
|
||||||
|
|
||||||
def remove_Instance(self):
|
def remove_Instance(self):
|
||||||
if self.__retOutput:
|
if self.__retOutput:
|
||||||
|
|
Loading…
Reference in New Issue