Android_Hid : Use Android As Rubber Ducky Against Another Android Device

Android_Hid is a tool used by 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?

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

How to prevent this happening on PC?

  • Don’t let anyone charge their smartphones in your PC
  • Use security software that will detect Metasploit payload
  • USB condom should help

PoC

Prerequisites

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

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

R K

Recent Posts

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

1 week ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

2 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

3 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

3 weeks ago

Rust BOFs – Unlocking New Potentials In Cobalt Strike

This took me like 4 days (+2 days for an update), but I got it…

3 weeks ago

MaLDAPtive – Pioneering LDAP SearchFilter Parsing And Security Framework

MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…

3 weeks ago