Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T1037.005, T1543.001, T1543.004 Persist Tests Enhancements #2755

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

kevinmstapleton
Copy link
Contributor

Details:
MACOS ONLY

  1. T1037.005:
  • Added test for alternative method of spawning daemon inside /Library/StartupItems using bash + /etc/rc.common
  • Added test for alternative method of spawning agent inside /Library/StartupItems using bash + /etc/rc.common
  • Added src directory containing StartupParameters.plist, two bash scripts, and two plist files (one for agent, one for daemon) to be spawned from the bash scripts.
  1. T1543.001:
  • Simply added coverage for LaunchAgents placed in root directory /Library/LaunchAgents in addition to the already existing ~/Library/LaunchAgents test
  1. T1543.004:
  • Simply added coverage for LaunchDaemons placed in user directory ~/Library/LaunchDaemons in addition to the already existing /Library/LaunchDaemons test

Testing:
Tested on Apple M1 Pro Sonoma 14.3.1

Associated Issues:

kevinmstapleton added 2 commits April 25, 2024 10:17
T1037.005, T1543.001, T1543.004
Copy link
Collaborator

@cyberbuff cyberbuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. Requested a couple changes.

Comment on lines +37 to +42
- name: Launch Daemon - Users Directory
auto_generated_guid:
description: |
Utilize LaunchDaemon in /Users directory to touch temporary file in /tmp
supported_platforms:
- macos
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My suggestion here would be instead of creating a new test, we can create a new input argument in the previous test launch_daemons_path and have a default value of /Library/LaunchDaemons. If needed, others can change this path to execute in a different directory(say Users directory). What are your thoughts ?

Comment on lines +66 to +67
cleanup_command: |
sudo launchctl unload tmp/T1037_005_daemon.plist
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

launchctl load command is not called in the executor-command. Is this by mistake ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants