Exemple #1
0
 def run_backup_commands(self, resp, url, dest_path, http_path):
     """
     If you need multiple commands for the same os you can override this method to add backup commands
     :param resp: Response from base command
     :param url: Vulnerable url
     :param dest_path: Where to upload monkey
     :param http_path: Where to download monkey from
     :return: Command's response (same response if backup command is not needed)
     """
     if not isinstance(resp, bool) and POWERSHELL_NOT_FOUND in resp:
         LOG.info(
             "Powershell not found in host. Using bitsadmin to download.")
         backup_command = BITSADMIN_CMDLINE_HTTP % {
             'monkey_path': dest_path,
             'http_path': http_path
         }
         T1197Telem(ScanStatus.USED, self.host, BITS_UPLOAD_STRING).send()
         resp = self.exploit(url, backup_command)
     return resp
Exemple #2
0
 def upload_monkey(self, url, commands=None):
     result = super(ElasticGroovyExploiter,
                    self).upload_monkey(url, commands)
     if "windows" in self.host.os["type"] and result:
         T1197Telem(ScanStatus.USED, self.host, BITS_UPLOAD_STRING).send()
     return result
Exemple #3
0
def T1197_telem_test_instance():
    return T1197Telem(STATUS, MACHINE, USAGE_STR)