Some call every exploit, hijack and the rest a virus. This is not a virus but a hijack.
https://www.google.com/search?client=opera&q=reset+safari+hijack+apple finds priors. Pick the article you can work with.
I’ve had this problem for a while and it seems that I have accidentally downloaded a virus on my MacBook. Every so often my safari will close and a bunch of windows will pop open my screen. Mostly just the safari preferences with extensions open. I don’t have any extension downloaded but when this happens it shows an extension that a green round icon with a white magnifying glass on it. Every time it seems to have a different name but the icon is the same. I read online that I should simply uninstall it and move it to the bin and later delete the contents of the bin. So that’s exactly what I’ve done every single time it’s happened. However it doesn’t work on the long run and the next day or even a couple hours later it pops up again. While everything is working normally there is no such application in my finder or any extensions in safari. How can I solve this problem??

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic