Hackers are targeting outdated iPhones and Android phones through infected websites to steal passwords and sensitive data. Here’s how to protect your device.