In most cases, wiping your phone will remove all spyware from it, effectively removing the hackers as well. However, there are apps out there that remain hidden even from hard resets, which means that they will survive even a complete wipe.