2.6.0 • Published 3 years ago

havelock v2.6.0

Weekly downloads
24
License
MIT
Repository
github
Last release
3 years ago

Havelock

Extract and decrypt accounts, cookies, and history from web browsers based on Chromium. Havelock was initially developed as part of a remote administration tool for harvesting accounts from a computer and sending them to a remote endpoint securely. It’s now available as an API in JavaScript and a standalone CLI.

Verified Web Browsers

Every web browser using the same storage mechanism for user data is supported. These are the verified web browsers:

NameAPIPlatform(s)
ChromiumchromiumWindows, macOS, Linux
Google Chrome StablechromeWindows, macOS, Linux
Google Chrome BetachromeBetaLinux
Google Chrome DevchromeDevLinux
Google Chrome CanarychromeCanaryWindows, macOS
Brave StablebraveWindows, macOS, Linux

Adding a browser

Feel free to add support for more browsers through a Pull Request. To get started, take a look at the existing browser definitions in /browsers. The gist of adding a browser is simple. You need to figure out the Keychain credentials and provide a path resolution that works on Windows, macOS, and Linux.

String Decryption

You can decrypt strings retrieved from your web browser using Havelock. Currently, there is only support for macOS.

PlatformAlgorithmSupportedSource
WindowsAES-256-GCMNoos_crypt_win.cc
macOSAES-128-CBCYesos_crypt_mac.mm
LinuxAES-128-CBCYesos_crypt_linux.cc

API

The Havelock API is available in JavaScript. You can only use it from a Node.js environment.

Installation

Havelock is available as havelock in npm. Use your favorite package manager to install it to your Node.js project:

yarn add havelock

Usage

Using the Havelock API is quick and easy.

Extracting data

Here’s an example of retrieving data from the logins table in the Login Data file of the Default profile in Google Chrome:

const havelock = require("havelock");

const explorer = havelock.explorer;
const browser = havelock.browser;

explorer
  .getDataFromUserDataDirectoryFile(
    browser.chrome,
    "Default",
    "Login Data",
    "logins"
  )
  .then((logins) => {
    console.info(logins);
  })
  .catch((reason) => {
    console.error(reason);
  });

There are also shorthands available for interesting files. You can achieve the same result using this shorter function:

explorer
  .getLoginsFromLoginDataFile(browser.chrome, "Default")
  .then((logins) => {
    console.log(logins);
  })
  .catch((reason) => {
    console.error(reason);
  });

Decrypting data

Havelock can decrypt passwords and credit cards numbers. Here’s an example of decrypting a password from the logins table in the Login Data file of the Default profile of Google Chrome:

const crypto = havelock.crypto;

explorer
  .getDataFromUserDataDirectoryFile(
    browser.chrome,
    "Default",
    "Login Data",
    "logins"
  )
  .then((logins) => {
    logins.forEach((login) => {
      crypto
        .decrypt(browser.chrome, login.password_value)
        .then((value) => {
          console.log(value);
        })
        .catch((reason) => {
          console.error(reason);
        });
    });
  })
  .catch((reason) => {
    console.error(reason);
  });

CLI

Havelock is also available as a standalone CLI. It can be separately to execute commands on the local machine.

Installation

The Havelock CLI can be included by using your favorite package manager to install it globally:

yarn global add havelock

Usage

The command havelock should now be available globally throughout your system. You can see the commands and options with:

havelock --help

Extracting data

You can retrieve your logins from the default profile in Google Chrome with:

havelock logins chrome default

If you want a more filtered version of the output, i.e. interesting data points, you can use the option -t:

havelock logins chrome default -t

Decrypting data

Use the option -d if you want to decrypt fields known to be encrypted.

Attribution

Thank you to David Sheldrick (ds300) for passing on the package name.

License

MIT

2.5.0

3 years ago

2.4.0

3 years ago

2.6.0

3 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.2

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.6.0

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

9 years ago

0.1.1

9 years ago