Code Monkey home page Code Monkey logo

fakeusb's Introduction

FakeUSB - Make your own BadUSB device!

What is this?

This project was done for my university thesis about Cybersecurity. We needed a tool to test our USB Firewall (built using USBProxy and a BeagleBone Black).

This tool is based on USBProxy (and needs a BeagleBone Black), but instead of waiting for a real device on the "slave port", it emulates an USB device, which is described by its Descriptors (located into the config folder).

If you use a keyboard or a mouse, you can also make a script with some actions which will be ran when the fake device is connected and recognized by the host.

Basic example

fakeusb -a keyboard -d keyboard

Will run the keyboard script (located in the attack folder) using a fake keyboard device.

Available Devices

Current available devices are:

  • keyboard: emulates a keyboard
  • mouse: emulates a mouse
  • multimedia: emulates keyboard + mouse
  • mass-storage: emulates a mass storage device

Available Commands

Available commands for attack scripts are:

  • Keyboard
    • WRITE(EP) "string": writes the string string as if it has beed typed on the keyboard
    • PRESS_KEYS(EP) KEY1+KEY2+KEY3: simulates a keyboard shortcut (max 3 chars) (ex. ALT+F4 or CTRL+ALT+CANC)
  • Mouse
    • CLICK(EP) KEY: simulates a click of the key KEY on the mouse
    • MOVE(EP) X,Y: moves the pointer to X pixels horizontal and Y pixels vertical
    • MOVE_AND_CLICK(EP) KEY X,Y: simulates a drag & drop
  • Generic
    • DELAY(EP) TIME: waits TIME ms before sending the next command

EP is the IN endpoint which we want to use to send our commands.

Those commands can be used only with keyboards or mice. You can find some examples in the attack folder.

Other Info

  • You can see this tool in action in this video, while it tries to bypass our USB Firewall.
  • More info about Design and Implementations can be found in my thesis chapter (in Italian): link.
  • No, I won't do a documentation (in English) for this because I'm lazy.

fakeusb's People

Contributors

skazza94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.