From c82a9cfbf055007b788828635c53765ecb37e2bd Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Mon, 4 Apr 2022 16:44:42 +0200 Subject: [PATCH] Agent: Half the default smb timeout to 30sec --- monkey/infection_monkey/exploit/tools/smb_tools.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/exploit/tools/smb_tools.py b/monkey/infection_monkey/exploit/tools/smb_tools.py index 8c353cf8c..8930bf467 100644 --- a/monkey/infection_monkey/exploit/tools/smb_tools.py +++ b/monkey/infection_monkey/exploit/tools/smb_tools.py @@ -27,9 +27,8 @@ class SmbTools(object): password, lm_hash="", ntlm_hash="", - timeout=60, + timeout=30, ) -> Optional[str]: - # TODO assess the 60 second timeout creds_for_log = get_credential_string([username, password, lm_hash, ntlm_hash]) logger.debug(f"Attempting to copy an agent binary to {host} using SMB with {creds_for_log}") @@ -188,7 +187,7 @@ class SmbTools(object): return remote_full_path @staticmethod - def new_smb_connection(host, username, password, lm_hash="", ntlm_hash="", timeout=60): + def new_smb_connection(host, username, password, lm_hash="", ntlm_hash="", timeout=30): try: smb = SMBConnection(host.ip_addr, host.ip_addr, sess_port=445) except Exception as exc: