Add pass-the-hash for sambacry

This commit is contained in:
Itay Mizeretz 2017-09-27 17:23:23 +03:00
parent fe77fc833c
commit 7e3f420fe0
1 changed files with 4 additions and 3 deletions

View File

@ -161,13 +161,14 @@ class SambaCryExploiter(HostExploiter):
return writable_shares_creds_dict
def get_credentials_list(self):
user_password_pairs = self._config.get_exploit_user_password_pairs()
creds = self._config.get_exploit_user_password_or_hash_product()
# Add empty credentials for anonymous shares.
credentials_list = [{'username': '', 'password': '', 'lm_hash': '', 'ntlm_hash': ''}]
for user, password in user_password_pairs:
credentials_list.append({'username': user, 'password': password, 'lm_hash': '', 'ntlm_hash': ''})
for user, password, lm_hash, ntlm_hash in creds:
credentials_list.append(
{'username': user, 'password': password, 'lm_hash': lm_hash, 'ntlm_hash': ntlm_hash})
return credentials_list