Advanced Ransomware Detection

By using decoy files and process analysis, ransomware attacks are detected and mitigated early, ensuring data security and reducing resource wastage.

JP7537661B2Active Publication Date: 2024-08-21PALO ALTO NETWORKS INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023503075
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-07-26
Filing Date
2021-06-09
Publication Date
2024-08-21
Estimated Expiration
2041-06-09

AI Technical Summary

Technical Problem

Ransomware attacks encrypt data on computer systems, rendering it inaccessible unless a ransom is paid, and existing detection methods are inefficient in distinguishing between legitimate processes and malicious activities.

Method used

Implementing decoy files and static/dynamic analysis to classify processes as benign or suspicious, enumerating protected files only for suspicious processes, and initiating preventive measures against potential threats.

Benefits of technology

Enhances the detection of ransomware attacks by identifying and mitigating threats before data encryption occurs, reducing the risk of data loss and minimizing resource wastage on decoy files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007537661000006
    Figure 0007537661000006
  • Figure 0007537661000003
    Figure 0007537661000003
  • Figure 0007537661000002
    Figure 0007537661000002
Patent Text Reader

Abstract

Methods, apparatus, and computer program products implement embodiments of the present invention, including protecting computer systems connected to storage devices. This involves storing a set of protected files and a decoy file on a storage device, where any changes to the decoy file indicate a cyber attack on the computer system. Upon receiving a request from a process running on the computer system to enumerate files stored on the storage device, the process is analyzed to classify the process as benign or suspicious. The protected files are enumerated for the process regardless of whether the process is classified as benign or suspicious. However, one or more decoy files are enumerated for the process only if the process is classified as suspicious.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates generally to computer security, and more particularly to detecting ransomware attacks in computer systems. [Background technology]

[0002] Malware is an abbreviation for malicious software (e.g., executable code, scripts, and active content) that, when executed, intentionally causes damage to a computer or data stored on a computer. Examples of malware include computer viruses, worms, Trojan horses, ransomware, spyware, adware, and scareware.

[0003] Ransomware (i.e., one of the types of malware mentioned above) is a type of malicious software that threatens to permanently block access to computer-accessible data unless a ransom is paid. The data is typically blocked by encrypting files on the computer that stores the data, thereby rendering them unusable and requiring a ransom payment to decrypt them.

[0004] Ransomware attacks are typically carried out using Trojan horses, which are disguised as legitimate files and loaded with malware that computer users are tricked into downloading or opening when received as an email attachment. Some other ransomware attacks may be carried out via "worms," ​​which move automatically from computer to computer without requiring user action to infect the computer with malware.

[0005] Once a computer is infected, the ransomware systematically encrypts some or all of the data on storage capacity accessible to the computer, rendering the data inaccessible to applications running on the device. In some configurations, the ransomware includes an application that reads data from a file, encrypts the data, and overwrites the file with the encrypted data. Once the ransom is paid, decryption software is provided by the attacker, allowing the computer to decrypt the data and return to its pre-attack state.

[0006] The above discussion is presented as a general overview of the related art in this field, and should not be construed as an admission that any of the information contained therein constitutes prior art against the present application. Summary of the Invention

[0007] According to one embodiment of the present invention, there is provided a method for protecting a computer system connected to a storage device, comprising the steps of: storing a set of protected files and a decoy file in the storage device, any modification to the decoy file being indicative of a cyber attack on the computer system, receiving a request from a process running on the computer system to enumerate files stored in the storage device, analyzing the process by a processor to classify the process as benign or suspicious, enumerating the protected files for the process, and enumerating the decoy file for the process only if the process is classified as suspicious.

[0008] In one embodiment, the cyber-attack includes a ransomware attack.

[0009] In another embodiment, the method also includes initiating preventative measures on the process.

[0010] In an additional embodiment, the step of initiating preventive action includes identifying a causal chain of the process and initiating preventive action for the causal chain.

[0011] In a further embodiment, the step of analyzing the process includes identifying an executable file on the storage device that launched the process, and performing a static analysis on the identified executable file.

[0012] In a supplemental embodiment, performing the static analysis includes identifying a name of the executable file, comparing the identified name to a list of whitelisted names, classifying the process as suspicious if the identified name does not match any of the whitelisted names, and classifying the process as benign if the identified name matches any of the whitelisted names.

[0013] In one embodiment, performing the static analysis includes identifying a path of the executable file, comparing the identified path to a list of whitelisted paths, classifying the process as suspicious if the identified path does not match any of the whitelisted paths, and classifying the process as benign if the identified path matches any of the whitelisted paths.

[0014] In another embodiment, performing the static analysis includes computing a signature of the executable file, comparing the computed signature to a list of whitelisting signatures, classifying the process as suspicious if the computed signature does not match any of the whitelisting signatures, and classifying the process as benign if the computed signature matches any of the whitelisting signatures.

[0015] In an additional embodiment, performing the static analysis includes computing a hash value of the executable file, comparing the computed hash value to a list of whitelisted hash values, classifying the process as suspicious if the computed hash value does not match any of the whitelisted hash values, and classifying the process as benign if the computed hash value matches any of the whitelisted hash values.

[0016] In one embodiment, analyzing the process includes performing a dynamic analysis on the process.

[0017] In another embodiment, performing the dynamic analysis includes identifying a thread in the process that communicated the request to enumerate files, determining whether the thread was injected into the process, classifying the process as suspicious if it is determined that the thread was injected into the process, and classifying the thread as benign if it is determined that the thread was not injected into the process.

