Mobile and desktop wallets can provide adequate security when configured correctly. Meanwhile, it is recommended to have a highly-secure antivirus or firewall to prevent any attack that might happen. However, hardware wallets are generally considered the safest option.