diff --git a/monkey/infection_monkey/post_breach/actions/communicate_as_backdoor_user.py b/monkey/infection_monkey/post_breach/actions/communicate_as_backdoor_user.py index dba5daad4..b24ace801 100644 --- a/monkey/infection_monkey/post_breach/actions/communicate_as_backdoor_user.py +++ b/monkey/infection_monkey/post_breach/actions/communicate_as_backdoor_user.py @@ -67,16 +67,16 @@ class CommunicateAsBackdoorUser(PBA): format_string = ( 'powershell.exe -command "[Net.ServicePointManager]::SecurityProtocol = [' "Net.SecurityProtocolType]::Tls12; " - 'Invoke-WebRequest {url} -UseBasicParsing"' + 'Invoke-WebRequest {url} -UseBasicParsing -method HEAD"' ) else: # if curl works, we're good. # If curl doesn't exist or fails and wget work, we're good. # And if both don't exist: we'll call it a win. if shutil.which("curl") is not None: - format_string = "curl {url}" + format_string = "curl {url} --head" else: - format_string = "wget -O/dev/null -q {url}" + format_string = "wget -O/dev/null -q {url} --method=HEAD" return format_string.format(url=url) def send_result_telemetry(self, exit_status, commandline, username):