A threat infected my Mac. I backup all my files and clear the threat. If I restore from backup ,OS may re-infect again or not..
If you have done factory reset, The infected files are stored in your backup itself. If you restore old data it affect again.