I have a .NET application and a .NET Windows Service . How can I establish a secure communication channel between the two?
Most people on the Internet recommend communicating with Windows services using Named Pipes . But it looks like it could create a big hole in the system. If any dude turns engineers to my application, he will know the name of the pipe and the protocol that I use, and this allows him to connect to my service and do whatever he wants.
Example: My client installs my application and gives it full privileges to install the service. He then downloads other software, and does not provide full privileges. But this software finds my service and uses it using the channel name and reverse engineering protocol.
So how to create a secure communication channel? Can the service somehow access the program that is just connected to its pipe (so that I can compare its hash if the service was installed in a safe place)? Or maybe use a different IPC ? How does Microsoft protect its services from this security hole?
source share