openwall / openwall/john

Add support for WordPress 6.8+ bcrypt password hashes ($wp$2y$)

Open
#6,016 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Description

WordPress 6.8 introduced a new password hashing format based on bcrypt with an HMAC-SHA384 pre-hashing step.

The resulting hashes use the $wp$2y$ prefix.

It would be useful for John the Ripper to support this format natively, including automatic hash detection and a dedicated format name such as wpbcrypt.

Algorithm

The password transformation performed by WordPress is:

digest = HMAC-SHA384(
    key = "wp-sha384",
    message = password
)

encoded = base64_encode(digest)

hash = bcrypt(encoded, salt, cost)

The stored bcrypt hash is then prefixed with $wp$:

$wp$2y$<cost>$<salt-and-digest>

Conceptually:

bcrypt(base64(HMAC-SHA384(key="wp-sha384", password)))

Test vector

Example hash:

$wp$2y$10$607XKVrBjPEqujeOXNwbYuOJ.gPMd2TelMMknmeV70Kap1E81Ovo6

Expected plaintext:

hashpwn

Expected usage could be similar to:

john --format=wpbcrypt hashes.txt

or through automatic format detection:

john hashes.txt

Compatibility reference

Hashcat added native support for this algorithm as mode 35500.

Example:

echo hashpwn | hashcat -m 35500 -a 0 --potfile-disable \
'$wp$2y$10$607XKVrBjPEqujeOXNwbYuOJ.gPMd2TelMMknmeV70Kap1E81Ovo6'

References

Suggested requirements

  • Recognize hashes beginning with $wp$2y$.
  • Remove the WordPress-specific $wp$ marker before processing the bcrypt portion.
  • Apply HMAC-SHA384 using the fixed key wp-sha384.
  • Base64-encode the binary HMAC digest using standard Base64.
  • Use the resulting Base64 string as the bcrypt password input.
  • Support the bcrypt cost contained in the stored hash.
  • Include test vectors for ASCII and UTF-8 passwords.
  • Provide CPU support initially, with OpenCL support considered separately.

Thank you for maintaining John the Ripper.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked WordPress password-hash implementation and hash-generation reference, then inspect John's existing bcrypt-related format entry points. Use the supplied hashpwn vector and add ASCII and UTF-8 coverage for detection, the wpbcrypt format, HMAC-SHA384 preprocessing, Base64 handling, and the stored cost. Done means the example cracks correctly through both explicit and automatic format selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cryptography, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.