[0018] In additional embodiments, performing the dynamic analysis includes identifying a thread in the process that communicated the request to enumerate files, determining whether the thread contains shellcode, classifying the process as suspicious if it is determined that the thread contains shellcode, and classifying the thread as benign if it is determined that the thread does not contain shellcode.

[0019] In a further embodiment, performing the dynamic analysis includes identifying a thread in the process that communicated the request to enumerate files, determining that the thread includes a thread stack, whether the thread stack includes a memory address of a shared library of a graphical user interface, classifying the process as suspicious if it is determined that the thread stack does not include a memory address of a shared library, and classifying the thread as benign if it is determined that the thread stack includes a memory address of a shared library.

[0020] According to an embodiment of the present invention, there is also provided an apparatus for protecting a computer system, the apparatus including: a storage device configured to store a set of protected files and a decoy file, any modification to the decoy file being indicative of a cyber attack on the computer system; and a processor configured to receive a request from a process running on the computer system to enumerate files stored in the storage device, analyze the process to classify the process as benign or suspicious, enumerate the protected files for the process, and in response to classifying the process as suspicious, enumerate the decoy files for the process.

[0021] According to an embodiment of the present invention, there is additionally provided a computer software product for protecting a computer system, said product comprising a non-transitory computer readable storage medium having stored thereon program instructions which, when read by a computer, cause said computer to: store a set of protected files and a decoy file in a storage device connected to said computer system, any modification to said decoy file being indicative of a cyber attack on said computer system, receive a request from a process running on said computer system to enumerate files stored in said storage device, analyze said process in order to classify said process as benign or suspicious, enumerate said protected files for said process, and in response to classifying said process as suspicious, enumerate said decoy file for said process.

[0022] According to an embodiment of the present invention, there is further provided a method for protecting a computer system connected to a storage device, the method comprising the steps of detecting running processes that have made a particular type of change to a number of files stored in the storage device, comparing, by a processor, the detected number with a specified threshold, and in response to determining that the detected number exceeds the specified threshold, initiating preventative action against the running processes.

[0023] In one embodiment, the step of initiating preventive action includes identifying a causal chain of the execution process and initiating preventive action for the causal chain.

[0024] In another embodiment, the particular type of modification includes renaming the file extension of the file to the same file extension.

[0025] In an additional embodiment, the particular type of modification includes renaming the file extension of the file to one or more specified file extensions.

[0026] In a further embodiment, the particular type of modification includes encrypting the file.

[0027] In accordance with one embodiment of the present invention, there is also provided an apparatus for protecting a computer system, the apparatus including a storage device configured to store a plurality of files, a memory, and a processor configured to: detect in the memory running processes that have made a particular type of change to a number of files stored in the storage device, compare the detected number by the processor to a specified threshold, and in response to determining that the detected number exceeds the specified threshold, initiate preventative action against the running processes.

[0028] According to an embodiment of the present invention, there is additionally provided a computer software product for protecting a computer system, said product including a non-transitory computer readable storage medium having program instructions stored thereon which, when read by a computer, cause said computer to: detect running processes that have made a particular type of change to a number of files stored in a storage device; compare, by a processor, said detected number to a specified threshold; and, in response to determining that said detected number exceeds said specified threshold, initiate preventative action against said running processes. [Brief description of the drawings]

[0029] The present disclosure is now described, by way of example only, with reference to the accompanying drawings. [Figure 1A]1A and 1B (collectively also referred to herein as FIG. 1) are block diagrams that generally illustrate a computing system configured to detect ransomware attacks in accordance with one embodiment of the present invention. [Figure 1B] FIG. 1B is a block diagram that generally illustrates a computing system configured to detect ransomware attacks in accordance with one embodiment of the present invention. [Diagram 2] FIG. 2 is a flow chart that generally illustrates a method for detecting processes initiating a ransomware attack on a computer system, in accordance with an embodiment of the present invention. [Diagram 3] FIG. 3 is a flow chart that generally illustrates a method for detecting ransomware attacks by performing static analysis on processes according to an embodiment of the present invention. [Figure 4] FIG. 4 is a flow chart that generally illustrates a method for detecting ransomware attacks by performing dynamic analysis on processes, according to an embodiment of the present invention. [Diagram 5] FIG. 5 is a flow chart that generally illustrates a method for detecting a ransomware attack by analyzing files modified by a process, in accordance with an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0030] One example of protecting a computer system from ransomware attacks is to store and monitor decoy files on the computer system. The decoy files are strategically named, thereby inviting the target of the ransomware attack. For example, the decoy files can be disguised as document and / or image files and can be named to appear at the top of an alphabetical list of files in a directory.

[0031] By continuously monitoring for decoy files, the computer system can detect ransomware attacks by detecting modifications to any of the decoy files. Because the decoy files are strategically named, these files are typically the first files modified in a ransomware attack. Thus, the computer system may be able to detect a ransomware attack before the attack encrypts personal and / or sensitive data.

[0032] While monitoring for decoy files can be an effective tool for detecting ransomware attacks, decoy files can be cumbersome to legitimate processes and user experiences. In one example, backup and archive processes running on a computer system can waste time and computing resources when processing decoy files. In another example, users of a computer system can become confused when the computer system presents decoy files in a directory listing.

