fortra / impacket

Impacket is a collection of Python classes for working with network protocols.
https://www.coresecurity.com
Other
12.98k stars 3.49k forks source link

feat: add principalType as new option #1749

Open DevSpork opened 1 month ago

DevSpork commented 1 month ago

This PR adds support for providing the principal type in the request. Currently the script is hardcoded to use NT_PRINCIPAL. However it can be useful to specify the type for some kind of attacks. The new parameter is principalType and it can be one of the values from the PrincipalNameType enum.

Usage is as follows:

python3 examples/getTGT.py domain.com/user:password -dc-ip <IP> -principalType NT_ENTERPRISE
DevSpork commented 1 month ago

I saw that there is a similar PR for the same thing I think this one has several advantages over #1748 . It directly uses the argparse primitives for parameter handling, and doesn't unnecessary, duplicate the principal enum in case it ever gets modified.