Method for detecting network attack, electronic device and computer program product

By monitoring the compression ratio of written data and file integrity checks, ransomware attacks are identified, which solves the problem of difficulty in detecting ransomware with existing technology, achieves efficient and accurate network attack detection, and reduces the risk of data loss.

CN118734299APending Publication Date: 2024-10-01DELL PROD LP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310341023.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing detection methods are difficult to effectively detect ransomware network attacks, especially on data storage servers. Traditional anti-virus methods cannot identify encrypted random data, and entropy-based detection methods have high performance and are difficult to find the source of the attack, resulting in Potential data loss is high.

Method used

By monitoring the compression ratio of written data and using the difference in data volume during data compression and decompression, we can initially determine that there may be a network attack, and perform file integrity checks on the associated user-side connections to reduce the amount of detection calculations and identify the origin of the attack. The user-side connection of the attack.

Benefits of technology

It significantly reduces the calculation amount of network attack detection, accurately identifies the user-side connection that initiated the attack, avoids data loss due to snapshot deletion, improves user experience, and does not affect the operations of other users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734299A_ABST
    Figure CN118734299A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method for detecting a network attack, electronic equipment and a computer program product. The method may include determining a compression ratio of write data within a time window of a predetermined duration, the compression ratio being a ratio of a data volume of the write data before compression to a data volume of the write data after compression. The method may further include determining a user-side connection associated with the write data in accordance with at least a determination that the compression ratio is below a threshold compression ratio. Further, the method may include determining data from the user-side connection as the network attack in accordance with a determination that a file associated with the user-side connection is unable to pass the file integrity check. According to the embodiment of the invention, the calculation amount of network attack detection can be obviously reduced, the user side connection initiating the network attack can be accurately detected, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer networks, and more particularly, to methods, electronic devices, and computer program products for detecting network attacks. Background Art

[0002] Currently, cyber attacks such as ransomware have become a major threat to the security of user data on data storage servers. Data storage servers are often targeted by ransomware attacks. Since ransomware only encrypts data and the encrypted data content is random, traditional anti-virus methods cannot detect ransomware activity. The increasing number of ransomware variants makes ransomware activity detection more difficult. Current ransomware detection is performed at the storage object or even system level, and when a ransomware attack is detected, all access to the storage server is blocked. Scheduling snapshots is a good practice to protect data, but since ransomware is not easily detected by storage systems, snapshots may be rotated when the retention limit is reached. If ransomware activity is not detected in time, the potential data loss caused by ransomware attacks remains high. Summary of the invention

[0003] The embodiments of the present disclosure provide a detection solution for network attacks.

[0004] In a first aspect of the present disclosure, a method for detecting a network attack is provided. The method may include determining a compression ratio of written data within a time window of a predetermined length, wherein the compression ratio is a ratio of the amount of data of the written data before being compressed to the amount of data of the written data after being compressed. The method may further include determining a user-side connection associated with the written data based at least on determining that the compression ratio is lower than a threshold compression ratio. In addition, the method may include determining data from the user-side connection as the network attack based on determining that a file associated with the user-side connection cannot pass a file integrity check.

[0005] In a second aspect of the present disclosure, an electronic device is provided, comprising a processor; and a memory coupled to the processor, the memory having instructions stored therein, which, when executed by the processor, cause the electronic device to perform actions, the actions comprising: determining a compression ratio of write data within a time window of predetermined length, the compression ratio being the ratio of the amount of data of the write data before being compressed to the amount of data of the write data after being compressed; determining a user-side connection associated with the write data based at least on determining that the compression ratio is lower than a threshold compression ratio; and determining data from the user-side connection as the network attack based on determining that a file associated with the user-side connection cannot pass a file integrity check.

[0006] In a third aspect of the present disclosure, there is provided a computer program product tangibly stored on a computer readable medium and comprising machine executable instructions which, when executed, cause a machine to perform any of the steps of the method according to the first aspect.

[0007] This Summary is provided to introduce a selection of concepts in a simplified form that are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the disclosure, nor is it intended to limit the scope of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the exemplary embodiments of the present disclosure in more detail in conjunction with the accompanying drawings, wherein the same or similar reference numerals generally represent the same or similar components in the exemplary embodiments of the present disclosure. In the accompanying drawings:

[0009] Figure 1 A schematic diagram showing an example environment according to an embodiment of the present disclosure is shown;

[0010] Figure 2 A schematic diagram showing a process of detecting a network attack according to an embodiment of the present disclosure is shown;

[0011] Figure 3 A schematic diagram showing an example environment for a data compression / decompression module according to an embodiment of the present disclosure is shown;

[0012] Figure 4 A schematic diagram showing a protocol instruction according to an embodiment of the present disclosure;

[0013] Figure 5 A schematic diagram showing a process of detecting a network attack according to another embodiment of the present disclosure is shown;

[0014] Figure 6 A schematic diagram of an example environment showing data within a time window according to an embodiment of the present disclosure; and

[0015] Figure 7 A block diagram of an example device that may be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0016] The principles of the present disclosure will be described below with reference to several example embodiments shown in the accompanying drawings.

[0017] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "a set of example embodiments". The term "another embodiment" means "a set of additional embodiments". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0018] As discussed above, data storage service providers may face cyber attacks such as ransomware in the process of providing secure and stable data storage services to users. Ransomware is a type of malware that prevents users from accessing computer files, systems or networks maintained by data storage service providers and requires users to pay a ransom for access. Therefore, such cyber attacks may lead to costly operational disruptions and loss of critical information and data.

[0019] For example, NAS (Network Attached Storage) servers are a common target for ransomware attacks because they are often used to maintain important shared files for users. In the past period of time, there have been more and more reports of attackers successfully encrypting data in NAS servers and demanding ransom payments. The ransomware on the infected user's device will replace the files in the shared folder with versions encrypted by the key controlled by the attacker. After the file encryption and replacement is completed, the user will not be able to access the file unless the user pays the ransom for the decryption key. In order to avoid such incidents, it is necessary to detect such network attacks.

[0020] Since ransomware activities usually only include operations such as reading, writing, creating, and deleting files, ransomware behavior is not easy to detect. Various new variants of ransomware make it more difficult to detect ransomware attacks. In addition, since the data written by ransomware is encrypted random data, the encrypted data content is random, and traditional IDS (intrusion detection system) cannot effectively detect it. As for file integrity checks, it can detect ransomware attacks in some cases, but continuously scanning all files in the storage system is a very expensive performance cost for the storage system itself.

[0021] In addition, there are some ransomware detection methods based on entropy. However, this method usually relies on the backend's support for entropy calculation. In other words, this detection method requires computing power to perform functions related to entropy calculation (such as compression or deduplication) to obtain data entropy. However, in addition to the problem of high performance cost, this type of method is also difficult to find the source of the ransomware attack because it only focuses on the existing data in the storage server.

[0022] In addition, snapshots can be used to minimize the threat of ransomware encryption because they provide users with accessible copies of data at previous points in time. In other words, if a user has a snapshot that is not affected by ransomware encryption, the user can obtain a copy of the data in that snapshot to get rid of the ransomware. However, snapshots may be automatically deleted due to space thresholds or expiration of snapshot retention periods. Therefore, for shared folders encrypted by ransomware, even if there are snapshots to protect the data, useful snapshots may still be deleted if the network attack is not discovered in time.

[0023] In order to at least partially solve the above shortcomings, an embodiment of the present disclosure provides a novel solution for detecting network attacks. Since current data storage servers all utilize data compression mechanisms to improve the throughput of actual data transmission, data analysis can be performed on the compression ratio of written data within a period of time. When the amount of incompressible data in the written data is large, it means that the written data is likely to be encrypted on a large scale. At this time, it can be preliminarily determined that the written data is executing a network attack, and a file integrity check is performed on the data source of the written data. In this way, the present disclosure can significantly reduce the computational complexity of network attack detection, and can accurately detect the user-side connection that initiates the network attack. Therefore, the entire detection process does not affect the operations of other users, thereby improving the user experience.

[0024] Figure 1 FIG. 1 is a schematic diagram of an example environment 100 according to an embodiment of the present disclosure, in which a device and / or process according to an embodiment of the present disclosure may be implemented. Figure 1 As shown, the example environment 100 may include write data 110 within a time window of predetermined length, historical data 120 within one or more time windows before the time window, a computing device 130, and a detection result 140 of whether the write data 110 is at least part of a network attack.

[0025] It should be understood that the computing device 130 is configured to analyze the write data 110. Specifically, the write data 110 is compressed during the transmission process, and it is usually decompressed before being saved to the server. Therefore, the amount of data of the write data 110 before being decompressed by the data decompression module is usually less than the amount of data after being decompressed by the data decompression module. For the encrypted write data, because its data entropy increases, the amount of data before being decompressed by the data decompression module is almost equal to the amount of data after being decompressed by the data decompression module. Using this phenomenon, the computing device 130 can monitor the input data decompression module and the write data output from the data decompression module. For example, the computing device 130 can compare the compression ratio of the write data 110 with the compression ratio of the historical data 120. When the compression ratio of the write data 110 is less than the compression ratio of the historical data 120, it indicates that the write data 110 may be at least a part of a network attack. At least based on this, the computing device 130 can generate a detection result 140. Specifically, the network attack detection scheme will be described in detail below.

[0026] In some embodiments, the computing device 110 may be any device with computing capabilities. As a non-limiting example, the computing device may be any type of fixed computing device, mobile computing device, or portable computing device, including but not limited to a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, etc. All or part of the components of the computing device may be distributed in the cloud. The computing device and the nodes connected thereto may adopt a cloud-edge architecture.

[0027] It should be understood that Figure 1 It is only intended to illustrate some concepts of the present disclosure and is not intended to limit the scope of the present disclosure.

[0028] The following will combine Figure 2 The process of detecting network attacks according to an embodiment of the present disclosure is described in detail. For ease of understanding, the specific data mentioned in the following description are exemplary and are not intended to limit the scope of protection of the present disclosure. It is understood that the embodiments described below may also include additional actions not shown and / or may omit the actions shown, and the scope of the present disclosure is not limited in this respect.

[0029] Figure 2 FIG. 2 is a schematic diagram of a process 200 for detecting a network attack according to an embodiment of the present disclosure. In some embodiments, the process 200 may be performed as follows: Figure 1 Implementation in the computing device 130. Figure 2 The process 200 for detecting network attacks according to an embodiment of the present disclosure is described. For ease of understanding, the specific examples mentioned in the following description are exemplary and are not intended to limit the protection scope of the present disclosure.

[0030] like Figure 2 As shown, at 202, the computing device 130 can determine the compression ratio of the written data 110 within a time window of a predetermined length. The compression ratio is the ratio of the amount of data of the written data 110 before being compressed to the amount of data of the written data 110 after being compressed. It should be understood that the "after being compressed" described in the text is used to indicate that the data has been processed by the data compression / decompression module, and even if certain data cannot be further compressed, it can continue to be processed by the data compression module. In other words, the data that cannot be further compressed has a data amount that is substantially unchanged after being processed by the data compression module and before being processed by the data compression module. In addition, the "data before being compressed" can be understood as the original data, and the "data after being compressed" can be understood as compressed data. In addition, the network attack detection scheme disclosed in the present invention can be applied to the SMB protocol or other compression protocols such as FTP, SFTP, etc. It should be understood that FTP, SFTP and SMB support protocol layer compression with connection-level compression.

[0031] At 204, if the computing device 130 determines that the compression ratio is lower than the threshold compression ratio, the computing device 130 may further determine the user-side connection associated with the write data 110. In other words, the compression ratio is lower than the threshold compression ratio, which means that at least most of the data in the write data 110 has been encrypted. At this point, it can be preliminarily determined that the write data 110 may be at least part of a network attack, and the user-side connection or user device associated with the write data 110 may have been controlled by the attacker's ransomware.

[0032] It should be understood that in order to more accurately detect network attacks, in some embodiments, while monitoring the compression ratio of the written data 110, the read data and the operation records on the data can be further analyzed. Figure 3 FIG. 3 is a schematic diagram of an example environment 300 for a data compression / decompression module 330 according to an embodiment of the present disclosure. Figure 3 In the example, the computing device 130 is configured to analyze the write data and read data of different user-side connections to detect network attacks.

[0033] In some embodiments, the computing device 130 may determine an additional compression ratio of the read data within the time window. The additional compression ratio is the ratio of the amount of the read data before being compressed to the amount of the read data after being compressed. It should be understood that the "time window" herein has a duration equal to the predetermined duration above.

[0034] like Figure 3As shown, for the user-side connection 310, the computing device 130 can determine the data volume of the read data in the current time window before being compressed by the data compression / decompression module 330 (the data volume of the original data) 311, the data volume of the read data after being compressed by the data compression / decompression module 330 (the data volume of the compressed data) 312, and the data volume of the write data in the time window before being decompressed (the data volume of the compressed data) 314, and the data volume of the write data after being decompressed (the data volume of the original data) 313. Correspondingly, for the user-side connection 320, the computing device 130 can determine the data volume of the read data in the current time window before being compressed (the data volume of the original data) 321, the data volume of the read data after being compressed (the data volume of the compressed data) 322, and the data volume of the write data in the time window before being decompressed (the data volume of the compressed data) 324, and the data volume of the write data after being decompressed (the data volume of the original data) 323. Based on these data, computing device 130 may determine a compression ratio for write data within the time window and an additional compression ratio for read data within the time window.

[0035] In some embodiments, computing device 130 may compare the compression ratio to the additional compression ratio and the compression ratio to the threshold compression ratio. If the compression ratio is lower than the additional compression ratio and the compression ratio is lower than the threshold compression ratio, computing device 130 may determine that the user-side connection associated with writing the data is likely to be an attacker. Figure 3 In the example, if the compression ratio of the user-side connection 310 in the time window is substantially the same as the additional compression ratio and the compression ratio is substantially the same as the threshold compression ratio, it can be determined that the written data on the user-side connection 310 is normal data. If the compression ratio of the user-side connection 320 in the time window is less than the additional compression ratio and the compression ratio is less than the threshold compression ratio, it can be determined that the written data on the user-side connection 320 may be a network attack.

[0036] It should be understood that in order to more accurately detect network attacks, in some embodiments, while monitoring the compression ratio of written data and the additional compression ratio of read data, the operation records of these data can also be analyzed. It should be understood that the protocol layer is usually provided with multiple protocol instructions for indicating various operations of users on data. Figure 4 A schematic diagram of a protocol instruction 400 according to an embodiment of the present disclosure is shown.

[0037] like Figure 4As shown, the protocol instruction 400 may include the following operations performed on the file: open 401, set attributes 402, truncate 403, close 404, read 405, write 406, remove 407. It should be understood that these operations are all common operations, and the protocol instruction 400 may also include other operations. It should also be understood that the file sharing protocol implements the structure and language of file requests between the user side and the server, so that instructions for opening, reading, writing and closing files through the network can be provided. For network attacks, the common operation sequence is: create a file, write high entropy data to the same file identifier; and delete the file after reading the same file identifier. Therefore, when the delete file operation after the read file operation and / or the encrypt file operation after the create file operation appear multiple times within a time window, it can be basically determined that the user-side connection is used to implement a network attack.

[0038] In summary, the computing device 130 may determine the data set to be analyzed based on the data in the time window. As an example, the structure of the data set is shown in the following Table 1:

[0039] Connection*connection, User-side connection identifier uitn64_t ingress_in Amount of compressed data written uint64_t ingress_out Amount of raw data written uitn64_t egress_in The amount of compressed data read uint64_t egress_out The amount of raw data read File_Ops*op_list File Operation List

[0040] Table 1

[0041] return Figure 2 At 206, computing device 130 may perform a file integrity check on the file associated with the determined user-side connection. If the user-side connection fails the file integrity check, computing device 130 may determine that the data from the user-side connection is a network attack.

[0042] Figure 5 FIG. 5 is a schematic diagram of a process 500 for detecting a network attack according to another embodiment of the present disclosure. In some embodiments, the process 500 may be performed as follows: Figure 1 Implementation in the computing device 130. Figure 5 The process 500 for detecting network attacks according to an embodiment of the present disclosure is described. For ease of understanding, the specific examples mentioned in the following description are exemplary and are not intended to limit the protection scope of the present disclosure.

[0043] At 502, the computing device 130 begins to evaluate data within a time window. It should be understood that the "time window" herein may have a duration equal to the aforementioned predetermined duration.

[0044] At 504, the computing device 130 may analyze the written data in the time window, for example, to determine whether the compression ratio of the written data in the time window is low. As an example, the compression ratio of the written data may be compared with a threshold compression ratio. If the compression ratio of the written data is lower than the threshold compression ratio, the process may proceed to 506, otherwise, the written data is not a network attack, and the computing device 130 may continue to evaluate the next time window at 510.

[0045] At 506, the computing device 130 may further analyze the write data within the time window, for example, to determine whether the number of abnormal operations within the time window is high. As an example, the number of abnormal operations may be compared with a threshold number of times. If the number of abnormal operations is higher than the threshold number of times, the computing device 130 may determine that the user-side connection associated with the write data may be an attack source, and enter 508, otherwise it indicates that the write data is not a network attack, and the computing device 130 may continue to evaluate the next time window at 510. In some embodiments, in order to determine the number of abnormal operations, the computing device 130 may determine a first count of delete file operations after a read file operation within the time window, and determine a second count of encrypt file operations after a create file operation within the time window. Furthermore, based on at least one of the first count and the second count, the computing device 130 may determine the number of abnormal operations.

[0046] At 508, computing device 130 may trigger a file integrity check. File integrity checks usually consume computing power, but since the aforementioned data analysis process may be such that the file integrity check is only applied to individual user-side connections that may be subject to network attacks, computing power is saved overall.

[0047] In some embodiments, if a user-side connection that initiates a network attack is found through a file integrity check, the computing device 130 may block the user-side connection and save a historical snapshot associated with the user-side connection or create a snapshot associated with the user-side connection. In this way, snapshots can be prevented from being removed in a timely manner, making it easier for users to restore data later without being blackmailed by network attacks. Figure 6 Describe the scenario of data analysis in detail.

[0048] Figure 6 Schematic diagram of an example environment 600 showing data within a time window according to an embodiment of the present disclosure. Figure 6 As shown, the example environment 600 includes a user side connection 610 and a user side connection 620, both of which contain the data sets in Table 1 above. Figure 6 The data on the right is newer and closer to Figure 6 The data on the left is older. In addition, it should be understood that Figure 6 The patterned squares in are used to represent high entropy data (i.e., data that cannot be compressed further), while the blank squares are used to represent normal data.

[0049] As an example, data 611 may include the amount of compressed data written and the amount of original data written, thereby determining the compression ratio of the written data. Accordingly, data 612 may include the amount of compressed data read and the amount of original data read, thereby determining the additional compression ratio of the read data. Similarly, data 621 may include the amount of compressed data written and the amount of original data written, thereby determining the compression ratio of the written data. And data 622 may include the amount of compressed data read and the amount of original data read, thereby determining the additional compression ratio of the read data. In addition, data OPS may be used to represent a file operation list for the data.

[0050] Based on the above data set, the computing device 130 can perform network attack detection for the time window 630. For example, for the user-side connection 610, since the compression ratio of the written data in the time window 630 is substantially the same as the additional compression ratio of the read data, it can be determined that there is no network attack. For the user-side connection 620, since the compression ratio of the written data in the time window 630 is much smaller than the additional compression ratio of the read data, and it is also determined in the data OPS that the number of abnormal operations is too large, it can be determined that the user-side connection 620 may have a network attack. Then, a file integrity check can be performed for the user-side connection 620. In addition, the computing device 130 can also determine the probability of each user-side connection being associated with a network attack based on the data set in the time window 630. The above operation records and compression ratios can be used to reflect file operations and IO patterns from user-side connections.

[0051] Through the above embodiments, the present disclosure can detect network attacks without enabling the entropy calculation function. This allows the storage system to simply apply the detection method of the present disclosure without consuming considerable computing power. In addition, since the network attack detection of the present disclosure is based on statistical data at the user-side connection level, the network connection used by the attacker can be identified, and the user-side connection can be blocked, while other connections can still access the storage server.

[0052] Figure 7 700 is a block diagram of an example device 700 that can be used to implement embodiments of the present disclosure. For example, the electronic device 700 can be used to implement Figure 1. As shown in the figure, the electronic device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 702 or loaded from a storage unit 708 to a random access memory (RAM) 703. In RAM 703, various programs and data required for the operation of the device 700 can also be stored. CPU 701, ROM 702 and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0053] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0054] The processing unit 701 performs the various methods and processes described above, such as processes 200 and 500. For example, in some embodiments, the various methods and processes described above can be implemented as a computer software program or a computer program product, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by CPU 701, one or more steps in any process described above can be performed. Alternatively, in other embodiments, CPU 701 can be configured to perform processes such as processes 200 and 500 by any other appropriate means (e.g., by means of firmware).

[0055] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0056] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, any non-temporary storage device, or any suitable combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0057] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0058] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0059] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0060] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0061] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0062] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0063] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for detecting a network attack, comprising: Determine a compression ratio of the written data within a time window of a predetermined length, wherein the compression ratio is a ratio of the amount of the written data before being compressed to the amount of the written data after being compressed; determining a user-side connection associated with the write data based at least on determining that the compression ratio is below a threshold compression ratio; as well as Based on determining that the file associated with the user-side connection cannot pass the file integrity check, the data from the user-side connection is determined to be the network attack.

2. The method of claim 1 , wherein determining the user-side connection associated with the write data comprises: In response to the compression ratio being lower than the threshold compression ratio, determining a number of abnormal operations within the time window; as well as In response to the number being higher than a threshold number, the user-side connection associated with the write data is determined.

3. The method according to claim 2, wherein determining the number of the abnormal operations within the time window comprises: determining a first count of delete file operations following a read file operation within the time window; determining a second count of encrypt file operations following the create file operation within the time window; Based on at least one of the first count and the second count, the number of abnormal operations is determined.

4. The method according to claim 1, further comprising: An additional compression ratio of the read data within the time window is determined, where the additional compression ratio is a ratio of a data volume of the read data before being compressed to a data volume of the read data after being compressed.

5. The method of claim 4, wherein determining the user-side connection associated with the write data comprises: Based on determining that the compression ratio is lower than the additional compression ratio and the compression ratio is lower than a threshold compression ratio, the user-side connection associated with the write data is determined.

6. The method according to claim 1, further comprising: The threshold compression ratio is determined based on compression ratios of historical data written in a plurality of previous time windows having the predetermined duration.

7. The method according to claim 1, further comprising: In response to determining the network attack, blocking the user-side connection; as well as A historical snapshot associated with the user-side connection is saved or a snapshot associated with the user-side connection is created.

8. The method of claim 1, wherein the cyber attack is a ransomware attack.

9. An electronic device, comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, wherein when the instructions are executed by the processor, the electronic device performs actions, the actions comprising: Determine a compression ratio of the written data within a time window of a predetermined length, wherein the compression ratio is a ratio of the amount of the written data before being compressed to the amount of the written data after being compressed; determining a user-side connection associated with the write data based at least on determining that the compression ratio is below a threshold compression ratio; as well as Based on determining that the file associated with the user-side connection fails the file integrity check, the data from the user-side connection is determined to be a network attack.

10. The apparatus of claim 9, wherein determining the user-side connection associated with the write data comprises: In response to the compression ratio being lower than the threshold compression ratio, determining a number of abnormal operations within the time window; as well as In response to the number being higher than a threshold number, the user-side connection associated with the write data is determined.

11. The apparatus of claim 10, wherein determining the number of the abnormal operations within the time window comprises: determining a first count of delete file operations following a read file operation within the time window; determining a second count of encrypt file operations following the create file operation within the time window; Based on at least one of the first count and the second count, the number of abnormal operations is determined.

12. The apparatus according to claim 9, further comprising: An additional compression ratio of the read data within the time window is determined, where the additional compression ratio is a ratio of a data volume of the read data before being compressed to a data volume of the read data after being compressed.

13. The apparatus of claim 12, wherein determining the user-side connection associated with the write data comprises: Based on determining that the compression ratio is lower than the additional compression ratio and the compression ratio is lower than a threshold compression ratio, the user-side connection associated with the write data is determined.

14. The apparatus according to claim 9, further comprising: The threshold compression ratio is determined based on compression ratios of historical data written in a plurality of previous time windows having the predetermined duration.

15. The apparatus according to claim 9, further comprising: In response to determining the network attack, blocking the user-side connection; as well as A historical snapshot associated with the user-side connection is saved or a snapshot associated with the user-side connection is created.

16. The device of claim 9, wherein the cyber attack is a ransomware attack.

17. A computer program product tangibly stored on a computer readable medium and comprising machine executable instructions which, when executed, cause a machine to perform actions comprising: Determine a compression ratio of the written data within a time window of a predetermined length, wherein the compression ratio is a ratio of the amount of the written data before being compressed to the amount of the written data after being compressed; determining a user-side connection associated with the write data based at least on determining that the compression ratio is below a threshold compression ratio; as well as Based on determining that the file associated with the user-side connection fails the file integrity check, the data from the user-side connection is determined to be a network attack.

18. The computer program product of claim 17, wherein determining the user-side connection associated with the write data comprises: In response to the compression ratio being lower than the threshold compression ratio, determining a number of abnormal operations within the time window; as well as In response to the number being higher than a threshold number, the user-side connection associated with the write data is determined.

19. The computer program product of claim 18, wherein determining the number of the abnormal operations within the time window comprises: determining a first count of delete file operations following a read file operation within the time window; determining a second count of encrypt file operations following the create file operation within the time window; Based on at least one of the first count and the second count, the number of abnormal operations is determined.

20. The computer program product of claim 17, further comprising: An additional compression ratio of the read data within the time window is determined, where the additional compression ratio is a ratio of a data volume of the read data before being compressed to a data volume of the read data after being compressed.