How I can create named pipe in the Windows 8 with AppContainer integrity level?
To create an instance of a named pipe by using CreateNamedPipe, the user must have FILE_CREATE_PIPE_INSTANCE access to the named pipe object. If a new named pipe is being created, the access control list (ACL) from the security attributes parameter defines the discretionary access control for the named pipe.
Every pipe is placed in the root directory of the named pipe filesystem (NPFS), mounted under the special path \\. \pipe\ (that is, a pipe named "foo" would have a full path name of \\. \pipe\foo ).
A named pipe is a named, one-way or duplex pipe for communication between the pipe server and one or more pipe clients. All instances of a named pipe share the same pipe name, but each instance has its own buffers and handles, and provides a separate conduit for client/server communication.
A named pipe is a logical connection, similar to a TCP session, between a client and server that are involved in a Common Internet File System (CIFS)/SMB/SMB Version 2 and Version 3 connection.
As Pavel Minaev mentioned in one of comments to some answer, there are no named pipes in WinRT (for Metro applications, for desktop applications pipes are the same as in Windows 7):
Named pipes aren't there, for example, nor are memory mapped files. There are sockets (including server sockets), but when connecting to localhost, you can only connect to the same app.
You may be interested in the WinRT API, including sockets.
Talking about WinRT - you really can't create named pipe.
Talking about Windows 8 desktop application running under AppContainer integrity level - you can create named pipe by regular WinAPI functions. The problem is by default only applications with same AppContainer ID could access it (in other words - only instances of your own application). But in fact if you have process under High or Medium integrity level - from this process you can create pipe and decrease its integrity level, so applications from AppContainer can use it.
Take a look at sample here: http://msdn.microsoft.com/en-us/library/windows/desktop/hh448493(v=vs.85).aspx
Even more - from desktop application with High integrity level you can use dll injection to inject you dll to WinRT application and again - use WinAPI to create pipes. So pipes are denied in WinRT not by OS design, but only by lack of interfaces in WinRT.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With