forked from p15670423/monkey
Agent: Wrap log4shell exploiters in a try/except
This commit is contained in:
parent
6b934d6de5
commit
a9d735593c
|
@ -159,7 +159,13 @@ class Log4ShellExploiter(WebRCE):
|
||||||
]
|
]
|
||||||
for exploit in get_log4shell_service_exploiters():
|
for exploit in get_log4shell_service_exploiters():
|
||||||
for port in open_ports:
|
for port in open_ports:
|
||||||
|
try:
|
||||||
exploit.trigger_exploit(self._build_ldap_payload(), self.host, port)
|
exploit.trigger_exploit(self._build_ldap_payload(), self.host, port)
|
||||||
|
except Exception as ex:
|
||||||
|
logger.warning(
|
||||||
|
"An error occurred while attempting to exploit log4shell on a "
|
||||||
|
f"potential {exploit.service_name} service: {ex}"
|
||||||
|
)
|
||||||
|
|
||||||
# Wait for request
|
# Wait for request
|
||||||
sleep(Log4ShellExploiter.REQUEST_TO_VICTIM_TIME)
|
sleep(Log4ShellExploiter.REQUEST_TO_VICTIM_TIME)
|
||||||
|
|
Loading…
Reference in New Issue