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

port cve-2021-34600 poc, fix device desfire aes crypto #1594

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Feb 9, 2022

  1. make style

    y-x41 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    c53dc84 View commit details
    Browse the repository at this point in the history
  2. Fix device desfire AES en-/decryption

    This commit fixes `mifare_cypher_single_block()` when used with `T_AES`.
    `mifare_cypher_single_block()` essentially re-implements CBC mode for
    all used ciphers by XOR-ing the IV with the data either before
    encryption or after decryption and using AES in ECB mode. However, for
    AES encryption `mbedtls_aes_crypt_cbc()` was then called to perform the
    en-/decryption operation, which then also XOR-ed the IV with the data,
    all of which resulted in the wrong en-/decryption of the data. This is
    fixed by replacing the call to `mbedtls_aes_crypt_cbc()` with a call to
    `mbedtls_aes_crypt_ecb()`.
    y-x41 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    611dbbc View commit details
    Browse the repository at this point in the history
  3. Port CVE-2021-34600 poc

    Add support for performing the attack on systems affected by
    CVE-2021-34600. For this, this commit adds the commands `hf mfdesbrute
    get_challenge` and `hf mfdesbrute open_door`.
    y-x41 committed Feb 9, 2022
    Configuration menu
    Copy the full SHA
    5fd35c5 View commit details
    Browse the repository at this point in the history