1. Remove unknown profiles if present.
System Preferences > Profiles
Open System Preferences, select “General and click the “Profiles” icon ( a checkmark on a gear) .
When Profiles pane opens, select the unknown profile and click the minus button at the bottom.
Section: Remove a configuration profile from your Mac
Profiles: https://support.apple.com/guide/mac-help/configuration-profiles-standardize-settings-mh35561/mac
2 If Safari's home page is stuck
In some cases, after being changed by adware or malware, Safari's home page can become stuck.
You will be able to edit the Homepage field in Safari's preferences, but the change will not stick.
This appears to be a bug, and there is an odd workaround. Try this:
- In Safari, choose Preferences from the Safari menu.
- In the window that opens, click the General icon (if necessary)
- Enter your desired home page in the "Homepage" field, but DO NOT press return!
- At the top of the window, click any of the other icons (eg, Tabs, AutoFill, etc).
- You may see a prompt asking for confirmation for changing the home page. If so, confirm.
- Switch back to the General page and check to make sure the home page has been changed.
Credit:https://forums.malwarebytes.com/topic/236261-how-to-remove-weknow-malware-and-others/