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

48 lines
976 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
##
2005-10-11 07:22:38 +00:00
###
#
# Exec
# ----
#
# Executes an arbitrary command.
#
###
2016-03-08 14:02:44 +01:00
module MetasploitModule
2005-10-11 07:22:38 +00:00
CachedSize = 24
2013-08-30 16:28:54 -05:00
include Msf::Payload::Single
2015-04-14 23:23:02 -05:00
include Msf::Payload::Bsd
2005-10-11 07:22:38 +00:00
2013-08-30 16:28:54 -05:00
def initialize(info = {})
super(merge_info(info,
'Name' => 'BSD Execute Command',
'Description' => 'Execute an arbitrary command',
'Author' => [
'snagg <snagg[at]openssl.it>',
'argp <argp[at]census-labs.com>',
'joev'
2015-04-15 19:26:53 -05:00
],
'License' => BSD_LICENSE,
'Platform' => 'bsd',
2015-04-15 19:26:53 -05:00
'Arch' => ARCH_X86
))
2005-10-11 07:22:38 +00:00
2013-08-30 16:28:54 -05:00
# Register exec options
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
2005-10-11 07:22:38 +00:00
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