The file server protocol you use matters. The WannaCry ransomware was effective due to companies’ file shares using a weak SMB protocol. If your file shares have been around a while, it may be time to tighten the security.
For Windows environments, a file share hosted on Windows 2016 will automatically use the latest version supported by the connecting client, and therefore stay the most secure while remaining compatibility. To check the version actively in use (while you have a connection with a file server), starting with Windows 8.1 you can check the version with the PowerShell elevated command Get-SmbConnection SERVERNAME and the version will show as Dialect.
For Linux servers hosting a Samba file share to Windows, the protocol version can be set in the /etc/samba/smb.conf file with the following on the file share:
client min protocol = SMB3
client max protocol = SMB3
- SMB 1 – Windows 2000
- SMB 2 – WIndows Vista SP1 and Windows Server 2008
- SMB 2.1 – Windows 7 and Windows Server 2008 R2
- SMB 3.0 – Windows 8 and Windows Server 2012
- SMB 3.0.2 – Windows 8.1 and Windows Server 2012 R2
- SMB 3.1.1 – Windows 10 and Windows Server 2016