My iPhone 5 currently running 8.1.2 has some sort of virus?

My iPhone 5 has some sort of virus. I'm not sure the exact source of the virus (either through the PanGu 7.1.1 jailbreak or a program i installed from cydia after the jailbreak). Anyways, I have tried to restore multiple times and it will end up working for a hour before dropping back into recovery mode. I even tried resetting it manually on the device. I'm convinced that the only way to fix this is to do it through a third-party application. Does anyone know of a possible solution or any other ideas on how to fix this?

Do a semi-restore and only download tweaks from official cydia sources