Cis 2.12.2 (#9525)

This commit is contained in:
Sharon Katz 2023-01-27 11:16:41 -05:00 committed by GitHub
parent dd33a7a29a
commit 218f10eefe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 50 additions and 0 deletions

View File

@ -712,6 +712,27 @@ spec:
---
apiVersion: v1
kind: policy
spec:
name: CIS - Ensure Guest Access to Shared Folders Is Disabled
platforms: macOS
platform: darwin
description: Allowing guests to connect to shared folders enables users to access selected shared folders and their contents from different computers on a network
resolution: |
Automated method:
Ask your system administrator to deploy the following script which will disable guest users from access to shared folders:
/usr/bin/sudo /usr/sbin/sysadminctl -smbGuestAccess off
Graphical Method:
Perform the following steps to no longer allow guest user access to shared folders:
1. Open System Settings
2. Select Users & Groups
3. Select the i next to the Guest User
4. Set Allow guests to connect to shared folders to disabled
query: SELECT 1 from plist where path = '/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist' AND key = 'AllowGuestAccess' AND value = 0;
purpose: Informational
tags: compliance, CIS, CIS_Level1, CIS2.12.2
---
apiVersion: v1
kind: policy
spec:
name: CIS - Ensure Automatic Login Is Disabled (MDM Required)
platforms: macOS

View File

@ -1 +1,3 @@
#!/bin/bash
sudo /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Test Message 1"

View File

@ -1 +1,3 @@
#!/bin/bash
sudo /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool true

View File

@ -1 +1,3 @@
#!/bin/bash
sudo /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint -int 0

View File

@ -1 +1,3 @@
#!/bin/bash
sudo dscl . -list /Users hint . -delete /Users/<username>

View File

@ -1,2 +1,4 @@
#!/bin/bash
sudo /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow GuestEnabled -bool false
sudo /usr/bin/defaults write /Library/Preferences/com.apple.MCX DisableGuestAccount -bool true

View File

@ -0,0 +1,9 @@
#!/bin/bash
/usr/bin/sudo /usr/sbin/sysadminctl -smbGuestAccess off
# For testing
# Get Status: /usr/bin/sudo /usr/sbin/sysadminctl -smbGuestAccess status
# Set to enabled: /usr/bin/sudo /usr/sbin/sysadminctl -smbGuestAccess on

View File

@ -1 +1,3 @@
#!/bin/bash
sudo /usr/bin/defaults delete /Library/Preferences/com.apple.loginwindow autoLoginUser

View File

@ -1,3 +1,5 @@
#!/bin/bash
sudo /usr/bin/defaults write /Library/Application\
Support/CrashReporter/DiagnosticMessagesHistory.plist AutoSubmit -bool false

View File

@ -1 +1,3 @@
#!/bin/bash
sudo /usr/sbin/spctl --master-enable

View File

@ -1,2 +1,4 @@
#!/bin/bash
#replace username
sudo -u <username> /usr/bin/defaults -currentHost write com.apple.screensaver idleTime -int 1200

View File

@ -1,2 +1,4 @@
#!/bin/bash
sudo /usr/sbin/sysadminctl -screenLock immediate -password <administrator password>
sudo /usr/sbin/sysadminctl -screenLock 5 seconds -password <administrator password>