diff --git a/nxc/protocols/winrm.py b/nxc/protocols/winrm.py index 9fbf3b2a..688522ce 100644 --- a/nxc/protocols/winrm.py +++ b/nxc/protocols/winrm.py @@ -364,7 +364,7 @@ class winrm(connection): self.conn.execute_cmd(clean_command) if self.args.dump_method == "cmd" else self.conn.execute_ps(f"cmd /c '{clean_command}'") except Exception as e: if ("does not exist" in str(e)) or ("TransformFinalBlock" in str(e)): - self.logger.fail("Failed to dump SAM hashes, maybe got blocked by AV softwares or current user is not privileged user") + self.logger.fail("Failed to dump SAM hashes, it may have been detected by AV or current user is not privileged user") elif hasattr(e, "code") and e.code == 5: self.logger.fail(f"Dump SAM hashes with {self.args.dump_method} failed, please try '--dump-method'") else: @@ -393,7 +393,7 @@ class winrm(connection): self.conn.execute_cmd(clean_command) if self.args.dump_method == "cmd" else self.conn.execute_ps(f"cmd /c '{clean_command}'") except Exception as e: if ("does not exist" in str(e)) or ("TransformFinalBlock" in str(e)): - self.logger.fail("Failed to dump LSA secrets, maybe got blocked by AV softwares or current user is not privileged user") + self.logger.fail("Failed to dump LSA secrets, it may have been detected by AV or current user is not privileged user") elif hasattr(e, "code") and e.code == 5: self.logger.fail(f"Dump LSA secrets with {self.args.dump_method} failed, please try '--dump-method'") else: diff --git a/tests/e2e_commands.txt b/tests/e2e_commands.txt index 60527646..5238c33c 100644 --- a/tests/e2e_commands.txt +++ b/tests/e2e_commands.txt @@ -186,6 +186,12 @@ netexec ldap TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -M whoami ##### WINRM netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS # need an extra space after this command due to regex netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS -X whoami +netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS --sam +netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS --sam --dump-method cmd +netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS --sam --dump-method powershell +netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS --lsa +netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS --lsa --dump-method cmd +netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS --lsa --dump-method powershell netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS --laps netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS --check-proto http netexec winrm TARGET_HOST -u LOGIN_USERNAME -p LOGIN_PASSWORD KERBEROS --check-proto https