1

I've got a user running an application through the RDP / RemoteApp system.

I need to pass a message from a local app to another app running on the remote side. I control both of them completely. The message is a few bytes and I care about <1s latency. Completely async, there's no response.

How can I achieve that? I couldn't find any information about something like a custom side channel in RDP.

The options I know of are not great:

  • monitoring file changes on a mapped drive - that would be really slow... not sure that's even guaranteed to be reliable over RDP
  • fake USB/smartcard device redirect - that's a serious overkill and I really don't want to write drivers just for this

Is there anything much simpler? Ideally I'd love to just share a named pipe, but that doesn't seem possible.

viraptor
  • 33,322
  • 10
  • 107
  • 191

2 Answers2

1

The answer is RDS Virtual Channel apparently - it allows creating separate streams to a server on the remote side.

Docs: https://learn.microsoft.com/en-us/windows/win32/termserv/terminal-services-virtual-channels

A universal network / named pipe tunneling example: https://github.com/earthquake/UniversalDVC

viraptor
  • 33,322
  • 10
  • 107
  • 191
0

I suggest the next solution fits your needs. Is not universal but useful thing.

You must have:

  • enabled Local drive redirection on RDP-server;
  • administrative rights on RDP-client PC;
  • ability to use named pipes by your app.

Instruction:

  1. On RDP connection redirect your drive. It would be C:

  2. Make link to your pipe (with administrative rights). It would be file abc in C:\pipe folder. For working named pipe use same name to avoid mistakes:

    mklink abc \\.\pipe\abc

  3. Create pipe abc by your app. You can also use external tools instead like Makepipe.exe or Powershell:

    Makepipe /w 1 /pabc

  4. On remote RDP session use symlink file to work with named pipe. This cmd-command send text "Message" to RDP-client's named pipe by symbolic link.

    echo Message \\tsclient\C\pipe\abc

P.S. As you can see file system can be used for inter-process communication.

Daemon-5
  • 241
  • 1
  • 6