2022-12-30 21:50:15 -05:00
|
|
|
##
|
|
|
|
|
# This module requires Metasploit: https://metasploit.com/download
|
|
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
module MetasploitModule
|
2023-04-18 16:41:48 -04:00
|
|
|
CachedSize = 0
|
2022-12-30 21:50:15 -05:00
|
|
|
|
|
|
|
|
include Msf::Payload::Single
|
|
|
|
|
include Msf::Sessions::CommandShellOptions
|
|
|
|
|
|
|
|
|
|
def initialize(info = {})
|
2023-02-03 15:29:19 -05:00
|
|
|
super(
|
|
|
|
|
merge_info(
|
|
|
|
|
info,
|
2023-04-18 16:41:48 -04:00
|
|
|
'Name' => 'Command Shell, Bind SSM (via AWS API)',
|
2023-02-03 15:29:19 -05:00
|
|
|
'Description' => 'Creates an interactive shell using AWS SSM',
|
|
|
|
|
'Author' => 'RageLtMan <rageltman[at]sempervictus>',
|
2023-08-01 15:02:11 -04:00
|
|
|
'References' => [['URL', 'https://www.sempervictus.com/single-post/once-upon-a-cloudy-air-i-crossed-a-gap-which-wasn-t-there']],
|
2023-02-03 15:29:19 -05:00
|
|
|
'License' => MSF_LICENSE,
|
2023-04-18 16:41:48 -04:00
|
|
|
'Platform' => '',
|
|
|
|
|
'Arch' => ARCH_ALL,
|
2023-02-03 15:29:19 -05:00
|
|
|
'Handler' => Msf::Handler::BindAwsSsm,
|
2023-04-18 16:41:48 -04:00
|
|
|
'Session' => Msf::Sessions::AwsSsmCommandShellBind,
|
2023-02-03 15:29:19 -05:00
|
|
|
'Payload' => {
|
|
|
|
|
'Offsets' => {},
|
2022-12-30 21:50:15 -05:00
|
|
|
'Payload' => ''
|
|
|
|
|
}
|
2023-02-03 15:29:19 -05:00
|
|
|
)
|
|
|
|
|
)
|
2022-12-30 21:50:15 -05:00
|
|
|
end
|
|
|
|
|
|
2023-04-18 16:41:48 -04:00
|
|
|
def on_session(session)
|
|
|
|
|
super
|
2022-12-30 21:50:15 -05:00
|
|
|
|
2023-04-18 16:41:48 -04:00
|
|
|
session.arch.clear # undo the ARCH_ALL amalgamation
|
2022-12-30 21:50:15 -05:00
|
|
|
end
|
|
|
|
|
end
|