pandora v1.0 releases: A red team tool to extract credentials from password managers

Pandora

This is a red team tool that assists in gathering credentials from different password managers. They are separated into three categories, Windows 10 desktop applications, browsers, and browser plugins. This may work on other OS, like Linux, but it is not tested yet. In this release, the tool supports 14 password managers, with 18 different implementations (e.g., the tool could dump credentials either from the desktop app, or the browser plugin of the same product). Specifically, in most cases, password managers must be up and unlocked for the tool to work.

So, the purpose of this tool is to provide an additional attack vector in red team engagements, since many users are using password managers. Three different videos have been uploaded to assist in understanding how this tool works.

Regarding fixing these issues, most vendors responded that such issues are out-of-scope for them since the attacker needs local access or AV/EDR should protect the user against such attacks. Although some products may provide fixes, their exploits will be released at a later date (they are still under disclosure).

Methodology

The code is structured as follows:

  1. The user chooses the relevant password manager or may request for additional input.
  2. Based on the relevant password manager, the tool dumps the process into a file.
  3. The dump file then is analyzed to identify any relevant pattern within it, with the purpose of extracting credentials.
  4. In some cases, some junk data will be presented to the user. These data will be noted as unparsed characters. So, they can be easily recognized.
  5. The user then can identify the credentials (either in cmd or in the relevant txt file).

It should be noted that in some cases password managers store in plaintext other types of data, like credit card details, addresses, Wi-Fi passwords etc. Users should be wary of such attacks and should not execute untrusted files, enable 2FA, etc.

Regarding the exploits, the methodology is simple, i.e., the purpose is to identify a pattern or a keyword that would pinpoint the relevant credentials within the dump file. Each password manager is different, so, each exploitation method differs. However, the concept is the same, i.e., finding the relevant pattern can pinpoint the credentials within this file. In some cases, the exploit finds when the credentials start and then gathers the next bytes, say 100. I did some extensive testing to identify these values correctly, but they may differ in a real-case scenario. Open an issue if you want to propose another password manager to be included in this tool.

The following table depicts a high-level view of the tool’s capabilities. Note that Firefox and the relevant Firefox plugins of password managers may not work correctly. They need further research for the tool to be able to extract the credentials in every case. This is due to the fact that Firefox changes its pattern with each execution.

Note: The Users column refers to the number of users mentioned in the Chrome Web Store for each browser plugin.

Name Location Credentials Browser Stability Version Users
Chromium Browser Entries Chrome/MSEdge/Brave Yes 121.0.6106.0 N/A
1Password App/Plugin Master(Both)/Entries(App) Chrome/Firefox Yes 8.10.18 +4M
Firefox Browser Entries N/A No 119.0 N/A
Dashlane Plugin Master/Entries Chrome/Firefox Chrome 6.2344.1 +2M
Keeper App Entries N/A Yes 16.10.9 N/A
LastPass Plugin Master/Entries Chrome Yes 4.123.0 +10M
Roboform Plugin Entries Chrome Yes 9.5.2.0 +600K
Bitwarden Plugin Master/Entries Chrome Yes 2023.10.1 +3M
Norton Plugin Entries Chrome Yes 8.1.0.73 +4M
Bitdefender Plugin Master Chrome Yes 1.3.0 +90K
Ironvest Plugin Entries Chrome Yes 9.8.15 +90K
Passwarden App Entries N/A Yes 3.3 +1K
Avira Plugin Entries Chrome Yes 2.19.14.4461 +6M
Passwordboss App Entries N/A Yes 5.5.5104 +20K

Regarding the extraction of credentials, some exploits are based on a specific number of bytes, to extract the credentials. So, maybe, in some cases, this number must be increased to extract this information correctly. During the experiments, common usernames and passwords were used. So, in most cases, this would be sufficient.

Another note is relevant to the version of each password manager of a browser plugin. If a change is made in the code and affects the process, the tool may be unable to identify these credentials. So, keep in mind that there is a possibility to mishandle some credentials if an older/newer version of the tool is used, or a different OS is running (tested on Windows 10 Pro).

In most cases, the following will be needed to extract the credentials:

  1. The relevant app (browser or desktop app) is up, unlocked, and running.
  2. In some cases, like in Chromium browsers, an interaction needs to be made with either the relevant plugin or the embedded password manager of the browser.
  3. In other cases, some password managers keep these credentials cleartext in memory, even after being locked. This behavior was noted in Keeper.
  4. In the case of 1Password, high integrity privilege is required. So, execute the .exe with high privileges, or provide the dump file as input.
  5. All tests were made with the default settings of each password manager.

It is sufficient to mention that since user behavior is to open such apps and leave them open, it would provide an additional attack vector for lateral movement. Another keypoint is that most of these tools will automatically be locked when the user is completely idle. This means that even if the app or browser plugin is idle and the user is using their host for other activities, these apps will not be locked. Also, in some cases, it is possible to completely avoid user interaction. For instance, some browser plugins remain unlocked for some time. As a result, it is possible to start this process from cmd, without needing the user and extract the credentials. Check Avira’s video example to understand this process.

It should be noted that there were some cases like KeePass, StickyPassword, and Opera in which no credentials were found to be cleartext within the memory.

Changelog v1.0

  1. Fast, full, local, and merge options
  2. Assist the user in identifying which app or browser plugin is installed
  3. Exploit for CVE-2023-23349
  4. Fixed some typos
  5. Added master password extraction for Roboform and Keeper
  6. Included some details in the readme section

Install & Use

Copyright (c) 2023 Efstratios Chatzoglou