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

Create macOS policies for SCA #331

Closed
3 of 6 tasks
chemamartinez opened this issue Mar 25, 2019 · 4 comments
Closed
3 of 6 tasks

Create macOS policies for SCA #331

chemamartinez opened this issue Mar 25, 2019 · 4 comments

Comments

@chemamartinez
Copy link
Contributor

chemamartinez commented Mar 25, 2019

Currently, there are not available security policies for macOS. This is necessary to be able to perform SCA scans in that OS.

This issue attempts to develop SCA policies based on the CIS benchmarks for the multiple macOS versions available. It also depends on the possibility to create checks that read commands output, which is already developed here.

This is the list of available CIS benchmarks for macOS:

  • macOS 10.13 (High Sierra)

  • macOS 10.12 (Sierra)

  • macOS 10.11 (El Capitan)

  • macOS 10.10 (Yosemite)

  • macOS 10.9 (Mavericks)

  • macOS 10.8 (Mountain Lion)

This work has been already started at: 3.9-macos-yaml-policies

@chemamartinez chemamartinez added this to To do in Wazuh 3.10.0 Mar 25, 2019
@snaow snaow removed this from To do in Wazuh 3.10.0 Mar 25, 2019
@snaow snaow added this to To do in Wazuh 3.9.0 via automation Mar 25, 2019
@snaow snaow added this to the 13th week sprint milestone Mar 25, 2019
@juan70 juan70 self-assigned this Mar 28, 2019
@juan70
Copy link
Contributor

juan70 commented Mar 29, 2019

2019-04-05

2019-04-04

2019-04-03

  • Added policy file for MacOS 10.11.

  • Added one more check for MacOS 10.12 and 10.13.

  • Fix some typos.

  • Renumber all the id: fields:

    • cis_apple_macOS_10.13.yml: from 10000
    • cis_apple_macOS_10.12.yml: from 10500
    • cis_apple_macOS_10.11.yml: from 11000
  • Reorganize the files in directories named after the version of Darwin:

    OS Version Codename Darwin version
    OS X 10.11 El Capitan 15
    macOS 10.12 Sierra 16
    macOS 10.13 High Sierra 17
  • Add a specific file for web-related vulnerabilities. It is the same as the generic one, except for the list of directories related to the web contents. These directories don't seem to be located at the same places as for Linux.

2019-04-02

  • MacOS 10.13 yml file: renumber id: fields, starting from 10000.
  • Policy file for MacOS 10.12. Numbered starting from 10500.
  • Started creating policy file for MacOS 10.11.

2019-04-01

  • Review the rules for the policies, because some things are forbidden, especially pipes. Some checks cannot be implemented due to this limitation.
  • The checks are performed for the current user, which is root. Some checks are useless for root. For example: screen saver, iCloud sync.
  • Finally, 29 checks out of 74 Scored checks are implemented.
  • TODO: just update the id: fields.

2019-03-29

  • New policies for MacOS 10.13. From the file CIS_Apple_macOS_10.13_Benchmark_v1.0.0.pdf, around 31 out of 74 Scored checks have been taken into account for the time being.
  • TODO: maybe include more Scored checks, and include some Not Scored ones. And remove the empty policies.

@juan70
Copy link
Contributor

juan70 commented Apr 2, 2019

According https://en.wikipedia.org/wiki/MacOS:

Version Codename Release date Most recent version
OS X 10.8 Mountain Lion July 25, 2012 10.8.5 (12F45) (October 3, 2013)
OS X 10.9 Mavericks October 22, 2013 10.9.5 (13F1112) (September 18, 2014)
OS X 10.10 Yosemite October 16, 2014 10.10.5 (14F27) (August 13, 2015)
OS X 10.11 El Capitan September 30, 2015 10.11.6 (15G31) (July 18, 2016)
macOS 10.12 Sierra September 20, 2016 10.12.6 (16G29) (July 19, 2017)
macOS 10.13 High Sierra September 25, 2017 10.13.6 (17G65) (July 9, 2018)
macOS 10.14 Mojave September 24, 2018 10.14.4 (18E226) (March 25, 2019)

So maybe not all the policy files are going to be implemented. Maybe only 10.13, 10.12 and 10.11.

@juan70
Copy link
Contributor

juan70 commented Apr 2, 2019

The generic policy files are used for all the UNIX-like operating systems.
For MacOS:

juan70 pushed a commit that referenced this issue Apr 3, 2019
juan70 pushed a commit that referenced this issue Apr 3, 2019
The subdirectories are named after the version of the Darwin kernel:
- 15 for OSX 10.11 (Darwin 15)
- 16 for macOS 10.12 (Darwin 16)
- 17 for macOs 10.13 (Darwin 17)
juan70 pushed a commit that referenced this issue Apr 3, 2019
Mainly because in MacOS, the paths for the web-related directories
seem to be located in different places compared to Linux.
juan70 pushed a commit that referenced this issue Apr 4, 2019
@juan70 juan70 moved this from To do to Review in progress in Wazuh 3.9.0 Apr 5, 2019
chemamartinez pushed a commit that referenced this issue Apr 8, 2019
chemamartinez pushed a commit that referenced this issue Apr 8, 2019
The subdirectories are named after the version of the Darwin kernel:
- 15 for OSX 10.11 (Darwin 15)
- 16 for macOS 10.12 (Darwin 16)
- 17 for macOs 10.13 (Darwin 17)
chemamartinez pushed a commit that referenced this issue Apr 8, 2019
Mainly because in MacOS, the paths for the web-related directories
seem to be located in different places compared to Linux.
@chemamartinez
Copy link
Contributor Author

Merged: #345. Thanks @juan70 !!

Wazuh 3.9.0 automation moved this from Review in progress to Done Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Wazuh 3.9.0
  
Done
Development

No branches or pull requests

3 participants