Here are ways to prevent not just Wannacry/ WannaCrypt Ransomware, but also any other cyber attack, as suggested by cyberswachhtakendra
— Maintain updated Antivirus software on all systems
— Check regularly for the integrity of the information stored in the databases
— Regularly check the contents of backup files of databases for any unauthorized encrypted contents of data records or external elements, (backdoors /malicious scripts.)
— Ensure integrity of the codes /scripts being used in database, authentication and sensitive systems
— Establish a Sender Policy Framework (SPF) for your domain, which is an email validation system designed to prevent spam by detecting email spoofing by which most of the ransomware samples successfully reaches the corporate email boxes.
— Keep the operating system third party applications (MS office, browsers, browser Plugins) up-to-date with the latest patches.
— Application whitelisting/Strict implementation of Software Restriction Policies (SRP) to block binaries running from %APPDATA% and %TEMP% paths. Ransomware sample drops and executes generally from these locations.
— Perform regular backups of all critical information to limit the impact of data or system loss and to help expedite the recovery process. Ideally, this data should be kept on a separate device, and backups should be stored offline.
— Don't open attachments in unsolicited e-mails, even if they come from people in your contact list, and never click on a URL contained in an unsolicited e-mail, even if the link seems benign. In cases of genuine URLs close out the e-mail and go to the organization's website directly through browser
— Follow safe practices when browsing the web. Ensure the web browsers are secured enough with appropriate content controls.
— Disable remote Desktop Connections, employ least-privileged accounts.
— Restrict users' abilities (permissions) to install and run unwanted software applications.
— Individuals or organizations are not encouraged to pay the ransom, as this does not guarantee files will be released. Report such instances of fraud to CERT-In and Law Enforcement agencies
— Block the attachments of file types, exe|pif|tmp|url|vb|vbe|scr|reg|cer|pst|cmd|com|bat|dll|dat|hlp|hta|js|wsfCarry out vulnerability Assessment and Penetration
— Testing (VAPT) and information security audit of critical networks/systems, especially database servers from CERT-IN empaneled auditors. Repeat audits at regular intervals.