guardicore / monkey

Infection Monkey - An open-source adversary emulation platform
https://www.guardicore.com/infectionmonkey/
GNU General Public License v3.0
6.67k stars 785 forks source link

SMB exploiter errors #2490

Closed VakarisZ closed 1 year ago

VakarisZ commented 2 years ago

Describe the bug

SMB exploiter throws errors when no credentials are configured.

The logic of SMB exploiter is flawed, because line 166 is:

return remote_full_path, SelectedCredentials(user, password, lm_hash, ntlm_hash), timestamp

But the user, password, lm_hash can be undefined.

Solution

Fix the logic. Maybe don't return the credentials at all, only set them in self.successful_credentials?

mssalvatore commented 1 year ago

Duplicate of #2599