
- #What files should be in your library folder on mac how to#
- #What files should be in your library folder on mac mac#
Go to the /Applications/Utilities/ folder and open the program called AppleScript Editor. While developing such a script might be difficult for some users, Apple offers a built-in script example that can be used to issue a notice whenever an item is added to a folder: In OS X you can monitor folders using Folder Actions, which link applescripts to folders on the system so if they are changed then the scripts will run. There are two options available for doing this: Checking this box in the AppleScript Editor utility will add the script menu to the menu bar.

As a result, we can also use these folders to help proactively detect and prevent such malware intrusions. While malware variants might use different names for files and the locations of where they put them, most to date have used one of the system's various LaunchAgents folders (generally the one in the user account) as a starting point for their malware.

In some instances the targeted executable is the malware that attempts to steal personal information, but at other times this is only the initial phase and the malware then downloads and installs additional components that are harder to detect. The malware then places a launch agent file in the username/Library/LaunchAgents/ folder, which targets the malicious executable and continually launches it. The malware exploits the user or a system vulnerability and places an executable file on the system (usually within the user account).
#What files should be in your library folder on mac mac#
In many of the recent malware attacks on OS X, this Launch Agent structure is being used to initially load the malware and infect Mac systems. The rest of the agent file contains other conditional elements for running the specified program, such as the "StartInterval" key here which tells the system launcher to run this program every 3523 seconds. These are the process Label, and the Program Arguments (sometimes called simply "Program"), which are the name of the script as it appears to the launcher, and the executable file that is being managed by the script. The keys and values in the file will differ depending on the agent's uses, but the main components are those outlined in the red squares. Launch agent files are XML files containing a list of properties, whose basic anatomy is as follows: The most important component of the launch agent file is the "ProgramArguments" or "Program" key, which shows where the executable file is located that the launch agent is targeting.Įach agent file contains a list of keys followed by their values. The others are in the global Library and System/Library folders, and are loaded when the system boots. The first is in your user account's Library, and the scripts in it are loaded when you log in. There are three LaunchAgent folders in an OS X installation.

#What files should be in your library folder on mac how to#
Recently I discussed how to do this for automatically changing Safari's downloads folder whenever an external drive is attached to the system. Most of the time developers use these scripts as components to their programs, but they can also be used for your own customizations. For instance, Apple uses one of these scripts to schedule the "backupd" process for Time Machine, and have it create backups every hour. The LaunchAgents folders (and their paired LaunchDaemons folder for managing service processes) are locations that contain scripts to automatically manage system processes. The LaunchAgents folders may contain numerous launcher files for various system and application processes such as scheduled updater routines, but have also been used by malware developers to launch their criminal activity.ĭespite this wave of malware and the variants of each that have followed, most of these attacks have one thing in common: they use Launch Agent scripts for at least one stage of their attacks. Some of these attacks are targeted for specific groups in China or Tibet, but others like Flashback are more widespread and have targeted as many Mac systems as possible, by exploiting vulnerabilities in the system when browsing Web pages and posing as fake Flash installer applications. These include yesterday's news of the SabPab malware and its MacKontrol variant, and also the Olyx malware that is a variant of the Tibet malware we previously discussed. The same vulnerabilities that this and others have used are now cropping up in other malware as well. Recently the Mac platform has been hit with a few malware attacks, the most notable being the Flashback malware.