[0033] An embodiment of the present invention provides a method and system for restricting the enumeration of decoy files to processes running on a computer system. As described below, a set of protected files and decoy files are stored on a storage device coupled to the computer system. As previously described, any changes to the decoy files are indicative of a cyber attack on the computer system. Upon receiving a request from a process running on a computing device to enumerate files stored on the storage device, the process can be analyzed to classify the process as either innocent or suspicious. Protected files (i.e., not including decoy files) are enumerated for a process regardless of whether the process is classified as benign or suspicious. However, in an embodiment of the present invention, decoy files (along with protected files) are enumerated for a process only if the process is classified as suspicious.

[0034] In some embodiments, a process may be analyzed using static and / or dynamic analysis. In additional embodiments, in response to classifying a process as suspicious, preventive action may be initiated. For example, a process classified as suspicious may be killed along with its entire causality.

[0035] In a further embodiment, changes to protected files performed by processes running on a computer system may be monitored to detect ransomware attacks. As described below, upon detecting a process running on a computing device performing a given type of change to a large number of files stored in a storage device, the detected number may be compared to a given threshold. In response to determining that the detected number exceeds the given threshold, preventative measures may be initiated.

[0036] System Description 1A and 1B are block diagrams that generally illustrate an example computer system 20 executing an endpoint agent 22 that can detect ransomware attacks against files 24 stored on one or more storage devices 26 connected to the computer system in accordance with one embodiment of the present invention. Hardware and software components of computer system 20 are illustrated in FIG 1A, and data components stored on storage devices 26 are illustrated in FIG 1B.

[0037] In FIG. 1B, the files 24 can be differentiated by adding letters to the identifying numbers, so that the files are organized as follows:

[0038] Program Executable File 24A. The program executable file 24A is used to perform various functions and operations on the computer system 20. One example of a given program executable file is the calculator application, calc.ex, produced by Microsoft Corporation, One Microsoft Way, Redmond, WA 98052 USA.

[0039] Data Files 24B. Data files 24B store data that can be accessed by program files 24A. Examples of data files 24B include, but are not limited to, document files, spreadsheet files, presentation files, image files, and video files.

[0040] Decoy File 24C. As mentioned above, decoy files are used to detect ransomware attacks.

[0041] Shared Library File 24D. The shared library file program file 24D is loaded by the program files 24A at the beginning of execution. Once a shared library is installed and properly configured, all program files 24A can automatically use it.

[0042] Although the embodiments herein are described in terms of protected files 24A, 24B, and 24D, it is believed that use of the embodiments of the present invention to protect any other type of file 24 is within the spirit and scope of the present invention.

[0043] Computer system 20 includes a processor 28 and memory 30. In one embodiment, computer system 22 is directly connected to a storage device 26, for example via a parallel ATA interface or a serial ATA interface. In another embodiment, storage device 26 may be a component of storage (not shown) that is accessible by computer system 20 over a data network 32, such as a local area network.

[0044] An example of an endpoint agent 22 is XDR Agent, manufactured by Palo Alto Networks, Inc., 3000 Tannery Way, Santa Clara, CA 95054 USA. TM It is.

[0045] During operation, the processor 28 may execute, from the memory 30, an operating system 34, a shared library 36, a decoy file monitor 38, an endpoint agent 22, and additional processes 40, each having one or more respective features 42. The features 42 are described in the discussion below with reference to FIG.

[0046] In some embodiments, the processor 28 can load each shared library 36 from each shared library file 24D into the memory 30. TM In some cases, shared library 36 may include a dynamic link library (DLL).

[0047] The decoy file monitor 38 monitors changes to the decoy file 24C to detect ransomware attacks, as described above.

[0048] During execution on the processor 28, each process 40 may comprise one or more threads 44. Each thread 44 includes a thread stack 46, which may include executable code 48 and one or more function addresses 50. In some embodiments, each function address 50 includes the address in memory 30 of a given shared library 36.

[0049] In some embodiments, as described in the description below with reference to FIGURE 3, endpoint agent 22 may use one or more whitelists 52 when performing static analysis of a given process 40. Each whitelist 52 includes a set of whitelist features 54. Examples of whitelist features 54 are described below.

[0050] 1B, data storage device 26 may store a set of file metadata records 56, where each file metadata record 56 corresponds to a given file 24. For each given file 24, the corresponding file metadata record 56 may store information such as: A unique file identifier (ID) 58 that references a given file. Filename 60 for the given file. Extension 62 for a given file. In some embodiments, extension 62 may indicate the file type (eg, image or spreadsheet) for a given file. A path 64 for a given file that indicates the location of the given file on a given storage device 26 . The signature of a given file. The hash value 68 for the given file.

[0051] 1A, memory 30 may also store one or more causality objects 70. In some embodiments, endpoint agent 22 may analyze processes 40 and threads 44 and store the respective contexts 72 of the threads and processes to causality objects 70. Endpoint agent 22 may then track and preserve the context between threads 44 and the processes in which they execute.

[0052] During operation, the endpoint agent 22 can track processes 40 and threads 44 executing on the processor 28 and group them into causal relationships 70 (i.e., X causes Y). The causal relationships are based on tracking information that the endpoint agent 22 collects about events that occur in the computer system 20. The endpoint agent 22 can track and store context 72 for the causal relationships 70 by monitoring activities such as process 40 creation, thread 44 insertion, and remote procedure call actions.

[0053] In some embodiments, the processor 28 may store the files 24 in one or more directories 74 on the storage device 26. In the embodiments described herein, a given directory 74 that stores at least one decoy file 24C may be referred to as a protected directory 74.

[0054] Processor 28 may include a general purpose central processing unit (CPU) or a special purpose embedded processor, which is programmed with software or firmware to perform the functions described herein. The software may be downloaded to computer system 22 in electronic form, for example, over a network. Additionally or alternatively, the software may be stored on a tangible, non-transitory computer readable medium, such as optical, magnetic, or electronic memory media. Additionally or alternatively, at least some of the functions of processor 28 may be performed by hardwired or programmable digital logic circuitry.

[0055] Examples of memory 30 include dynamic random access memory and non-volatile random access memory. Storage devices 26 may include non-volatile storage devices, such as hard disk drives and solid state disk drives.

[0056] In some embodiments, the tasks of the endpoint agent 22 executing on the processor 28 may be performed by a data cloud-based application executing outside the computer system 20, as described herein.

[0057] RANSOMWARE DETECTION 2 is a flow chart that generally illustrates a method of using a decoy file 24C to detect a cyber-attack, such as a ransomware attack, against a computer system 20, in accordance with an embodiment of the present invention. In an embodiment of the present invention, the operations performed by the endpoint agent 22 described in the description that follows with reference to the flow chart may also be described as being performed by a processor 28.

[0058] In step 80, the processor 28 stores a set of files 24 in a given directory 74, where at least one file in the set includes a given decoy file 24C, and the remaining files in the set include non-decoy files 24 (i.e., files 24A, 24B, and 24D). In an embodiment of the present invention, a given directory is protected if at least one of the files stored in the given directory includes a given decoy file 24C. Additionally, any files 24A, 24B, and 24D (as well as any other non-decoy files 24) in the given directory may be referred to as protected files 24.

[0059] In step 82, processor 28 receives a request from a given process 40 to enumerate the files in a given directory 74. In an embodiment of the invention, endpoint agent 22 can detect the request from the given process, and the endpoint agent running on processor 28 can perform steps 84-98, described below.

[0060] In step 84, the endpoint agent 22 determines whether the given directory is protected. In some embodiments, as described above, the endpoint agent 22 can classify a given directory as protected if it stores at least one decoy file 24C.

[0061] If the given directory is protected, then in step 86, the endpoint agent 22 analyzes the given process to classify the given process as either benign or suspicious. In embodiments described herein, the endpoint agent 22 may analyze the given process by analyzing the given process in memory 30 and / or by analyzing the given executable file 24A that the operating system 34 loaded into memory to launch the given process. In some embodiments, the endpoint agent 22 may analyze the given process by performing a static and / or dynamic analysis of the given process. An example of a static analysis that the endpoint agent 22 may perform on a given process is described below in the description with reference to FIG. 3, and an example of a dynamic analysis that the endpoint agent 22 may perform on a given process is described below in the description with reference to FIG. 4.

[0062] If the endpoint agent 22 classifies the given process as suspicious in step 88, then the endpoint agent may enumerate all files (i.e., both protected files and decoy files) in the given directory for the given process in step 90. In an embodiment of the invention, the endpoint agent 22 enumerates the decoy files 24C for a given process only if it classifies the given process as suspicious.

[0063] Typically, a given process communicates a request to the operating system, and thus, the endpoint agent 22 can enumerate all files in a given directory by communicating instructions to the operating system 34 for the given process in response to the received request to enumerate all files in the given directory.

[0064] In step 92, the endpoint agent 22 initiates preventative measures in response to classifying the given process as suspicious, and the method ends. In one embodiment, the endpoint agent 22 may perform preventative measures by terminating the given process. In another embodiment, in addition to terminating the given process, the endpoint agent 22 may identify and initiate preventative measures for a causal chain for the given process. The causal chain includes additional processes 40 associated with the given process. Identifying the causal chain is described below in the discussion with reference to FIG. 4.

[0065] Returning to step 88, if the endpoint agent 22 classifies the given process as benign, then in step 94, the endpoint agent may enumerate all (only) protected files (i.e., those that do not contain decoy files) in the given directory for the given process. File enumeration is described in the discussion referencing step 90 above.

[0066] In step 96, the endpoint agent 22 monitors the processes to determine whether a given process has modified any of the protected files in a given directory. If the endpoint agent 22 determines that a given process has modified any of the protected files, then in step 98, the endpoint agent analyzes the changes to the protected files and classifies the changes as either suspicious or benign. Analysis of changes to protected files made by a given process is described below with reference to FIG. 5.

[0067] If the endpoint agent classifies the modification as suspicious, the method continues to step 90. However, if the endpoint agent 22 determines that the modification is benign, the method ends.

[0068] Returning to step 96, if the endpoint agent 22 determines that the given process has not modified any of the protected files in the given directory, the method ends.

[0069] Returning to step 84 , if the endpoint agent 22 determines that the given directory is not protected, the method continues to step 94 .

[0070] 3 is a flow chart that generally illustrates a method for detecting a ransomware attack by performing static analysis on a given process (i.e., the process that generated the request in step 82 of FIG. 2) in accordance with an embodiment of the present invention. In the presently described embodiment, the endpoint agent 22 may perform the static analysis by identifying one or more characteristics 42 from the given process and comparing the identified characteristics to whitelist characteristics 54 in one or more whitelists 52, as described below.

[0071] 1 above, each whitelist 52 includes a list of whitelist features 54. Example features include, but are not limited to, a process name, a process path, a trusted signature, and a process hash value.

[0072] In step 100, the endpoint agent 22 stores a set of whitelisted names in a whitelist feature in a first given whitelist 52, a set of whitelisted paths in a second given whitelist 52, a set of whitelisted trusted signatures in a whitelist feature in a third given whitelist 52, and a set of whitelisted hashes in a whitelist feature in a fourth given whitelist 52. In the present embodiment, the whitelisted feature in the first given whitelist is also referred to as a whitelisted name 54, the whitelisted feature in the second given whitelist is also referred to as a whitelisted path 54, the whitelisted feature in the third given whitelist is also referred to as a whitelisted signature 54, and the whitelisted feature in the fourth given whitelist is also referred to as a whitelisted hash value 54.

[0073] In step 102, the endpoint agent 22 identifies a file name of a given file A that the endpoint agent loaded into memory to launch a given process. To identify the file name, the endpoint agent 22 can identify a given executable file A that the endpoint agent loaded into memory 30 and began executing to launch a given process, identify the corresponding file metadata record 56 for the given executable file, and retrieve the file name 60 from the corresponding file metadata record.

[0074] In step 104, the endpoint agent 22 compares the retrieved file name to the whitelisted names in a first given whitelist. If the endpoint agent 22 does not find a given whitelisted name 54 that matches the retrieved file name, then in step 106, the endpoint agent classifies the retrieved file name as suspicious. However, if the endpoint agent 22 finds a given whitelisted name 54 that matches the retrieved file name, then in step 108, the endpoint agent classifies the retrieved name as benign.

[0075] In step 110, the endpoint agent 22 identifies a path of a given file A that the endpoint agent loaded into memory to launch a given process. To identify the path, the endpoint agent 22 may identify a given executable file A that the endpoint agent loaded into memory 30 to launch a given process and that began execution, identify a corresponding file metadata record 56 of the file metadata record corresponding to the given executable file, and obtain the path 64 from the corresponding file metadata record.

[0076] In step 112, the endpoint agent 22 compares the retrieved path to the whitelisted paths in the second given whitelist. If the endpoint agent 22 does not find a matching given whitelisted path 54 with the retrieved path, in step 114, the endpoint agent classifies the retrieved path as a suspicious path. However, if the endpoint agent 22 finds a matching given whitelisted path 54 with the retrieved file name, in step 116, the endpoint agent 22 classifies the retrieved path as benign.

[0077] In step 118, the endpoint agent 22 calculates a signature of a given file A that the endpoint agent loaded into memory to launch a given process. To calculate the signature, the endpoint agent 22 may identify a given executable file A that the endpoint agent loaded into memory 30 to launch a given process and began executing, calculate a signature for the given executable file, identify a corresponding file metadata record 56 for the given executable file, and store the calculated signature in the corresponding file metadata record's signature 66.

[0078] In step 120, the endpoint agent 22 compares the calculated signature to the whitelisting signatures of a third given whitelist. If the endpoint agent 22 does not find a given whitelisting signature 54 that matches the calculated signature, then in step 122, the endpoint agent 22 classifies the calculated signature as suspicious. However, if the endpoint agent 22 finds a given whitelisting signature 54 that matches the calculated signature, then in step 124, the endpoint agent 22 classifies the calculated signature as benign.

[0079] In another embodiment, the endpoint agent 22 can obtain the given signature 66 from the given file 24 and authenticate the obtained signature (i.e., in addition to or as an alternative to calculating and comparing the calculated signature to a whitelisted signature, as described above). In this embodiment, the memory 30 can store a trusted certificate authority (not shown) for a certificate (not shown), and the endpoint agent 22 can authenticate the given signature by mathematically verifying the given signature.

[0080] For example, if a given signature is said to be from company X and the certificate authority (CA) that issued the given signature is company Y (a trusted CA on the computer system), the operating system 24 will classify the certificate as valid. Once the operating system 24 has classified the certificate as valid, the endpoint agent 22 can also check if company X is included in a given whitelist. Typically, an attacker cannot fake / re-use the actual certificate in his malicious file, as the signature generation / verification process requires a private key (i.e., asymmetric encryption) to be able to successfully sign any file 24.

[0081] In step 126, the endpoint agent 22 calculates a hash value of a given executable file A that the endpoint agent 22 loaded into memory to launch a given process. To calculate the hash value, the endpoint agent 22 may identify a given executable file 56A that the endpoint agent loaded into memory 30 to launch a given process and that began execution, calculate a hash value for the given executable file using a function such as SHA256 or MD5, identify a corresponding file metadata record in the file metadata record that corresponds to the given executable file, and store the calculated hash value in the hash value 68 of the corresponding file metadata record.

[0082] At step 128, the endpoint agent 22 compares the calculated hash value to the whitelisted hash values ​​in the fourth given whitelist. If the endpoint agent 22 does not find a given whitelisted hash value 54 that matches the calculated hash value, then at step 130, the endpoint agent classifies the calculated hash value as suspicious. However, if the endpoint agent 22 finds a given whitelisted signature 54 that matches the calculated hash value, then at step 132, the endpoint agent classifies the calculated hash value as benign.

[0083] Finally, in step 134, the endpoint agent 22 analyzes the classified name, classified path, classified signature, and classified hash to classify the given process as either benign or suspicious. In one embodiment, the endpoint agent 22 can classify the given process as benign if all classifications are benign. Similarly, the endpoint agent 22 can classify the given process as suspicious if all classifications are suspicious.

[0084] In another embodiment, the endpoint agent 22 can apply one or more rules to the classification to classify a given process as either benign or suspicious. In a first example, the endpoint agent 22 can classify a given process as benign if the given executable file was loaded from a particular whitelisted path 54 (e.g., "C:\Program Files). In a second example, the endpoint agent 22 can classify a given process as benign if the computed signature of the given executable file matches a particular whitelisted signature 54. In a third example, the endpoint agent 22 can classify a given process as benign if the name of the given executable file matches a particular whitelisted name 54 and the computed signature of the given executable file matches a particular whitelisted signature 54.

[0085] 4 is a flow chart that generally illustrates a method for detecting a ransomware attack by performing dynamic analysis on a given process, in accordance with an embodiment of the present invention. In one embodiment, the endpoint agent 22 may perform dynamic analysis on any given process 40 that communicated a request to enumerate files in a given directory 74. In another embodiment, the endpoint agent 22 may perform dynamic analysis on a given process (only) if the static analysis classified the given process as benign (i.e., as described in the description with reference to FIG. 3 above).

[0086] In step 140, the endpoint agent 22 identifies a given thread 44 in a given process (i.e., the process that communicated the request in the description with reference to step 82 of FIG. 2 above). In some embodiments, the endpoint agent 22 can then identify the given thread by “hooking” (i.e., intercepting) from data structures (not shown) of the operating system 34 the identity of any thread 44 that is currently executing on the processor 28 and that is requesting access to any given file 24 or enumeration of files in any given directory 74.

[0087] In step 142, the endpoint agent 22 determines whether the given thread was injected into the given process (e.g., by an additional malicious process 40). To determine whether the given thread was injected into the given process, the endpoint agent 22 checks the operating system 34 (e.g., Microsoft Windows TM It is possible to hook an internal function (not shown) called CreateRemoteThread in .

[0088] If the endpoint agent 22 determines that the given thread was injected into the given process, then in step 144 the endpoint agent may classify the given thread as suspicious and the method ends. However, if the endpoint agent 22 determines that the given thread was not injected into the given process, then in step 146 the endpoint agent determines whether the given thread contains shellcode. Shellcode includes computer executable code that starts a command shell from which an attacker can gain control of the computer system 20. To detect shellcode within a given thread, the endpoint agent 22 may identify properties of the region in memory 30 from which the given thread is executing by monitoring within the operating system 34, and detect which properties allow a malicious process 40 to inject its "shellcode" into the given process.

[0089] If the endpoint agent 22 determines that the given thread contains shellcode, the method continues to step 142. However, if the endpoint agent 22 determines that the given thread does not contain shellcode, then in step 148, the endpoint agent determines whether the thread stack of the given thread contains a given function address 50 that matches an address in memory 30 of a given shared library 36 (e.g., a DLL) for a graphical user interface (GUI). The rationale for this step is that malware typically restricts operations that modify one or more files 24, and therefore typically does not contain code to perform tasks such as presenting a file name in a GUI.

[0090] If the endpoint agent 22 determines that the thread stack of the given thread includes a given function address 50 that matches the address of the given shared library 36 for the GUI, then in step 150 the endpoint agent may classify the given thread as benign and the method ends. In the embodiment described herein, if the given thread includes a given function address 50 that matches the address of the given shared library 36 for the GUI, then the thread may also be referred to as a GUI thread. However, if the endpoint agent 22 determines that the thread stack of the given thread does not include a given function address 50 that matches the address of the given shared library 36 for the GUI, then the method continues to step 142.

[0091] For each given process 40, the operating system 34 typically maintains a mapping between each given shared library (e.g., DLL) and its respective virtual memory address. The endpoint agent 22 can use these mappings to translate all virtual addresses in the state of the thread stack when a given thread requests to enumerate a file 24. If the endpoint agent 22 detects any addresses that are mapped to a given DLL (e.g., x.dll, b.dll) within the given DLL whitelist 52 at a predefined distance on the stack from the current code location (i.e., the given thread), the endpoint agent can classify the given thread as a GUI thread.

[0092] As described in the description with reference to Figure 2 above, the endpoint agent 22 can identify and initiate preventive measures for the causality chain for a given process. In one embodiment, the endpoint agent 22 can identify the causality chain for a given process by analyzing the respective context 72. In this embodiment, upon classifying a given thread 44 as malicious, the endpoint agent 22 can use the respective context 72 to identify any additional malicious threads 44 and any additional malicious processes 40 in the causality chain that are part of the malicious thread, and initiate preventive measures for the identified malicious threads and processes (i.e., as described in the description with reference to step 92 of Figure 2 above).

[0093] While malicious threads typically also "live" within a given malicious process, there are instances where a malicious thread 44 performing malicious activity runs within a legitimate process 40. In such cases, only the malicious thread is killed, but the legitimate process (and any additional legitimate threads therein) continues to exist. Thus, the endpoint agent 22 can identify instances where a malicious thread 44 was created by a malicious process 40, but uses techniques supported by the operating system (such as thread injection and reflective loading) to run inside the legitimate process 40.

[0094] Figure 5 is a flow chart that generally illustrates a method for detecting ransomware attacks by analyzing files 24 modified by a given process, according to one embodiment of the present invention. The steps described in Figure 5 can be performed independently of the classification performed by static and dynamic analysis described above.

[0095] In step 160, the endpoint agent 22 specifies a threshold and one or more file extensions. Typically, ransomware attacks only target data files 24A that store user / corporate data. Thus, the specified file extensions may be those used for documents (e.g., ".doc"), spreadsheets (e.g., ".xls"), and images (e.g., ".jpg").

[0096] In step 162, the endpoint agent 22 determines whether the given process generated a ransom request. In one embodiment, the ransom request includes a ransom note stored in the given file 24 that includes details of the ransomware attack and details of how to pay the ransom in exchange for a decryption key for files encrypted in the attack. In some embodiments, the endpoint agent 22 can classify the given file 24 as a ransom request by detecting specific file names (e.g., “restore_files_rvrk.html”, “confirmation.key”, “last_chance.txt”, “recovery_key.txt”) or by detecting specific phrases in the given file 24, such as “Your important files are encrypted”, or keywords such as “Bitcoin”, “encryption”, and “payment”.

[0097] If the endpoint agent 22 detects that the given process generated a ransom request message, then in step 164 the endpoint agent initiates preventative measures for the given process and the method ends. Initiating preventative measures for a given process is described above in the discussion with reference to step 92 of FIG. 2.

[0098] If the endpoint agent 22 does not detect that the given process has generated a ransom request message, then in step 166 the endpoint agent determines the number of files 24 modified by the given process and compares the determined number to a given threshold.

[0099] If, in step 168, the determined number of files 24 modified by a given process is greater than a given threshold, then, in step 170, the endpoint agent determines whether the modifications include modifying files so that they all have the same file extension 62.

[0100] If the endpoint agent 22 determines that the modification includes modifying the files so that they all have the same file extension 62, the method continues to step 164. However, if the endpoint agent 22 determines that the modification does not include modifying the files so that they all have the same file extension 62, then in step 172 the endpoint agent determines whether the modification includes renaming the files so that they all have a file extension 62 that matches one of the given file extensions.

[0101] If the endpoint agent 22 determines that the modification includes renaming the files so that they all have file extensions 62 that match one of the given file extensions, the method continues at step 164. However, if the endpoint agent 22 determines that the modification does not include renaming the files so that they all have file extensions 62 that match one of the given file extensions, then in step 174 the endpoint agent determines whether the modification includes encrypting the files.

[0102] If the endpoint agent 22 determines that the modification includes encrypting the file, the method continues to step 164. However, if the endpoint agent 22 determines that the modification does not include encrypting the file, the method ends. In some embodiments, the endpoint agent 22 can detect if a given file 24 has been encrypted using techniques such as Chi Square Distribution, Monte-Carlo Pi Approximation, and entropy analysis. In additional embodiments, the endpoint agent 22 can detect if a given file 24 has been encrypted by analyzing the header of the given file to determine the file type (i.e., for the given file).

[0103] In operation, a given file 24 may have one or more headers, each of which stores metadata for the file (which is different for each type of file). In particular, there are file types that are compressed / encrypted by default (e.g., .JPEG / .JPG image files and Microsoft .docx files). Typically, the endpoint agent 22 can determine the file type of a given file 24 by parsing the file header of the given file, since the file extension is not a reliable indicator.

[0104] Returning to step 168, if the determined number of files 24 modified by a given process is not greater than the given threshold, the method ends.

[0105] It will be understood that the above-described embodiments have been cited by way of example, and that the present invention is not limited to what has been particularly shown and described above, but rather, the scope of the present invention includes both combinations and subcombinations of the various features described above, as well as variations and modifications thereof which would occur to a person skilled in the art upon reading the above description and which have not been disclosed in the prior art.

Claims

1. 1. A method for protecting a computer system connected to a storage device, comprising: storing a set of protected files and a decoy file in the storage device, any changes to the decoy file being indicative of a cyber attack on the computer system; receiving a request from a process executing on the computer system to enumerate files stored on the storage device; analyzing, by a processor, the process to classify the process as benign or suspicious; enumerating the protected files for the process; enumerating the decoy files for the process only if the process is classified as suspicious; Including, The step of analyzing the process includes performing a dynamic analysis on the process; performing the dynamic analysis, identifying a thread in the process that communicated the request to enumerate the file, the thread including a thread stack; determining whether the thread stack includes or is less than or equal to a memory address of a shared library of a graphical user interface; classifying the process as suspicious if it is determined that the thread stack does not contain a memory address of the shared library; and classifying the thread as benign if it is determined that the thread stack includes a memory address of the shared library; Including, method.

2. The cyber attack includes a ransomware attack. The method of claim 1.

3. The method comprises: initiating preventative measures for said process; The method of claim 1 , comprising:

4. The step of initiating a preventive measure comprises: - identifying a causal chain of said process; and initiating preventive measures against said causal chain; The method of claim 3 , comprising:

5. The step of analyzing the process includes: identifying an executable file on the storage device that launched the process; and performing a static analysis on the identified executable file; The method of claim 1 , comprising:

6. performing the static analysis Identifying the name of the executable file; comparing the identified name to a list of whitelisted names; classifying the process as suspicious if the identified name does not match any of the whitelisted names; and classifying the process as benign if the identified name matches any of the whitelisted names; The method of claim 5 , comprising:

7. performing the static analysis Identifying a path to the executable file; comparing the identified path to a list of whitelisted paths; classifying the process as suspicious if the identified path does not match any of the whitelisted paths; and classifying the process as benign if the identified path matches any of the whitelisted paths; The method of claim 5 , comprising:

8. performing the static analysis Computing a signature of the executable file; comparing the calculated signature to a list of whitelisting signatures; classifying the process as suspicious if the calculated signature does not match any of the whitelisted signatures; and classifying the process as benign if the calculated signature matches any of the whitelisted signatures; The method of claim 5 , comprising:

9. performing the static analysis calculating a hash value of the executable file; comparing the calculated hash value to a list of whitelisted hash values; classifying the process as suspicious if the calculated hash value does not match any of the whitelisted hash values; and classifying the process as benign if the calculated hash value matches any of the whitelisted hash values; The method of claim 5 , comprising:

10. performing the dynamic analysis, identifying a thread in said process that communicated said request to enumerate files; determining whether the thread has been injected into the process; classifying the process as suspicious if it is determined that the thread has been injected into the process; and classifying the thread as benign if it is determined that the thread was not injected into the process; The method of claim 1 , comprising:

11. performing the dynamic analysis, identifying a thread in said process that communicated said request to enumerate files; determining whether the thread contains shellcode; classifying the process as suspicious if the thread is determined to contain shellcode; and classifying the thread as benign if it is determined that the thread does not contain shellcode; The method of claim 1 , comprising:

12. An apparatus for protecting a computer system, comprising: a storage device configured to store a set of protected files and a decoy file, any modification to the decoy file being indicative of a cyber attack on the computer system; a processor; receiving a request from a process executing on the computer system to enumerate files stored in the storage device; analyzing the process to classify the process as benign or suspicious; enumerating the protected files for the process; in response to classifying the process as suspicious, enumerating the decoy files against the process; a processor configured to Including, the processor is configured to perform a dynamic analysis on the process; The processor, identifying a thread in the process that communicated the request to enumerate the file, the thread including a thread stack; determining whether the thread stack includes or is less than or equal to a memory address of a shared library of a graphical user interface; classifying the process as suspicious if it is determined that the thread stack does not contain a memory address of the shared library; and classifying the thread as benign if it is determined that the thread stack includes a memory address of the shared library; and performing the dynamic analysis by Device.

13. The cyber attack includes a ransomware attack.

13. The apparatus of claim 12.

14. The processor further comprises: Initiating preventative measures against said process; The apparatus of claim 12 configured to:

15. The processor, - identifying a causal chain of said process; and initiating preventive measures against said causal chain; Initiating said preventive measures by The apparatus of claim 14 configured as follows:

16. The processor, identifying an executable file on the storage device that launched the process; and performing a static analysis on the identified executable file; Analyzing the process by The apparatus of claim 12 configured to:

17. The processor, Identifying the name of the executable file; comparing the identified name to a list of whitelisted names; classifying the process as suspicious if the identified name does not match any of the whitelisted names; and classifying the process as benign if the identified name matches any of the whitelisted names; performing said static analysis by 17. The apparatus of claim 16, configured to:

18. The processor, Identifying a path to the executable file; comparing the identified path to a list of whitelisted paths; classifying the process as suspicious if the identified path does not match any of the whitelisted paths; and classifying the process as benign if the identified path matches any of the whitelisted paths; performing said static analysis by 17. The apparatus of claim 16, configured to:

19. The processor, Computing a signature of the executable file; comparing the calculated signature to a list of whitelisting signatures; classifying the process as suspicious if the calculated signature does not match any of the whitelisted signatures; and classifying the process as benign if the calculated signature matches any of the whitelisted signatures; performing said static analysis by 17. The apparatus of claim 16, configured to:

20. The processor, calculating a hash value of the executable file; comparing the calculated hash value to a list of whitelisted hash values; classifying the process as suspicious if the calculated hash value does not match any of the whitelisted hash values; and classifying the process as benign if the calculated hash value matches any of the whitelisted hash values; performing said static analysis by 17. The apparatus of claim 16, configured to:

21. The processor, identifying a thread in said process that communicated said request to enumerate files; determining whether the thread has been injected into the process; classifying the process as suspicious if it is determined that the thread has been injected into the process; and classifying the thread as benign if it is determined that the thread was not injected into the process; performing the dynamic analysis by The apparatus of claim 12 configured to:

22. The processor, identifying a thread in said process that communicated said request to enumerate files; determining whether the thread contains shellcode; classifying the process as suspicious if the thread is determined to contain shellcode; and classifying the thread as benign if it is determined that the thread does not contain shellcode; performing the dynamic analysis by The apparatus of claim 12 configured to:

23. 1. A computer program for protecting a computer system, the computer program comprising program instructions stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when read by a computer, cause the computer to: storing a set of protected files and a decoy file in a storage device connected to the computer system, any changes to the decoy file being indicative of a cyber attack against the computer system; receiving a request from a process executing on the computer system to enumerate files stored in the storage device; analyzing the process to classify the process as benign or suspicious; enumerating the protected files for the process; in response to classifying the process as suspicious, enumerating the decoy files against the process; Let them do so, the program instructions are configured to analyze the process by performing a dynamic analysis on the process; The program instructions include: identifying a thread in the process that communicated the request to enumerate the file, the thread including a thread stack; determining whether the thread stack includes or is less than or equal to a memory address of a shared library of a graphical user interface; classifying the process as suspicious if it is determined that the thread stack does not contain a memory address of the shared library; and classifying the thread as benign if it is determined that the thread stack includes a memory address of the shared library; and performing the dynamic analysis by Computer program.

Citation Information

Patent Citations

  • Behavior-based ransomware detection using decoy files

    US10193918B1

  • System and method to prevent, detect, thwart, and recover automatically from ransomware cyber attacks, using behavioral analysis and machine learning

    US20180248896A1

  • Preventing ransomware from encrypting files on a target machine

    US20200089876A1

  • Non-regressive injection of deception decoys

    US20200183820A1