Skip to content
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

Update GetUserSPNs.py (#1) #77

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/GetUserSPNs.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def __init__(self, username, password, user_domain, target_domain, cmdLineOption
self.__saveTGS = cmdLineOptions.save
self.__requestUser = cmdLineOptions.request_user
self.__stealth = cmdLineOptions.stealth
self.__rc4 = cmdLineOptions.rc4
if cmdLineOptions.hashes is not None:
self.__lmhash, self.__nthash = cmdLineOptions.hashes.split(':')

Expand Down Expand Up @@ -313,6 +314,9 @@ def run(self):
if self.__requestUser is not None:
searchFilter += '(sAMAccountName:=%s)' % self.__requestUser

if self.__rc4 is True:
searchFilter += '(!(msds-supportedencryptiontypes:1.2.840.113556.1.4.804:=24))'

searchFilter += ')'

try:
Expand Down Expand Up @@ -507,6 +511,7 @@ def request_multiple_TGSs(self, usernames):
help='Output filename to write ciphers in JtR/hashcat format. Auto selects -request')
parser.add_argument('-ts', action='store_true', help='Adds timestamp to every logging output.')
parser.add_argument('-debug', action='store_true', help='Turn DEBUG output ON')
parser.add_argument('-rc4', action='store_true', default=False, help='Only requests users who do not support AES (avoid MDI downgrade detection)')

group = parser.add_argument_group('authentication')

Expand Down