Hacked computer
My computer has been hacked, which manifests itself by Safari opening unwanted windows asking to contact a fake Apple help website, unwanted Firefox start-ups, hung screens, weird messages on rebooting, you name it. Have removed all cookies from Safari & Firefox, but notice that certain malicious items reinstall themselves regardless (and this is with "allow cookies from websites I visit" enabled); some of these are listed as cache, cookies and local storage, see attached image. After having tried almost everything I now want to try to disable/flush out specific cookies, but don't know how - any help much appreciated.
iMac, macOS Sierra (10.12.3), 3.06 GHz Intel Core 2 Duo