If you suspect you have installed adware/malware:
>System Preferences>Profiles. found next to Accessibility (click into it and then remove all the suspicious things from the list.) May or may not be present if no profiles found.
Adware Removal Guide—Manual removal of : http://www.thesafemac.com/arg-identification/
or
Try running this trusted utility https://www.malwarebytes.com/mac/
also Verify you are not using SOCKS proxy:
>System Preferences>Networks>Advanced>Proxy uncheck the box
Adware/malware launch daemons can set SOCKS proxies without user participation.
(SOCKS is an Internet protocol that exchanges network packets between a client and server through a proxy server.)