I'm pounding out a very basic script to delete the various versions of Advanced Mac Cleaner. AMC has really become a pain since deploying Palo Alto Traps software. Users are getting malicious adware messages because of AMC with no means to clean the computer up. There been no easy clean up without installing a 3rd party app, which brings a set of it's own problems. It's great don't get me wrong, we'd just prefer to do this the silent way.
The script could use some help, it kind of works but because of my lack of expertise I have it doing an "rm -R" on every known directory and an "rm" on the known files whether they exist or not. The thought is if they are there they'll get deleted, if not the line just errors out.
It's a pretty extensive list of know files and directories and still growing. It's based on where I've found the files and what's been reported known in the past. I setup a smart group searching for the app(s), then have a policy run this script. Anyone want to tackle at making it a bit better or refer me to something that already does this, that doesn't require installing an app like malwarebytes?
Thanks,
Chuck
!/bin/sh
Remove app/
sudo rm -R "/Applications/Advanced Mac Cleaner.app/"
sudo rm -R "/Users/$3/Desktop/Advanced Mac Cleaner.app/"
sudo rm -R "/Applications/Mac Ads Cleaner.app/"
sudo rm -R "/Applications/Mac Adware Cleaner.app/"
sudo rm -R "/Applications/_MACOSX/Advanced Mac Cleaner.app/"
sudo rm -R "/Applications/_MACOSX/Mac Ads Cleaner.app/"
sudo rm -R "/Applications/_MACOSX/Mac Adware Cleaner.app/"
sudo rm -R "/Users/$3/.Trash/Advanced Mac Cleaner.app/"
Select User Library Locate any folders bearing the following names, and delete. Not all of them may be present.
sudo rm -R "/Users/$3/Library/Advanced Mac Cleaner/"
sudo rm -R "/Users/$3/Library/Mac Adware Cleaner/"
sudo rm -R "/Users/$3/Library/Mac Ads Cleaner/"
sudo rm -R "/Users/$3/Library/hlpradc/"
sudo rm -R "/Users/$3/Library/hlpramc/"
sudo rm -R "/Users/$3/Library/hlprawc/"
locate the LaunchAgents folder, and open it. Inside there will be files containing these names, delete. Not all may be present
sudo rm "/Users/$3/Library/LaunchAgents/Adwarecleaner"
sudo rm "/Users/$3/Library/LaunchAgents/hlpradc"
sudo rm "/Users/$3/Library/LaunchAgents/hlpramc"
sudo rm "/Users/$3/Library/LaunchAgents/hlprawc"
sudo rm "/Users/$3/Library/LaunchAgents/com.adscleaner.hlpradc.plist"
sudo rm "/Users/$3/Library/LaunchAgents/com.adwarecleaner.hlprawc.plist"
sudo rm "/Users/$3/Library/LaunchAgents/com.pcv.hlpramcn.plist"
sudo rm "/Library/LaunchAgents/Adwarecleaner"
sudo rm "/Library/LaunchAgents/hlpradc"
sudo rm "/Library/LaunchAgents/hlpramc"
sudo rm "/Library/LaunchAgents/hlprawc"
sudo rm "/Library/LaunchAgents/com.adscleaner.hlpradc.plist"
sudo rm "/Library/LaunchAgents/com.pcv.hlpramcn.plist"
locate and delete User cache and Cookies
sudo rm "/Users/$3/Library/Caches/com.adscleaner.hlpradc"
sudo rm "/Users/$3/Library/Caches/com.adwarecleaner.hlprawc"
sudo rm "/Users/$3/Library/Caches/com.pcvark.Mac-Adware-Cleaner"
sudo rm "/Users/$3/Library/Caches/com.techyutils.cleaner"
sudo rm "/Users/$3/Library/Caches/com.techyutils.Mac-Ads-Cleaner"
sudo rm "/Users/$3/Library/Caches/com.pcvark.Mac-Adware-Cleaner.binarycookies"
sudo rm "/Users/$3/Library/Cookies/com.techyutils.cleaner.binarycookies"
sudo rm "/Users/$3/Library/Cookies/com.techyutils.Mac-Ads-Cleaner.binarycookies"
locate the Library folder Open the Application Support delete these files
sudo rm -R "/Users/$3/Library/Applications Support/Mac Ads Cleaner/"
sudo rm -R "/Users/$3/Library/Applications Support/Mac Adware Cleaner/"
sudo rm -R "/Users/$3/Library/Applications Support/Mac File Opner/"
sudo rm -R "/Users/$3/Library/Applications Support/Advanced Mac Cleaner/"
sudo rm -R "/Users/$3/Library/Applications Support/awc/"
sudo rm -R "/Users/$3/Library/Applications Support/amc/"
sudo rm -R "/Users/$3/Library/Applications Support/adc/"
locate the Library Preferences
sudo rm "/Users/$3/Library/Preferences/Mac Adware Cleaner"
sudo rm "/Users/$3/Library/Preferences/Adware"
sudo rm "/Users/$3/Library/Preferences/Adwarecleaner"
sudo rm "/Users/$3/Library/Preferences/pcvark"
sudo rm "/Users/$3/Library/Preferences/com.PCvark.Advanced-Mac-Cleaner.plist"
sudo rm "/Users/$3/Library/Preferences/com.adscleaner.hlpradc.plist"
sudo rm "/Users/$3/Library/Preferences/com.adscleaner.hlpradc.plist."
sudo rm "/Users/$3/Library/Preferences/com.adwarecleaner.hlprawc.plist"
sudo rm "/Users/$3/Library/Preferences/com.adwarecleaner.hlprawc.plist."
sudo rm "/Users/$3/Library/Preferences/com.pcvark.Mac-Adware-Cleaner.plist"
sudo rm "/Users/$3/Library/Preferences/com.pcvark.Mac-File-Opener.plist"
sudo rm "/Users/$3/Library/Preferences/com.pcv.hlpramc.plist"
sudo rm "/Users/$3/Library/Preferences/com.techyutils.Mac-Ads-Cleaner.plist"
sudo rm "/Users/$3/Library/Preferences/com.techyutils.cleaner.plist"
locate Library Log and delete
sudo rm "/Users/$3/Library/Logs/Mac Adware Cleaner"
sudo rm "/Users/$3/Library/Logs/Hlpramc"
sudo rm "/Users/$3/Library/Logs/Hlprawc"
sudo rm "/Users/$3/Library/Logs/Advanced Mac Cleaner.log"
sudo rm "/Users/$3/Library/Logs/Mac Ads Cleaner.log"
sudo rm "/Users/$3/Library/Logs/Mac Adware Cleaner.log"
sudo rm "/Users/$3/Library/Logs/helperamc.log"
sudo rm "/Users/$3/Library/Logs/hlpradc.log"
sudo rm "/Users/$3/Library/Logs/hlprawc.log"
locate Library Saved Application State folder and delete these folders
sudo rm -R "/Users/$3/Library/Saved Application State/Pcvark/"
sudo rm -R "/Users/$3/Library/Saved Application State/Mac Adware Cleaner/"
exit 0