Skip to content

Add NTDS Group Policies#38

Merged
Schamper merged 4 commits intofox-it:mainfrom
Matthijsy:ntds-group-policies
Feb 19, 2026
Merged

Add NTDS Group Policies#38
Schamper merged 4 commits intofox-it:mainfrom
Matthijsy:ntds-group-policies

Conversation

@Matthijsy
Copy link
Contributor

This PR adds a query to obtain Group Policies from the NTDS

This works correctly on the GOAD dataset, however I dot get some issues with an NTDS I cannot share unfortunately. It gives the following error while processing:

  File "/Users/user/repos/dissect/dissect.database/dissect/database/ese/cursor.py", line 49, in _node
    node = self._secondary.search(node.data.tobytes(), exact=True)
  File "/Users/user/repos/dissect/dissect.database/dissect/database/ese/btree.py", line 131, in search
    raise KeyNotFoundError(f"Can't find key: {key}")
dissect.database.ese.exception.KeyNotFoundError: Can't find key: b'\x7f\x80\x00\x89|'

This results in 28 GPOs missing in that case.

Another NTDS which is on VT gives the following error:

  File "/Users/user/repos/dissect/dissect.database/dissect/database/ese/ntds/query.py", line 49, in _process_query
    yield from self._query_database(filter)
  File "/Users/user/repos/dissect/dissect.database/dissect/database/ese/ntds/query.py", line 76, in _query_database
    raise ValueError(f"Index for attribute {schema.column!r} not found in the NTDS database")
ValueError: Index for attribute 'ATTc0' not found in the NTDS database

@Schamper do you have any idea what we could to debug this?

@Schamper
Copy link
Member

This works correctly on the GOAD dataset, however I dot get some issues with an NTDS I cannot share unfortunately. It gives the following error while processing:

Is it a clean copy, or do you have separate transaction log files available? Unfortunately we don't support that yet (#18), so it's possible this breaks on an index search in a dirty database. Unfortunately without having access to a database to interact with, this is basically impossible for me to debug remotely.

Another NTDS which is on VT gives the following error:

I'll look into this one!

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (adb327d) to head (5218dea).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
dissect/database/ese/ntds/ntds.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main     #38   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        150     150           
  Lines       4123    4125    +2     
=====================================
- Misses      4123    4125    +2     
Flag Coverage Δ
unittests 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Schamper Schamper merged commit 658aa54 into fox-it:main Feb 19, 2026
21 checks passed
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 19, 2026

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing Matthijsy:ntds-group-policies (5218dea) with main (adb327d)

Open in CodSpeed

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

Successfully merging this pull request may close these issues.

2 participants