Restoring your iPhone can be a quick fix for clearing any inroads that hackers have already made into your device. However, it will also make your device more vulnerable until you bring its security patches up to date.

Back Doors

Restoring your system to its original factory settings will wipe out any back doors hackers established into your device. However, restoring your phone to a back-up where the back doors were already installed could preserve the hacker's way into the device.

Jailbroken

Jailbreaking your iPhone removes many of the security mechanisms that Apple puts in place to protect your device. Restoring your iPhone to factory settings will remove the jailbreak and reestablish the security mechanisms that make it harder for hackers to get into your phone.

Security Patches

When you restore your phone to factory settings, it will be exactly the way it was when you took it out of the box. This includes software that will be missing all the security patches that Apple has released since manufacturing the device. If you don't install the updates for your device shortly after restoring it, then you are leaving known vulnerabilities that someone could use to hack into your iPhone.