island: Check if credential in exploit telemetry is `None` before processing it

This commit is contained in:
Shreya Malviya 2021-08-25 19:31:36 +05:30
parent 1da79f78bf
commit 876cdbeffa
1 changed files with 3 additions and 2 deletions

View File

@ -74,5 +74,6 @@ def encrypt_exploit_creds(telemetry_json):
for i in range(len(attempts)):
for field in ["password", "lm_hash", "ntlm_hash"]:
credential = attempts[i][field]
if len(credential) > 0:
attempts[i][field] = get_encryptor().enc(credential)
if credential: # PowerShell exploiter's telem may have `None` here
if len(credential) > 0:
attempts[i][field] = get_encryptor().enc(credential)