Agent: Send ExploiterResultData from Hadoop exploiter

This commit is contained in:
Shreya Malviya 2022-02-23 16:33:00 +05:30
parent 90646a6ff9
commit 57eca553a7
1 changed files with 6 additions and 4 deletions

View File

@ -41,18 +41,20 @@ 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:
return False
return self.exploit_result
paths = self.get_monkey_paths()
if not paths:
return False
return self.exploit_result
http_path, http_thread = HTTPTools.create_locked_transfer(self.host, paths["src_path"])
command = self._build_command(paths["dest_path"], http_path)
if not self.exploit(self.vulnerable_urls[0], command):
return False
return self.exploit_result
http_thread.join(self.DOWNLOAD_TIMEOUT)
http_thread.stop()
self.add_executed_cmd(command)
return True
self.exploit_result.exploitation_success = True
self.exploit_result.propagation_success = True
return self.exploit_result
def exploit(self, url, command):
# Get the newly created application id