From 9ab80362decd8337bc9852cf5bd191e8d9910dd7 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Thu, 26 Dec 2019 16:08:55 +0200 Subject: [PATCH] Added TLS version to powershell command. --- .../post_breach/actions/communicate_as_new_user.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/post_breach/actions/communicate_as_new_user.py b/monkey/infection_monkey/post_breach/actions/communicate_as_new_user.py index 42162fb55..5519eb3d2 100644 --- a/monkey/infection_monkey/post_breach/actions/communicate_as_new_user.py +++ b/monkey/infection_monkey/post_breach/actions/communicate_as_new_user.py @@ -49,7 +49,9 @@ class CommunicateAsNewUser(PBA): @staticmethod def get_commandline_for_http_request(url, is_windows=is_windows_os()): if is_windows: - format_string = 'powershell.exe -command "Invoke-WebRequest {url}" -UseBasicParsing' + format_string = \ + 'powershell.exe -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ' \ + 'Invoke-WebRequest {url} -UseBasicParsing"' else: # true || false -> 0. false || true -> 0. false || false -> 1. So: # if curl works, we're good.