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

Error while parsing NTDS in local : Unpacked data doesn't match constant value 'b'\\x00\\x00\\x00\\x00'' should be ''regf'' #1345

Closed
skidrow88 opened this issue Jun 14, 2022 · 1 comment

Comments

@skidrow88
Copy link

Configuration

impacket version: 0.10.0
Python version: python3.9

Debug Output With Command String

secretsdump.py -system SYSTEM -ntds NTDS.dit LOCAL

➜  Active Directory secretsdump.py -debug -system SYSTEM -ntds NTDS.dit LOCAL
Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation

[+] Impacket Library Installation Path: /usr/local/lib/python3.9/site-packages/impacket
Traceback (most recent call last):
  File "/usr/local/bin/secretsdump.py", line 130, in dump
    bootKey = localOperations.getBootKey()
  File "/usr/local/lib/python3.9/site-packages/impacket/examples/secretsdump.py", line 2698, in getBootKey
    winreg = winregistry.Registry(self.__systemHive, False)
  File "/usr/local/lib/python3.9/site-packages/impacket/winregistry.py", line 170, in __init__
    self.__regf = REG_REGF(data)
  File "/usr/local/lib/python3.9/site-packages/impacket/structure.py", line 87, in __init__
    self.fromString(data)
  File "/usr/local/lib/python3.9/site-packages/impacket/structure.py", line 152, in fromString
    self[field[0]] = self.unpack(field[1], data[:size], dataClassOrCode = dataClassOrCode, field = field[0])
  File "/usr/local/lib/python3.9/site-packages/impacket/structure.py", line 315, in unpack
    raise Exception("Unpacked data doesn't match constant value '%r' should be '%r'" % (data, answer))
Exception: ("Unpacked data doesn't match constant value 'b'\\x00\\x00\\x00\\x00'' should be ''regf''", 'When unpacking field \'Magic | "regf | b\'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\x00\\x00\\x00\\x00\\x00\\x00\\...........................x00\\x00\\x00\\x00\\x00\'[:4]\'')
[*] Cleaning up...

Additional context

  • NTDS was grab with ntdsutil.exe
  • The domaine name is customer-paris.fr
  • The NetBIOS name is DOMAINE
  • The functional level is Windows2016domaine
@skidrow88
Copy link
Author

Problem resolved. The files were corrupted

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

1 participant