forked from p15670423/monkey
Agent: Report failed login attempts
This commit is contained in:
parent
74088c8143
commit
8eb3c94a94
|
@ -9,6 +9,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import tempfile
|
import tempfile
|
||||||
from binascii import unhexlify
|
from binascii import unhexlify
|
||||||
|
from time import time
|
||||||
from typing import Dict, List, Optional, Sequence, Tuple
|
from typing import Dict, List, Optional, Sequence, Tuple
|
||||||
|
|
||||||
import impacket
|
import impacket
|
||||||
|
@ -130,13 +131,18 @@ class ZerologonExploiter(HostExploiter):
|
||||||
|
|
||||||
# Try authenticating.
|
# Try authenticating.
|
||||||
for _ in interruptible_iter(range(0, self.MAX_ATTEMPTS), self.interrupt):
|
for _ in interruptible_iter(range(0, self.MAX_ATTEMPTS), self.interrupt):
|
||||||
|
timestamp = time()
|
||||||
try:
|
try:
|
||||||
rpc_con_auth_result = self._try_zero_authenticate(rpc_con)
|
rpc_con_auth_result = self._try_zero_authenticate(rpc_con)
|
||||||
if rpc_con_auth_result is not None:
|
if rpc_con_auth_result is not None:
|
||||||
return True, rpc_con_auth_result
|
return True, rpc_con_auth_result
|
||||||
|
|
||||||
|
error_message = "Failed to authenticate with domain controller"
|
||||||
|
self._publish_exploitation_event(timestamp, False, error_message=error_message)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
error_message = f"Error occured while authenticating to {self.host}: {err}"
|
error_message = f"Error occured while authenticating to {self.host}: {err}"
|
||||||
logger.info(error_message)
|
logger.info(error_message)
|
||||||
|
self._publish_exploitation_event(timestamp, False, error_message=error_message)
|
||||||
return False, None
|
return False, None
|
||||||
|
|
||||||
return False, None
|
return False, None
|
||||||
|
|
Loading…
Reference in New Issue