mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 14:03:24 +00:00
os_hibernate_mode_enable: remediation is not effective #231
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @marcindulak on GitHub.
Summary
os_hibernate_mode_enable: remediation is not effective
Steps to reproduce
On a fresh system, execute the compliance script generated from baseline (e.g. https://github.com/usnistgov/macos_security/blob/main/baselines/cis_lvl2.yaml) which includes this rule,
and apply remediation with "3. Run Commands to remediate non-compliant settings". Run the "2. Run New Compliance Scan" again.
Operating System version
What is the current bug behavior?
The following commands appear not effective
06cc0d2614/rules/os/os_hibernate_mode_enable.yaml (L28-L34)After their execution the following is reported by pmset:
See https://apple.stackexchange.com/questions/434372/cant-find-standbydelayhigh-and-standbydelaylow-on-macbook-pro-2021 for discussion.
The following line appears unused in the check
06cc0d2614/rules/os/os_hibernate_mode_enable.yaml (L12)I'm not sure if it should be removed, or covered by a check.
See for example discussion at https://www.techrepublic.com/article/how-to-ensure-the-integrity-of-your-encrypted-drive-while-its-hibernating-in-macos/
What is the expected correct behavior?
or another "passed" check output as needed.
Relevant logs and/or screenshots
Output of checks
Possible fixes
Unknown
@robertgendler commented on GitHub:
Good idea with the issue template update. We made that a long long time ago. So I think we should update that.
@robertgendler commented on GitHub:
Issue template updated!
@marcindulak commented on GitHub:
Thanks, it's Apple Silicon M1.
It was not clear to me how braches are used, but got an answer in https://github.com/usnistgov/macos_security/issues/132#issuecomment-1230282160.
Following this I have some suggestions:
sw_vers && system_profiler SPHardwareDataType | grep "Chip:". I'm not sure how portable is this.@robertgendler commented on GitHub:
Is this an Apple Silicon Mac or Intel?
I believe what you're running into is fixed on the OS branches
https://github.com/usnistgov/macos_security/blob/monterey/rules/os/os_hibernate_mode_enable.yaml
Check out the OS branches for the most up to date.
@ecbyrd commented on GitHub:
As @robertgendler mentioned, we are recommending those settings for Intel machines only. For Apple Silicon we have these settings:
$ sudo pmset -a standby <value≤900>$ sudo pmset -a destroyfvkeyonstandby 1$ sudo pmset -a hibernatemode 25Also, hibernatemode 25 is not included, which is what sets the proper hibernate mode we require.