In the wake of a cyberattack that infected tens of thousands of computers around the world, Long Island cybersecurity experts said home users and small-business owners should take preventive measures to avoid similar threats.

A program known as “WannaCry” took control of vulnerable computers — in many cases using pirated software that hadn’t been updated with security patches — and demanded payments in order to allow users to access their data, a type of malicious software known as “ransomware.”

Cybersecurity specialists said individuals and small companies can follow simple steps to decrease their vulnerability to a ransomware attack:

  • Regularly install updates to your operating system

“To prevent a ransomware attack, a couple of simple things can be done,” said Anita D’Amico, CEO of Code Dx Inc., a Northport company that diagnoses software security vulnerabilities.

“Installing the latest updates on your operating system, programs and applications is crucial.”

D’Amico, who has worked in cybersecurity since the mid-90s, recommends setting a configuration on your computer that searches for software updates automatically.

advertisement | advertise on newsday

Steve Rubin, a partner and co-chair of Garden City law firm Moritt Hock & Hamroff LLP, who specializes in cybersecurity cases, said it’s important to make sure you have enough space on your computer for updates.

“Sometimes people avoid updating their software because they don’t have enough space,” he said.

  • Invest in anti-virus software

“Anti-virus software, if installed and kept updated, can catch most of the better known and most common malware and malicious code,” D’Amico said. “And most anti-virus programs are not overly expensive.”

  • Click carefully

“Be vigilant and aware of any website and email link you are clicking on,” said Chris Fidis, owner of SEO Business Solutions, a cybersecurity company in West Hempstead. Ransomware attacks usually involve phishing, the fraudulent practice of sending emails appearing to be from a reputable source but containing malicious links.

Also, be careful about files that you save to a USB jump drive.

  • Have a data recovery plan and back up your data

“If you’re a small-business owner, you should run a cybersecurity audit of everything you have on your entire company, including your data,” Rubin said. Knowing exactly how much your data is really worth is half the battle.

“And you should, always, always, back it up” on an external hard drive, he said.

advertisement | advertise on newsday

D’Amico agreed: “Don’t put yourself in the situation where you have to decide whether to pay the ransom or not. If your files are secure in another location like a hard drive,” or stored remotely in the computing cloud, “the threat from hackers to destroy your data loses its power.”