Skip to content

os_version does not display Apple's new Rapid Security Response information #8008

Closed

Description

@directionless

Bug report

Today we have a new Apple Rapid Security Response (RSR). I think this might be the first.

This can be seen in in the a over in

$ sw_vers
ProductName:		macOS
ProductVersion:		13.3.1
ProductVersionExtra:	(a)
BuildVersion:		22E772610a

But it is not in our table:

osquery> SELECT * FROM os_version;
+-------+---------+-------+-------+-------+--------+----------+---------------+----------+-------+
| name  | version | major | minor | patch | build  | platform | platform_like | codename | arch  |
+-------+---------+-------+-------+-------+--------+----------+---------------+----------+-------+
| macOS | 13.3.1  | 13    | 3     | 1     | 22E261 | darwin   | darwin        |          | arm64 |
+-------+---------+-------+-------+-------+--------+----------+---------------+----------+-------+

This is because we're reading /System/Library/CoreServices/SystemVersion.plist and that is not updated.

Probably, it comes from around https://github.com/mlabbe/CoreFoundation/blob/master/CFUtilities.c#L280

Activity

  1. uptycs-brian commented on May 2, 2023

    @uptycs-brian

    See https://support.apple.com/guide/deployment/manage-rapid-security-responses-dep93ff7ea78/web

    RR's may not update the main startup volume, only the Preboot volume. So it looks like OSQuery will have to read from /System/Cryptexes/OS/System/Library/CoreServices/SystemVersion.plist to check if it differs from /System/Library/CoreServices/SystemVersion.plist. Currently osquery only reads from the latter.

  2. directionless commented on May 2, 2023

    @directionless
    MemberAuthor

    Thanks @uptycs-brian ! That looks like it has the correct info

  3. zwass commented on May 3, 2023

    @zwass
    Member

    Heads up it looks like we have two slightly different approaches in PRs: #8010 #8011

  4. directionless commented on May 3, 2023

    @directionless
    MemberAuthor

    I'd like to think the framework approach in #8011 is more future proof. Curious what others think

  5. uptycs-brian commented on May 3, 2023

    @uptycs-brian

    The framework approach is not more future proof it appears to be using Apple SPI. Which has no guarantees of not disappearing or changing in a future version. I'm not saying the approach is wrong, but the plist change is much smaller and as far as future proofing there is no difference.

  6. 1dustindavis commented on May 4, 2023

    @1dustindavis

    It looks like #8011 adds a new column instead of modifying the output to the existing column. For us, a new column is preferred since the RSR build numbers are formatted significantly different than the non-RSR build numbers. Having access to both numbers independently is valuable.

  7. uptycs-brian commented on May 4, 2023

    @uptycs-brian

    Column("version", TEXT, "Pretty, suitable for presentation, OS version"),

    version is not meant to be parsed. You should be using major, minor and patch or build if you need to be exacting.

    The version value in #8010 matches the version displayed in "About This Mac"

    Screenshot 2023-05-03 at 7 59 28 PM

  8. 1dustindavis commented on May 4, 2023

    @1dustindavis

    I am referencing the build column. Although it matches the about box, it is still valuable to have both pieces of data, imo.

  9. twttr-wfreitas commented on May 5, 2023

    @twttr-wfreitas

    Vote for #8010 as it's more in line with macOS reports.

  10. zwass commented on May 5, 2023

    @zwass
    Member

    I think we should try to determine which approach to take in the upcoming office hours meeting on Tuesday. For anyone who wants to join, please join the #officehours channel in osquery Slack.

  11. directionless commented on May 9, 2023

    @directionless
    MemberAuthor

    We talked about this in office hours today. Draft notes are in hackmd

    Our conclusion:

    • lets use the API
    • we'll add an extra column
    • version should match Apple (and gains (a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions