enumtaskscheduler.cna 856 B

1234567891011121314151617181920212223242526272829
  1. # author REDMED-X
  2. beacon_command_register(
  3. "enumtaskscheduler", "Enumerate and list all the scheduled tasks in the root folder.",
  4. "INFO:\nEnumerate and list all the scheduled tasks in the root folder.\n\n" .
  5. "ARGUMENTS:\n[hostName]: The FQDN of the remote host or \"\" for the current system.\n\n" .
  6. "USAGE:\nenumtaskscheduler <(optional) hostName>\n\n" .
  7. "EXAMPLES:\nenumtaskscheduler \nenumtaskscheduler DB01.example.local\n\n");
  8. alias enumtaskscheduler {
  9. $bid = $1;
  10. $host = $2;
  11. # Read in the right BOF file
  12. $handle = openf(script_resource("enumtaskscheduler.o"));
  13. $data = readb($handle, -1);
  14. closef($handle);
  15. $arg_data = bof_pack($bid, "Z", $host);
  16. blog($bid, "Tasked to enumerate scheduled tasks in the root folder..");
  17. beacon_inline_execute($bid, $data, "go", $arg_data);
  18. }