Multi Recon Local Exploit Suggester - Metasploit


This page contains detailed information about how to use the post/multi/recon/local_exploit_suggester metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Multi Recon Local Exploit Suggester
Module: post/multi/recon/local_exploit_suggester
Source code: modules/post/multi/recon/local_exploit_suggester.rb
Disclosure date: -
Last modification time: 2022-05-25 10:25:32 +0000
Supported architecture(s): -
Supported platform(s): AIX, Android, Apple_iOS, Arista, BSD, BSDi, Brocade, Cisco, Firefox, FreeBSD, HPUX, Hardware, Irix, Java, JavaScript, Juniper, Linux, Mainframe, Mikrotik, Multi, NetBSD, Netware, NodeJS, OSX, OpenBSD, PHP, Python, R, Ruby, Solaris, Unifi, Unix, Unknown, Windows
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module suggests local meterpreter exploits that can be used. The exploits are suggested based on the architecture and platform that the user has a shell opened as well as the available exploits in meterpreter. It's important to note that not all local exploits will be fired. Exploits are chosen based on these conditions: session type, platform, architecture, and required default options.

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


There are two ways to execute this post module.

From the Meterpreter prompt

The first is by using the "run" command at the Meterpreter prompt. It allows you to run the post module against that specific session:

meterpreter > run post/multi/recon/local_exploit_suggester

From the msf prompt

The second is by using the "use" command at the msf prompt. You will have to figure out which session ID to set manually. To list all session IDs, you can use the "sessions" command.

msf > use post/multi/recon/local_exploit_suggester
msf post(local_exploit_suggester) > show options
    ... show and set options ...
msf post(local_exploit_suggester) > set SESSION session-id
msf post(local_exploit_suggester) > exploit

If you wish to run the post against all sessions from framework, here is how:

1 - Create the following resource script:


framework.sessions.each_pair do |sid, session|
  run_single("use post/multi/recon/local_exploit_suggester")
  run_single("set SESSION #{sid}")
  run_single("run")
end

2 - At the msf prompt, execute the above resource script:

msf > resource path-to-resource-script

Required Options


  • SESSION: The session to run this module on

Knowledge Base


The Local Exploit Suggester is a post-exploitation module that you can use to check a system for local vulnerabilities. It performs local exploit checks; it does not actually run any exploits, which is useful because this means you to scan a system without being intrusive. In addition to being stealthy, it's a time saver. You don't have to manually search for local exploits that will work; it'll show you which exploits the target is vulnerable to based on the system's platform and architecture.

The Local Exploit Suggester is available for Python, PHP, and Windows Meterpreter.

Vulnerable Application


To use the Local Exploit Suggester:

  • You must have an open Meterpreter session.

Verification Steps


Please see the Overview section.

Options


You can set the following options for the Local Exploit Suggester:

  • showdescription - Set this option to true to see more details about each exploit.

Scenarios


When the Local Exploit Suggester runs, it displays a list of local exploits that the target may be vulnerable to, and it tells you the likelihood of exploitation.

The following terms are used to help you understand how vulnerable a target is to a particular exploit:

  • Vulnerable - Indicates that the target is vulnerable.
  • Appears - Indicates that the target may be vulnerable based on the file version, but the vulnerable code has not been tested.
  • Detected - Indicates that the target has the file, but it cannot be determined whether or not the target is vulnerable.

Go back to menu.

Msfconsole Usage


Here is how the multi/recon/local_exploit_suggester post exploitation module looks in the msfconsole:

msf6 > use post/multi/recon/local_exploit_suggester

msf6 post(multi/recon/local_exploit_suggester) > show info

       Name: Multi Recon Local Exploit Suggester
     Module: post/multi/recon/local_exploit_suggester
   Platform: Apple_iOS, Hardware, Multi, Mainframe, Firefox, NodeJS, Python, JavaScript, PHP, Unix, Irix, HPUX, AIX, FreeBSD, NetBSD, BSDi, OpenBSD, BSD, OSX, Solaris, Arista, Mikrotik, Brocade, Unifi, Juniper, Cisco, Linux, Ruby, R, Java, Android, Netware, Windows, Unknown
       Arch: 
       Rank: Normal

Provided by:
  sinn3r <[email protected]>
  Mo

Compatible session types:
  Meterpreter
  Shell

