The present disclosure relates to security for information technology and more particularly relates to methods, systems and computer readable media for protecting data processing systems from malware or other security problems created by software.
Many existing data processing systems use techniques to prevent malware or other software from affecting the operation of the system. One such technique involves booting a system (such as a computer, smartphone or tablet computer) via a secure boot ROM which is the start of a chain of trust that proceeds through the use of a series of code signatures up the chain of trust. The iOS operating system from Apple Inc. provides such a technique for securely booting an iPhone or iPad. Another technique which can be used in the prior art is to sign executable code provided from a third party application developer with a certificate issued by an operator of an application store. This signed code can be verified to be authentic at run time, and thereby prevent malware, which would not be verified to be authentic, from running. Apps available from the Apple app store for iOS are examples of applications that are signed before being made available on an application store.
Systems, methods, and machine readable media are described which use code verification to verify the authenticity of installed software. The code verification, in one embodiment, can be performed using a set of different paths which includes a first path that uses a trust cache of hashes of operating system components and platform applications that are included together in a software build that is installed on a system and a second path which evaluates code signed with one or more certificates (for example, code signatures) for a software component, such as software from a third party software application or daemon that is not part of the software build. The path taken by the code verification process is audited to verify that the system has not been compromised by malware or other malicious software.
In one embodiment, a method for performing this code verification can include: determining an expected path of a code verification process for a first software component, wherein the code verification process has at least two paths which are different and wherein the first software component is a software application or a software daemon; causing the code verification process to perform a code verification on the first software component to determine whether the first software component is authentic; comparing the expected path to the path taken by the code verification process when the code verification on the first software component was performed: causing a protective action to occur in response to determining from the comparison that the path taken does not match the expected path. In one embodiment, the code verification process can record the path taken, and the two paths can include a first path for checking a trust cache of hashes of binaries from a build of an operating system and platform applications (and platform daemons) and a second path for evaluating a signature of signed code for a software component. In one embodiment, the expected path is determined by a first daemon which launches software components including software applications and software daemons. In one embodiment, the first daemon is the first user process which is launched in user memory space after a set of one or more kernel software components establish a kernel memory space during a secure boot up procedure which verifies code signatures in a chain of trust starting from a secure boot ROM.
In one embodiment, the first daemon determines the expected path based upon the source of the request or job to launch the first software component; the source, in one embodiment, can be either (1) a property list (or similar data structure) used by the first daemon to launch “system” or platform daemons (e.g. platform daemons bundled with the operating system), where the property list can specify a list of platform daemons and their storage locations (e.g. pathnames in a file system) in a persistent storage such as flash memory or (2) a user application that presents a user interface which shows icons or other selectable items that allow a user to select an application to cause the application to be launched or to run. In this embodiment, if the source is a property list then the expected path is the first path; the property list in this case includes a list of platform daemons that are expected to be bundled with a software build of the operating system, and therefore the software verification process is expected to use the trust cache. If the source is the user application that is used by a user to select an application (to cause it to be launched) then the expected path is the second path (which evaluates a signature of signed code) unless the user application indicates that the user's selected application is a platform application in which case the expected path is the first path. In one embodiment, the user application displays icons of both platform applications and third party applications, and the user application specifies to the first daemon whether the user's selected application is a platform application or a third party application.
In another embodiment, the first daemon determines the expected path from a property list used by the first daemon, and the property list specifies a storage location (e.g. pathname) that determines either the first path for the first software component or the second path for the first software component. In one embodiment, the first daemon causes the launching of a set of software daemons which is specified in the property list, and the property list also specifies a set of addresses or paths used to launch each software daemon in the set of software daemons.
In one embodiment, the first daemon, after it is launched, launches a software application that presents a graphical user interface which shows icons on a touch sensitive screen that allows the user to select an icon to launch the application represented by that icon.
In one embodiment, the protective action is one of: rebooting the data processing system to a restore mode requiring a re-installation of software; rebooting the data processing system to a recovery mode; causing a kernel panic; or disabling the first software component.
The methods described herein can be implemented by data processing systems, such as a smartphone or desktop computer or laptop computer or tablet computer or other consumer electronic devices. The methods described herein can also be implemented by one or more data processing systems which execute executable instructions, stored on one or more non-transitory machine readable media, that cause the one or more data processing systems to perform one or more of the methods described herein. Thus, the embodiments described herein include methods, data processing systems, and non-transitory machine readable media.
The above summary does not include an exhaustive list of all embodiments in this disclosure. All systems and methods can be practiced from all suitable combinations of the various aspects and embodiments summarized above, and also those disclosed in the Detailed Description below.
The present invention is illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements.
Various embodiments and aspects will be described with reference to details discussed below, and the accompanying drawings will illustrate the various embodiments. The following description and drawings are illustrative and are not to be construed as limiting. Numerous specific details are described to provide a thorough understanding of various embodiments. However, in certain instances, well-known or conventional details are not described in order to provide a concise discussion of embodiments.
Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in conjunction with the embodiment can be included in at least one embodiment. The appearances of the phrase “in one embodiment” in various places in the specification do not necessarily all refer to the same embodiment. The processes depicted in the figures that follow are performed by processing logic that comprises hardware (e.g. circuitry, dedicated logic, etc.), software, or a combination of both. Although the processes are described below in terms of some sequential operations, it should be appreciated that some of the operations described may be performed in a different order. Moreover, some operations may be performed in parallel rather than sequentially.
The embodiments described herein can be used to enhance the security of a data processing system, such as a smartphone or laptop computer. For example, the embodiments described herein can be used to stop jailbreaks of a device (such as a smartphone) from persisting across reboots when a hacker or jail breaker has laid down a file at a memory address they know will be executed. The one or more embodiments herein can be used to audit the path taken by code verification software, and when the path taken does not match an expected path determined by the system for a given software component, then the system can take protective action.
The secure boot ROM 103 can contain boot up code that in one embodiment can implement a boot up process from boot code stored in the read only memory which is implicitly trusted. The boot ROM code can contain a root certificate authority public key, such as a root certificate authority public key which is used to verify that the boot up code is signed by a trusted entity, such as the vendor of the device or operating system, before allowing it to load. This is the first step in the chain of trust where each step ensures that the next is signed by the vendor of the system, such as Apple in one embodiment. When the boot code finishes its loading process, it verifies and runs the next stage loader which in turn can verify and load the kernel of the operating system, such as operating system 21, which can be stored in non-volatile (persistent) storage, such as flash memory. The storage 105 can include a plurality of other components in addition to the operating system software 21. This secure boot chain which utilizes a chain of trust helps to ensure that the lowest levels of software are not tampered with and allows the operating system to run only on validated devices from the vendor. In one embodiment, the vendor can be a company that has provided and develops the operating system 21 and the platform apps 33. In one embodiment the platform apps 33 can include a standard set of software which is provided with a software build for a device such that each device from the vendor comes with the operating system and the platform apps (and bundled software daemons). In one embodiment, the platform apps can include standard software applications such as a web browser (e.g., Mobile Safari), email application, and other standard software components that are bundled with the operating system for distribution on devices, such as a smartphone or tablet computer or other data processing systems.
The non-volatile storage 105 can include a plurality of different software components including the operating system software component 21 which can include boot code as well as kernel software used to create an operating environment as is known in the art. Further, storage 105 can also include launch software 25 which can be software which performs the function of launching other software components, either on demand when a user launches a user application, such as a platform application or a third party application, or based on a list of daemons in a list, such as a property list stored in property lists 23. In one embodiment, the launch software 25 can be a user process which runs in user memory space while the operating system or the kernel of the operating system runs in kernel memory space. In one embodiment, the launch software 25 can be responsible for launching, either directly or indirectly, all other software components, including software applications and software daemons. In one embodiment, the launch software can be the software component known as launched used in the OS X operating system from Apple Inc. of Cupertino, Calif. and also used in the iOS operating system from Apple Inc. of Cupertino, Calif. In one embodiment, the launch software 25 can be the first user process which is launched by the kernel after the kernel completes its boot up process. In one embodiment, the launch software, after it is launched, can launch the application 29 which can be a user interface application such as Springboard or the Finder which is used by a user to launch user applications (which can be either platform applications or third party applications).
In one embodiment, the non-volatile storage 105 also includes code verification software 27 which is utilized to verify the authenticity of the software image either before or after it is launched. In one embodiment, the code verification software can include one or more software components which can provide different code verification processes depending upon the code which is being verified. In one embodiment, the code verification software can have at least two paths for verifying software. One path can utilize a trust cache of hashes 31 which contains, as is known in the art, hashes of known and authentic software bundled with a software build (which includes a version of the operating system and a corresponding version of the platform apps 33 and daemons bundled with the operating system). The use of the trust cache can be one path for code verification while the evaluation or verification of signed code using a certificate from a trusted authority or source can be another path for a code verification process. In one embodiment, two different software processes can be invoked depending upon the path. For example, in the case of the Apple iOS operating system, the AppleMobileFileIntegrity kernel extension can be used to verify apps and daemons in the platform apps 33 which come bundled with the operating system as part of a standard software build. In other words, the AppleMobileFileIntegrity (AMFI) can be the code verification software process which verifies or authenticates platform apps and platform daemons which are bundled with a software build which includes the operating system and the platform apps and platform daemons from the vendor of the operating system. Another software component known as the AMFI daemon (amfid) performs verification for software which originates from parties other than the vendor of the operating system and platform apps (and platform daemons), in which case third party apps are verified by verifying the code signature for the third party app, such as third party apps 35. Such third party apps can include apps such as Angry Birds, Facebook, Yelp, etc. As is known in the art, as the operating system completes its boot up process and as software applications begin to be launched, the executing code for these various software components are stored in the volatile storage 107.
In one embodiment, the trust cache 31 is a signed file with all of the hashes of the binaries of all platform apps and platform daemons that are bundled with the build of the operating system from the vendor of the operating system or the vendor of the device which includes the operating system and the bundled platform apps and platform daemons. The trust cache includes, in one embodiment, hashes for launchd, cloudd, Springboard, MobileSafari and other platform apps and other daemons that are bundled with the build of the iOS operating system from the vendor Apple Inc. of Cupertino, Calif. which also provides a device, such as an iPhone or iPad table to run the build of the operating system and other bundled components such as the platform apps and the daemons that are bundled with the build of the operating system. The trust cache, as described herein, is used during a code verification process to verify the authenticity of the software provided by the vendor of the build of the operating system and the rest of the bundled components. In one embodiment, the trust cache does not include hashes of any third party code such as software from companies other than the vendor of the operating system or the device which created the build of the operating system which is bundled with the platform apps and daemons. In this instance, the trust cache can only be used to verify the authenticity of software from the vendor which created the build of the operating system or the vendor of the device which bundled the operating system with the platform apps and other daemons.
The third party apps 35 can be a collection of one or more third party applications that can be signed by a certificate from a trusted authority such as a vendor of the operating system 21 or a vendor of the app store which provided the third party app to the device that contains the storage 105. The third party is, in one embodiment, different than the vendor of OS 21 or the vendor of the app store. There are numerous ways in which an app can be signed with a certificate in order to ensure its authenticity. For example, a developer (a third party) who is preparing the software for the third party app can obtain a certificate from a vendor of the operating system or device or app store or some other trusted authority. In one embodiment, the certificate can be obtained from an entity which creates the operating system 21 and the platform apps 33 and which also provides an app store from which the app can be distributed to end users. The certificate can include an identifier of the developer and/or the developer's public key and can be encrypted by the vendor's private key. The certificate can be bundled or concatenated with the binary of the compiled code written by the developer or otherwise created by the developer. The developer can then sign the code with the certificate and then provide the signed code to the app store for distribution to end users. After the end user downloads the app, it can be evaluated at run time using techniques which are known in the art such as those done by third party apps obtained from Apple's app store.
The embodiments described herein can be implemented in a system with the software architecture shown in
The property list 21 can specify a sequence or order for launching various daemons. For example in the case of
Various methods will now be described which can utilize the software architecture shown in
Once the launch software 25 has selected an app for launching (or been requested to launch an application), the method shown in
In one embodiment, the launch software, such as launch software 25 may perform operations in conjunction with interprocess communication (IPC). For example, the launch software may be involved in interprocess communications between the launch software itself and other processes such as other daemons or applications, etc. In one embodiment, the launch software can be configured to deny an interprocess communication if the caller (which requests the interprocess communication with the launch software) is not software which has a hash in the trust cache, such as the trust cache 31. In other words, if the caller software does not have a hash of its binary in the trust cache, then the launch software denies the IPC request or action. This can prevent the use of interprocess communication with the launch software when the software which calls for the interprocess communication was not bundled with the operating system and platform apps and daemons that came with the build of the operating system. In other words, a third party application in this embodiment will not be able to access the launch software's functionality through an IPC.
As shown in
The mass storage 811 is typically a magnetic hard drive or a magnetic optical drive or an optical drive or a DVD RAM or a flash memory or other types of memory system which maintain data (e.g., large amounts of data) even after power is removed from the system. Typically the mass storage 811 will also be a random access memory although this is not required. While
In the foregoing specification, specific exemplary embodiments have been described. It will be evident that various modifications may be made to those embodiments without departing from the broader spirit and scope set forth in the following claims. The specification and drawings are, accordingly, to be regarded in an illustrative sense rather than a restrictive sense.
This application claims the benefit of U.S. Provisional Patent Application No. 62/302,589, filed on Mar. 2, 2016, which application is incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62302589 | Mar 2016 | US |