Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mode 33400: mega.nz password-protected link (PBKDF2-HMAC-SHA512) #3907

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DCNick3
Copy link

@DCNick3 DCNick3 commented Nov 20, 2023

mega.nz is a centralized file-sharing service with some nice security features, like client-side file decryption. Apparently it is not widely known, but mega password-protected links are implemented fully on the client side using PBKDF2-HMAC-SHA512 to derive a key and an HMAC-SHA256 to verify the derived key.

This PR adds support for cracking passwords for such links.

Relevant documentation

Example hash

P!AgD________U2XVjJi1vxkJgMPf5rkQYUn1H_6WI_sKtiic69mqBKP_____________________O_PDG0Om7BSapL1QoRAgUrz9vzaZmrYnU8t-Au6hteg

It corresponds to the following link:

https://mega.nz/#P!AgD________U2XVjJi1vxkJgMPf5rkQYUn1H_6WI_sKtiic69mqBKP_____________________O_PDG0Om7BSapL1QoRAgUrz9vzaZmrYnU8t-Au6hteg

This hash follows the algorithm, but does not correspond to a real file.

Notes

I did not test this on file links (they have 01 at the second byte and a different key length), but I did try to support it.

I am unsure of some of the choices I made in the PR and would like some input from the maintainers:

  1. What should the category for such a hash should be? I've used HASH_CATEGORY_APPLICATION_DATABASE, but it's not really an application and more like a centralized service..
  2. I am not sure if the use of COMPARE_M in the kernel makes sense. Intuitively, we already know the digest we want to compare with so, probably COMPARE_S should be used instead? I was not able to figure out how to use it here though

@WhiteyCookie
Copy link

Why isn't this already implemented? Can't wait. Plz hashcat people, do it before Christmas :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants