Earlier quoted context omitted.
Good to address the security aspects of named pipe. However none of those describes how to secure the server. The server needs to call ImpersonateNamedPipeClient() on the incoming client connection to assume the client’s security token, that would lower the server’s privilege to the level of the client. That’s it! A guest level client can connect to the server. The server’s privilege becomes guest, and cannot access…
FWIW, the project in the article is explicitly intended to allow privilege elevation: "You have an application which runs in user context, without any administrative rights, and you need to perform some tasks which requires higher privileges."
Named Pipes in .NET 6 with Tray Icon and Service
31–40 of 54 posts
Re: Named Pipes in .NET 6 with Tray Icon and Service
#32Earlier quoted context omitted.
Good to address the security aspects of named pipe. However none of those describes how to secure the server. The server needs to call ImpersonateNamedPipeClient() on the incoming client connection to assume the client’s security token, that would lower the server’s privilege to the level of the client. That’s it! A guest level client can connect to the server. The server’s privilege becomes guest, and cannot access…
FWIW, the project in the article is explicitly intended to allow privilege elevation: "You have an application which runs in user context, without any administrative rights, and you need to perform some tasks which requires higher privileges."
Re: Named Pipes in .NET 6 with Tray Icon and Service
#33Earlier quoted context omitted.
FWIW, the project in the article is explicitly intended to allow privilege elevation: "You have an application which runs in user context, without any administrative rights, and you need to perform some tasks which requires higher privileges."
The server can do whatever it needs to do in its higher privilege. Just when it interacts with the client connection, it lowers its privilege to the client's level. It gets the incoming data, sanitizes it, and reverts back to higher privilege to do the work. This minimizes the attack surface to the area dealing with client interaction, not the whole server. The server might link in a 3rd party XML library to sanitize…
Re: Named Pipes in .NET 6 with Tray Icon and Service
#34Earlier quoted context omitted.
Pretty sure there isn't anything you can't do in Jetbrains Rider EAP. Edit: would like to know why I'm being downvoted.
- Debugging across .NET and C++ on the same solution. - Create a architecture diagram out of .NET and native compiled code. - Integration with SharePoint and Dynamix SDKs - SQL Server and Azure SDKs - Using the Fakes mocking framework for MSIL rewriting - Debugging the GPU shaders Just a couple of examples, I can take plenty more out of VS enterprise. I really don't get how people can think JetBrains does better than…
> They will ever play catch-up with platform capabilities and only offer a subset of the package.
Obviously, they are competing with a 20+yo product.
But atleast I can get all my .NET work done on Linux without needing slow bloated VS with a ton of useless features like 'unit testing for poor code choices or legacy codebases', or 'integration with the 2nd worst collaborative tool after Jira'.
Re: Named Pipes in .NET 6 with Tray Icon and Service
#35Earlier quoted context omitted.
- Debugging across .NET and C++ on the same solution. - Create a architecture diagram out of .NET and native compiled code. - Integration with SharePoint and Dynamix SDKs - SQL Server and Azure SDKs - Using the Fakes mocking framework for MSIL rewriting - Debugging the GPU shaders Just a couple of examples, I can take plenty more out of VS enterprise. I really don't get how people can think JetBrains does better than…
So, the parent comment I replied to was in relation to needing VS 2022 for .NET 6, to which I replied that you could use Jetbrains Rider EAP, obviously for .NET 6, to accomplish the task in the linked post. > They will ever play catch-up with platform capabilities and only offer a subset of the package. Obviously, they are competing with a 20+yo product. But atleast I can get all my .NET work done on Linux without ne…
Looking forward to see how they deal with MAUI and Blazor integration.
What others call bloat I call productivity features.
Re: Named Pipes in .NET 6 with Tray Icon and Service
#36Earlier quoted context omitted.
Is there a reason you do this? Curious, I havent had to setup SQL Server myself in a while so I don't know what a reasonable reason would be.
Named pipes are fast when the database is on the same box, but slower than a normal tcp connection when the database is remote. Something to do with PeekNamedPipe calls having to prepend reads.
Re: Named Pipes in .NET 6 with Tray Icon and Service
#37I think this is the first NamedPipes tutorial in C# that I've ever seen that doesn't do things completely wrong by using a StreamWriter or StreamReader. Of course, that's because it uses another library that wraps all the tricky bits of NamedPipes that everybody always does wrong -> https://github.com/HavenDV/H.Pipes NamedPipes are sweet for doing same-machine IPC on Windows, that is for sure, but the built-in API is…
Re: Named Pipes in .NET 6 with Tray Icon and Service
#38Earlier quoted context omitted.
Been using them since 1992 but at this point I would naturally turn to sockets, even on the same machine. I can't even really say why though. Named pipes are nice because they are really more like a file but at this point sockets feel more natural because they exist and are supported everywhere.
TCP server cannot assume the security context of the client, thus privilege elevation attack can easily happen.
Re: Named Pipes in .NET 6 with Tray Icon and Service
#39This uses the package H.Pipes which seems to use System.Runtime.Serialization.BinaryFormatter by default; isn't this insecure?
Edit: Never mind, see https://docs.microsoft.com/en-us/dotnet/standard/serializati...
Re: Named Pipes in .NET 6 with Tray Icon and Service
#40I think this is the first NamedPipes tutorial in C# that I've ever seen that doesn't do things completely wrong by using a StreamWriter or StreamReader. Of course, that's because it uses another library that wraps all the tricky bits of NamedPipes that everybody always does wrong -> https://github.com/HavenDV/H.Pipes NamedPipes are sweet for doing same-machine IPC on Windows, that is for sure, but the built-in API is…
Can you elaborate what’s wrong with using StreamReader or StreamWriter with a np? I’ve used them before so wondering what I’m potentially doing wrong here and what’s the alternative.
See https://stackoverflow.com/questions/31936100/namedpipeserver...