launchd persistence macOS

cp launchd.plist ~/Library/LaunchAgents/com.apple.update.plist ; launchctl load ~/Library/LaunchAgents/com.apple.update.plist

Installs a LaunchAgent with an innocuous name (com.apple.update) in ~/Library/LaunchAgents and loads it with launchctl: your payload will execute at every user login, classic macOS persistence.

When you already have access to a user session on macOS and want persistence that survives reboots: a LaunchAgent in ~/Library/LaunchAgents runs with user privileges at every login, no admin needed. The com.apple. prefix disguises the agent among legitimate ones.

If you need persistence with root privileges, a user LaunchAgent is not enough: you need /Library/LaunchDaemons (which requires admin). Also avoid it if the host has Jamf/Kandji with file integrity monitoring on ~/Library/LaunchAgents: the appearance of a new plist in that directory triggers an immediate alert.