From a4f0b4a645fc9d1e42d9dab4a85c2377342ded95 Mon Sep 17 00:00:00 2001 From: Alvin Smith Date: Tue, 28 Nov 2023 09:02:56 +1300 Subject: [PATCH] Update: example/lookupsid.py with Kerberos auth option by adding '-k' --- examples/lookupsid.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/lookupsid.py b/examples/lookupsid.py index f82d67cae..40a7b1052 100755 --- a/examples/lookupsid.py +++ b/examples/lookupsid.py @@ -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) @@ -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: