question

hooked-7092 avatar image
0 Votes"
hooked-7092 asked LimitlessTechnology-2700 answered

UNC Path vs Physical Path and OS security layers

I develop Windows application that write data to file located on filesystem.
I have 2 options to reach the filesystem:

  1. Physical path: C:\Folder\Myfile.txt

  2. UNC Path (Configured RWX MyShare): \MyShare\Myfile.txt

When using UNC path, we sometimes receive "unexpected network error occurred".

I am wondering if UNC and Physical path is using different drivers/kernel modules/security layers internally in the OS?

On linux when you File.Open or File.Read, it depend on the filesystem type, each filesystem will have different implementation, you will go through different security layers. Is it the same on windows?

Questions:

  1. When using UNC / Physical path, do we go via different drivers / seucity layers?

  2. When Using UNC, Could it be Endpoint protection/Firewall/Antivirus might add additional security layer?

windows-serverwindows-server-securitywindows-hardware-wdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello Hooked,

When working with UNC files there are 2 main things to take in consideration:

  1. Explicitly opening for SMB communication
    RPC EPM TCP 135 - 139
    RPC over HTTPS TCP 593
    SMB (for named pipes) TCP 445

  2. Resilience of network
    When the error happens, you may try to "clean" the network usage, in order to confirm if there is any local bottleneck of the computer: Run>
    ipconfig /flushdns
    nbtstat –RR
    netsh int ip reset
    netsh winsock reset

Hope this helps in your case,
Best regards,

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.