Skip to content

cast error on windows os_version, and missing build revision? #6082

Closed
@directionless

Description

Bug report

We noticed a couple of issues with the windows version table.

Windows seems to have a major, minor, build, and build revision. Notably the is no patch level. This means that when we select against the os_version table, we get cast errors:

osquery> SELECT patch FROM os_version;                                                                                                        
I1125 20:47:07.555104  3564 dynamic_table_row.cpp:114] Error casting patch () to INTEGER                                                      
patch =                                                                                                                                       

Also, it could be interesting to add a build revision. I know this is in the registry, not sure it's in WMI

osquery> select data from registry WHERE key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" and name = "UBR" ;          
 data = 864                                                                                                                                   

What operating system and version are you using?

osquery> SELECT version, build, platform FROM os_version;                                                                                     
 version = 10.0.17763                                                                                                                         
   build = 17763                                                                                                                              
platform = windows                                                                                                                            

What version of osquery are you using?

osquery> SELECT version from osquery_info;                                                                                                    
version = 4.1.1                                                                                                                               

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions