High-level view
Traveler consists of two Nim binaries living on different but coordinated systems:
-
Leymano (Sender – Linux/WSL2)
- OS: Linux / WSL2 (for example, Kali).
- Reads the raw shellcode file
payload.bin. - Generates a 1-byte session key and XOR-encrypts the entire buffer in memory.
- Opens an
AF_VSOCKsocket targetingCID 2(Windows host) and the agreed port (5005by default). - Sends: key (1 byte) → size (4 bytes) → encrypted stream.
-
Anchor (Receiver – Windows)
- OS: Windows 10/11 with WSL2 / Hyper-V.
- Discovers the active WSL VM GUID by running
hcsdiag listand applying a regex to its output. - Builds a service GUID from the port (
makeServiceGUID) and registers it at:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\GuestCommunicationServices\<ServiceGUID>. - Opens an
AF_HYPERVsocket and binds using the WSLVmIdand the computedServiceId. - Listens for a single connection, receives the stream, decrypts it, and executes the payload via callback.
Data flow
- Payload preparation on Linux (
payload.binin raw format). - Encryption and send with Leymano:
- Random
sessionKey. xorData(payload, sessionKey).- Send key, size, and encrypted buffer over AF_VSOCK.
- Random
- Reception and decryption with Anchor:
- Read key and size from the AF_HYPERV socket.
- Reserve RW memory with
VirtualAlloc. - Receive the encrypted stream into that buffer.
- XOR loop to decrypt in place.
- Switch region to RX via
VirtualProtect.
- Indirect execution:
- Cast the shellcode pointer to the callback type expected by
EnumSystemLocalesA. - Call the API, which in turn invokes the shellcode as if it were a locale enumeration routine.
- Cast the shellcode pointer to the callback type expected by
High-level diagram
flowchart LR
subgraph Guest [Linux / WSL2]
L[Leymano<br/>Sender] -->|"Key + size + encrypted stream"| VS[AF_VSOCK]
end
VS -->|"Hypervisor internal traffic"| HV[AF_HYPERV / VM Bus]
subgraph Host [Windows]
HV --> A[Anchor<br/>Receiver]
A -->|"In-place decryption"| MEM[RX buffer]
MEM -->|"EnumSystemLocalesA callback"| SC[Shellcode]
end