Patent Publication Number: US-11381578-B1

Title: Network-based binary file extraction and analysis for malware detection

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is a continuation of U.S. patent Ser. No. 12/571,294 filed Sep. 30, 2009, now U.S. Pat. No. 8,832,829, the entire contents of which are incorporated by reference. 
    
    
     BACKGROUND 
     Presently, malicious network content (e.g., malicious software or malware) can attack various devices via a communication network. For example, malware may include any program or file that is harmful to a computer user, such as bots, computer viruses, worms, Trojan horses, adware, spyware, or any programming that gathers information about a computer user or otherwise operates without permission. 
     Adware refers to programs configured to direct advertisements to a computer or a particular user. In one example, adware identifies the computer and/or the user to various websites visited by a browser on the computer. The website may then use the adware to either generate pop-up advertisements or otherwise direct specific advertisements to the user&#39;s browser. Spyware refers to programs configured to collect information regarding the user, the computer, and/or a user&#39;s network habits. In one example, spyware may collect information regarding the names and types of websites that the user browses and then transmit the information to another computer. Adware and spyware are often added to the user&#39;s computer after the user browses to a website that hosts the adware and/or spyware. The user is often unaware that these programs have been added and is similarly unaware of the adware&#39;s and/or spyware&#39;s function. 
     Various processes and devices have been employed to prevent the problems that malicious network content can cause. For example, computers often include antivirus scanning software that scans a particular client device for viruses. Computers may also include spyware and/or adware scanning software. The scanning may be performed manually or based on a schedule specified by a user associated with the particular computer, a system administrator, and so forth. Unfortunately, by the time a virus or spyware is detected by the scanning software, some damage on the particular computer or loss of privacy may have already occurred. Additionally, it can take weeks or months for new anti-virus signatures to be manually created and for an anti-virus application to be updated. Moreover, polymorphic exploits are also an issue that limits the effectiveness of some anti-virus applications. 
     In some instances, malicious network content comprises a bot. A bot is a software robot configured to remotely control all or a portion of a digital device (e.g., a computer) without authorization from the digital device&#39;s legitimate owner. Bot-related activities include bot propagation, as well as attacking other computers on a network. Bots commonly propagate by scanning nodes (e.g., computers or other digital devices) available on a network to search for a vulnerable target. When a vulnerable computer is scanned, the bot may install a copy of itself. Once installed, the new bot may continue to seek other computers on a network to infect. A bot may also be propagated by a malicious website configured to exploit vulnerable computers that visit its web pages. 
     A bot may also, without the authority of the infected computer user, establish a command-and-control (C&amp;C) communication channel to receive instructions. Bots may receive command-and-control communication from a centralized bot server or another infected computer (e.g., via a peer-to-peer (P2P) network established by a bot on the infected computer). When a plurality of bots (i.e., a bot net) act together, the infected computers (i.e., zombies) can perform organized attacks against one or more computers on a network, or assist those engaging in criminal enterprises. In one example, bot infected computers may be directed to flood another computer on a network with excessive traffic in a denial-of-service attack. In another example, upon receiving instructions, one or more bots may direct the infected computer to transmit spam across a network. In a third example, bots may host illegal businesses such as pharmaceutical websites that sell pharmaceuticals without a prescription. 
     Malicious network content may be distributed over a network via websites, e.g., servers operating on a network according to an HTTP standard. Malicious network content distributed in this manner may be actively downloaded and installed on a user&#39;s computer, without the approval or knowledge of the user, simply by accessing the website hosting the malicious network content. The website hosting the malicious network content may be referred to as a malicious web site. The malicious network content may be embedded within data associated with web pages hosted by the malicious website. For example, a web page may include JavaScript code, and malicious network content may be embedded within the JavaScript code. In this example, the malicious network content embedded within the JavaScript code may be obfuscated such that it is not apparent until the JavaScript code is executed that the JavaScript code contains malicious network content. Therefore, the malicious network content may attack or infect a user&#39;s computer before detection by antivirus software, firewalls, intrusion detection systems, or the like. Additionally, network traffic may contain malicious binary files, such as, for example, executables. 
     SUMMARY 
     Embodiments of the present invention allow for network-based binary file extraction and analysis for malware detection. 
     In a first claimed embodiment, a method is disclosed for network-based file analysis for malware detection. Network content is received from a network tap. A binary packet is identified in the network content. A binary file, including the binary packet, is extracted from the network content. It is determined whether the extracted binary file is detected to be malware. 
     In a second claimed embodiment, a system is disclosed for network-based file analysis for malware detection. The system includes a binary identification module configured to receive and identify a binary packet in network content. A binary extraction module is communicatively coupled with the binary identification module and configured to extract a binary file including the identified binary packet from the network content. A malware determination module is configured to determine whether an extracted binary file is detected to be malware. 
     In a third claimed embodiment, a computer-readable storage medium is disclosed that has stored thereon instructions executable by a processor to perform a method for network-based file analysis for malware detection. The method comprises receiving network content from a network tap; identifying a binary packet in the network content; extracting a binary file including the binary packet from the network content; and determining whether the extracted binary file is detected to be malware. 
    
    
     
       BRIEF DESCRIPTION OF FIGURES 
         FIG. 1  is a block diagram of an exemplary malicious network content detection environment. 
         FIG. 2  is a block diagram of an exemplary malicious network content detection system. 
         FIG. 3  is a block diagram of an exemplary virtual machine analysis module. 
         FIG. 4  is a block diagram of an exemplary virtual environment component pool. 
         FIG. 5  is a block diagram of an exemplary virtual environment. 
         FIG. 6  is a flowchart of an exemplary method for network-based file analysis for malware detection. 
         FIG. 7  is a flowchart of an exemplary method for network-based file analysis for malware detection. 
         FIG. 8  is a block diagram of an exemplary malicious network content detection device. 
     
    
    
     DETAILED DESCRIPTION 
     As mentioned herein, network traffic may contain malware. The malware can have the form of malicious binary files, such as, for example, executables. Embodiments according to the present technology relate to a system and method for network-based binary file extraction and analysis for malware detection. 
       FIG. 1  is a block diagram of an exemplary malicious network content detection environment  100 . The environment of  FIG. 1  includes server device  105  and client device  110  communicating over network  120 . Network tap  115  is also in communication with network  120  and may intercept communications sent over network  120 , for example the communications between client device  110  and server device  105 . Network tap  115  can generate a copy of the intercepted communications and provide the copied communications to malicious network content detection system  125 . 
     Network  120  may be implemented as the Internet or other WAN, a LAN, intranet, extranet, private network, public network, combination of these, or other network or networks. 
     Server device  105  provides a network service over network  120 . In some embodiments, when network  120  is implemented as the Internet, server  105  can provide a web service. Server device  105  may include one or more applications  107  and run an operating system (OS)  109 . In some embodiments, application  107  is a web application providing a web service over network  120 . Operating system  109  may be an operating system suitable for use by a server, such as WINDOWS, LINUX, or NOVEL NETWARE operating system. 
     Client device  110  may execute one or more client applications  112  on operating system  114 . In some embodiments, one or more applications on client device  110  may utilize a service provided by server device  105  over network  120 . In some embodiments, client device  110  may utilize a web service provided over network  120  by server device  105 . Application  112  may be any of several types of applications, such as a browser application, instant messaging application, e-mail application, or another application which can communicate over network  120  or is affected by network content communicated to or from client device  110  over network  120 . The network content may include, for example, network data, binary files, executables, etc. Operating system  114  may be any operating system suitable for a client  110 , such as WINDOWS, UNIX, or any other suitable operating system. 
     Malicious network content detection system  125  can communicate with network tap  115  as well as server device  105  and network  120  (communication not illustrated). Network tap  115  may intercept communications between client  110  and server device  105  and communicate a copy of the intercepted communications to malicious network content detection system  125 . The intercepted communications can include binary files transmitted to server device  105 . Malicious network content detection system  125  can identify, extract, and analyze a binary file contained in network communications between a client device  110  and a server device  105 . As part of the processing of network communications, the malicious network content detection system can detect a malicious binary and take steps to minimize the impact of the malicious binary, including initiating blocking of the communication, isolation of the binary, removal of the binary from server device  105 , communication to an administrator, and other actions. Malicious network content detection system  125  is discussed in more detail below. 
       FIG. 2  is a block diagram of an exemplary malicious network content detection system  125 . Malicious network content detection system  125  includes binary identification module  205 , binary extraction module  210 , static analysis module  215  (or heuristics module), pre-verification module  220 , virtual machine analysis module  225 , and heuristics database  230 . Each of modules  205 ,  210 ,  215 ,  220 , and  225  as well as database  230  can be implemented as one or more programs executed by one or more processors on one or more servers. Each of modules  205 ,  210 ,  215 ,  220 , and  225 , as well as database  230  can be implemented at least in part hardware. Modules  205 ,  210 ,  215 ,  220 , and  225  as well as database  230  can communicate with each other over data bus  235 . Data bus  235  may be implemented as one of more general or specific data busses for communicating data, such as, for example, a memory bus, a processor bus, and so forth. 
     Binary identification module  205  receives network content (e.g., network traffic) via network tap  115 . Binary identification module  205  is configured to identify a binary packet in the network content. Binary identification module  205  can identify binary file packets which are multi-protocol and multi-format. For example, binary identification module  205  can identify a binary packet in one of multiple protocols. These protocols can include, for example, STTP, HTTP, SMTP, TFTP, FTP, IMAP, and so forth. Similarly, binary identification module  205  can identify a binary packet in one of multiple formats. These formats can include, for example, Base64, MIME, Gzip (which is a form of compression), and so forth. Binary identification module  205  can identify a binary packet based on different portions of the packet, including packet header data. Binary identification module  205  can also identify encoded and compressed executables by decoding packets using an appropriate decoder and then determining if the decoded content is an (or portion of) executable or not. 
     Binary extraction module  210  is communicatively coupled with binary identification module  205  and configured to receive intercepted network content from binary identification module  205 . Binary extraction module  210  extracts a binary file, which includes binary packets, from the intercepted network content. Binary extraction module  210  can extract binary file packets which are multi-protocol and multi-format. In one embodiment, the binary file extraction is performed before analyzing the binary file to determine if the binary file is detected to be malware. Analyzing the binary file to determine if the binary file is detected to be malware will be described herein. 
     Malicious network content detection system  125  does not only just search for a raw executable based on the executable headers. The system also searches for encoded executables by first performing decoding and then determining if the decoded content is an executable or not. 
     In one embodiment, extracting the binary file includes utilizing transmission control protocol (TCP) sequence numbers within the packet to position binary packets in a correct order. This is done because packets belonging to an executable often come out of order. Sometimes, packets of an executable are missing altogether. A user datagram protocol (UDP), or any other suitable protocol, can also be utilized in accordance with embodiments according to the present invention. 
     Static analysis module  215  is communicatively coupled with binary extraction module  210 . The static analysis module  215  can receive an extracted binary (i.e., extracted executable file) from binary extraction module  210 . Static analysis module  215  then applies heuristics to the received extracted executable. The heuristics can be retrieved from heuristics database  230 . Static analysis module  215  is configured apply heuristics to the extracted binary file to determine if the binary file is suspicious or not. Static analysis module  215  examines heuristics and performs analysis to detect features such as obfuscation, size, etc. Static analysis module  215  is communicatively coupled with heuristics database  230 . When application of the heuristics indicates that one or more data packets (such as a binary file) of the network data have a suspicious characteristic or are otherwise suspicious, static analysis module  215  may provide the suspicious binary file to pre-verification module  220 . 
     Pre-verification module  220  can receive a suspicious binary file from static analysis module  215  and compare the binary file against a repository of information associated with known malware binary files to determine if there is a match. The information may include binary file header data, signature data, binary files, and other information. Pre-verification module  220  can compare checksums (hashes, etc.), search for patterns in the network traffic, etc., to determine if there is a match. If pre-verification module  220  detects that a binary file matches a stored malware binary file, the binary file is transmitted to virtual machine analysis module  225  for further processing. If pre-verification module  220  does not detect that a binary file matches a stored malware binary file, virtual machine analysis is then performed on the binary file by the virtual machine analysis module  225 , as discussed herein. 
     An exemplary static analysis module  215  and heuristics database are discussed in more detail in U.S. patent application Ser. No. 12/263,971, filed on Nov. 3, 2008, titled, “Systems and Methods for Detecting Malicious Network Content,” which is incorporated by reference herein in its entirety. 
     Virtual machine analysis module  225  is communicatively coupled with heuristics database  230  and pre-verification module  220 . Virtual machine analysis module  225  receives suspicious binary files from pre-verification module  220  and processes the suspicious binary files in a virtual environment. The processing may include executing the suspicious binary files in a virtual operating system to determine if the binary files perform any undesirable actions, operations, or otherwise are determined to be malware. Virtual machine analysis module  225  is discussed in more detail below. 
     Referring to  FIG. 3 , virtual machine analysis module  225  is shown in greater detail. Scheduler  340  of virtual machine analysis module  225  can receive a suspicious binary file from static analysis module  215 , via pre-verification module  220  (or via static analysis module  215  directly), and replay or execute the binary file in virtual environment  350 . In some embodiments, suspicious binary files include data packets that might contain malicious network content such as executable files, for example. 
     In exemplary embodiments, “replay” of the suspicious network content includes processing the suspicious network content in a virtual environment  350  that is configured to mimic the real environment in which the network content was or was intended to be processed. Configuring the replay of suspicious network content can include retrieving one or more virtual environment components from virtual environment component pool  345 , configuring the virtual components, providing the virtual components to virtual environment  350 , and executing playback of the suspicious binary file within the virtual environment along with the configured virtual components. For example, a suspicious binary file may be configured to execute within a virtual network browser configured to run on a virtual operating system within virtual environment  350 . 
     Virtual environment component pool  345  contains a pool of different component types, such as applications, operating systems, and other components. Virtual environment  350  is used to replay suspicious network content using one or more virtual components configured to operate virtually within the virtual environment  350 . The operation of exemplary embodiments of a scheduler is discussed in more detail in U.S. patent application Ser. No. 12/263,971, filed on Nov. 3, 2008, titled, “Systems and Methods for Detecting Malicious Network Content,” which is incorporated by reference herein in its entirety. 
     Referring to  FIG. 4 , virtual environment component pool  345  includes virtual environment applications  405 , virtual environment operating systems  410 , virtual environment networks  415 , and virtual environment agents  420 . Each of virtual environment applications  405  may be configured to appear and perform as a real application which processes or is affected by network data. Examples of virtual environment applications  405  include a browser application, such as “Internet Explorer” by Microsoft Corporation or “FireFox” by Mozilla, instant messaging applications, client e-mail applications, other applications that process data communicated over a network, and other applications. The virtual environment applications  405  may be implemented as one or more templates of a type of application, or a specific instance of a particular application. The virtual environment applications  405  can be retrieved, configured, and used within one or more virtual environments  350 . The behavior of the virtual environment applications  405  can be monitored and compared to an expected behavior to determine whether or not any variances exist which may indicate malicious network content and/or data. 
     Virtual environment operating system  410  can be implemented to appear and perform as any of several widely known operating systems for computers which process network data, for example WINDOWS, UNIX, or other operating systems. The virtual environment operating system may be configured to mimic a real operating system and monitor to detect attempted changes and actual changes to the operating system which are unexpected. 
     Virtual environment agent  420  can detect changes in a virtual environment component, such as a virtual environment application  405  or virtual environment operating system  410 . In some embodiments, a virtual environment agent  420  may detect changes to a virtual environment component that are not made using a standard process, changes to virtual environment component settings that should not be changed, and other changes to a virtual environment component. For example, virtual environment agent  420  may detect when a change is made to an operating system setting using a non-standard process. 
     Virtual environment network  415  may be implemented to include a virtual switch, an intranet, the Internet, or some other network. Virtual environment network  415  is configured with protocols that mimic the real network in which the network data is communicated. 
       FIG. 5  is a block diagram of an exemplary virtual environment  350 . Virtual environment  350  includes replayer  505 , virtual environment network  510 , virtual environment operating system  515 , virtual environment applications  520 - 525 , and virtual environment agent  530 . Replayer  505  replays network content such as a suspicious binary file in the virtual environment network  510  by receiving and transmitting communications with virtual environment operating system  515  over virtual environment network  510 . The communications can be processed by virtual environment operating system  515  as well as by one or more virtual environment applications  520 - 525 . 
     In some embodiments, suspicious network data such as a suspicious binary file is processed by virtual environment operating system  515  and virtual environment applications  520  and/or  525 . Virtual environment network  510  may receive the suspicious binary file from replayer  505  and provide the suspicious binary file to virtual environment operating system  515 . Virtual operating system  515  may process the suspicious binary file and optionally provide the suspicious binary file to a virtual environment application. In some embodiments, virtual operating system  515  is configured to mimic a server or server applications, such as server device  105 , application  107  or operating system  109 . 
     Virtual environment network  510  may be retrieved from virtual environment component pool  345 . The virtual environment network  510  may be implemented as a program to implement a switch or a gateway, or some other software implementation of a network which mimics an actual communications network. In some embodiments, the virtual environment network  510  may process and implement the transmission of data in a manner that simulates the processing and transmission of data by an actual network. In some embodiments, the communications processed through virtual environment network  510  are monitored. In some embodiments, implementing a virtual environment network  510  is optional, in which case replayer  505  communicates with virtual environment operating system  515  directly. 
     Virtual environment operating system  515  is configured to mimic (e.g., appear and perform in a similar manner as) a real operating system, for example, operating system  114  for client device  110  that processes data over network  120 . In some embodiments, virtual environment operating system  515  is implemented as code that emulates an operating system and can interact with one or more virtual environment applications as an actual operating system would. In some embodiments, the virtual environment operating system is implemented as an actual operating system executing within a virtual environment  350 . 
     Virtual environment operating system  515  may communicate data between virtual environment network  510  (or replayer  505 ) and one or more virtual environment applications. For example, virtual environment operating system  515  may receive requests from a virtual environment application, route the request to replayer  505 , and route response data, for example suspicious network content data, from replayer  505  to virtual environment application  520  or  525 , respectively. In some embodiments, communications, settings, and other parameters aspects of the behavior of virtual environment operating system  515  within virtual environment  350  are monitored. In some embodiments, virtual environment operating system  515  is optional. 
     Virtual environment applications  520  and  525  are each configured to behave as an application that processes or is affected by network content on a client computer or server. For example, a virtual environment application may be implemented as code that emulates a real application to mimic the behavior of the real application, for example the behavior of application  112  on client device  110 . In some embodiments, a virtual environment application may be implemented as a copy of the actual application which is executed within the virtual environment. 
     Virtual environment applications can be configured and controlled to replicate the processing of suspicious content data. For example, when replaying suspicious content data, such as a binary executable for example, the virtual environment application can be controlled to submit a request for data over a virtual network. At least a portion of the suspicious content data is transmitted to the virtual environment application in response to the request. Replay of suspicious network data continues until the content data has been replayed in its entirety. The communications, settings, and other aspects of the behavior of virtual environment applications within virtual environment  350  can be monitored. 
     One or more virtual environment agents  530  can be configured to monitor the behavior and/or state of one or more virtual environment components. In some embodiments, virtual environment component behavior can include requests for data, sending or receiving data over a network, processing and/or storing data, or other operations performed on the component. In some embodiments, the virtual environment component state may include a “snapshot” of the virtual environment parameters and settings, for example values for components settings, status of a portion component portion (i.e., error conditions, interrupts, availability of a buffer), or values for settings or parameters for the component. For example, virtual environment agent  530  can monitor changes made to virtual environment operating system  515 . In some embodiments, if a setting is changed to an improper value or an improper procedure is used to change a setting to the operating system, the virtual environment agent  530  can detect the code associated with suspicious network content which performed the change. 
     In addition to the network, operating system, application, and agent components illustrated in virtual environment  350 , other types of virtual environment components can be used within virtual environment  350  to process suspicious network data. For example, virtual environment  350  may include virtual environment hardware to mimic a hardware protocol, ports, or other behavior of an actual hardware machine. 
     Exemplary methods discussed herein relate to detecting and processing malicious network content. Examples are occasionally discussed which relate to virtual environment components comprising a browser application and an operating system. These exemplary references are for purposes of discussion only and are not intended to limit the scope of the present technology. 
       FIG. 6  is a flow chart  600  of an exemplary method for network-based file analysis for malware detection. In step  605 , malicious network content detection system  125  receives network content (e.g., network traffic) from network  120  via network tap  115 . More specifically, in one embodiment, binary identification module  205  receives a copy of network content from network tap  115 . 
     In step  610 , binary identification module  205  identifies a binary packet in the network content. As mentioned herein, binary identification module  205  can identify a binary packet in multiple protocols and multiple formats. In some embodiments, several binary packets may be identified at step  610 , each of which is forwarded to binary extraction module  210 . 
     In step  615 , binary extraction module  210  receives intercepted network content from binary identification module  205 . Binary extraction module  210  extracts a binary file, which includes binary packets, from the network content identified as one or more binary packets by binary identification module  205 . Binary extraction module  210  can extract binary file packets which are multi-protocol and multi-format. 
     However, data packets are often encountered out of order. Furthermore, all of the data packets of a given executable might not arrive in an unbroken chain. In other words, data packets that are not part of the executable in question might intervene. Data packets can also be missing altogether. Binary extraction module  210  can use, for example, TCP sequence numbers in order to put binary packets in a correct order until a binary file is constructed and thus extracted. In other words, binary extraction module  210  may remove the identified packets and place them into a binary file in the order they were intended. 
     In step  620 , static analysis is performed on the binary file which comprises one or more extracted binary packets. Static analysis module  215  receives an extracted binary file from binary extraction module  210 . Static analysis module  215  then applies heuristics to the binary file to determine if the binary file is suspicious. Static analysis module  215  searches for indicia such as obfuscation, size, etc. Static analysis module  215  accesses heuristics data from heuristics database  230  to facilitate the analysis. 
     In step  625 , when examination of the heuristics indicates that one or more binary data packets (one or more packets from the extracted binary file) of the network data have a suspicious characteristic or are otherwise suspicious, static analysis module  215  provides the suspicious binary file to pre-verification module  220  and the process proceeds to step  705  of  FIG. 7 . 
     If the binary file does not appear to be suspicious, then the process proceeds to step  630 . In step  630 , the binary file is eliminated as possible malware. Static analysis module  215  performs a pre-evaluation process to identify suspicious packets and binary files having suspicious packets which require more in-depth processing while eliminating binary files and packets that do not need to be analyzed further. By eliminating packets and binary files that do not need to by analyzed further, the static analysis module  215  saves processing cycles when compared to prior art methods that completely analyze all binary packets and files. 
     Referring to  FIG. 7 , a flowchart  700  is depicted of an exemplary method for network-based file analysis for malware detection. In step  705 , pre-verification is performed by pre-verification module  220 . In this phase, the suspicious binary file identified by static analysis module  215  is compared to binary files contained in a pre-verification database (not depicted) of known malicious binary files to determine if there is a match for the suspicious binary file. Various techniques can be utilized to determine a match, such as calculating checksums, searching for patterns, etc. The pre-verification database can be located within malicious network content detection system  125 . In one embodiment, the pre-verification database is a standalone database. However, it is also contemplated that the pre-verification database can be a part of pre-verification module  220 , part of one of the other modules, or part of heuristics database  235 . In step  710 , if there the pre-verification database includes a match for the suspicious binary file, the process proceeds to step  715 . If there is no match then the process proceeds to step  725 . 
     In step  715 , it has been determined that the binary file matches with known malware, and the binary file is declared as malicious. In step  720 , the binary file is placed under quarantine. In this step, the binary file is isolated from client device  110  so that the binary file cannot inflict any damage. Other actions can also be performed based on the determination that the suspicious malware is actually malware. 
     In step  725 , the binary file is received by virtual machine analysis module  225 . Virtual machine analysis is then performed on the binary file by the virtual machine analysis module  225 , as discussed herein, in order to determine if the binary file in question is malicious. Various behavior and activities of the binary file within a configured virtual environment are monitored in order to detect any suspicious behavior or activity. The monitoring can include attempted CPU instrumentation by the suspicious binary file, network behavior anomalies, network pattern matches, operating system behavior, data theft, key logging, startup, file registry process, code injection, changes to files, changes to registry keys, changes to processes, processes trying to launch themselves, initiation of processes trying to “hook” themselves into the startup mechanisms of an operating system, such as a WINDOWS operating system, so that on reboot the suspicious binary file will start automatically, processes trying to perform actions such as kill firewalls or kill anti-virus software to protect themselves, and so forth. 
     Suspicious network content can be detected by static analysis module  215  as static analysis module  215  applies heuristics to the network content provided by binary extraction module  210 . For example, if a heuristic applied by static analysis module  215  identifies a suspicious characteristic in the network content, then the network content is considered suspicious. Exemplary methods for detecting suspicious network content using heuristics and other methods are disclosed in U.S. patent application Ser. No. 12/263,971, filed on Nov. 3, 2008, titled, “Systems and Methods for Detecting Malicious Network Content,” which is incorporated by reference herein in its entirety. 
     The suspicious network content may include data packets containing suspicious characteristics as well as related data packets. For example, suspicious network content may include data packets comprising the request which resulted in a response having a suspicious characteristic as well as additional data retrieved by the code containing the suspicious characteristic. The suspicious network content may include binary files and/or executables. 
     Suspicious network content is replayed using the virtual environment components. The suspicious network content is replayed within virtual environment  350  by replayer  505 . In some embodiments, replaying virtual network content includes processing the suspicious network data by one or more virtual environment components within virtual environment  350 . For example with respect to web page content having suspicious content, replayer  505  transmits the suspicious network content containing the suspicious characteristic to be processed by a virtual environment operating system and virtual environment browser application. The actual network content copied is provided to the one or more of the virtual environment components. 
     After replaying the suspicious network content, the virtual environment components are analyzed to detect malicious network content. In some embodiments, each virtual environment component is associated with an expected behavior. The expected behavior for a component is compared to the behavior observed for the virtual environment component as the component processed the suspicious network content. If there was a difference between the observed behavior and the expected behavior, the suspicious network content is determined to be malicious network content. 
     After detecting malicious network content, the malicious network content is identified and processed. In some embodiments, an identifier is created for the malicious network content and further processing is performed to minimize damage resulting from the malicious network content. The further processing may include blocking subsequent network data that resembles the identified malicious network content, removing the malicious network content from one or more clients within a computer network, and other processing. 
     An exemplary method for configuring virtual environment components includes identifying components in a live environment. The components may be identified on client device  110 , server device  105 , or some other machine (real or virtual) or environment that processes or is affected by network data communicated over network  120 . The identification can be performed by scheduler  340  based on information in network data, a reporting server with information for one or more computers exposed to the network content (e.g., computers that transmit or receive the suspicious content), data stored locally on malicious network content detection system  125 , or from some other source. Examples of real environment components include a browser application, electronic messaging client, instant messaging client, an operating system, some other software or hardware on a machine that accesses network content, etc. 
     Scheduler  340  performs various tasks, as described herein. Virtual environment components are retrieved for the identified real environment components by scheduler  340 . The virtual environment component can be associated with types of applications, operating systems, or other code that can be executed in a real environment. The components can be retrieved by scheduler  340  from virtual environment component pool  345 . 
     The one or more virtual environment components may be configured to mimic a real environment application at. Scheduler  340  can configure the component to mimic the appearance and behavior of the real environment application. The configuration can be such that any suspicious code will not be able to detect a difference between the real component and the virtual environment component application. For example, a virtual environment network application  415  can be configured as Microsoft&#39;s “Internet Explorer” or Mozilla&#39;s “Firefox” browser application, wherein the component is configured with protocols, user preferences, proxy addresses, encryption preferences, add-in code, and other settings that can correspond to an actual browser application executing on client device  110 . 
     In some embodiments, rather than execute code that mimics the application, a copy of the actual application is executed within the virtual environment. Thus, the application is executed within a virtual operating system, configured with settings and parameters associated with a real application. 
     Virtual environment components can be configured to mimic a real environment operating system. The virtual environment operating system may be configured to mimic an operating system used to process network data communicated over network  120  by server device  105  or client device  110 . For example, the component can be configured to mimic Microsoft&#39;s “Windows” operating system. The configuration may include setting a number of port addresses, settings, and other data. 
     Virtual environment components may then be configured to mimic the real environment network. Configuring a virtual environment component network may involve setting up protocols, and other features to mimic network  120 . In some embodiments, the network may be configured as a virtual switch, relay station, or some other network system for relaying content data. 
     Virtual environment agents are retrieved and configured. A virtual environment agent can be implemented as code which monitors component behavior and settings in a virtual environment. The virtual environment agents may detect behaviors and changed settings as they occur and may detect whether the behaviors or setting changes are expected or unexpected. If unexpected, the suspicious network content which implemented or caused the change is identified as malicious. 
     In some embodiments, a virtual machine hardware component may be configured as well. In this case, the virtual machine hardware may be configured to mimic real hardware ports, settings, and other aspects of the actual hardware used to implement an operating system and application components. 
     An example regarding replaying network content using a browser application is considered herein. An initial request is replayed from a virtual environment application to a virtual environment operating system. In some embodiments, the initial request is configured based on network content (for example, consisting of network data packets) copied by network tap  115 . For example, network content may be stored for period of time. When one or more network content data packets are determined to be suspicious, all network content associated with the suspicious data packets are retrieved and replayed. For example, network content provided to a network browser application in response to a request may contain suspicious data packets. Once data packets in the response are determined to be suspicious, the request which generated the response as well as other communications occurring after the response was received all retrieved in their entirety. 
     In some embodiments, the initial request is configured by replayer  505  or scheduler  340  and sent from virtual environment application  520  to replayer  505 . Transmission of the initial request can result in virtual environment application behavior corresponding to the request. For example, for a network browser application, the request may initiate creating of a cookie associated with the request. The cookie can include a timestamp for and an identifier associated with the request, as well as creation of other data. 
     Suspicious network content is provided to a requesting virtual environment application. In response to the initial request, the network content is transmitted to the virtual environment application to replicate transmission of the network content to the requesting client in a real computing environment. For example, in reply to an HTTP request, the response may include HTTP packets, image data packets, and other content comprising a response to the request. The data packets comprising the response are transmitted to virtual operating system  515  by replayer  505  over virtual environment network  510 . Virtual operating system  515  receives the content data, optionally processes the data, determines which virtual environment application will receive the data, and “transmits” the content data to the virtual environment application. For a virtual network browser application, the content data is transmitted to the browser application to be loaded as a web page or other content. 
     In some embodiments, the network content is not provided to a virtual environment operating system, but rather directly to the virtual environment application. 
     The suspicious network content is then processed by the virtual environment application. For example, a virtual environment browser application may load web page data and image data, execute a script, or provide flash video as included in the response data packets. 
     When the received network content contains code that is malicious (although it may not yet be identified as malicious before it is executed), the content is processed by the virtual environment application just as it would be when the network content and malicious code would be executed by a real application. For example, malicious content may include binary code that includes an executable. When executed by the virtual environment browser application, the executable code may attempt to transmit a message to a server, retrieve data within the local environment, change a setting in the virtual environment browser application, or perform some other operation as mentioned herein. 
     While processing the suspicious network content, the virtual environment application, operating system, network and other virtual environment components are monitored by one or more virtual environment agents  530 . As suspicious network data is “replayed” by processing the network data by the virtual environment components, the behavior of each component can be detected, logged, stored, reported and/or otherwise monitored by an agent. One agent may monitor a single component or multiple components. 
     For example, a virtual environment agent may detect behavior in a virtual environment browser application. When the virtual environment browser receives and processes suspicious content data, the browser application may execute executable code within the data. The executable code may attempt to transmit a message over the virtual network (i.e., to replayer  505 ) improperly. For example, the executable may attempt to send a message directly to a server instead of using a proxy address specified by the virtual environment browser application. A virtual environment agent monitoring the browser application may detect all requests sent by the virtual browser application, and thereby detect the improper request which did not go to the proxy address. 
     A virtual environment agent may also detect changes to an operating system which are improper. For example, when executed by a virtual environment application, an executable or other code in received network content may change or attempt to change an operating system setting, value, or otherwise change the virtual environment operating system. The virtual environment agent may detect the change or attempted change by intercepting or monitoring all changes to the virtual environment operating system. As another example, the operating system may receive data to be stored. The data may comprise an executable, which may attempt to access information, control an application, or perform some other function. When data received by the operating system for storage is an executable or other executable code, the execution of the data is monitored by the agent to determine the effects of the data execution. 
     When monitoring data, a virtual environment agent may record information regarding the effects and identification of the suspicious network data when the data is being processed in the virtual environment. For example, the virtual environment agent may identify application and operating system settings and values affected by the suspicious network content, values before and after they are affected during processing of the suspicious network content, changes to processes such as an operating system “start-up” process, and other changes. The virtual environment agent may also identify a request made by the suspicious network content, including requests to transmit data over a network, requests for local data access, and other requests. This and other data may be stored and/or reported by the virtual environment agent for later processing. 
     Analyzing virtual environment components to detect malicious network content can be performed by scheduler  340 . In one embodiment, expected behavior for a virtual environment component such as an application, operating system and/or network is accessed. The expected behavior data can be determined from stored behavior patterns associated with each component. The behavior patterns may be accessed locally or remotely by scheduler  340 . For example, a stored behavior pattern for a virtual environment network browser can indicate that all requests to transmit over a network should be directed towards a proxy address specified by the virtual environment network browser. A stored behavior pattern for an operating system can indicate parameter values that should not be changed as well as code that should be invoked when attempting to change a particular parameter. 
     The actual behavior pattern of the virtual environment application or operating system is then compared with the expected behavior pattern for the application or operating system. The actual behavior may be retrieved from data stored by one or more virtual environment agents  530 . For example, the expected behavior for transmitting a request by a virtual environment network browser can include sending a content request to a proxy address set within the network browser settings. The actual behavior may include a content request initiated by executable binary code in the suspicious network content that attempts to transmit a network request directly. 
     If a difference is detected between the actual behavior and expected behavior then the suspicious network content is identified and processed as malicious network content. In some embodiments, the suspicious network data is flagged to be identified and processed later. 
     After identifying and processing the malicious network content, or if no difference is detected between the actual behavior and expected behavior, the actual behavior for a virtual environment operating system is compared to the expected behavior for the virtual environment operating system. For example, the expected behavior may involve a particular process changing an operating system parameter value, when the actual behavior may attempt to change the operating system parameter value without using the particular process. The actual behavior may involve an attempt to change the settings by code executed by an application. If any difference is detected between the actual behavior and the expected behavior for the virtual environment operating system, the suspicious network data associated with the actual behavior is identified and processed as malicious network content. 
     The actual behavior is compared with expected behavior for a virtual environment network. If any difference is detected between the actual behavior and the expected behavior, the network data associated with the behavior is identified and processed as malicious network content. If no difference is detected, the suspicious network data is not identified as malicious network content. 
     In some embodiments, scheduler  340  can detect malicious content from the behavior of a virtual environment application, virtual environment operating system, or virtual environment network “on the fly” or instantly during replay of the suspicious content in the virtual environment rather than waiting until suspicious content replay has been completed. As suspicious content is replayed, scheduler  340  may compare each incremental behavior of a virtual environment application, operating system, or network to the corresponding next expected incremental behavior. If the next actual incremental behavior does not match the next expected incremental behavior, the suspicious content responsible for the actual behavior is immediately identified as malicious network content and the malicious network content is processed. By comparing the expected behavior and actual behavior during replay rather than after replay has completed, malicious network content can be identified during the replay of the suspicious content (i.e., “on the fly”) and subsequent occurrences of the malicious network content can be detected more quickly. 
     More detail regarding identifying and processing malicious network content is described herein. First, an identifier is created for malicious network content. The identifier may be generated at least in part based on information within the malicious network data. 
     Network content data associated with malicious network content is then collected. The collected network content data associated with the malicious network content may include the data packets that include the identified malicious network content, code retrieved by the malicious network content, source information that provided the malicious network content, and other data. 
     After collecting network content data, a heuristic is generated to identify the subsequent malicious network content associated with the malicious content data. The heuristic is generated such that it may identify network data copied and provided by network tap  115 . In some embodiments, the heuristic is a signature of the network content data. In some embodiments, the signature can include or be derived from data packets comprising the malicious network data, an identification of the application that processed the malicious data, a byte sequence of the malicious data, and other data that is capable of identifying the malicious network data within a stream of network data received over a network. 
     The generated heuristic is then provided to static analysis module  215  within malicious network content detection system  125 . Once provided to static analysis module  215 , the static analysis module  215  may apply the heuristic to network data retrieved by network tap  115  and provided to malicious network content detection system  125 . 
     In some embodiments, a signature may be generated immediately upon detecting the malicious network content, such that the signature can be applied to subsequent network content with minimal delay. Generating and applying the signature immediately against subsequent network content enables the present system to provide real-time detection and protection against malicious network content. For example, if a virtual environment agent  420  detects that network content improperly changes a virtual environment operating system setting, the agent, scheduler, or heuristic module (or a combination of these) may generate a signature for the corresponding network content. The heuristic module may then apply the signature to subsequent network traffic copied by network tap  115 . If any network content in subsequent network traffic matches the signature, the subsequent network traffic can be blocked or otherwise contained without affecting client device  110 . 
     In addition to providing heuristics against subsequent or future malicious network content, measures may be taken to remove the malicious network content from computing systems which have already been infected by the content. Script code is created for disinfecting live environment components. The script code is generated for the purpose of restoring a real environment component from damage caused by the malicious network content. The created script code is then distributed and executed among computers suspected of receiving the malicious network content. 
     Virtual environment components and the like are discussed in more detail in U.S. patent application Ser. No. 12/359,252, filed on Jan. 23, 2009, titled, “Detecting Malicious Network Content Using Virtual Environment Components,” which is incorporated by reference herein in its entirety. 
     In step  730 , a determination is made as to whether the binary file has been detected to be malicious (e.g. malware). If the binary file has been detected to be malicious then the process proceeds to step  715 . If the binary file has not been detected to be malicious then the process proceeds to step  735 . In step  735 , the binary file is ignored since a determination has been made that it is not malicious. 
       FIG. 8  is a block diagram of an exemplary malicious network content detection device. In some embodiments, the method of  FIG. 8  provides more detail for malicious network content detection system  125  of  FIG. 1 . Malicious network content detection system  125  comprises at least one or more processors  805 , memory systems  810 , and storage systems  815 , each of which can be communicatively coupled with data bus  820 . In some embodiments, data bus  820  may be implemented as one or more data buses. Malicious network content detection system  125  may also comprise communication network interface  825 , input/output (I/O) interface  830 , and display interface  835 . Communication network interface  825  may be communicatively coupled with network  120  via communication medium  840 . In some embodiments, malicious network content detection system  125  may be communicatively coupled with a network tap, such as network tap  115 , which in turn may be communicatively coupled with network  120 . Bus  920  provides communications between communications network interface  825 , processor  805 , memory system  810 , storage system  815 , I/O interface  830 , and display interface  835 . 
     Communications network interface  825  may communicate with other digital devices (not shown) via communications medium  840 . Processor  905  executes instructions which may be stored on a processor-readable storage medium. Memory system  810  may store data permanently or temporarily. Some examples of memory system  810  include RAM and ROM. Storage system  815  also permanently or temporarily stores data. Some examples of storage system  815  are hard discs and disc drives. I/O interface  830  may include any device that can receive input and provide output to a user. I/O interface  830  may include, but is not limited to, a keyboard, a mouse, a touch screen, a keypad, a biosensor, a compact disc (CD) drive, a digital video disc (DVD) drive, an optical disk drive, or a floppy disk drive. Display interface  835  may include an interface configured to support a display, monitor, or screen. In some embodiments, malicious network content detection system  125  comprises a graphical user interface to be displayed to a user over a monitor in order to allow the user to control malicious network content detection system  125 . 
     The foregoing detailed description of the technology herein has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the technology to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. The described embodiments were chosen in order to best explain the principles of the technology and its practical application to thereby enable others skilled in the art to best utilize the technology in various embodiments and with various modifications as are suited to the particular use contemplated. It is intended that the scope of the technology be defined by the claims appended hereto.