红蓝攻防
点击放大


<a href="
<img src="assets/images/logo.png" width="160" alt="TapDucky icon" align="left" style="border: solid 1px #ddd;"/>
</a>
<div>
<h3 style="font-size: 2.2rem; letter-spacing: 1px;">TapDucky - Android USB HID Keystroke Injector</h3>
<p style="font-size: 1.15rem; font-weight: 500;"> <strong>Open-source DuckyScript runner for rooted Android with USB Gadget (ConfigFS) support</strong><br> <strong>TapDucky</strong> lets you create, customize, schedule, and run DuckyScript on Android by emulating a USB keyboard, mouse, or composite HID device for authorized testing and automation. It includes payload parameterization, multiple scheduler triggers, execution logs, and a GitHub-backed payload library with automatic DuckyScript and optional Digispark <code>.ino</code> con.</p>
<di="center">

![Issues]()
![Pull Requests]()
![Android ]()

<di="display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:center;">
<a href=" style="display:inline-flex; align-items:center;">
<img src="
alt="Get it on F-Droid"
style="display:block; height:102px; width:auto;">
</a>
<a href=" style="display:inline-flex; align-items:center;">
<img src="assets/images/get-it-on-github.png" alt="GitHub Releases" style="display:block; height:100px; width:auto;">
</a>
</div>
</div>
.ino sketches when possible.Note: A rooted device with Linux USB gadget (ConfigFS) support is required. Use a physical device as emulators cannot HID behavior.
org.kaijinlab.tap_ducky/gadgetcheckRoot, checkSupport, listUdcs, getStatus, getDiagnosticsgetKeyboardLayouts, setKeyboardLayout, resol, setKeyboardLayoutByCodeacti, deactivate, panicStop, retryOpenHidWritersexecuteDuckyScript(script, delayMultiplier, executionId?), cancelExecution(executionId)testKeyboardKey(label), testMouseMove(dx,dy,wheel,buttons), testCtrlAltDel()org.kaijinlab.tap_ducky/gadget_logsorg.kaijinlab.tap_ducky/gadget_statusorg.kaijinlab.tap_ducky/gadget_execTapDucky includes a full DuckyScript-style engine implemented natively on Android (Kotlin) with expression e and structured control flow. It supports keyboard, mouse/pointer, timing, /defines, functions, and simple randomness utilities.
Supported command families (high level):
Notes on behavior:
Mouse/Pointer syntax quick reference:
Capability matrix (selected):
| Feature group | Sub-feature | Supported | Notes |
|---|---|:---:|---|
| Text/timing | STRING / STRINGLN / STRING_DELAY | ✅ | Per-char timing for STRING_DELAY; global delay |
| Text blocks | STRING/STRINGLN blocks | ✅ | Multiline blocks terminated by END_STRING / END_STRINGLN |
| Timing | DELAY, DEFAULTDELAY/DEFAULT_DELAY | ✅ | DEFAULT applies after each executable step |
| Repeat | REPEAT N | ✅ | Duplicates the previous command N times |
| Comments | REM, REM_BLOCK/END_REM | ✅ | Non-executable |
| Modifiers | GUI/WIN, CTRL, ALT, SHIFT combos | ✅ | Parsed as a single combo step |
| Key commands | Explicit key names | ✅ | All keys/aliases listed in “Explicit key and alias support” |
| Hold/release | HOLD, RELEASE | ✅ | Tracks held set; pairs with INJECT_MOD |
| Explicit key state | KEYDOWN, KEYUP | ✅ | Direct key down/up control for combos and held keys |
| Injected modifiers | INJECT_MOD | ✅ | Persisting modifier mask until cleared |
| Mouse/pointer | MOUSE/POINTER CLICK/HOLD/DRAG/MO | ✅ | Relati with repeat counts |
| Control flow | IF/ELSE IF/ELSE/END_IF | ✅ | Nested chains supported |
| Loops | WHILE/END_WHILE | ✅ | Condition e with expression engine |
| Functions | FUNCTION/END_FUNCTION, CALL/CALL_FUNCTION, RETURN | ✅ | Supports arguments; RETURN sets $? |
| | VAR $name = expr | ✅ | Integers, 0..65535 stored; $? is exit code; scoped locals |
| Defines | DEFINE NAME value | ✅ | Simple text substitution before parse |
| Error handling | TRY/CATCH/END_TRY | ✅ | Reco failures without aborting script |
| Waits | WAIT_FOR, SLEEP_UNTIL | ✅ | Host/UDC/keyboard readiness + timed waits |
| Random | RANDOM_* generators | ✅ | Lower/upper/letter/number/special/char |
| Attack modes | ATTACKMODE | ⚠️ | Parsed, but no backend handler is implemented yet |
Note: The surfaces syntax issues, unknown commands, and structure errors before execution. See the Payload Editor for in-UI results with line numbers.
Execution timing highlights:
Note: In addition to the listed aliases, TapDucky accepts snake_case forms like down_arrow, up_arrow, left_arrow, right_arrow, page_up, page_down, print_screen, scroll_lock, num_lock, caps_lock, string_delay, default_delay, etc. These are normalized internally.
1. Download the latest APK from Releases:
<a href=" style="display:inline-flex;">
<img src="assets/images/get-it-on-github.png" alt="GitHub Releases" style="display:block; height:28px; width:auto;">
</a>
2. Install the application:
- Enable installation from unknown sources if needed.
- Grant root when prompted by your root manager.
3. Launch and Configure:
- Open TapDucky.
- In Ad Settings, choose/adjust HID profile (Keyboard/Mouse/Composite), VID/PID, and keyboard layout.
- Arm a session and run a test command from Execute.
owner/repo or full URL with branch/path). <img width="180" height="400" alt="TapDucky app screenshot 1" src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" />
<img width="180" height="400" alt="TapDucky app screenshot 2" src="fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" />
<img width="180" height="400" alt="TapDucky app screenshot 3" src="fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" />
<img width="180" height="400" alt="TapDucky app screenshot 4" src="fastlane/metadata/android/en-US/images/phoneScreenshots/4.png" />
<img width="180" height="400" alt="TapDucky app screenshot 5" src="fastlane/metadata/android/en-US/images/phoneScreenshots/5.png" />
<img width="180" height="400" alt="TapDucky app screenshot 6" src="fastlane/metadata/android/en-US/images/phoneScreenshots/6.png" />
<img width="180" height="400" alt="TapDucky app screenshot 7" src="fastlane/metadata/android/en-US/images/phoneScreenshots/7.png" />
<img width="180" height="400" alt="TapDucky app screenshot 8" src="fastlane/metadata/android/en-US/images/phoneScreenshots/8.png" />
<br><br><br>
<img src="fastlane/metadata/android/en-US/images/featureGraphic.png" alt="TapDucky Banner App" style="display:block; height:260px; width:auto;">
Contributions are welcome! If you'd like to help impro:
1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Submit a pull request with your proposed changes.
This project is licensed under the GNU GPLv3 License. See LICENSE.
If you encounter any issues or ha, please open an issue on the GitHub repository or contact the maintainer.
| App | What it does |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| IR Blaster | Control and test infrared functionality for compatible devices. |
| USBDevInfo | Inspect USB device details and behavior to understand what's connected. |
| GadgetFS | Experiment with USB gadget functionality (hardware‑adjacent, low‑level). |
| TapDucky | A security/testing tool for controlled keystroke injection workflows. |
| HIDWiggle | A mouse jiggler built with USB gadget functionalities. |
| AKTune | Adapti kernel auto‑tuner for CPU/GPU/scheduler/memory/I/O. |
开发语言:Dart
Star 数:177
该项目属于红蓝攻防方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Turns any rooted phone into the legendary USB Rubber Ducky. Android USB HID Keystroke Injector展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | tap-ducky - Turns any rooted phone into the legendary USB Rubb |
| 所属分类 | 红蓝攻防 |
| 发布作者 | admin |
| 发布时间 | 2026-10-06 00:47:58 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 474 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |