-
Notifications
You must be signed in to change notification settings - Fork 4
Add NTDS parser #8
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8 +/- ##
==========================================
- Coverage 82.05% 0.00% -82.06%
==========================================
Files 31 146 +115
Lines 2352 3881 +1529
==========================================
- Hits 1930 0 -1930
- Misses 422 3881 +3459
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f106d7e to
d5b7986
Compare
0150196 to
0d319e3
Compare
|
Okay I think I've fueled my addiction enough for now. In my opinion we only need to add a few more unit tests based on GOAD (I already added a test file) and perhaps replace the existing tests with the GOAD file. Most of everything "basic" (and a little more) is already done. We can work on improving the "useful objects" later, as well as the additional tooling. The only part I'm a little divided on are the bajillion source files for all objects, but I guess there's not really a nicer way to do that. |
|
Huge thanks to @Schamper for improving, extending and refactoring the code a lot; you went way deeper into the cruel depths of NTDS.dit than I originally did 😄. I think that as of now, the code is very much in a version 1.0 state and ready to be reviewed. |
CodSpeed Performance ReportCongrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
dissect/database/ese/ntds/objects/msauthz_centralaccessrules.py
Outdated
Show resolved
Hide resolved
dissect/database/ese/ntds/objects/msds_passwordsettingscontainer.py
Outdated
Show resolved
Hide resolved
| assert isinstance(domain_admins, Group) | ||
| assert isinstance(domain_users, Group) | ||
|
|
||
| shame = next(goad.search(sAMAccountName="cersei.lannister")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗣️🔔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update return types of the root_domain and pek in ntds.py. Will ack afterwards.
Adding a parser for the New Technology Directory Services Directory Information Tree (NTDS.dit) file, present on Windows Domain Controllers. This type of ESE database holds information related to an Active Directory environment.
Although multiple people have contributed to this tool within Fox-IT over the years, special acknowledgement goes to colleagues @Schamper and Aman Asarfi, whose work and research were invaluable. Performing in-depth investigation of the file format mainly comes from their end, and this pull request mainly puts all the code and knowledge gathered over the years into a proper Dissect-compatible format.
Several features include:
ntds.users()ntds.query("(objectClass=user)")Still work in progress:
NTDSclass that outputs data in Bloodhound-supported format. Within Fox this goes by the namefoxhound. This tool can be added later on as well in a separate pull request.Domainobject, and more functionality related to checking whether objects are related to each other. For example, a function where you could callObject.has_priv_over(obj2, GENERIC_ALL).Related to fox-it/dissect.target#1348