T1547.007
Re-opened Applications
Adversaries may modify plist files to automatically run an application when a user logs in on macOS. When a user logs out or restarts via the macOS GUI, a prompt with a checkbox to 'Reopen windows when logging back in' causes all currently open applications to be added to a property list file named com.apple.loginwindow.[UUID].plist within ~/Library/Preferences/ByHost/. Adversaries can establish persistence by adding a malicious application path to this plist file to execute payloads when a user logs in.
Microsoft Sentinel / Defender
kusto
DeviceFileEvents
| where Timestamp > ago(24h)
| where FolderPath has "Library/Preferences/ByHost"
| where FileName startswith "com.apple.loginwindow."
| where ActionType in ("FileModified", "FileCreated")
| project Timestamp, DeviceName, FileName, FolderPath, ActionType,
InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessAccountName
| sort by Timestamp desc medium severity
medium confidence
Data Sources
File: File Modification File: File Creation Microsoft Defender for Endpoint
Required Tables
DeviceFileEvents
False Positives
- Normal macOS logon/logoff cycle modifying the loginwindow plist via the loginwindow process
- Users manually toggling the 'Reopen windows when logging back in' checkbox in System Preferences
- macOS system updates that modify loginwindow preferences
Last updated: 2026-04-20 Research depth: deep
References (5)
- https://attack.mitre.org/techniques/T1547/007/
- https://support.apple.com/en-us/HT204005
- https://www.virusbulletin.com/uploads/pdf/conference/vb2014/VB2014-Wardle.pdf
- https://taomm.org/PDFs/vol1/CH%200x02%20Persistence.pdf
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1547.007/T1547.007.md
Unlock Pro Content
Get the full detection package for T1547.007 including response playbook, investigation guide, and atomic red team tests.
Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance
Related Detections
Parent Technique
T1547Boot or Logon Autostart ExecutionRelated Sub-techniques
T1547.001Registry Run Keys / Startup FolderT1547.002Authentication PackageT1547.003Time ProvidersT1547.004Winlogon Helper DLLT1547.005Security Support ProviderT1547.006Kernel Modules and ExtensionsT1547.008LSASS DriverT1547.009Shortcut ModificationT1547.010Port MonitorsT1547.012Print ProcessorsT1547.013XDG Autostart EntriesT1547.014Active SetupT1547.015Login Items