
<https://sepses.org/resource/attack/attack-pattern--43ba2b05-cf72-4b6c-8243-03a4aba41ee0> <http://purl.org/dc/terms/created> "2020-01-10T16:01:15.995+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
	<http://purl.org/dc/terms/description> """Adversaries may use a Login Hook to establish persistence executed upon user logon. A login hook is a plist file that points to a specific script to execute with root privileges upon user logon. The plist file is located in the <code>/Library/Preferences/com.apple.loginwindow.plist</code> file and can be modified using the <code>defaults</code> command-line utility. This behavior is the same for logout hooks where a script can be executed upon user logout. All hooks require administrator permissions to modify or create hooks.(Citation: Login Scripts Apple Dev)(Citation: LoginWindowScripts Apple Dev) 

Adversaries can add or insert a path to a malicious script in the <code>com.apple.loginwindow.plist</code> file, using the <code>LoginHook</code> or <code>LogoutHook</code> key-value pair. The malicious script is executed upon the next user login. If a login hook already exists, adversaries can add additional commands to an existing login hook. There can be only one login and logout hook on a system at a time.(Citation: S1 macOs Persistence)(Citation: Wardle Persistence Chapter)

**Note:** Login hooks were deprecated in 10.11 version of macOS in favor of [Launch Daemon](https://attack.mitre.org/techniques/T1543/004) and [Launch Agent](https://attack.mitre.org/techniques/T1543/001) """ ;
	<http://purl.org/dc/terms/modified> "2025-10-24T17:48:42.963+00:00"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
	<http://purl.org/dc/terms/title> "Login Hook" ;
	<http://purl.org/dc/terms/version> "2.0" ;
	<https://sepses.org/vocab/ref/attack#hasDomain> "enterprise-attack" ;
	<https://sepses.org/vocab/ref/attack#isSubtechnique> true ;
	<https://sepses.org/vocab/ref/attack#platform> "macOS" ;
	a <https://sepses.org/vocab/ref/attack#Technique> .

