Files
metasploit-gs/modules/payloads/singles/osx/x86/exec.rb
T

48 lines
982 B
Ruby
Raw Normal View History

##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
##
###
#
# Exec
# ----
#
# Executes an arbitrary command.
#
###
2016-03-08 14:02:44 +01:00
module MetasploitModule
CachedSize = 24
2013-08-30 16:28:54 -05:00
include Msf::Payload::Single
2015-04-14 23:08:57 -05:00
include Msf::Payload::Bsd::X86
2013-08-30 16:28:54 -05:00
include Msf::Payload::Osx
2013-08-30 16:28:54 -05:00
def initialize(info = {})
super(merge_info(info,
2015-04-14 23:08:57 -05:00
'Name' => 'OS X Execute Command',
'Description' => 'Execute an arbitrary command',
'Author' => [
'snagg <snagg[at]openssl.it>',
'argp <argp[at]census-labs.com>',
'joev'
],
'License' => BSD_LICENSE,
'Platform' => 'osx',
'Arch' => ARCH_X86
2013-08-30 16:28:54 -05:00
))
2015-04-14 23:08:57 -05:00
register_options([
OptString.new('CMD', [ true, "The command string to execute" ]),
])
2013-08-30 16:28:54 -05:00
end
2013-08-30 16:28:54 -05:00
#
# Dynamically builds the exec payload based on the user's options.
#
def generate_stage(opts={})
2015-04-14 23:08:57 -05:00
bsd_x86_exec_payload
2013-08-30 16:28:54 -05:00
end
end