Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/payloads/singles/generic/ssh/interact.rb
21547 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
module MetasploitModule
7
CachedSize = 0
8
9
include Msf::Payload::Single
10
include Msf::Sessions::CommandShellOptions
11
12
def initialize(info = {})
13
super(
14
merge_info(
15
info,
16
'Name' => 'Interact with Established SSH Connection',
17
'Description' => 'Interacts with a shell on an established SSH connection',
18
'Author' => 'Spencer McIntyre',
19
'License' => MSF_LICENSE,
20
'Platform' => '',
21
'Arch' => ARCH_ALL,
22
'Handler' => Msf::Handler::Generic,
23
'Session' => Msf::Sessions::SshCommandShellBind,
24
'PayloadType' => 'ssh_interact',
25
'Payload' => {
26
'Offsets' => {},
27
'Payload' => ''
28
}
29
)
30
)
31
end
32
33
def on_session(session)
34
super
35
36
session.arch.clear # undo the ARCH_ALL amalgamation
37
end
38
end
39
40