Today we had a global cyberattack in which approximately 60 thousand companies of all sizes were affected in at least 74 countries. You can check the news portals for coverage of what happened.
(https://www.tecmundo.com.br/malware/116652-wannacry-ransomware-o-mundo-chorar-sexta-feira-12.htm)
I’m going to briefly show what you should do to reduce the chances of your Windows computer/server being compromised by a ransomware, a type of malicious software that caused this whole crisis, WannaCry. This ransomware encrypts all the files on the machine and uses lateral communication, which makes its communication very hard to detect. It exploits a remote command execution vulnerability in the SMB protocol, and that is how it spreads so quickly across the network.
The software takes advantage of a vulnerability in the Windows operating system that, according to Microsoft, was fixed on March 14, 2017, but if your Windows is not up to date you won’t have that fix. (https://technet.microsoft.com/en-us/library/security/ms17-010.aspx)
Do the following on your Windows computer/server:
- Press the Windows key and type “cmd” to open the command prompt;
- At the prompt, type “powershell” to open the PowerShell utility inside cmd itself. No graphical application will open, you will just see the command prompt change. (Example below the step-by-step)
- At the PowerShell prompt, type “Get-SmbServerConfiguration | Select EnableSMB1Protocol, EnableSMB2Protocol”. This runs a query so you can see what your current configuration looks like.
- Again at the PowerShell prompt, type “Set-SmbServerConfiguration -EnableSMB1Protocol $false”. This changes the Windows SMB configuration, disabling the vulnerable feature. To confirm, type “A”.
- Run step 3 again to confirm that the change was applied.
Example:
C:\WINDOWS\system32>powershell
Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. All rights reserved.
PS C:\WINDOWS\system32> Get-SmbServerConfiguration | Select EnableSMB1Protocol, EnableSMB2Protocol
EnableSMB1Protocol EnableSMB2Protocol
------------------ ------------------
True True
PS C:\WINDOWS\system32> Set-SmbServerConfiguration -EnableSMB1Protocol $false
Confirm
Are you sure you want to perform this action?
Performing operation 'Modify' on Target 'SMB Server Configuration'.
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A
PS C:\WINDOWS\system32> Get-SmbServerConfiguration | Select EnableSMB1Protocol, EnableSMB2Protocol
EnableSMB1Protocol EnableSMB2Protocol
------------------ ------------------
False True
I hope this helps someone. Best regards and see you soon.
Franky

Super dica Franky!!! Vlw