MichaelGrafnetter / DSInternals

Directory Services Internals (DSInternals) PowerShell Module and Framework
https://www.dsinternals.com
MIT License
1.62k stars 250 forks source link

Unable to find pekList column Id? #159

Closed TheUniquePaulSmith closed 1 year ago

TheUniquePaulSmith commented 1 year ago

Tried first the Get-ADDBAccount but was returning a null reference exception. So I tried debugging the solution. Seems my ntds.dit doesn't contain a columnId for pekList

image

Steps to reproduce:

  1. Running lab domain controller (Windows Server 2019 datacenter, version 1809 OS Build 17763.4252)
  2. Copied the ntds.dit file via ntdsutil with IFM
  3. Used Get-BookKey to retrieve bootkey value
  4. Created a sample console application using your project solution, that loads the database and tries to validate bootkey via DirectoryAgent.CheckBootKey(bootKey)

Wonderful project by the way!

MichaelGrafnetter commented 1 year ago

Hello @TheUniquePaulSmith , if this is happening in a lab environment, could you please attach the entire IFM backup as a ZIP file?

TheUniquePaulSmith commented 1 year ago

Sure, I've uploaded it to a storage account, and will DM you the SAS Key via Twitter. Even though it's a lab, I'd like to get the data private if possible.

MichaelGrafnetter commented 1 year ago

@TheUniquePaulSmith Thanks for sharing. Unfortunately, I was not able to replicate the issue, everything is working for me with the sample DB of yourson Windows 11. Does the DSInternals PowerShell module work on the development machine of yours (e.g. the Get-ADDBAccount -All -DBPath ...\ntds.dit -LogPath ...\NTDS -BootKey (Get-BootKey -SystemHiveFilePath ...\SYSTEM))? Could you please double-check that you provided the proper path to both the database file and to the transaction log directory (in case they differ)?

TheUniquePaulSmith commented 1 year ago

I should've checked the copy I sent you; the version I sent you works for me as well. I can't remember when I was first testing whether I selected Create RODC or Create Full from the IFM options. I suspect it was Create RODC because my plan is to test this with RODC data.

image

Here's a screenshot of the NTDS.dit that failed image

Let me know if you are interested in seeing that file, otherwise I can close this issue. Thank you!

MichaelGrafnetter commented 1 year ago

Ah, OK, RODCs are currently not supported.