Developing OVAL Inventory Tests for Apple Platforms.
(I'm attempting to reset the conversation and move forward from what went on in the pkginfo discussion.) One of the typical uses for OVAL (http://oval.mitre.org) is to determine whether a particular version of a particular software package is installed. E.g. Is Firefox version 22.0 installed? These tests are typically used to determine if a machine is susceptible to particular CVEs. See http://oval.mitre.org/repository/data/ViewDefinition?id=oval%3aorg.mitre.ova.... On Windows systems, the registry is typically consulted to see if an application is installed and what version it is. On Red Hat Linux systems, the Red Hat Package Manager (RPM) is checked (see http://oval.mitre.org/repository/data/ViewItem?id=oval:org.mitre.oval:tst:38...). If you check the similar inventory definitions in the OVAL Repository for OS X you will notice a few things (http://oval.mitre.org/repository/data/SearchDefinitionAdv?class=2&family=2) : 1. There are very few items compared to Windows or Linux. 2. They all check for the existence of a particular file, whether it be in the package receipt directory (/private/var/db/receipts) or the /Applications directory. Based on the discussion concerning the pkginfo test, the above approach of checking for the existence of certain files is at best not a best practice, and at worst dangerously wrong. During the pkginfo test discussion, it was mentioned that "system_profiler SPApplicationsDataType" could be used from the command line, and Josh shared some Objective-C code that does a metadata query. I want to be careful when developing the OVAL constructs not to dictate the implementation. E.g. Issuing "system_profiler SPApplicationDataType" and then using Xpath to examine the XML might work, but an "application_test" that you hand an application name and get back metadata similar to what system_profiler provides may make more sense. On Windows, there is not a "regedit_test", there's a "registry_test". Under the covers, "application_test" could use system_profiler or API calls to return the desired stuff. And how the information is retrieved could depend on many things – is the evaluation being done directly on the box? Is a central scanner being used that connects remotely to a box? Is MDM being used? If we go down the path of "systemprofiler_test" that limits our options quite heavily. OTOH, system_profiler seems to be very flexible and gives access to many types of information in an "Apple approved" way. Perhaps implementing a general system_profiler based test quickly will be a good starting point and from there we can move on to better, more specialized tests. (Similar to how there is a textfilecontent test, but there is now a proposal for an INI test as working with INI files as raw text files is extremely cumbersome.) - Jasen.
Jasen, I submit that there are few items in the OVAL repository because very few people have spent any time writing them. I further submit one of the goals of the SCAP-on-Apple project is to greatly expand the number of definitions. I also would like to state (again) that just because OSX is built around BSD doesn't mean you can immediately use Linux processes to check for anything. I won't even comment on how Windows is tested because there's no similarity between these two OSes. I know OVAL/Mitre people like to use unix of some kind or another and I don't want to alienate them but OSX has its own way of defining and finding things and this should be used instead of trying to shoehorn OSX into an existing method. I have not heard from Shawn on any of this discussion and would really like to hear how Apple would like to proceed. Apple is in the enterprise, there's no hiding that fact, so Apple needs to speak up and give us direction on what the best way to discover OSX settings is. For those of you who haven't looked at where our project is, please check out http://scap-on-apple.macosforge.org. Thank you for the interest in OSX. On Jul 26, 2013, at 10:53 AM, "Jacobsen, Jasen W." <jasenj1@mitre.org> wrote:
... If you check the similar inventory definitions in the OVAL Repository for OS X you will notice a few things (http://oval.mitre.org/repository/data/SearchDefinitionAdv?class=2&family=2) : There are very few items compared to Windows or Linux. They all check for the existence of a particular file, whether it be in the package receipt directory (/private/var/db/receipts) or the /Applications directory. ... - Jasen.
Peter Link LLNL retired plink53@mac.com
I completely agree. Unfortunately, the recent pkginfo discussion has revealed that OVAL does not have suitable language features to perform an accurate software inventory on OS X. So not only are people not writing OVAL definitions, there is no way to write good definitions. We, the OVAL community, could really use Apple's help to get a good inventory test into the language. I believe we (the OVAL folks) would like to get something into the next version of OVAL which is planned to be released later this year, that's why I'm pushing a bit. - Jasen. From: Peter Link <plink53@mac.com<mailto:plink53@mac.com>> Date: Friday, July 26, 2013 5:53 PM To: MITRE Employee <jasenj1@mitre.org<mailto:jasenj1@mitre.org>> Cc: "scap-on-apple-dev@lists.macosforge.org<mailto:scap-on-apple-dev@lists.macosforge.org>" <scap-on-apple-dev@lists.macosforge.org<mailto:scap-on-apple-dev@lists.macosforge.org>>, oval-developer-list OVAL Developer List/Closed Public Discussion <oval-developer-list@lists.mitre.org<mailto:oval-developer-list@lists.mitre.org>> Subject: Re: [SCAP-On-Apple-Dev] Developing OVAL Inventory Tests for Apple Platforms. Jasen, I submit that there are few items in the OVAL repository because very few people have spent any time writing them. I further submit one of the goals of the SCAP-on-Apple project is to greatly expand the number of definitions. I also would like to state (again) that just because OSX is built around BSD doesn't mean you can immediately use Linux processes to check for anything. I won't even comment on how Windows is tested because there's no similarity between these two OSes. I know OVAL/Mitre people like to use unix of some kind or another and I don't want to alienate them but OSX has its own way of defining and finding things and this should be used instead of trying to shoehorn OSX into an existing method. I have not heard from Shawn on any of this discussion and would really like to hear how Apple would like to proceed. Apple is in the enterprise, there's no hiding that fact, so Apple needs to speak up and give us direction on what the best way to discover OSX settings is. For those of you who haven't looked at where our project is, please check out http://scap-on-apple.macosforge.org<http://scap-on-apple.macosforge.org/>. Thank you for the interest in OSX.
participants (2)
-
Jacobsen, Jasen W.
-
Peter Link