Safari Cannot Connect *but FireFox Can (plus more problems)
2010.5 iMac 2.8GHz Core i5
4GB 1333 MHz DDR3
macOS Sierra 10.12.6
Yes it's old, but up until now it had been performing fine and meeting our needs.
My problem is that when launching Safari it says it cannot connect to the server, but it's not an internet connection issue because FireFox works fine along with all of our other in-home devices connected to the internet. The background is this...
I noticed when typing a search into the url bar in Safari that it was redirecting and using a Yahoo search thing. Very odd looking and I never (intentionally) installed this. But that's what caught my eye first. I installed Sophos and it found "Mughthesec." I did some reading online and found a couple of posts here which suggested using Malwarebytes to remove. Sophos did its thing initially and quarantined it, but recommendations found here said to remove Sophos as it interferes with the the MacOS. So I installed Malwarebytes and it found a number of other threats and removed them and then I uninstalled Sophos.
But now Safari doesn't work and the App Store will open the window but not really launch, just a blank App Store window forever. No programs show up, search doesn't work etc. It's like whatever the problem rooted itself into, since being removed, has removed vital links in the chain of operation. Like if you had a rope and someone tied a knot (virus) in it, to fix the knot you just cut that entire section of rope out.r
So I can't used the App Store to reinstall the OS and I even tried Option+Command+R upon restart to initiate the web based recovery thing, but it just freezes on the white screen with grey apple logo once that World Logo with timer countdown finishes. I suspect because its attempt to retrieve the information from the internet is blocked/interrupted.
What can I do?