forked from p15670423/monkey
Agent: Log and report exploitation attempts from PowerShellExploiter
This commit is contained in:
parent
8209fa55df
commit
a2bdc69388
|
@ -53,9 +53,20 @@ class PowerShellExploiter(HostExploiter):
|
||||||
for username, password in credentials:
|
for username, password in credentials:
|
||||||
try:
|
try:
|
||||||
client = self._authenticate(username, password)
|
client = self._authenticate(username, password)
|
||||||
|
|
||||||
|
LOG.info(
|
||||||
|
"Successfully logged into {self.host.ip_addr} using Powershell. User: "
|
||||||
|
"{username}"
|
||||||
|
)
|
||||||
|
self.report_login_attempt(True, username, password)
|
||||||
|
|
||||||
return client
|
return client
|
||||||
except Exception:
|
except Exception as ex: # noqa: F841
|
||||||
pass
|
LOG.debug(
|
||||||
|
"Error logging into {self.host.ip_addr} using Powershell. User: "
|
||||||
|
"{username}, Error: {ex}"
|
||||||
|
)
|
||||||
|
self.report_login_attempt(False, username, password)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue