There are apps that require access to assistive devices in Yosemite. A perfect example of this is TextExpander 4. It needs the ability to type text on the user’s behalf. The easiest way to enable access for these items is to drag-and-drop them into the Accessibility section under the Privacy tab in the Security and Privacy pane of System Preferences. Continue reading “OS X Yosemite: Enable Access for Assistive Devices Command Line”
Set up the Hazel rules as seen below for each of the folder mentioned above.
You will get a notification with the filename if something gets placed in those folders. It will then open the folder so you can decide if it needs to be deleted or if it is a legitimate file.
Malware Detection Using launchd (Free, More Technical, and Severely-limited)
Unfortunately, this method is more technical and does not work as well as Folder actions because the file and folder namedo not get passedas arguments to the script. So those nice alert dialogs you used to get won’t have all the nifty information. But if you don’t feel like paying for Hazel, or having your CPU go crazy using Folder Actions, and still want to at least know if something is going on, then read on.
Ironically enough, you will be creating a file and putting it in one of the folders that Folder Actions may have previously been monitoring. This should also give you some insight as to why hackers are always trying to put files into these folders.
Script To Run When Items Are Added To The Folders
First, you will need a script that will execute when a new item is added into one of the folders. Since launchd won’t pass arguments to the script, you can just make a basic dialog that tells you an item was added to them.
osascript -e 'display dialog "Possible launchd threat detected..." with title "Roll-your-own Malware Detection"'
launchd .plist To Watch The Folders For Changes
The next process is much easier if you use a program like Lingon X, but I will show you how to manually create the file. I suggest using an app like TextWrangler because it works better for writing code. If you want to use TextEdit or some other editor, be sure it is set to plain-text and not rich-text.
Create a new file called RollYourOwn.MalwareDetection.Yosemite.plist with the following content:
Then, save it to /Library/LaunchAgents . Make sure the file has the correct user, group, and permissions by running these commands:
If you instead edited the text file from the command line in vim or nano , there are probably not any extended attributes to remove.
Now the launchd plist is ready. What you just made was your own little program that runs a custom script (for all users at login). It will run automatically and in the background. Now you might understand why hackers will try to install things in a similar fashion. They can have their malicious code executed every time someone logs into their Mac. But the file you just made runs code that will help rather than hinder.
The launchd plist utilized QueueDirectories, which will basically run the script as long as there is an item in it. You can also use WatchPaths, but it it much more sensitive to changes. Experiment with both to find out what is best for you.
Quickly gather a ton of system information on any Mac with a five-key keyboard shortcut!
After triggering the keyboard shortcut, it may look like nothing happened (on Yosemite, the screen briefly flashes white), but if you open up /var/tmp , you will see a sysdiagnose folder (it won’t actually finish until the folder is transformed into a .tar.gz , which can take a couple of minutes). Continue reading “OS X’s Native 5-finger, 5-minute System Diagnosis”
Use your LastPass usernames and passwords in Safari on your iOS device without paying for a LastPass Premium subscription. Using a bit of scripting, you can roll-your-own Last Pass freemium without paying a dime!