Announcement

Collapse
No announcement yet.

Anyone know how to find the SMB level of an active network connection?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Anyone know how to find the SMB level of an active network connection?

    When mapping a network drive using SMB, SMB 3.0 is the only SMB level at present that supports the network connection being encrypted. But if a 3.0 connection can't be made (or isn't supported by the version of Windows running or the server), then the server & client fall back to a lower level until they find a level that works, or all levels have failed. So even with a mapped drive on a system like Windows 10 that supports SMB 3.0, you normally don't really know what SMB level ended up being negotiated. If the version of Windows has (or came with) PowerShell, you can use "Get-SmbConnection" in PowerShell to check the SMB level being used & whether the link is encrypted, etc. But I can't count on Windows 7 or Vista machines having PowerShell on them, so I can't count on being able to exploit PowerShell. Does anyone know how to get the same info from the Windows API, say maybe, using the WNet API? I want to be able to have a program make decisions based on whether the connection is encrypted or not.
    Last edited by Michael Burns; 8 Aug 2017, 10:44 AM.
    Michael Burns

  • #2
    You can use WMI and the MSFT_SmbConnection class: https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

    You can find examples of how to use WMI using my includes at: https://forum.powerbasic.com/forum/j...nstrumentation

    Forum: http://www.jose.it-berater.org/smfforum/index.php

    Comment


    • #3
      Thanks. I couldn't find MSFT_SmbConnection under any namespace using your WMIGEN & WMIGENX tools despite using them on a machine that was quite happy to allow the Get-SmbConnection cmdlet to run in PowerShell. I presume that means I don't understand how to use them. I will keep looking into this. Also, I seem to be having trouble finding a copy of your WMI.INC on the Powerbasic forums.
      Last edited by Michael Burns; 12 Aug 2017, 06:58 PM.
      Michael Burns

      Comment

      Working...
      X