GithubHelp home page GithubHelp logo

ntdissector's Introduction

ntdissector

Ntdissector is a tool for parsing records of an NTDS database. Records are dumped in JSON format and can be filtered by object class.

By providing the SYSTEM hive or the right bootkey in hex format, encryption layers will be removed from the right columns.

More info in the following blogposts :

Installation

$ python3 -m pip install [--user] ./ntdissector

Usage

$ ntdissector -h                           
usage: ntdissector [-h] [-system SYSTEM] -ntds NTDS [-bootKey BOOTKEY] [-outputdir OUTPUTDIR] [-cachedir CACHEDIR] [-f FILTER] [-filters] [-limit LIMIT] [-cn] [-debug] [-verbose]
                      [-silent] [-ts] [-w WORKERS] [-nocache] [-dryRun]

NTDS Dissector

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         Display version info

Files:
  -system SYSTEM        SYSTEM hive to parse
  -ntds NTDS            NTDS file to parse
  -bootKey BOOTKEY      Force bootkey (skips the SYSTEM hive parsing)
  -outputdir OUTPUTDIR  Base output directory
                        (Default: /home/mehdie/.ntdissector/out/)
  -cachedir CACHEDIR    Base cache directory
                        (Default: /home/mehdie/.ntdissector/.cache/)

Filter options:
  -f FILTER, --filter FILTER
                        Filter object classes, 'all' to dump everything.
                        Use -filters to get a list of available object classes
                        Default: [user, secret, group, domainDNS].
  -filters              Print all classes available for filtering
  -limit LIMIT          Dump a specific number of objects then stop

Display options:
  -cn                   Toggle CN naming output (Default: LDAP naming)
  -debug                Turn DEBUG output ON
  -verbose              Turn INFO output ON
  -silent               Silent
  -ts                   Adds a timestamp to every logging output
  -keepDel              Keeps deleted records

Miscellaneous:
  -w WORKERS, -workers WORKERS
                        Number of workers (default: 5)
  -nocache              Disable cache
  -dryRun               Launch in dry run mode, ignores cache files

Examples:

> Dump users, groups and domain backup keys
$ ntdissector -ntds NTDS.dit -system SYSTEM -outputdir /tmp/ntdissector/ -ts -f user,group,secret

> Dump all records from the database
$ ntdissector -ntds NTDS.dit -system SYSTEM -outputdir /tmp/ntdissector/ -ts -f all

> Dump user objects and include deleted records
$ ntdissector -ntds NTDS.dit -system SYSTEM -outputdir /tmp/ntdissector/ -ts -f user -keepDel

> List object classes available to filter records
$ ntdissector -ntds NTDS.dit  -filters

At first run, the tool builds automatically a schema of object classes and attributes. Both schemas are cached locally to skip this step on the next run.

Default directories:

  • Cache files : ~/.ntdissector/.cache/[hash]
  • Output directory : ~/.ntdissector/out/[hash]/[object-class-name].json

ntdissector's People

Contributors

idem-s1n avatar hypn0s avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.