Skip to content

Commit 597a198

Browse files
authored
Add best practice macOS setup (#23)
* Add policies * Add them to teams * Add policies * Add automatic enrollment profile and macOS setup config * Add profile
1 parent 946d423 commit 597a198

5 files changed

+114
-8
lines changed

lib/automatic-enrollment.dep.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"profile_name": "Fleet's example automatic enrollment profile",
3+
"allow_pairing": true,
4+
"is_mdm_removable": true,
5+
"org_magic": "1",
6+
"language": "en",
7+
"region": "US",
8+
"skip_setup_items": [
9+
"Accessibility",
10+
"Appearance",
11+
"AppleID",
12+
"AppStore",
13+
"Biometric",
14+
"Diagnostics",
15+
"FileVault",
16+
"iCloudDiagnostics",
17+
"iCloudStorage",
18+
"Location",
19+
"Payment",
20+
"Privacy",
21+
"Restore",
22+
"ScreenTime",
23+
"Siri",
24+
"TermsOfAddress",
25+
"TOS",
26+
"UnlockWithWatch"
27+
]
28+
}

lib/device-health.policies.yml renamed to lib/macos-device-health.policies.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# The Fleet Enterprise Edition (EE) license applies to code in this file. See the license here: https://github.com/fleetdm/fleet/blob/main/ee/LICENSE
2+
13
- name: macOS - CIS - Ensure FileVault is enabled (MDM required)
24
platform: darwin
35
description: Checks that FileVault is enabled. FileVault secures a system's data by automatically encrypting its boot volume and requiring a password or recovery key to access it. This policy checks that filevault is enabled on the device and that the user is not allowed to disable it.
+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# The Fleet Enterprise Edition (EE) license applies to code in this file. See the license here: https://github.com/fleetdm/fleet/blob/main/ee/LICENSE
2+
3+
- name: Windows - CIS - Ensure Enable screen saver is enabled
4+
platform: windows
5+
description: |
6+
This policy setting enables/disables the use of desktop screen savers.
7+
The recommended state for this setting is: Enabled.
8+
resolution: |
9+
To establish the recommended configuration via GP, set the following UI path to Enabled:
10+
'User Configuration\Policies\Administrative Templates\Control Panel\Personalization\Enable screen saver'
11+
Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer).
12+
query: |
13+
SELECT 1 FROM registry WHERE path LIKE 'HKEY_USERS\%\SOFTWARE\Policies\Microsoft\Windows\Control Panel\Desktop\ScreenSaveActive' and data = 1;
14+
- name: "Windows - CIS - Ensure Screen saver timeout enabled: 20 minutes or less"
15+
platform: windows
16+
description: |
17+
This setting specifies how much user idle time must elapse before the screen saver is launched.
18+
The recommended state for this setting is: Enabled: 900 seconds or fewer, but not 0. Note: This setting has no effect under the following circumstances:
19+
- The wait time is set to zero.
20+
- The "Enable Screen Saver" setting is disabled.
21+
- A valid screen existing saver is not selected manually or via the "Screen saver executable name" setting
22+
resolution: |
23+
To establish the recommended configuration via GP, set the following UI path to Enabled: 900 or fewer, but not 0:
24+
'User Configuration\Policies\Administrative Templates\Control Panel\Personalization\Screen saver timeout'
25+
Note: This Group Policy path may not exist by default. It is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with the Microsoft Windows 7 & Server 2008 R2 Administrative Templates (or newer).
26+
query: |
27+
SELECT 1 FROM registry WHERE path LIKE 'HKEY_USERS\%\SOFTWARE\Policies\Microsoft\Windows\Control Panel\Desktop\ScreenSaveTimeOut' AND data <=1200 AND data > 0 ;
28+
- name: Windows - CIS - Ensure BitLocker is enabled
29+
platform: windows
30+
description: Full Disk Encryption (FDE) reduces the risk of compromise when a device is lost or stolen. This query lists any system that does not have BitLocker enabled on its OS drive (typically C:).
31+
resolution: Ask your system administrator to turn on disk encryption in Fleet
32+
query: SELECT * FROM bitlocker_info WHERE drive_letter='C:' AND protection_status != 1;
33+
- name: Windows - CIS - Ensure guest account is disabled
34+
platform: windows
35+
description: |
36+
This policy setting determines whether the Guest account is enabled or disabled. The Guest account allows unauthenticated network users to gain access to the system.
37+
resolution: |
38+
Automatic method:
39+
Ask your system administrator to establish the recommended configuration via GP, set the following UI path to 'Disabled':
40+
'Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\Security Options\Accounts: Guest account status'
41+
query: |
42+
SELECT 1 FROM mdm_bridge where mdm_command_input = "<SyncBody><Get><CmdID>1</CmdID><Item><Target><LocURI>./Device/Vendor/MSFT/Policy/Result/LocalPoliciesSecurityOptions/Accounts_EnableGuestAccountStatus</LocURI></Target></Item></Get></SyncBody>" and mdm_command_output == 0;
43+
- name: Windows - CIS - Ensure password is required to wake the computer from screen saver is enabled
44+
platform: windows
45+
description: |
46+
This setting determines whether screen savers used on the computer are password protected.
47+
The recommended state for this setting is: Enabled.
48+
resolution: |
49+
To establish the recommended configuration via GP, set the following UI path to Enabled:
50+
'User Configuration\Policies\Administrative Templates\Control Panel\Personalization\Password protect the screen saver'
51+
Note: This Group Policy path is provided by the Group Policy template ControlPanelDisplay.admx/adml that is included with all versions of the Microsoft Windows Administrative Templates.
52+
query: |
53+
SELECT 1 FROM registry WHERE path LIKE 'HKEY_USERS\%\SOFTWARE\Policies\Microsoft\Windows\Control Panel\Desktop\ScreenSaverIsSecure' and data = 1;
54+
- name: Windows - CIS - Ensure Remote Desktop is disabled
55+
platform: windows
56+
description: |
57+
This policy setting allows you to configure remote access to computers by using Remote Desktop Services.
58+
resolution: |
59+
To establish the recommended configuration via GP, set the following UI path to 'Disabled':
60+
'Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections\Allow users to connect remotely by using Remote Desktop Services'
61+
query: |
62+
SELECT 1 FROM registry WHERE (path = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\Terminal Services\\fDenyTSConnections' AND data = 1);
63+
- name: Windows - CIS - Ensure Remote Management is set to disabled
64+
platform: windows
65+
description: |
66+
The Windows Remote Management (WinRM) service implements the WS-Management protocol for remote
67+
management. WS-Management is a standard web services protocol used for remote software and
68+
hardware management. The WinRM service listens on the network for WS-Management requests and processes them.
69+
resolution: |
70+
Automatic method:
71+
Ask your system administrator to establish the recommended configuration via domain GP, set the following UI path to 'Disabled':
72+
'Computer Configuration\Policies\Windows Settings\Security Settings\System Services\Windows Remote Management (WS-Management)'
73+
query: |
74+
SELECT 1 FROM registry WHERE (path = 'HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\WinRM\\Start' AND data == 4);

teams/workstations-canary.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ controls:
2121
custom_settings:
2222
- path: ../lib/windows-screenlock.xml
2323
macos_setup:
24-
bootstrap_package:
25-
enable_end_user_authentication:
26-
macos_setup_assistant:
24+
bootstrap_package: https://github.com/organinzation/repository/bootstrap-package.pkg
25+
enable_end_user_authentication: true
26+
macos_setup_assistant: ../lib/automatic-enrollment.dep.json
2727
scripts:
2828
- path: ../lib/remove-zoom-artifacts.script.sh
2929
- path: ../lib/reset-timezone.sh
@@ -37,7 +37,8 @@ queries:
3737
observer_can_run: true
3838
automations_enabled: false
3939
policies:
40-
- path: ../lib/device-health.policies.yml
40+
- path: ../lib/macos-device-health.policies.yml
41+
- path: ../lib/windows-device-health.policies.yml
4142
agent_options: ./lib/agent-options.yml
4243
team_settings:
4344
webhook_settings:

teams/workstations.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,18 @@ controls:
2121
custom_settings:
2222
- path: ../lib/windows-screenlock.xml
2323
macos_setup:
24-
bootstrap_package:
25-
enable_end_user_authentication:
26-
macos_setup_assistant:
24+
bootstrap_package: https://github.com/organinzation/repository/bootstrap-package.pkg
25+
enable_end_user_authentication: true
26+
macos_setup_assistant: ../lib/automatic-enrollment.dep.json
2727
scripts:
2828
- path: ../lib/remove-zoom-artifacts.script.sh
2929
- path: ../lib/reset-timezone.sh
3030
queries:
3131
- path: ../lib/collect-usb-devices.queries.yml
3232
- path: ../lib/collect-failed-login-attempts.queries.yml
3333
policies:
34-
- path: ../lib/device-health.policies.yml
34+
- path: ../lib/macos-device-health.policies.yml
35+
- path: ../lib/windows-device-health.policies.yml
3536
agent_options: ./lib/agent-options.yml
3637
team_settings:
3738
webhook_settings:

0 commit comments

Comments
 (0)