-
Notifications
You must be signed in to change notification settings - Fork 12
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
Reading NTDS.DIT exhibits various problems #21
Comments
Thanks for reporting this. The reason it is not working well is because the Libesedb appears to work with this sample but the code for that library is quite difficult to follow and poorly documented so it might take a while to understand what it is actually doing to extract the long values. |
Looking further into it I discovered that Microsoft has recently published the source code for ESE here https://github.com/microsoft/Extensible-Storage-Engine/ which makes it a lot easier to understand as we dont need to reverse engineer the format any more. While libesedb has come a long way with reversing the format by looking at the source code there are a number of things missed. We probably should rebase this project on the Micorosft source code now that it is available (ie name the variables same as the MS source). I will spend some time reading the source code to see if we can figure it out. |
Should be fixed by #22 at head. Please test if you have the time |
Brilliant, reading long values works as intended here now. Do you want to keep this open about the multivalue fields only reading the first value, or should I make a new issue just for that? Thanks for the fix so far - impressed by your speed :-) |
So there are a couple of things to do still -
So it would be nice to implement those additional features but I dont have a sample that I can test it with. I guess we could create a sample db with the API but it seems pointless if we dont have solid forensic use cases for these features maybe the investment is not worth it? |
Most of the records in the NTDS.DIT I sent to you should have multiple values in the ATTc0 fields in the datatable table |
Reading a recent NTDS.DIT dump has surfaced several problems in the otherwise brilliant library you've created. Not sure how best to report this, but I'm attaching a lab dump of GOAD from Orange Cybersecurity which doesn't contain any secrets, and my observations from it.
The dump was made using NTDSUTIL / activate instance ntds / ifm / create full c:\temp - so there shouldn't be any DB corruption or similar problems with it.
Dumping sd_table there are multiple rows where the actual "sd_value" is incorrect, it's returned as 4 bytes not the entire data. Here is an example using ESEDatabaseView to show record 72 and 78 - using go-ese record 72 is returned correctly but the sd_value of record 78 is returned as "24000000".
I also suspect that some records are returned with corrupted sd_value, as I can not parse them as security descriptors, but I haven't had time to dive deeper into this.
Dumping datatable it shows that all ATTn fields are marked a multivalue (8), but almost all of what is returned using go-ese are not slices, just singular values. I found this as the ATTc0 attribute should return multiple integer values in most cases.
ntds.zip
The text was updated successfully, but these errors were encountered: