ZeroTrace HID & Dongle
OS Detection
Make a payload react to whether it is plugged into Windows, macOS or Linux.
OS Detection
A ZeroTrace HID device can work out which operating system it has been plugged into, so a single payload can behave correctly across Windows, macOS and Linux instead of you writing three separate payloads.
How it works
You trigger detection with the osDetection command, or have the device detect on start-up. The result is then readable in your payload as the host state _@detectedOS:
osDetection
set os '_@detectedOS'
With that value in a variable, the payload can branch, for example open the right kind of terminal, or use the correct modifier key (Command on macOS, Control elsewhere). The terminal command already takes an OS argument (windows, linux or mac) for exactly this purpose.
What it recognises
Detection distinguishes the common desktop and mobile hosts a device is plugged into, including Windows, macOS and Linux. The detected OS is also shared with other devices over TraceNet, so a fleet view can show what each device is attached to.
OS detection tells you which host you are on; the keyboard layout tells the device which characters to send. Set both to match the host for a payload that types the right thing everywhere.