It sounds exactly like you have "CrossRider" adware:
New Crossrider variant installs configuration profiles on Macs - Malwarebytes Labs
To get rid of it, go into System Preferences.
See if there is a preference pane for "Profiles".
If there is, open it and delete all profiles.
Next download and run:
DetectX Swift (free)
DetectX
and delete any malicious files that it flags.
Then all that you have to do is go into your browser and correct the settings for your default search engine and start page.
Just FYI, the way that this Trojan is spread is that you were on the Web and something popped up that told that you had to install or update Adobe Flash, and you clicked on Okay, and it downloaded and you installed it. However, the alert was bogus, and the software that you downloaded wasn't Flash at all, it was a Trojan Horse.