Skip to content

Commit

Permalink
Update: example/lookupsid.py with Kerberos auth option by adding '-k'
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvin Smith committed Nov 27, 2023
1 parent e89ef34 commit a4f0b4a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/lookupsid.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,11 @@ def __bruteForce(self, rpctransport, maxRid):

group.add_argument('-hashes', action="store", metavar = "LMHASH:NTHASH", help='NTLM hashes, format is LMHASH:NTHASH')
group.add_argument('-no-pass', action="store_true", help='don\'t ask for password (useful when proxying through smbrelayx)')
group.add_argument('--use-kerberos', action="store_true", help='use kerberos auth instead')

group.add_argument('-k', action="store_true",
help='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')
if len(sys.argv)==1:
parser.print_help()
sys.exit(1)
Expand All @@ -193,7 +196,7 @@ def __bruteForce(self, rpctransport, maxRid):
if options.target_ip is None:
options.target_ip = remoteName

lookup = LSALookupSid(username, password, domain, int(options.port), options.hashes, options.domain_sids, options.use_kerberos, options.maxRid)
lookup = LSALookupSid(username, password, domain, int(options.port), options.hashes, options.domain_sids, options.k, options.maxRid)
try:
lookup.dump(remoteName, options.target_ip)
except:
Expand Down

0 comments on commit a4f0b4a

Please sign in to comment.