GithubHelp home page GithubHelp logo

android_hid's Introduction

android_hid

Use Android as Rubber Ducky against targeted Android device or PC

HID attack using Android

Using Android as Rubber Ducky against Android or Windows. This is not a new technique, just a demo how to perform HID attack using Android instead of rubber ducky. For targeted Android device it is not necessary to be rooted, have ADB/USB debugging enabled and device authorized, since attacker's smartphone behaves as connected keyboard.

hid_attack - script contains customized commands that are executed (typed) against targeted Android device hid_pc - script contains customized commands that are executed (typed) against targeted Windows 10

How to prevent this happening on Android

  1. charge you smartphone using you own adapter
  2. use none trivial PIN or password lockscreen protection
  3. use mobile security software that will detect and prevent from launching payloads

How to prevent this happening on PC

  1. Don't let anyone charge their smartphones in your PC
  2. Use security software that will detect Metasploit payload
  3. USB condom should help

PoC

Android: https://youtu.be/aOWr6rWhsIs
PC: https://youtu.be/PJbqZm73MOc

Prerequisites

  • rooted Android with HID kernel support (e.g. NetHunter ROM)
  • OTG cable

Video Tutorial using NetHunter

Watch the video In the video was used "part1/msf_install" PoC script. Tested payload is removed.

Video Tutorial without using NetHunter

Watch the video USB Gadget Tool: https://github.com/tejado/android-usb-gadget
HID gadgets: https://github.com/pelya/android-keyboard-gadget/tree/master/hid-gadget-test
For easy access, I copied USB Gadget Tool and HID gadget to https://github.com/androidmalware/android_hid/tree/main/part2

Script info

This is custom script, which might not work on your testing case scenario. Because of that, you must play around with pressed keys that are sent to targeted device. Website with my testing payload is not active anymore. List of all possible keys can be found on the link below.

Execute command

bash hid_attack bash hid_pc

How to flash custom ROM with HID support

https://github.com/pelya/android-keyboard-gadget

Brute-force pin using Android as HID

https://github.com/urbanadventurer/Android-PIN-Bruteforce

List of all keys

https://github.com/anbud/DroidDucky/blob/master/droidducky.sh

android_hid's People

Contributors

androidmalware 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android_hid's Issues

Permission for Contribution

Hi, I want to contribute to this repository, I have fixed some of the typos in README.md file. But I am having a permission denied issue and unable to push the code to a new branch in your repository. Please grant me access to your repository so that I can open PR.

image

How the msf_install script works?

The script is applied to a Samsung Galaxy S8 with a 4-digit pin code. Used by nethanter(nexus 6p). The first number presses are skipped. The last 2 digits are typed and the OK button is pressed. Further the script does not fulfill. What parameters of the script need to be changed for the full operation of the brute.

Question about waiting time on wrong PIN

How this works? I mean, Androdi has a basic security that is when wrong PIN/Pattern entered, we got to wait 30 seconds to enter next then 30 seconds for each wrong try after that. How is this method gonna get over it I wonder?

Use pc to run HID script.

Hi, shall we use a normal Linux machine to do HID attack instead of using nethunter phone?
Literally am asking, How to convert a Linux machine to a rubber ducky?

Twitter

Ined. Hack twitter bro ❤️

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.