1. Field
The present disclosure relates generally to the field of digital security, and more specifically to detecting activities of interest in one or more instruction sequences, including the detection of malicious activities.
2. Description of Related Art
The proliferation of computing technologies has presented challenges in the field of digital security. As is well known, an electronic device (e.g., a computer operating on an enterprise platform) may be comprised malicious computer data and/or spread malicious computer data to other electronic devices. This may result, for instance, in substantial system disruption and economic loss. One of ordinary skill in the art would appreciate that attacks based on malicious computer data include computer viruses, malware, worms, Trojan horses, bots, intrusions (e.g., unauthorized access), exploits (e.g., escalation of privileges, violation of confidentiality), time-based attacks (e.g., Denial of Service), or the like. The term “threat” is used to describe one or more of these types of attacks.
Conventional digital security technologies may be used to detect and/or remove malicious computer data stored and/or executing on an electronic device. Such digital security technologies can include “anti-virus software”, “malware detection”, “intrusion prevention”, “anti-attack”, firewalls, or the like, though the terms are not identical in meaning. The term “Unified Threat Management” (“UTM”) has been used to describe one or more of these implementations of digital security technologies.
Conventional digital security technologies typically detect threats using signatures that correspond to specific threats. Existing designs under this paradigm are deficient in at least two ways. First, the detection of a threat relies on the a priori knowledge of the specific threat and the availability of a signature for the specific threat. That is, conventional digital security technologies rely on known signatures to detect the presence of a known computer virus, and as a result, conventional digital security technologies often fail to detect threats for which a signature is not yet available or known. For example, conventional digital security technologies may not be able to detect an unknown variation of a known computer virus.
Second, due to the ever-increasing number of known threats, conventional digital security technologies maintain a growing number of signatures. As processes execute on an electronic device, maintained signatures are compared with program images to identify possible threats. In many cases, comparing signatures to program images in this manner uses substantial computing resources. In the context of consumer computers, it should not surprise even the casual computer user that the operation of anti-virus software can cause a computer to become sluggish.
Despite improvements in the field, conventional digital security technologies continue to be limited by these deficiencies, which are consequences of their design.
An example method for detecting an instruction sequence of interest includes, at an electronic device having one or more processors, identifying a process executing on the electronic device. The method further includes obtaining, using the one or more processors, a representation of a virtual address space of the process. In some examples, the representation is indicative of one or more instruction sequences to be performed by the one or more processors of the electronic device. The method further includes generating, using the one or more processors, a data segment based on the representation. In some examples, the data segment comprises a plurality of integers. The method further includes determining, using the one or more processors, whether a meta-expression including a plurality of ordered integers appears in the data segment. In some examples, the meta-expression corresponds to an instruction sequence of interest. The method further includes, if the meta-expression appears in the data segment, initiating an operation.
The following description is presented to enable a person of ordinary skill in the art to make and use the various embodiments. Descriptions of specific devices, techniques, and applications are provided only as examples. Various modifications to the examples described herein will be readily apparent to those of ordinary skill in the art, and the general principles defined herein may be applied to other examples and applications without departing from the spirit and scope of the various embodiments. Thus, the various embodiments are not intended to be limited to the examples described herein and shown, but are to be accorded the scope consistent with the claims.
The embodiments described herein include techniques for detecting instruction sequences of interest. Exemplary instruction sequences of interest include, but are not limited to, instruction sequences that correspond to computer viruses, malware, worms, Trojan horses, bots, intrusions (e.g., unauthorized access), exploits (e.g., escalation of privileges, violation of confidentiality), timed-based attacks (e.g., Denial of Service), or the like.
Examples of the present invention are directed to virtual address spaces. Generally, a virtual address space is a set (e.g., one or more) of ranges of addresses (e.g., virtual addresses) made available to a process, for instance, by an operating system. Each process executing on an electronic device is assigned a respective virtual address space. With reference to
In operation, the execution stack 104 stores temporary variables and function parameters. When a function is called, a stack frame is pushed onto the execution stack 104 whi1e the function executes, and the frame popped (e.g., removed) when the function returns. In this manner, the execution stack 104 serves as a last-in-first-out (LIFO) mechanism by which various operations are performed. A pointer is used to track the “top” of the stack during operation and the size of the stack is typically fixed in size. On the other hand, the heap 106 stores variables yet persists across multiple function calls such that stored variables may be accessed by a process globally. The size of the heap may be adjusted using various allocation functions (e.g., malloc( ) calloc( ). The memory mapping segment 108 includes one or more dynamic links for accessing one or more libraries (e.g., DLLs) as required during operation.
At block 210, a UTMS is trained to identify one or more instruction sequences of interest. By way of example, the UTMS may be provided with a representation of a virtual address space of a process that corresponds to a particular, known threat. The representation may, for instance, include or be indicative of instructions corresponding to the known threat. In some examples, the representation is obtained using an application configured to capture the representation during execution of the process, such as a stack trace function. The representation may be indicative of one or more instruction sequences to be performed by the one or more processors of the electronic device. Further, the representation may be indicative of instruction sequences associated with any number of threads of the process and/or further may be associated with instruction sequences configured for multi-threaded operation (e.g., hyperthreading). Any known data structure may be used to implement the representation, including but not limited to a table, a linked list, or a combination thereof, and in some examples, may be obtained in response to a context switch, for instance, to the process associated with the virtual address space.
During training, the UTMS identifies, from the training representation, instruction sequences and/or data (e.g., data associated with the instruction sequences) that can be subsequently used to identify the presence of the same instruction sequences of interest in another, unknown set of operations. In addition, by way of processing at block 210, the UTMS also becomes able to identify the presence of threats that are related to the threat that was previously provided in the training instructions (i.e., a variant).
At block 220, the UTMS monitors a virtual address space to determine whether the (trained and related) instruction sequences of interest are present in the virtual address space. For example, the UTMS may monitor the virtual address space to determine if a process corresponding to the virtual address space intends to execute instructions associated with malicious activity. Monitoring the virtual address space in this manner may, for instance, include monitoring an execution stack of the virtual address space, a heap of the virtual address space, a memory mapping segment, and/or any other portion of a virtual address space. In some examples the UTMS may monitor portions of one or more additional virtual address spaces, such as those linked to the virtual address space by way of one or more dynamic links.
At decision block 230, the UTMS determines whether the monitored virtual address space is normal or abnormal. An abnormal virtual address space is one in which the UTMS has identified one or more instruction sequences of interest. If an abnormal instruction sequence is found, processing proceeds to block 240, where the UTMS provides (e.g., generates) one or more appropriate responses. Providing an appropriate response may include providing a user or system alert and/or may include terminating one or more threads of the process associated with the virtual address space. In another example, providing an appropriate response may include terminating all threads of the process associated with the virtual address space. In yet another example, providing an appropriate response may include terminating at least one thread of each of a plurality of processes. In some examples, the UTMS may instruct an OS kernel to terminate threads and/or processes. In other examples, the UTMS may include a dynamic link library to which the process is linked and may terminate threads and/or processes directly. If no abnormal instruction sequences are found, processing returns to block 220, and the UTMS monitors another virtual address space, for instance, of a virtual address space. As described, the UTMS may monitor a virtual address space responsive to a context switch. In this manner, the UTMS may monitor (e.g., sequentially monitor) any number of processes executing on an electronic device.
In the discussion below, the threat of computer viruses is used as an exemplary instruction sequence of interest for sake of simplicity. Process 200 (
At present, over 2 million computer viruses are known to exist. The exact count varies between 2.5 million and 8 million, because different sources of authority catalogue computer viruses differently. At block 210 of process 200, a UTMS may be provided with an instruction sequence that reflects one or more attacks associated with one or more known computer viruses. At the completion of block 210, the UTMS becomes trained to detect the presence of those one or more computer viruses, as well as their respective variants, in a virtual address space. At blocks 220-240, the UTMS monitors a virtual address space for the presence of those one or more computer viruses and their variants. In this way, the UTMS is able to manage attacks that are based known threats and their unknown variants.
Process 200 is notable in at least two ways. First, block 210 produces bounded sequences of data that can be used to detect all known computer viruses and their respective variants. Thus, a UTMS using process 200 need not necessarily rely on the a priori knowledge of a specific computer virus in order to detect the computer virus in a virtual address space during operation. Second, bounded sequences of data provided at block 210 are efficient in structure and in size when compared to known computer viruses signature files used by conventional computer anti-virus technologies. Specifically, it has been determined that bounded sequences of data totaling less than 200 (8-bit) bytes are sufficient to identify most, if not all, computer viruses presently known to exist, using process 200. This size stands in stark contrast to the size of conventional computer viruses signature files, which typically range from 50 megabytes (MB) to 300 MB in size. To put into perspective, the size of 50 MB is larger than the size of 200 (8-bit) bytes by 5 orders of magnitude. Thus, tremendous computational efficiencies can be realized during operation of a UTMS using process 200.
In some examples, the representation obtained at block 310 includes (or indicates) an instruction sequence of interest for purposes of training a UTMS. In the present example, the instruction sequence of interest is the presence of instructions associated with a computer virus in the virtual address space of a process. Thus, the instructions provided to block 310 may be indicative of an attack on an electronic device using a computer virus.
Optionally, in some examples, representations of additional virtual address spaces are also obtained. The additional virtual address spaces may, for instance, be those associated with the virtual address space by way of one or more dynamic links. While operation is described herein with respect to a representation of a single virtual address space, it will be appreciated that described examples apply analogously to analysis of representations of multiple virtual address spaces. In this manner, the UTMS may be trained on instruction sequences that are not contained within a single virtual address space, but rather are included in, call on, or are otherwise associated with multiple virtual address spaces.
In some examples, only particular portions of an instruction sequence are relevant to detecting instruction sequences of interest. Accordingly, at block 320, the relevant portions of an instruction sequence are retained, and extraneous information is discarded. By way of example, one or more instructions associated with one or more of the execution stack, heap, memory mapping segment, or any other portion of a virtual address space may be discarded. Additionally or alternatively, portions of instructions may be discarded. As an example, operands and/or pointers may be discarded. As another example, instructions of a particular type may be discarded. Opcodes, for instance, may be used to identify a type of one or more instructions, and instructions having opcodes of a particular type (e.g., NOP) may be discarded. The output of block 320 is referred to as a “relevant instruction sequence”.
At block 330, the relevant instruction sequence from block 320 is converted, bitwise, into integers, thereby producing one or more data segments. Each data segment may include a sequence of integers that corresponds to a subset of the information obtained at block 310. In one embodiment, 8-bit integers are used. Instructions that span less than 8-bits are converted to 8-bit representation by padding zeros to the most significant output bits. For example, block 320 may convert bits “100” to “0000 0100”. Instructions for operations that span more than 8-bits are converted into multiple 8-bit segments. For example, block 320 converts bits “0001 0010 0100 1000” to “0001 0010” and “0100 1000”.
As used here, the term “sequence” describes a list of ordered elements. It should be appreciated that the ordering of elements within sequences of integers provided at block 330 are derived from the ordering and adjacency of relevant portions of instruction sequences processed at blocks 310-320. Put another way, to the extent that an instruction sequence of interest produces a characteristic response in execution of a process, that response is captured by way of implementation of blocks 310-330. The response is further distilled in the implementation of blocks 340-360, discussed below, such that the response becomes useful for detecting instruction sequences of interest in an unknown set of instruction sequences.
At block 340, a distance function is used to identify characteristics from the sequences of integers produced by block 330. In some examples, the distance function is performed by comparing sequences of integers for different instructions and/or instruction sequences. By way of example, a sequence of integers produced by block 330 (based on a first set of instructions from block 320) is compared against the next, adjacent sequence of integers produced by block 330 (based on the next, adjacent set of instructions from block 320).
Conventional distance functions, such as string distance functions, are well known in the art and are not discussed in detail here. As an example, a conventional string distance function may be used to determine that the strings “a b c” and “z b c” have a distance of 1, because the strings vary only in that “a” in the former is replaced with “z” in the latter, and represents the sole difference between the two strings. The instruction sequences produced by block 310 lend themselves to comparison by distance functions because block 330 produces sequences of integers, which may be treated as individual elements by a distance function. Conventional string distance functions, however, do not provide distance metrics that are sufficient for detecting instruction sequences of interest. For example, the knowledge that two strings differ by a distance of 1 provides little useful information for computer virus detection.
In one embodiment, block 340 performs a custom distance function, described below, that produces reduced sequences of integers that support the detection of instruction sequences of interest. For the sake of simplicity, the custom distance function of block 340 is discussed with reference to
Turning to
At block 420 (
At block 430 (
For example, with reference to
Blocks 410-430 repeat for other integers that appear within at least a pair of adjacent sequences of integers. For example, the integer “48” also appears in at least one pair of adjacent sequences of integers among sequences of integers 510-519. Thus, blocks 410-430 are repeated for 4-bit integer “48”.
At the completion of block 430 (which in some examples is an exemplary string function carried out in block 340 of
At block 360 (
Meta-expression 630 represents the information that is sufficient to detect an instruction activity of interest within a virtual address space. Specifically, meta-expression 630 is sufficient to detect the instruction sequence represented by the initial input to process 300 (
Process 300 (
Importantly, it has been determined that many different malicious instruction sequences share the same meta-expressions. That is to say, two different instruction sequences of interest (such as a known computer virus A and a known computer virus B) may share the same meta-expression and therefore are detectable using a single meta-expression. Further, a meta-expression that is generated from an existing computer virus, for example, can be used to detect all variations of the existing computer virus, regardless of the permutations, sizes, or characteristics of the variations (i.e., even if the variations are unknown). Only a completely new type of computer virus, and not a variation on an existing computer virus, would not be detected by the existing meta-expression. In this way, a handful of meta-expressions are sufficient to identify many, if not all, of the known computer viruses (which number between 2.5 to 4 million, depending on the source of authority), as well as their respective variants.
The efficiency with which instruction sequences of interest can be detected using the meta-expressions provided by process 300 are now discussed. At the completion of process 300 (which is an exemplary UTMS training process carried out at block 210 of
The sequences of integers produced by block 330 are compared against one or more meta-expressions to determine if the analyzed virtual address space is normal or abnormal. An analyzed virtual address space is considered “abnormal” when two criteria are satisfied: (i) each integer in a meta-expression is present in the sequence of integers that corresponds to the virtual address space, and (ii) the sequence of integers appears in the same order in both the corresponding sequence of integers and the meta-expression. Notably, a virtual address space is considered normal if condition (i) fails to hold true. (The failure of condition (ii) is less useful because a sequence of integers may have multiple instances of a particular integer, and all of the instances must fail condition (ii) in order for condition (ii) to fail as a whole.)
When abnormal traffic is detected, the UTMS follows decision block 230 to block 240, where one or more appropriate responses are generated. When a normal virtual address space is detected, the UTMS returns to block 220 and analyzes additional virtual address spaces of one or more other processes and/or subsequently the same process. Blocks 210-230 are discussed with reference to
As is evident from the preceding discussion, at block 220, a UTMS performs many integer comparisons. Thus, optimization of integer comparisons is important to the efficiency of the UTMS. Recall that a virtual address space is considered to be normal at the first instance in which an integer in the meta-expression is absent in the sequence of integers that correspond to the virtual address space. Thus, the performance of the UTMS is improved if an early “normal” determination can be made. To this end, it is beneficial to structure the technique of block 220 such that the integer comparisons between a sequence of integers and a meta-expression terminates as soon as one integer from the meta-expression is identified as being absent in the sequence of integers.
In one embodiment, block 220 employs a nested computer programming language expression that returns an overall value of “failure” (e.g., a Boolean value) when any one of the nested levels returns a “false” condition. Thus, as soon as a UTMS identifies the absence of one integer (at any one of the nested levels), processing of the entire nested computer programming language expression terminates. The corresponding virtual address space is thus identified as being normal (in which case, no additional threat detection is necessary), and a subsequent virtual address space can be analyzed. For example, the LISP computer programming language allows for a nested expression in the form ((((A) (B)) (C)) (D)) that returns an overall value of “failure” if any one of expressions (A), (B), (C), and/or (D) is “false”. In this example, the expression (A) may query whether the first integer in a meta-expression appears in a sequence of integers, and the expression (B) may query whether the second integer in the meta-expression appears in the sequence of integers, so forth.
At block 240, appropriate responses may be generated. One appropriate response may be a user or system alert that indicates the presence of an instruction sequence of interest. Another appropriate response may be to terminate one or threads of a process associated with an abnormal virtual address space. Yet another appropriate response may include terminating at least one thread of each of a plurality of processes.
Portions of process 200 (
As shown in
Portions of process 200 (
In some embodiments, computer-executable instructions based on the C programming language that total less than 1 MB are sufficient to carry out process 200 (
Although only certain exemplary embodiments have been described in detail above, those skilled in the art will readily appreciate that many modifications are possible in the exemplary embodiments without materially departing from the novel teachings and advantages of this disclosure. For example, aspects of embodiments disclosed above can be combined in other combinations to form additional embodiments. Accordingly, all such modifications are intended to be included within the scope of this technology.
This application claims the benefit of U.S. Provisional Patent Application No. 62/311,840, filed on Mar. 22, 2016, the disclosure of which is herein incorporated by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
62311840 | Mar 2016 | US |