

To install osquery download the official installer from: If you are a Kolide customer you can use Live Query To follow along at home you will need a Mac computer with osquery installed. Used to arrive at the final query in the sections below. Information, that data can sometimes require massaging and manipulation toĪnswer the question that you are after. While osquery is incredibly powerful and has access to an enormous breadth of Using Osquery to Programmatically Return Manufacture Date Let’s examine, stepwise, how we can return that same information So now we know that my iMac Pro was manufactured sometime in the 49th week of Need to add 26 to 23 to get the total week value (49). The first half of the year was 26 weeks, so we will Talking about the 23rd week of the second half of the year means that we mustĪccount for the offset. Here is the first important note to ensure your success. The lookup table below displays the mapping of various years and weeks to For the remainder of this post we will be using my iMac Pro as the

Manufacturing date for an Apple device is encoded in the 4th and 5th characters To understand the rest of this post it is important to know that the To utilize external data through the creation of temporary lookup tables. Useful example for how to perform string and date manipulations as well as how Intent to do away with procedurally generated serials in favor of randomĪs a result the content of this blog article may be deprecated with regards toįor devices manufactured prior to the second half of 2021 (Apple MacBook ProsĪnd iMacs with Apple M series CPU’s), this approach still works, and serves as a The asterisk above is due to the fact that in 2020, Apple announced its

Manufacturing location, the manufacture date, and even the device enclosure With the serial could determine things such as the hardware model, the Various details about devices into their hardware serial number. *Up until the time of the original publication of this blog entry, Apple encoded
