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

add KDF functionality to rf08s 'full' card recovery script #2648

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

csBlueChip
Copy link
Contributor

No description provided.

Copy link

You are welcome to add an entry to the CHANGELOG.md as well

@iceman1001
Copy link
Collaborator

That way will introduce a new dependency of pycryptdome in order to be able to run it in the client.

pip install pycryptodome

I also noticed that All modules are installed under the Crypto package.

A solution would be use the KDF already in the pm3 client. This wouldn't introduce a new python module dependency.

@csBlueChip
Copy link
Contributor Author

Unless venvs bring you joy, I would highly advise apt-get install python-cryptodome over pip install.

But yes, if we can avoid it, let's do so ...what is the command I need to enter to get your KDF code to output the keys for a tag with id aabbccdd ?

@csBlueChip
Copy link
Contributor Author

csBlueChip commented Nov 21, 2024

I have traced the commit backwards and found the algorithm linked off the MiFare Ultralight menu ...It claims to need a 7-byte value, but will accept a 4-byte value ...it only returns 1 (the first) of the 32 keys

[usb] pm3 --> hf mfu pwdgen --uid 5cb49ca6
[=] -----------------------------------
[=]  UID 4b... 5C B4 9C A6
[=]  UID 7b... 5C B4 9C A6 00 00 00
[=] -----------------------------------
[=]  algo               pwd       pack
...
...
[=] -------------------------------------
[=]  Bambu........ 8693FC621E12

By comparison, my python code returns:

[=] UID: 5CB49CA6
[=]   Sector  0 : A = 8693fc621e12   B = d538def7b725
[=]   Sector  1 : A = 40a282c042aa   B = f4c0c55efc6a
[=]   Sector  2 : A = 184e3a2e94ca   B = 4422b9889125
[=]   Sector  3 : A = dd706a9ee951   B = 5e5b3758858d
[=]   Sector  4 : A = cd3a76149582   B = 51c3d96a0662
[=]   Sector  5 : A = 091a165322eb   B = 674f46f05025
[=]   Sector  6 : A = d0d277bc5c94   B = b48ba097d7b5
[=]   Sector  7 : A = cd9edfd14d29   B = 8c10fbbe4bcf
[=]   Sector  8 : A = ae46323d85b5   B = 92e3f0e07b4c
[=]   Sector  9 : A = 7758739e39b3   B = 4f252e68091e
[=]   Sector 10 : A = f87d61e37cf0   B = 4da6db3303e0
[=]   Sector 11 : A = ad44d2c7b55c   B = 37355580af8a
[=]   Sector 12 : A = f9aa7ada600d   B = 0ab78eae4708
[=]   Sector 13 : A = 9743553d9ead   B = 96947eab2af6
[=]   Sector 14 : A = ae19cd0a6e4e   B = 1be13ff8cda1
[=]   Sector 15 : A = a12932a626a7   B = 6715bbd7a562

...all of which is required

@iceman1001 iceman1001 merged commit c3571f1 into RfidResearchGroup:master Nov 22, 2024
12 checks passed
@iceman1001
Copy link
Collaborator

One of these days the integration will become better.

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.

2 participants