Basic options:
  Name             Current Setting  Required  Description
  ----             ---------------  --------  -----------
  SESSION                           yes       The session to run this module on
  SHOWDESCRIPTION  false            yes       Displays a detailed description for the available exploits

Description:
  This module suggests local meterpreter exploits that can be used. 
  The exploits are suggested based on the architecture and platform 
  that the user has a shell opened as well as the available exploits 
  in meterpreter. It's important to note that not all local exploits 
  will be fired. Exploits are chosen based on these conditions: 
  session type, platform, architecture, and required default options.

Module Options


This is a complete list of options available in the multi/recon/local_exploit_suggester post exploitation module:

msf6 post(multi/recon/local_exploit_suggester) > show options

Module options (post/multi/recon/local_exploit_suggester):

   Name             Current Setting  Required  Description
   ----             ---------------  --------  -----------
   SESSION                           yes       The session to run this module on
   SHOWDESCRIPTION  false            yes       Displays a detailed description for the available exploits

Advanced Options


Here is a complete list of advanced options supported by the multi/recon/local_exploit_suggester post exploitation module:

msf6 post(multi/recon/local_exploit_suggester) > show advanced

Module advanced options (post/multi/recon/local_exploit_suggester):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   VERBOSE    false            no        Enable detailed status messages
   WORKSPACE                   no        Specify the workspace for this module

Post Actions


This is a list of all post exploitation actions which the multi/recon/local_exploit_suggester module can do:

msf6 post(multi/recon/local_exploit_suggester) > show actions

Post actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the multi/recon/local_exploit_suggester post exploitation module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 post(multi/recon/local_exploit_suggester) > 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 find a platform


Here is a relevant code snippet related to the "Could not find a platform" error message:

54:	
55:	    module_platforms = mod.target.platform ? mod.target.platform.platforms : mod.platform.platforms
56:	    module_platforms.include? platform_obj
57:	  rescue ArgumentError => e
58:	    # When not found, find_platform raises an ArgumentError
59:	    elog('Could not find a platform', error: e)
60:	    return false
61:	  end
62:	
63:	  def is_session_type_compat?(mod)
64:	    mod.session_compatible? session.sid

No suggestions available.


Here is a relevant code snippet related to the "No suggestions available." error message:

110:	    end
111:	  end
112:	
113:	  def run
114:	    if @local_exploits.empty?
115:	      print_error 'No suggestions available.'
116:	      return
117:	    end
118:	
119:	    show_found_exploits
120:	    results = []

#Local Exploit Suggester failed with: <E.CLASS> when using <M.SHORTNAME>


Here is a relevant code snippet related to the "#Local Exploit Suggester failed with: <E.CLASS> when using <M.SHORTNAME>" error message:

120:	    results = []
121:	    @local_exploits.each do |m|
122:	      begin
123:	        checkcode = m.check
124:	      rescue => e
125:	        elog("#Local Exploit Suggester failed with: #{e.class} when using #{m.shortname}", error: e)
126:	        vprint_error "Check with module #{m.fullname} failed with error #{e.class}"
127:	        next
128:	      end
129:	
130:	      if checkcode.nil?

Check with module <M.FULLNAME> failed with error <E.CLASS>


Here is a relevant code snippet related to the "Check with module <M.FULLNAME> failed with error <E.CLASS>" error message:

121:	    @local_exploits.each do |m|
122:	      begin
123:	        checkcode = m.check
124:	      rescue => e
125:	        elog("#Local Exploit Suggester failed with: #{e.class} when using #{m.shortname}", error: e)
126:	        vprint_error "Check with module #{m.fullname} failed with error #{e.class}"
127:	        next
128:	      end
129:	
130:	      if checkcode.nil?
131:	        vprint_error "Check failed with #{m.fullname} for unknown reasons"

Check failed with <M.FULLNAME> for unknown reasons


Here is a relevant code snippet related to the "Check failed with <M.FULLNAME> for unknown reasons" error message:

126:	        vprint_error "Check with module #{m.fullname} failed with error #{e.class}"
127:	        next
128:	      end
129:	
130:	      if checkcode.nil?
131:	        vprint_error "Check failed with #{m.fullname} for unknown reasons"
132:	        next
133:	      end
134:	
135:	      # See def is_check_interesting?
136:	      unless is_check_interesting? checkcode

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


  • sinn3r
  • Mo

Version


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

Go back to menu.