From f85bb389cc618626fa036b87b90689af236a290b Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 9 Feb 2022 11:57:13 -0500 Subject: [PATCH] Agent: Add some debug logging to SMBFingerprinter --- monkey/infection_monkey/network/smb_fingerprinter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monkey/infection_monkey/network/smb_fingerprinter.py b/monkey/infection_monkey/network/smb_fingerprinter.py index a0e87f311..0d13a2d36 100644 --- a/monkey/infection_monkey/network/smb_fingerprinter.py +++ b/monkey/infection_monkey/network/smb_fingerprinter.py @@ -154,6 +154,8 @@ class SMBFingerprinter(IFingerprinter): if (SMB_PORT not in port_scan_data) or (port_scan_data[SMB_PORT].status != PortStatus.OPEN): return FingerprintData(None, None, services) + logger.debug(f"Fingerprinting potential SMB port {SMB_PORT} on {host}") + try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(0.7) @@ -188,6 +190,8 @@ class SMBFingerprinter(IFingerprinter): ] ) + logger.debug(f'os_version: "{os_version}", service_client: "{service_client}"') + if os_version.lower() != "unix": os_type = "windows" else: