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

load_rsa_private_numbers() missing 1 required positional argument: 'unsafe_skip_rsa_key_validation' #138

Open
psyray opened this issue Nov 15, 2023 · 1 comment

Comments

@psyray
Copy link

psyray commented Nov 15, 2023

Hi,

When trying to decrypt Master Key with Domain PVK I have the following error

Traceback (most recent call last):
  File "/path/bin/pypykatz", line 8, in <module>
    sys.exit(main())
  File "/path/lib/python3.10/site-packages/pypykatz/__main__.py", line 89, in main
    helper.execute(args)
  File "/path/lib/python3.10/site-packages/pypykatz/dpapi/cmdhelper.py", line 151, in execute
    self.run(args)
  File "/path/lib/python3.10/site-packages/pypykatz/dpapi/cmdhelper.py", line 217, in run
    dpapi.decrypt_masterkey_file_with_pvk(args.masterkeyfile, args.pvkfile)
  File "/path/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 354, in decrypt_masterkey_file_with_pvk
    privkey = PVKFile.from_file(pvkfile).get_key()
  File "/path/lib/python3.10/site-packages/winacl/dtyp/wcee/pvkfile.py", line 72, in get_key
    return RSAPrivateKeyBlob.from_bytes(self.keyblob).get_key()
  File "/path/lib/python3.10/site-packages/winacl/dtyp/wcee/rsaprivkey.py", line 52, in get_key
    return default_backend().load_rsa_private_numbers(numbers)
TypeError: Backend.load_rsa_private_numbers() missing 1 required positional argument: 'unsafe_skip_rsa_key_validation'

My command is

pypykatz dpapi masterkeypvk AppData/Roaming/Microsoft/Protect/S-1-5-21-xxx-xxx-xxx-500/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx ntds_capi_xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx.pvk

Can't identify if problem comes from pypykatz or winacl

Do you have a solution ?

@skelsec
Copy link
Owner

skelsec commented Jan 22, 2024

I don't have a solution as I

  1. Can't reproduce the issue
  2. Checking the documentation on load_rsa_private_numbers here doesn't mention any required arguments besides that supplied.

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

No branches or pull requests

2 participants