[go: up one dir, main page]

CN118400165A - Ransomware attack and data destruction attack detection method, system, device and medium - Google Patents

Ransomware attack and data destruction attack detection method, system, device and medium Download PDF

Info

Publication number
CN118400165A
CN118400165A CN202410619902.7A CN202410619902A CN118400165A CN 118400165 A CN118400165 A CN 118400165A CN 202410619902 A CN202410619902 A CN 202410619902A CN 118400165 A CN118400165 A CN 118400165A
Authority
CN
China
Prior art keywords
file
sentinel
attack
gateway
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410619902.7A
Other languages
Chinese (zh)
Inventor
朱文涛
张慧琳
周游
刘建
高玉堃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Artificial Intelligence Technology Beijing Co ltd
Original Assignee
China Telecom Artificial Intelligence Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Artificial Intelligence Technology Beijing Co ltd filed Critical China Telecom Artificial Intelligence Technology Beijing Co ltd
Priority to CN202410619902.7A priority Critical patent/CN118400165A/en
Publication of CN118400165A publication Critical patent/CN118400165A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了勒索攻击和数据破坏攻击检测方法、系统、设备及介质,包括:获取用户端创建的若干个第一真实文件,通过网关创建与第一真实文件对应的第一哨兵文件,并将第一真实文件和第一哨兵文件作为目标数据文件存储至服务器;通过服务器监测各目标数据文件的文件状态,并将文件状态上报至网关;通过网关根据文件状态判断第一哨兵文件是否发生改变;当第一哨兵文件发生改变,判定服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息。本发明降低了勒索攻击和数据破坏攻击检测的漏报率和误报率,降低了运维成本,增强了网络安全性,可广泛应用于网络安全技术领域。

The present invention discloses a method, system, device and medium for detecting ransomware attacks and data destruction attacks, including: obtaining a plurality of first real files created by a user end, creating a first sentinel file corresponding to the first real file through a gateway, and storing the first real file and the first sentinel file as target data files to a server; monitoring the file status of each target data file through a server, and reporting the file status to a gateway; judging whether the first sentinel file has changed according to the file status through a gateway; when the first sentinel file has changed, judging that the server has encountered a ransomware attack or a data destruction attack, and generating an alarm message. The present invention reduces the underreporting rate and false alarm rate of ransomware attack and data destruction attack detection, reduces operation and maintenance costs, enhances network security, and can be widely used in the field of network security technology.

Description

勒索攻击和数据破坏攻击检测方法、系统、设备及介质Ransomware attack and data destruction attack detection method, system, device and medium

技术领域Technical Field

本发明涉及网络安全技术领域,尤其是一种勒索攻击和数据破坏攻击检测方法、系统、设备及介质。The present invention relates to the field of network security technology, and in particular to a method, system, device and medium for detecting extortion attacks and data destruction attacks.

背景技术Background technique

勒索攻击是一种针对数据可用性的计算机网络攻击,多数体现为计算机病毒类(含蠕虫、木马等)软件并自动扩散,也可由网络攻击者甚至是跨国网络攻击者针对目标网络主动发起。无论形式如何,成功攻击的结果通常都是攻击者利用加密算法锁定受害者(可以是个人,也可以是企业或团体等组织)的数据文件,并且向受害者索要赎金性质的钱财。通常,勒索攻击只使用安全的加密算法进行文件锁定,拿不到正确的密钥无论是谁都无法解密。因此,受害者通常无法解除攻击者对数据文件的锁定机制,在没有备份、数据变得不可用的情况下,就可能被迫按照攻击者要求的方式来支付赎金,尽管受害者“破财”后攻击者也未必遵守约定提供能恢复数据文件的相应密钥。由此可见,勒索攻击的具体目标通常是存储在服务器上的一个个文件,而不会是数据库系统。勒索攻击性质极其恶劣,近年来在危害数据安全方面可谓臭名昭著。Ransomware is a computer network attack targeting data availability. Most of them are computer viruses (including worms, Trojans, etc.) and spread automatically. They can also be initiated by network attackers or even transnational network attackers against target networks. Regardless of the form, the result of a successful attack is usually that the attacker uses encryption algorithms to lock the victim's (which can be an individual, a company, a group, or other organizations) data files and demand money from the victim in the form of ransom. Usually, ransomware attacks only use secure encryption algorithms to lock files, and no one can decrypt them without the correct key. Therefore, victims are usually unable to unlock the attacker's locking mechanism for data files. In the absence of backups and when data becomes unavailable, they may be forced to pay the ransom in the manner required by the attacker, even though the attacker may not comply with the agreement to provide the corresponding key to restore the data files after the victim "goes bankrupt". It can be seen that the specific target of ransomware attacks is usually individual files stored on the server, not the database system. Ransomware attacks are extremely bad in nature and have been notorious in recent years for endangering data security.

勒索攻击多数体现为计算机病毒,所以不少应对方案遵循传统的病毒检测技术路线,如病毒特征库+黑白名单机制。但这类机制通常只能检测已知的病毒,很难检测新出现的病毒。此外,这种技术路线过于关注“病毒”而未与“勒索”紧密结合。Most ransomware attacks are manifested as computer viruses, so many response plans follow the traditional virus detection technology route, such as virus signature library + blacklist and whitelist mechanism. However, this type of mechanism can usually only detect known viruses and it is difficult to detect newly emerging viruses. In addition, this technical route focuses too much on "viruses" and is not closely integrated with "ransomware."

现有技术中公开了一种应对方案,其对文件存储服务器的操作系统进行修改,使得其文件存储驱动具备一定的“智能”:当运行的文件驱动程序检测到文件系统遍历API被调用时,文件驱动程序向文件系统遍历API投放诱饵文件(也称蜜点文件等);若刚投入的诱饵文件被执行了写入操作和/或重命名操作,则判定上述调用文件系统遍历API的进程为恶意进程、运行该进程的软件为勒索软件。现有技术方案存下以下缺陷:The prior art discloses a solution that modifies the operating system of the file storage server so that its file storage driver has a certain degree of "intelligence": when the running file driver detects that the file system traversal API is called, the file driver drops a bait file (also called a honey spot file, etc.) to the file system traversal API; if the bait file just dropped is written and/or renamed, the process that calls the file system traversal API is determined to be a malicious process and the software running the process is ransomware. The prior art solution has the following defects:

首先,不同的勒索软件有不同的“口味”,有的专门攻击某一种或几种类型的文件(例如只攻击Office文档),有的则专门攻击创建时间位于某区间(例如最近一年)的文件;“聪明”的勒索软件甚至会去主动识别并避开诱饵文件(例如,不去触碰无端“冒出”的临时文件)。勒索软件做出这样的考虑,是为了能在被发现或被阻断前尽快找到其认为最有攻击价值的目标数据并进行最大范围的锁定,从而以最小的投入、最小的“动静”去达到最大的破坏效果。现有技术方案并没有考虑勒索软件的这类攻击策略,而是只要发现文件系统遍历API被调用就投放诱饵文件。很显然,一旦这样的诱饵文件不符合勒索攻击的“口味”,诱饵文件就会被无视,检测也就失效,从而导致现有技术方案存在较大的漏报率,且检测方法的通用性不高。First, different ransomware has different "flavors". Some specialize in attacking one or several types of files (for example, only attacking Office documents), while others specialize in attacking files with a creation time in a certain range (for example, the last year); "smart" ransomware will even actively identify and avoid bait files (for example, not touching temporary files that "pop up" for no reason). The ransomware makes such considerations in order to find the target data that it considers to be most valuable to attack as soon as possible before being discovered or blocked, and lock it to the maximum extent, so as to achieve the maximum destructive effect with the minimum investment and the minimum "movement". The existing technical solution does not consider this type of attack strategy of ransomware, but instead drops a bait file as long as it finds that the file system traversal API is called. Obviously, once such a bait file does not meet the "flavor" of the ransomware attack, the bait file will be ignored and the detection will fail, resulting in a large false alarm rate in the existing technical solution and the low versatility of the detection method.

其次,现有技术方案易引起误报。例如,当合法用户(或其应用程序)对文件系统进行遍历时,文件驱动程序临时投放的诱饵文件往往会引起不知情用户的注意和好奇。此时,用户对诱饵文件的操作就很容易引发现有技术方案的误判了,从而导致现有技术方案存在相对较大的误报率。Secondly, the existing technical solutions are prone to false alarms. For example, when a legitimate user (or its application) traverses the file system, the bait file temporarily dropped by the file driver will often attract the attention and curiosity of uninformed users. At this time, the user's operation on the bait file can easily lead to misjudgment of the existing technical solution, resulting in a relatively large false alarm rate in the existing technical solution.

最后,现有技术方案需要修改服务器上的文件存储驱动,而电信、互联网公司等企业网环境下,服务器动辄数以万计且经常需要扩容(即向IDC部署新的服务器),结果就是这些服务器都要重新安装驱动程序,运维成本较高。Finally, the existing technical solutions require modifying the file storage driver on the server. However, in enterprise network environments such as telecommunications and Internet companies, there are tens of thousands of servers and capacity expansion is often required (i.e., deploying new servers to IDC). As a result, these servers need to reinstall the driver, which results in high operation and maintenance costs.

术语解释:Terminology explanation:

IDC:Internet Data Center,即互联网数据中心,此外,电信领域的资源池也被视为一种IDC。IDC: Internet Data Center. In addition, resource pools in the telecommunications field are also considered a type of IDC.

发明内容Summary of the invention

本发明的目的在于至少一定程度上解决现有技术中存在的技术问题之一。The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.

为此,本发明实施例的一个目的在于提供一种勒索攻击和数据破坏攻击检测方法,该方法降低了勒索攻击和数据破坏攻击检测的漏报率和误报率,降低了运维成本,增强了网络安全性。To this end, an object of an embodiment of the present invention is to provide a method for detecting ransomware attacks and data destruction attacks, which reduces the missed alarm rate and false alarm rate of ransomware attack and data destruction attack detection, reduces operation and maintenance costs, and enhances network security.

本发明实施例的另一个目的在于提供一种勒索攻击和数据破坏攻击检测系统。Another object of an embodiment of the present invention is to provide a ransomware attack and data destruction attack detection system.

为了达到上述技术目的,本发明实施例所采取的技术方案包括:In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:

一方面,本发明实施例提供了一种勒索攻击和数据破坏攻击检测方法,包括以下步骤:On the one hand, an embodiment of the present invention provides a method for detecting a ransomware attack and a data destruction attack, comprising the following steps:

获取用户端创建的若干个第一真实文件,通过网关创建与所述第一真实文件对应的第一哨兵文件,并将所述第一真实文件和所述第一哨兵文件作为目标数据文件存储至服务器;Acquire several first real files created by the user end, create first sentinel files corresponding to the first real files through the gateway, and store the first real files and the first sentinel files as target data files in the server;

通过所述服务器监测各所述目标数据文件的文件状态,并将所述文件状态上报至所述网关;Monitoring the file status of each of the target data files through the server, and reporting the file status to the gateway;

通过所述网关根据所述文件状态判断所述第一哨兵文件是否发生改变;Determining, by the gateway according to the file status, whether the first sentinel file has changed;

当所述第一哨兵文件发生改变,判定所述服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息;When the first sentinel file changes, it is determined that the server is subjected to a ransomware attack or a data destruction attack, and an alarm message is generated;

其中,所述第一哨兵文件的哨兵文件清单由所述网关维护,使得所述用户端无法感知所述第一哨兵文件,且所述服务器无法区分所述目标数据文件中的所述第一真实文件与所述第一哨兵文件。The sentinel file list of the first sentinel file is maintained by the gateway, so that the user end cannot perceive the first sentinel file, and the server cannot distinguish between the first real file and the first sentinel file in the target data file.

进一步地,在本发明的一个实施例中,所述获取用户端创建的若干个第一真实文件,通过网关创建与第一真实文件对应的第一哨兵文件,并将第一真实文件和第一哨兵文件作为目标数据文件存储至服务器这一步骤,其具体包括:Further, in one embodiment of the present invention, the step of obtaining a plurality of first real files created by the user terminal, creating a first sentinel file corresponding to the first real file through the gateway, and storing the first real file and the first sentinel file as target data files in the server specifically includes:

响应于所述用户端的文件创建操作,通过所述网关获取所述用户端创建的若干个所述第一真实文件;In response to the file creation operation of the user terminal, acquiring, through the gateway, a plurality of first real files created by the user terminal;

通过所述网关检测所述第一真实文件的文件属性,根据所述文件属性和预设的哨兵文件配备策略生成与所述第一真实文件对应的所述第一哨兵文件,并将所述第一哨兵文件的文件信息加入所述哨兵文件清单;Detecting the file attribute of the first real file through the gateway, generating the first sentinel file corresponding to the first real file according to the file attribute and a preset sentinel file configuration strategy, and adding the file information of the first sentinel file to the sentinel file list;

通过所述网关将所述第一真实文件与所述第一哨兵文件作为所述目标数据文件发送至所述服务器,使得所述服务器对所述目标数据文件进行存储;Sending the first real file and the first sentinel file as the target data file to the server through the gateway, so that the server stores the target data file;

其中,所述文件属性包括文件类型和文件路径。The file attributes include file type and file path.

进一步地,在本发明的一个实施例中,所述根据所述文件属性和预设的哨兵文件配备策略生成与所述第一真实文件对应的所述第一哨兵文件这一步骤,其具体为:Further, in one embodiment of the present invention, the step of generating the first sentinel file corresponding to the first real file according to the file attribute and the preset sentinel file configuration strategy is specifically as follows:

根据所述文件类型从预设的哨兵文件样本库中随机获取一个同类型的哨兵文件样本,将所述哨兵文件样本作为所述第一哨兵文件,并根据所述文件路径确定所述第一哨兵文件的存储位置;randomly acquiring a sentinel file sample of the same type from a preset sentinel file sample library according to the file type, using the sentinel file sample as the first sentinel file, and determining a storage location of the first sentinel file according to the file path;

或,or,

获取所述文件类型对应的填充模板,通过特定内容对所述填充模板进行填充处理得到所述第一哨兵文件,并根据所述文件路径确定所述第一哨兵文件的存储位置。A filling template corresponding to the file type is obtained, the filling template is filled with specific content to obtain the first sentinel file, and a storage location of the first sentinel file is determined according to the file path.

进一步地,在本发明的一个实施例中,所述通过所述服务器监测各所述目标数据文件的文件状态,并将所述文件状态上报至所述网关这一步骤,其具体包括:Further, in one embodiment of the present invention, the step of monitoring the file status of each target data file through the server and reporting the file status to the gateway specifically includes:

通过所述服务器实时/定时监测各所述目标数据文件的文件状态;Real-time/regular monitoring of the file status of each of the target data files by the server;

根据所述文件状态和监测时间生成文件状态日志,并将所述文件状态日志上报至所述网关。A file status log is generated according to the file status and the monitoring time, and the file status log is reported to the gateway.

进一步地,在本发明的一个实施例中,所述通过所述网关根据所述文件状态判断所述第一哨兵文件是否发生改变这一步骤,其具体包括:Further, in an embodiment of the present invention, the step of determining by the gateway whether the first sentinel file has been changed according to the file status specifically includes:

通过所述网关根据所述哨兵文件清单和所述文件状态日志确定所述第一哨兵文件的文件状态;Determining, by the gateway, the file status of the first sentinel file according to the sentinel file list and the file status log;

根据确定的所述第一哨兵文件的文件状态判断所述第一哨兵文件是否发生改变。It is determined whether the first sentinel file has been changed according to the determined file status of the first sentinel file.

进一步地,在本发明的一个实施例中,所述当所述第一哨兵文件发生改变,判定所述服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息这一步骤,其具体包括:Further, in one embodiment of the present invention, when the first sentinel file changes, determining that the server is subjected to a ransomware attack or a data destruction attack, and generating an alarm message specifically includes:

当确定所述第一哨兵文件发生改变,判定所述服务器遭遇勒索攻击或数据破坏攻击,并根据所述文件状态日志的相应信息确定攻击发生时间;When it is determined that the first sentinel file has changed, it is determined that the server has been subjected to a ransomware attack or a data destruction attack, and the time of the attack is determined according to corresponding information in the file status log;

根据所述攻击发生时间生成告警信息,并将所述告警信息发送至管理员。Generate alarm information according to the attack occurrence time, and send the alarm information to the administrator.

进一步地,在本发明的一个实施例中,所述勒索攻击和数据破坏攻击检测方法还包括以下步骤:Furthermore, in one embodiment of the present invention, the ransomware attack and data destruction attack detection method further includes the following steps:

当所述网关检测到所述用户端新创建的第二真实文件与所述服务器已存储的第二哨兵文件的文件路径和文件名均相同,对所述第二哨兵文件进行重命名,并根据重命名后的所述第二哨兵文件更新所述哨兵文件清单,或,通过所述第二真实文件覆盖所述第二哨兵文件,并将所述第二哨兵文件的文件信息从所述哨兵文件清单中移除。When the gateway detects that the second real file newly created by the user terminal has the same file path and file name as the second sentinel file stored on the server, the second sentinel file is renamed and the sentinel file list is updated according to the renamed second sentinel file, or the second sentinel file is overwritten by the second real file and the file information of the second sentinel file is removed from the sentinel file list.

另一方面,本发明实施例提供了一种勒索攻击和数据破坏攻击检测系统,包括:On the other hand, an embodiment of the present invention provides a ransomware attack and data destruction attack detection system, including:

哨兵文件创建模块,用于获取用户端创建的若干个第一真实文件,通过网关创建与所述第一真实文件对应的第一哨兵文件,并将所述第一真实文件和所述第一哨兵文件作为目标数据文件存储至服务器;A sentinel file creation module, used for acquiring a plurality of first real files created by a user terminal, creating a first sentinel file corresponding to the first real file through a gateway, and storing the first real file and the first sentinel file as target data files in a server;

文件状态上报模块,用于通过所述服务器监测各所述目标数据文件的文件状态,并将所述文件状态上报至所述网关;A file status reporting module, used to monitor the file status of each target data file through the server, and report the file status to the gateway;

文件状态判断模块,用于通过所述网关根据所述文件状态判断所述第一哨兵文件是否发生改变;A file status judgment module, used to judge whether the first sentinel file has changed according to the file status through the gateway;

告警信息生成模块,用于当所述第一哨兵文件发生改变,判定所述服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息;An alarm information generation module, configured to determine that the server is subjected to a ransomware attack or a data destruction attack and generate an alarm information when the first sentinel file changes;

其中,所述第一哨兵文件的哨兵文件清单由所述网关维护,使得所述用户端无法感知所述第一哨兵文件,且所述服务器无法区分所述目标数据文件中的所述第一真实文件与所述第一哨兵文件。The sentinel file list of the first sentinel file is maintained by the gateway, so that the user end cannot perceive the first sentinel file, and the server cannot distinguish between the first real file and the first sentinel file in the target data file.

另一方面,本发明实施例提供了一种电子设备,所述电子设备包括存储器、处理器、存储在所述存储器上并可在所述处理器上运行的程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,所述程序被所述处理器执行时实现如前面所述的勒索攻击和数据破坏攻击检测方法。On the other hand, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein the program, when executed by the processor, realizes the ransomware attack and data destruction attack detection method as described above.

另一方面,本发明实施例还提供了一种存储介质,所述存储介质为计算机可读存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如前面所述的勒索攻击和数据破坏攻击检测方法。On the other hand, an embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium for computer-readable storage, and stores one or more programs, and the one or more programs can be executed by one or more processors to implement the ransomware attack and data destruction attack detection method as described above.

本发明的优点和有益效果将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到:The advantages and beneficial effects of the present invention will be partly given in the following description, partly become apparent from the following description, or be understood through the practice of the present invention:

本发明实施例获取用户端创建的若干个第一真实文件,通过网关创建与第一真实文件对应的第一哨兵文件,并将第一真实文件和第一哨兵文件作为目标数据文件存储至服务器,通过服务器监测各目标数据文件的文件状态,并将文件状态上报至网关,通过网关根据文件状态判断第一哨兵文件是否发生改变,当第一哨兵文件发生改变,判定服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息。本发明实施例通过网关创建与真实文件对应的哨兵文件,将该哨兵文件与真实文件一起存储至服务器,部署哨兵文件的哨兵文件清单仅由网关进行维护,使得用户端无法感知哨兵文件且服务器无法区分真实文件与哨兵文件,这样当服务器遭遇勒索攻击或数据破坏攻击时,哨兵文件受攻击影响会被改变,网关通过服务器上报的文件状态即可判断哨兵文件是否发生改变,从而可以判断出服务器是否遭遇勒索攻击或数据破坏攻击,降低了勒索攻击和数据破坏攻击检测的漏报率和误报率,降低了运维成本,增强了网络安全性。The embodiment of the present invention obtains several first real files created by the user end, creates a first sentinel file corresponding to the first real file through a gateway, and stores the first real file and the first sentinel file as target data files to a server, monitors the file status of each target data file through the server, and reports the file status to the gateway, and determines whether the first sentinel file has changed according to the file status through the gateway. When the first sentinel file changes, it is determined that the server has encountered a ransom attack or a data destruction attack, and an alarm message is generated. The embodiment of the present invention creates a sentinel file corresponding to a real file through a gateway, stores the sentinel file together with the real file to the server, and the sentinel file list for deploying the sentinel file is only maintained by the gateway, so that the user end cannot perceive the sentinel file and the server cannot distinguish between the real file and the sentinel file. In this way, when the server encounters a ransom attack or a data destruction attack, the sentinel file will be affected by the attack and will be changed. The gateway can determine whether the sentinel file has changed through the file status reported by the server, so that it can be determined whether the server has encountered a ransom attack or a data destruction attack, reducing the missed report rate and false alarm rate of ransom attack and data destruction attack detection, reducing operation and maintenance costs, and enhancing network security.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例中的技术方案,下面对本发明实施例中所需要使用的附图作以下介绍,应当理解的是,下面介绍中的附图仅仅为了方便清晰表述本发明的技术方案中的部分实施例,对于本领域的技术人员来说,在无需付出创造性劳动的前提下,还可以根据这些附图获取到其他附图。In order to more clearly illustrate the technical solution in the embodiments of the present invention, the following introduction is made to the drawings required for use in the embodiments of the present invention. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solution of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

图1为本发明实施例提供的勒索攻击和数据破坏攻击检测方法的一种步骤流程图;FIG1 is a flowchart of a method for detecting ransomware attacks and data destruction attacks provided by an embodiment of the present invention;

图2为本发明实施例提供的勒索攻击和数据破坏攻击检测方法的数据交互示意图;FIG2 is a schematic diagram of data interaction of a method for detecting a ransomware attack and a data destruction attack provided by an embodiment of the present invention;

图3为本发明实施例提供的步骤S101的一种步骤流程图;FIG3 is a flowchart of step S101 provided in an embodiment of the present invention;

图4为本发明实施例提供的步骤S1012的一种步骤流程图;FIG. 4 is a flowchart of step S1012 provided in an embodiment of the present invention;

图5为本发明实施例提供的步骤S102的一种步骤流程图;FIG5 is a flowchart of step S102 provided in an embodiment of the present invention;

图6为本发明实施例提供的步骤S103的一种步骤流程图;FIG6 is a flowchart of step S103 provided by an embodiment of the present invention;

图7为本发明实施例提供的步骤S104的一种步骤流程图;FIG. 7 is a flowchart of step S104 provided in an embodiment of the present invention;

图8为本发明实施例提供的勒索攻击和数据破坏攻击检测方法的另一种步骤流程图;FIG8 is another step flow chart of a method for detecting a ransomware attack and a data destruction attack provided by an embodiment of the present invention;

图9为本发明实施例提供的勒索攻击和数据破坏攻击检测系统的结构示意图;FIG9 is a schematic diagram of the structure of a ransomware attack and data destruction attack detection system provided by an embodiment of the present invention;

图10为本发明实施例提供的电子设备的硬件结构示意图;FIG10 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention;

图11为本发明实施例提供的存储介质的结构示意图。FIG. 11 is a schematic diagram of the structure of a storage medium provided in an embodiment of the present invention.

具体实施方式Detailed ways

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能理解为对本申请的限制。需要说明的是,虽然在系统示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于系统示意图中的模块划分,或流程图中的顺序执行所示出或描述的步骤。对于以下实施例中的步骤编号,其仅为了便于阐述说明而设置,对步骤之间的顺序不做任何限定,实施例中的各步骤的执行顺序均可根据本领域技术人员的理解来进行适应性调整。Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limitations on the present application. It should be noted that, although the functional module division is performed in the system schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order from the module division in the system schematic diagram or the flow chart. For the step numbers in the following embodiments, they are only set for the convenience of explanation, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

在本发明的描述中,多个的含义是两个或两个以上,如果有描述到第一、第二只是用于区分技术特征为目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量或者隐含指明所指示的技术特征的先后关系。此外,除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。In the description of the present invention, the meaning of "a plurality" is two or more. If there is a description of the first or the second, it is only for the purpose of distinguishing the technical features, and it cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features. In addition, unless otherwise defined, all technical and scientific terms used in this document have the same meaning as those commonly understood by technicians in the technical field of this application. The terms used in this document are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

本申请实施例提供的勒索攻击和数据破坏攻击检测方法可应用于终端中,也可应用于服务器端中,还可以是运行于终端或服务器端中的软件。在一些实施例中,终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、机顶盒等;服务器端可以配置成独立的物理服务器,也可以配置成多个物理服务器构成的服务器集群或者分布式系统,还可以配置成提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN以及大数据和人工智能平台等基础云计算服务的云服务器;软件可以是实现勒索攻击和数据破坏攻击检测方法的应用等,但并不局限于以上形式。The ransomware attack and data destruction attack detection method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a set-top box, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the ransomware attack and data destruction attack detection method, but is not limited to the above forms.

本申请可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、机顶盒、可编程的消费电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

需要说明的是,在本申请的各个具体实施方式中,当涉及到需要根据用户信息、用户行为数据,用户历史数据以及用户位置信息等与用户身份或特性相关的数据进行相关处理时,都会先获得用户的许可或者同意,而且,对这些数据的收集、使用和处理等,都会遵守相关国家和地区的相关法律法规和标准。此外,当本申请实施例需要获取用户的敏感个人信息时,会通过弹窗或者跳转到确认页面等方式获得用户的单独许可或者单独同意,在明确获得用户的单独许可或者单独同意之后,再获取用于使本申请实施例能够正常运行的必要的用户相关数据。It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

如图1所示为本发明实施例提供的勒索攻击和数据破坏攻击检测方法的一种步骤流程图,参照图1,本发明实施例提供了一种勒索攻击和数据破坏攻击检测方法,具体包括以下步骤:FIG1 is a flowchart of a method for detecting a ransomware attack and a data destruction attack provided by an embodiment of the present invention. Referring to FIG1 , an embodiment of the present invention provides a method for detecting a ransomware attack and a data destruction attack, specifically comprising the following steps:

S101、获取用户端创建的若干个第一真实文件,通过网关创建与第一真实文件对应的第一哨兵文件,并将第一真实文件和第一哨兵文件作为目标数据文件存储至服务器;S101, obtaining a plurality of first real files created by a user terminal, creating a first sentinel file corresponding to the first real file through a gateway, and storing the first real file and the first sentinel file as target data files in a server;

其中,第一哨兵文件的哨兵文件清单由网关维护,使得用户端无法感知第一哨兵文件,且服务器无法区分目标数据文件中的第一真实文件与第一哨兵文件。The sentinel file list of the first sentinel file is maintained by the gateway, so that the user end cannot perceive the first sentinel file, and the server cannot distinguish the first real file in the target data file from the first sentinel file.

具体地,如图2所示为本发明实施例提供的勒索攻击和数据破坏攻击检测方法的数据交互示意图。本发明实施例应用于一种典型的企业网环境:用户与服务器位于两个相对分隔的网络(例如在绝大多数企业里,员工位于办公网,服务器位于IDC),从用户侧访问服务器侧需要经由某个带管控功能的网络实体才能通过两个网络的边界,本发明实施例统称该实体为网关。在实际情况中,网关可以是虚拟专用网(VPN)网关、堡垒机、零信任代理网关等,本发明实施例不对具体的实现技术做限制。网关执行基本的用户鉴权等功能,并放行合法用户进入服务器侧、访问在其权限范围内的资源。Specifically, as shown in FIG2 , it is a data interaction diagram of the ransomware attack and data destruction attack detection method provided by an embodiment of the present invention. The embodiment of the present invention is applied to a typical enterprise network environment: users and servers are located in two relatively separated networks (for example, in most enterprises, employees are located in the office network, and servers are located in the IDC). Accessing the server side from the user side requires passing through a network entity with a management and control function to pass through the boundary of the two networks. The embodiment of the present invention collectively refers to this entity as a gateway. In actual situations, the gateway can be a virtual private network (VPN) gateway, a bastion host, a zero-trust proxy gateway, etc. The embodiment of the present invention does not limit the specific implementation technology. The gateway performs basic user authentication and other functions, and allows legitimate users to enter the server side and access resources within their authority.

在本发明实施例中,上述网关具备如下“智能”:当用户创建(典型的如上传)文件时,网关按照一定的“配备”策略,自动代用户创建模拟真实文件的数据文件,即本发明实施例所描述的哨兵文件;用户创建的真实文件跟网关代用户“配备”的哨兵文件一并存放在服务器上,网关通过维护清单(或称列表、台账)来区分两类文件,可以理解的是,网关配备的哨兵文件量应显著少于来自用户的真实文件量,故网关只需维护哨兵文件清单就能区分两类文件;用户访问服务器总是需要经由网关,而网关总是向用户屏蔽有关哨兵文件存在性的任何信息,从而使得用户总是只看到自己创建的真实文件、但却感知不到任何哨兵文件,例如,用户查看已用存储空间时,网关设法将哨兵文件排除在外;同样的,网关也不会以任何形式向服务器透露出哨兵文件与真实文件的区别,使得服务器无法区分真实文件与哨兵文件。In an embodiment of the present invention, the above-mentioned gateway has the following "intelligence": when a user creates (typically such as uploading) a file, the gateway automatically creates a data file that simulates a real file on behalf of the user according to a certain "equipment" strategy, that is, the sentinel file described in the embodiment of the present invention; the real file created by the user and the sentinel file "equipped" by the gateway on behalf of the user are stored on the server together, and the gateway distinguishes the two types of files by maintaining a list (or list, ledger). It can be understood that the amount of sentinel files equipped by the gateway should be significantly less than the amount of real files from users, so the gateway only needs to maintain the sentinel file list to distinguish the two types of files; users always need to access the server through the gateway, and the gateway always shields the user from any information about the existence of sentinel files, so that the user always only sees the real files created by himself, but cannot perceive any sentinel files. For example, when the user views the used storage space, the gateway tries to exclude the sentinel files; similarly, the gateway will not reveal the difference between sentinel files and real files to the server in any form, so that the server cannot distinguish between real files and sentinel files.

如图3所示为本发明实施例提供的步骤S101的一种步骤流程图,参照图3,进一步作为可选的实施方式,获取用户端创建的若干个第一真实文件,通过网关创建与第一真实文件对应的第一哨兵文件,并将第一真实文件和第一哨兵文件作为目标数据文件存储至服务器这一步骤,其具体包括:FIG. 3 is a flowchart of step S101 provided in an embodiment of the present invention. Referring to FIG. 3 , as an optional implementation, a plurality of first real files created by a user terminal are obtained, a first sentinel file corresponding to the first real file is created through a gateway, and the first real file and the first sentinel file are stored as target data files in a server. The step specifically includes:

S1011、响应于用户端的文件创建操作,通过网关获取用户端创建的若干个第一真实文件;S1011, in response to a file creation operation of the user terminal, obtaining, through the gateway, a plurality of first real files created by the user terminal;

S1012、通过网关检测第一真实文件的文件属性,根据文件属性和预设的哨兵文件配备策略生成与第一真实文件对应的第一哨兵文件,并将第一哨兵文件的文件信息加入哨兵文件清单;S1012, detecting file attributes of the first real file through the gateway, generating a first sentinel file corresponding to the first real file according to the file attributes and a preset sentinel file configuration strategy, and adding file information of the first sentinel file to the sentinel file list;

S1013、通过网关将第一真实文件与第一哨兵文件作为目标数据文件发送至服务器,使得服务器对目标数据文件进行存储;S1013, sending the first real file and the first sentinel file as target data files to the server through the gateway, so that the server stores the target data files;

其中,文件属性包括文件类型和文件路径。The file attributes include the file type and the file path.

需要说明的是,本发明实施例对真实文件与哨兵文件的具体比例不做限定,当真实文件有多个时,网关可以按照预设比例或计数步长去生成对应数量的哨兵文件,也可以根据文件类型生成对应类型的一个或者多个哨兵文件,具体可以根据实际情况进行设置。It should be noted that the embodiment of the present invention does not limit the specific ratio of real files to sentinel files. When there are multiple real files, the gateway can generate a corresponding number of sentinel files according to a preset ratio or counting step, or it can generate one or more sentinel files of the corresponding type according to the file type. The specific setting can be made according to actual conditions.

如图4所示为本发明实施例提供的步骤S1012的一种步骤流程图,参照图4,进一步作为可选的实施方式,根据文件属性和预设的哨兵文件配备策略生成与第一真实文件对应的第一哨兵文件这一步骤,其具体为:FIG. 4 is a flowchart of step S1012 provided in an embodiment of the present invention. Referring to FIG. 4 , as an optional implementation, the step of generating a first sentinel file corresponding to the first real file according to the file attribute and the preset sentinel file configuration strategy is specifically as follows:

S10121、根据文件类型从预设的哨兵文件样本库中随机获取一个同类型的哨兵文件样本,将哨兵文件样本作为第一哨兵文件,并根据文件路径确定第一哨兵文件的存储位置;S10121. Randomly obtain a sentinel file sample of the same type from a preset sentinel file sample library according to the file type, use the sentinel file sample as a first sentinel file, and determine a storage location of the first sentinel file according to the file path;

或,or,

S10122、获取文件类型对应的填充模板,通过特定内容对填充模板进行填充处理得到第一哨兵文件,并根据文件路径确定第一哨兵文件的存储位置。S10122. Obtain a filling template corresponding to the file type, fill the filling template with specific content to obtain a first sentinel file, and determine a storage location of the first sentinel file according to the file path.

具体地,用户发起文件创建(典型的如上传)请求,网关根据用户所创建文件之名称等属性,按照管理员预设的“配备”策略,自动代用户创建模拟真实文件的数据文件,即哨兵文件。本发明实施例不对哨兵文件的命名方式做限制,也不要求哨兵文件的内容必须实时生成(可以离线准备好、放在文件队列里等待被调取);网关更新并维护的哨兵文件清单,以知晓哪些是哨兵文件(哨兵文件的位置)。需要说明的是,只有网关具备关于哨兵文件的知识,用户访问服务器总是需要经由网关,而网关总是向用户屏蔽有关哨兵文件存在性的任何信息(哪怕是磁盘空间占用信息),从而使得用户总是只看到自己创建的真实文件、但却感知不到任何哨兵文件。用户创建的真实文件连同网关代用户“配备”的哨兵文件都被存放至服务器上,服务器无法区分两类文件。Specifically, the user initiates a request to create a file (typically such as uploading), and the gateway automatically creates a data file that simulates a real file, i.e., a sentinel file, on behalf of the user based on the name and other attributes of the file created by the user and in accordance with the "equipment" strategy preset by the administrator. The embodiment of the present invention does not restrict the naming method of the sentinel file, nor does it require that the content of the sentinel file must be generated in real time (it can be prepared offline and placed in a file queue waiting to be retrieved); the gateway updates and maintains a list of sentinel files to know which are the sentinel files (the location of the sentinel files). It should be noted that only the gateway has knowledge about sentinel files, and users always need to go through the gateway to access the server, and the gateway always shields the user from any information about the existence of sentinel files (even disk space usage information), so that the user always sees only the real files he created, but cannot perceive any sentinel files. The real files created by the user and the sentinel files "equipped" by the gateway on behalf of the user are stored on the server, and the server cannot distinguish between the two types of files.

S102、通过服务器监测各目标数据文件的文件状态,并将文件状态上报至网关。S102: Monitor the file status of each target data file through the server, and report the file status to the gateway.

如图5所示为本发明实施例提供的步骤S102的一种步骤流程图,参照图5,进一步作为可选的实施方式,通过服务器监测各目标数据文件的文件状态,并将文件状态上报至网关这一步骤,其具体包括:FIG. 5 is a flowchart of step S102 provided in an embodiment of the present invention. Referring to FIG. 5 , as an optional implementation, the step of monitoring the file status of each target data file by the server and reporting the file status to the gateway specifically includes:

S1021、通过服务器实时/定时监测各目标数据文件的文件状态;S1021, monitoring the file status of each target data file in real time/periodic manner through the server;

S1022、根据文件状态和监测时间生成文件状态日志,并将文件状态日志上报至网关。S1022. Generate a file status log according to the file status and monitoring time, and report the file status log to the gateway.

具体地,服务器(无法区分真实文件与哨兵文件)按照一定的策略,实时或定期向网关汇报各文件的状态供网关监测。可以理解的是,正常情况下那些发生了状态改变的文件(例如服务器的日志文件,注意这类文件既不来自用户也不来自网关),大都会命中网关的白名单策略从而被忽略,因此网关可以只关注哨兵文件而不关注其他文件的动态。Specifically, the server (which cannot distinguish between real files and sentinel files) reports the status of each file to the gateway in real time or regularly according to a certain strategy for the gateway to monitor. It is understandable that under normal circumstances, those files that have changed their status (such as server log files, note that such files are neither from users nor from gateways) will hit the gateway's whitelist strategy and be ignored. Therefore, the gateway can only pay attention to the sentinel files and not the dynamics of other files.

S103、通过网关根据文件状态判断第一哨兵文件是否发生改变。S103: Determine, through the gateway according to the file status, whether the first sentinel file has changed.

如图6所示为本发明实施例提供的步骤S103的一种步骤流程图,参照图6,进一步作为可选的实施方式,通过网关根据文件状态判断第一哨兵文件是否发生改变这一步骤,其具体包括:FIG. 6 is a flowchart of step S103 provided in an embodiment of the present invention. Referring to FIG. 6 , as an optional implementation, the step of determining whether the first sentinel file has been changed according to the file status by the gateway specifically includes:

S1031、通过网关根据哨兵文件清单和文件状态日志确定第一哨兵文件的文件状态;S1031, determining the file status of the first sentinel file according to the sentinel file list and the file status log through the gateway;

S1032、根据确定的第一哨兵文件的文件状态判断第一哨兵文件是否发生改变。S1032: Determine whether the first sentinel file has changed according to the determined file status of the first sentinel file.

具体地,当服务器遭遇勒索攻击时,由于自动化的勒索病毒(及人类勒索攻击者)同样无法区分真实文件与哨兵文件,哨兵文件大概率会被当成真实文件对待、同样被锁定。一旦网关检测到哨兵文件原因不明地被改变(例如不见了、被覆盖),网关就判定受影响的哨兵文件所在服务器遭受了攻击,并发出相应告警供安全部门研判决策。因此也不难看出,本发明实施例能检测的攻击,实际上包括各种数据破坏攻击,而不仅仅是勒索攻击。Specifically, when a server encounters a ransomware attack, since the automated ransomware virus (and human ransomware attackers) are also unable to distinguish between real files and sentinel files, the sentinel files will most likely be treated as real files and locked. Once the gateway detects that the sentinel file has been changed for unknown reasons (for example, it has disappeared or been overwritten), the gateway determines that the server where the affected sentinel file is located has been attacked, and issues a corresponding alarm for the security department to make a decision. Therefore, it is not difficult to see that the attacks that can be detected by the embodiments of the present invention actually include various data destruction attacks, not just ransomware attacks.

S104、当第一哨兵文件发生改变,判定服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息。S104: When the first sentinel file changes, it is determined that the server is subjected to a ransomware attack or a data destruction attack, and an alarm message is generated.

如图7所示为本发明实施例提供的步骤S104的一种步骤流程图,参照图7,进一步作为可选的实施方式,当第一哨兵文件发生改变,判定服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息这一步骤,其具体包括:FIG. 7 is a flowchart of step S104 provided in an embodiment of the present invention. Referring to FIG. 7 , as an optional implementation, when the first sentinel file is changed, it is determined that the server is subjected to a ransomware attack or a data destruction attack, and a warning message is generated, which specifically includes:

S1041、当确定第一哨兵文件发生改变,判定服务器遭遇勒索攻击或数据破坏攻击,并根据文件状态日志的相应信息确定攻击发生时间;S1041, when it is determined that the first sentinel file has changed, it is determined that the server has been subjected to a ransomware attack or a data destruction attack, and the time of the attack is determined according to the corresponding information in the file status log;

S1042、根据攻击发生时间生成告警信息,并将告警信息发送至管理员。S1042: Generate alarm information according to the attack occurrence time, and send the alarm information to the administrator.

如图8所示为本发明实施例提供的勒索攻击和数据破坏攻击检测方法的另一种步骤流程图,参照图8,进一步作为可选的实施方式,勒索攻击和数据破坏攻击检测方法还包括以下步骤:FIG8 is another flowchart of the method for detecting a ransomware attack and a data destruction attack provided by an embodiment of the present invention. Referring to FIG8 , as an optional implementation, the method for detecting a ransomware attack and a data destruction attack further includes the following steps:

S105、当网关检测到用户端新创建的第二真实文件与服务器已存储的第二哨兵文件的文件路径和文件名均相同,对第二哨兵文件进行重命名,并根据重命名后的第二哨兵文件更新哨兵文件清单,或,通过第二真实文件覆盖第二哨兵文件,并将第二哨兵文件的文件信息从哨兵文件清单中移除。S105. When the gateway detects that the file path and file name of the second real file newly created by the user end are the same as those of the second sentinel file stored in the server, the second sentinel file is renamed and the sentinel file list is updated according to the renamed second sentinel file, or the second sentinel file is overwritten by the second real file and the file information of the second sentinel file is removed from the sentinel file list.

具体地,一旦用户创建的文件的完整路径(所在目录+文件名)恰巧与已有哨兵文件完全重合,则可将已有哨兵文件重命名为同目录下尚未出现的文件名,也可用真实文件覆盖哨兵文件并从哨兵文件清单中剔除该文件。Specifically, once the full path (directory + file name) of a file created by a user happens to completely overlap with an existing sentinel file, the existing sentinel file can be renamed to a file name that has not appeared in the same directory, or the sentinel file can be overwritten with a real file and removed from the sentinel file list.

下面结合两个具体实施例对本发明的实施过程做进一步说明。The implementation process of the present invention is further described below in conjunction with two specific embodiments.

实施例一:Embodiment 1:

在某电信企业中,员工通过零信任网关访问资源池内的服务器,且网关只支持用户以SFTP方式上传文件。每当一个用户上传一批(单个或多个)文件时,网关按扩展名对文件进行分类,并为每一类别都生成一个相同扩展名的哨兵文件。例如,不失一般性,当用户要上传1.jpg、2.docx、3.docx、4.mp4、5.jpg时,网关除忠实上传这五个真实文件外还额外生成并上传三个哨兵文件6.jpg、7.docx、8.mp4。本发明实施例不对哨兵文件的命名方式做限制,此处为简明起见,假定所有文件都不会在各自存放目录中遭遇同名。将这八个文件无差别地存放在服务器上,但只有网关知道6.jpg、7.docx、8.mp4是哨兵文件。服务器每十分钟上报一次所有文件的状态,尽管网关从不关心1.jpg、2.docx、3.docx、4.mp4、5.jpg的状态变化。一旦网关发现6.jpg、7.docx、8.mp4之一发生改变就告警。In a certain telecommunications company, employees access the servers in the resource pool through a zero-trust gateway, and the gateway only supports users to upload files in SFTP mode. Whenever a user uploads a batch (single or multiple) of files, the gateway classifies the files by extension and generates a sentinel file with the same extension for each category. For example, without loss of generality, when a user wants to upload 1.jpg, 2.docx, 3.docx, 4.mp4, and 5.jpg, the gateway not only faithfully uploads these five real files, but also generates and uploads three sentinel files 6.jpg, 7.docx, and 8.mp4. The embodiment of the present invention does not limit the naming method of the sentinel file. For the sake of simplicity, it is assumed that all files will not encounter the same name in their respective storage directories. These eight files are stored indiscriminately on the server, but only the gateway knows that 6.jpg, 7.docx, and 8.mp4 are sentinel files. The server reports the status of all files every ten minutes, although the gateway never cares about the status changes of 1.jpg, 2.docx, 3.docx, 4.mp4, and 5.jpg. Once the gateway finds that one of 6.jpg, 7.docx, or 8.mp4 has changed, it will issue an alarm.

上述过程中,网关的具体做法举例如下:In the above process, the specific steps of the gateway are as follows:

1)用户上传1.jpg、2.docx、3.docx、4.mp4、5.jpg时,网关按扩展名分成三类:jpg、docx、mp4。1) When users upload 1.jpg, 2.docx, 3.docx, 4.mp4, and 5.jpg, the gateway divides them into three categories according to the extensions: jpg, docx, and mp4.

2)网关根据预先配置的策略,为每一类(jpg/docx/mp4)真实文件都生成一个哨兵文件,并把所生成的三个哨兵文件6.jpg、7.docx、8.mp4都登记进哨兵文件清单,记录它们的状态信息(可包含文件校验值、最后修改时间等)。此处可用的预配置策略包括但不限于:从自建的文件样本库中随机挑选一个同类文件,用特定内容填充预定义模板以生成同类文件。如前所述,哨兵文件甚至可以离线准备好;在线操作时仅需要从队列中取出现成文件、分配合适文件名、登记进哨兵文件清单。2) The gateway generates a sentinel file for each type of real file (jpg/docx/mp4) according to the pre-configured strategy, and registers the three generated sentinel files 6.jpg, 7.docx, and 8.mp4 into the sentinel file list, recording their status information (which may include file checksums, last modification times, etc.). The pre-configured strategies available here include, but are not limited to: randomly selecting a file of the same type from a self-built file sample library, and filling a predefined template with specific content to generate a file of the same type. As mentioned above, sentinel files can even be prepared offline; when operating online, you only need to take out the existing file from the queue, assign a suitable file name, and register it in the sentinel file list.

3)服务器每十分钟上报一次所有文件的状态(它无法区分真实文件与哨兵文件)。由于文件数量可能很多,这个状态信息可能会很大。网关因为自己维护着哨兵文件清单,所以“能够且只需要”关注哨兵文件的动态,而无需对服务器上报的状态信息进行全量审计。一旦网关发现哨兵文件清单中的某个文件(6.jpg、7.docx、8.mp4之一)发生疑似来自勒索攻击的改变就告警,例如向安全部门发送手机短信、电子邮件等。3) The server reports the status of all files every ten minutes (it cannot distinguish between real files and sentinel files). Since there may be a large number of files, this status information may be very large. Because the gateway maintains its own sentinel file list, it "can and only needs" to pay attention to the dynamics of the sentinel files without having to conduct a full audit of the status information reported by the server. Once the gateway finds that a file in the sentinel file list (one of 6.jpg, 7.docx, 8.mp4) has a change that is suspected to be caused by a ransomware attack, it will issue an alarm, such as sending a text message or email to the security department.

为简明起见,本发明实施例只以文件名(而不是所在目录+文件名这样的完整路径)来指代真实文件和哨兵文件,下一实施例与此相同。关于完整路径还需要注意的是,如前所述,当用户创建的文件的完整路径刚好与已有哨兵文件完全重合,则可将已有哨兵文件重命名为同目录下尚未出现的文件名,也可用真实文件覆盖哨兵文件并从哨兵文件的清单中剔除该文件。这意味着网关可以灵活更新哨兵文件清单,而不仅仅是一味按照上述第2)步往里面添加新的哨兵文件。For the sake of simplicity, the embodiment of the present invention only refers to the real file and the sentinel file by the file name (rather than the complete path such as the directory + file name), and the next embodiment is the same. It should also be noted about the complete path that, as mentioned above, when the complete path of the file created by the user happens to completely overlap with the existing sentinel file, the existing sentinel file can be renamed to a file name that has not appeared in the same directory, or the sentinel file can be overwritten with the real file and removed from the list of sentinel files. This means that the gateway can flexibly update the sentinel file list, rather than just blindly adding new sentinel files according to the above step 2).

实施例二:Embodiment 2:

某大型互联网公司面向整个因特网提供云盘服务,用户可以通过网页浏览器或者专门的应用客户端从个人电脑(台式机、笔记本电脑等)或移动终端(手机、平板电脑等)上传及下载文件。当用户们上传文件时,对应的服务入口网站会对文件进行分类和计数,进而合成相应的哨兵文件。例如,jpg、png、bmp、gif等都划归为图片类,网关每观察到10张上传图片(按时间维度,即无论来自相同的用户还是不同的用户)时就自动生成1张哨兵图片(扩展名随机选取)一并上传。再如,docx、xlsx、pptx、pdf等都划归为办公文档类,网关每观察到5份上传文档时就自动生成1份哨兵文档(扩展名随机选取)一并上传。所有哨兵文件(无论类别)都被网关登记在案以进行识别。负责云盘实际文件存储的服务器实时向网关上报文件状态。一旦网关监测到某个哨兵文件被修改就告警。由于网关的智能行为对用户而言完全不可见,此实施例中用户体验与现有主流网盘别无二致,即本发明对用户没有影响。A large Internet company provides cloud disk services to the entire Internet. Users can upload and download files from personal computers (desktops, laptops, etc.) or mobile terminals (mobile phones, tablets, etc.) through web browsers or dedicated application clients. When users upload files, the corresponding service portal website will classify and count the files, and then synthesize the corresponding sentinel files. For example, jpg, png, bmp, gif, etc. are all classified as pictures. When the gateway observes 10 uploaded pictures (in the time dimension, whether from the same user or different users), it automatically generates a sentinel picture (extension randomly selected) and uploads them together. For another example, docx, xlsx, pptx, pdf, etc. are all classified as office documents. When the gateway observes 5 uploaded documents, it automatically generates a sentinel document (extension randomly selected) and uploads them together. All sentinel files (regardless of category) are registered by the gateway for identification. The server responsible for the actual file storage of the cloud disk reports the file status to the gateway in real time. Once the gateway detects that a sentinel file has been modified, it will issue an alarm. Since the intelligent behavior of the gateway is completely invisible to the user, the user experience in this embodiment is no different from that of existing mainstream network disks, that is, the present invention has no impact on the user.

上述过程中,网关的具体做法举例如下:In the above process, the specific steps of the gateway are as follows:

1)网关根据预先配置的策略,对用户们上传的文件按照扩展名进行分类(例如分为文本、图片、办公文档、网页、音频、视频、压缩包等等),并对每一类各自计数。此处的计数只对文件数量进行统计,无论文件来自何用户。1) The gateway classifies the files uploaded by users according to the extensions (e.g. text, pictures, office documents, web pages, audio, video, compressed files, etc.) according to the pre-configured policies, and counts each category. The count here only counts the number of files, regardless of which user the file comes from.

2)当某一类别的文件总数量增长到该类别预设“步长”的倍数时,网关按照相应策略生成并上传1个哨兵文件,这个哨兵文件可以跟达到“步长”倍数时最后上传的那个文件存放于同一位置(相同用户的相同目录下)。例如,用户们每上传10张图片,网关就用AI大模型生成1张哨兵图片并上传。再如,用户们每上传5份办公文档,网关就从因特网随机抓取1份哨兵办公文档并上传。网关维护哨兵文件清单,记录它们的状态信息。2) When the total number of files in a certain category grows to a multiple of the preset "step length" of the category, the gateway generates and uploads a sentinel file according to the corresponding strategy. This sentinel file can be stored in the same location (the same directory of the same user) as the last file uploaded when the "step length" multiple is reached. For example, every time a user uploads 10 pictures, the gateway uses the AI large model to generate a sentinel picture and upload it. For another example, every time a user uploads 5 office documents, the gateway randomly grabs a sentinel office document from the Internet and uploads it. The gateway maintains a list of sentinel files and records their status information.

3)存储服务器实时向网关上报所有文件状态,但网关只监测哨兵文件(占比很少,例如图片类占1/10,办公文档类占1/5)的动态。一旦网关监测到某个哨兵文件发生原因不明的修改就告警,例如自动拨打公司安全部门值班电话、在态势感知大屏上显示告警等。3) The storage server reports the status of all files to the gateway in real time, but the gateway only monitors the dynamics of sentinel files (a small proportion, such as 1/10 for pictures and 1/5 for office documents). Once the gateway detects that a sentinel file has been modified for unknown reasons, it will issue an alarm, such as automatically dialing the company's security department's on-call number or displaying an alarm on the situation awareness screen.

以上对本发明实施例的方法步骤和具体实施例进行了说明。可以理解的是,本发明实施例通过网关创建与真实文件对应的哨兵文件,将该哨兵文件与真实文件一起存储至服务器,部署哨兵文件的哨兵文件清单仅由网关进行维护,使得用户端无法感知哨兵文件且服务器无法区分真实文件与哨兵文件,这样当服务器遭遇勒索攻击或数据破坏攻击时,哨兵文件受攻击影响会被改变,网关通过服务器上报的文件状态即可判断哨兵文件是否发生改变,从而可以判断出服务器是否遭遇勒索攻击或数据破坏攻击,降低了勒索攻击和数据破坏攻击检测的漏报率和误报率,降低了运维成本,增强了网络安全性。The method steps and specific embodiments of the embodiments of the present invention are described above. It can be understood that the embodiments of the present invention create a sentinel file corresponding to a real file through a gateway, store the sentinel file together with the real file to the server, and the sentinel file list of the deployed sentinel file is only maintained by the gateway, so that the user end cannot perceive the sentinel file and the server cannot distinguish between the real file and the sentinel file. In this way, when the server encounters a ransom attack or a data destruction attack, the sentinel file will be changed by the attack. The gateway can determine whether the sentinel file has changed through the file status reported by the server, so as to determine whether the server has encountered a ransom attack or a data destruction attack, thereby reducing the missed report rate and false alarm rate of ransom attack and data destruction attack detection, reducing operation and maintenance costs, and enhancing network security.

与现有技术相比,本发明实施例还具有以下优点:Compared with the prior art, the embodiments of the present invention also have the following advantages:

1)低漏报率:仅当所有哨兵文件都“不幸”未被勒索攻击命中时,本发明实施例的检测方案才会失效。为此,在条件允许(例如服务器剩余存储空间充裕)时,管理员可以为用户新建的一批文件多配备哨兵文件。这里所谓的多,既可以是文件个数上的多,也可以是文件所占磁盘空间的多(从而看上去更像真实文件)。1) Low false negative rate: The detection scheme of the embodiment of the present invention will fail only when all sentinel files are "unfortunately" not hit by the ransomware attack. To this end, when conditions permit (for example, the server has sufficient remaining storage space), the administrator can equip a batch of newly created files with more sentinel files. The so-called more here can be more in terms of the number of files or more in terms of the disk space occupied by the files (so that they look more like real files).

2)低误报率:由于哨兵文件对用户完全不可见,用户操作无法涉及到哨兵文件,也就不会引起误报。2) Low false alarm rate: Since the sentinel file is completely invisible to the user, user operations cannot involve the sentinel file and will not cause false alarms.

3)低运维成本:本发明实施例甚至可以不修改服务器的文件存储驱动(因为本方案不hook服务器的API、无需服务器投放诱饵)。服务器仅需向网关上报文件状态,而这很容易通过定时任务之类来完成。3) Low operation and maintenance cost: The embodiment of the present invention may not even modify the file storage driver of the server (because the solution does not hook the server API and does not require the server to place bait). The server only needs to report the file status to the gateway, which can be easily accomplished through a scheduled task or the like.

4)高适用性:本发明实施例对检测其他数据破坏攻击也具有一定的适用性。4) High applicability: The embodiments of the present invention are also applicable to detecting other data destruction attacks.

如图9所示为本发明实施例提供的勒索攻击和数据破坏攻击检测系统的结构示意图,参照图9,本发明实施例提供了一种勒索攻击和数据破坏攻击检测系统,包括:FIG9 is a schematic diagram of the structure of a ransomware attack and data destruction attack detection system provided by an embodiment of the present invention. Referring to FIG9 , an embodiment of the present invention provides a ransomware attack and data destruction attack detection system, including:

哨兵文件创建模块,用于获取用户端创建的若干个第一真实文件,通过网关创建与第一真实文件对应的第一哨兵文件,并将第一真实文件和第一哨兵文件作为目标数据文件存储至服务器;A sentinel file creation module, used to obtain a plurality of first real files created by the user end, create a first sentinel file corresponding to the first real file through the gateway, and store the first real file and the first sentinel file as target data files in the server;

文件状态上报模块,用于通过服务器监测各目标数据文件的文件状态,并将文件状态上报至网关;A file status reporting module, used to monitor the file status of each target data file through the server and report the file status to the gateway;

文件状态判断模块,用于通过网关根据文件状态判断第一哨兵文件是否发生改变;A file status judgment module, used to judge whether the first sentinel file has changed according to the file status through the gateway;

告警信息生成模块,用于当第一哨兵文件发生改变,判定服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息;An alarm information generation module is used to determine that the server is subjected to a ransomware attack or a data destruction attack when the first sentinel file changes, and to generate an alarm information;

其中,第一哨兵文件的哨兵文件清单由网关维护,使得用户端无法感知第一哨兵文件,且服务器无法区分目标数据文件中的第一真实文件与第一哨兵文件。The sentinel file list of the first sentinel file is maintained by the gateway, so that the user end cannot perceive the first sentinel file, and the server cannot distinguish between the first real file and the first sentinel file in the target data file.

上述方法实施例中的内容均适用于本系统实施例中,本系统实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

本发明实施例还提供了一种电子设备,电子设备包括:存储器、处理器、存储在存储器上并可在处理器上运行的程序以及用于实现处理器和存储器之间的连接通信的数据总线,程序被处理器执行时实现上述勒索攻击和数据破坏攻击检测方法。该电子设备可以为包括平板电脑、车载电脑等任意智能终端。The embodiment of the present invention also provides an electronic device, which includes: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program is executed by the processor to realize the above-mentioned ransomware attack and data destruction attack detection method. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

如图10所示为本发明实施例提供的电子设备的硬件结构示意图,参照图9,本发明实施例提供了一种电子设备,包括:FIG10 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. Referring to FIG9 , an electronic device is provided by an embodiment of the present invention, including:

处理器1001,可以采用通用的CPU(Central Processing Unit,中央处理器)、微处理器、应用专用集成电路(Application Specific Integrated Circuit,ASIC)、或者一个或多个集成电路等方式实现,用于执行相关程序,以实现本发明实施例所提供的技术方案;The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

存储器1002,可以采用只读存储器(Read Only Memory,ROM)、静态存储设备、动态存储设备或者随机存取存储器(Random Access Memory,RAM)等形式实现。存储器1002可以存储操作系统和其他应用程序,在通过软件或者固件来实现本说明书实施例所提供的技术方案时,相关的程序代码保存在存储器1002中,并由处理器1001来调用执行本发明实施例的勒索攻击和数据破坏攻击检测方法;The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the ransomware attack and data destruction attack detection method of the embodiment of the present invention;

输入/输出接口1003,用于实现信息输入及输出;Input/output interface 1003, used to implement information input and output;

通信接口1004,用于实现本设备与其他设备的通信交互,可以通过有线方式(例如USB、网线等)实现通信,也可以通过无线方式(例如移动网络、WIFI、蓝牙等)实现通信;The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

总线1005,在设备的各个组件(例如处理器1001、存储器1002、输入/输出接口1003和通信接口1004)之间传输信息;A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input/output interface 1003 , and the communication interface 1004 );

其中处理器1001、存储器1002、输入/输出接口1003和通信接口1004通过总线1005实现彼此之间在设备内部的通信连接。The processor 1001 , the memory 1002 , the input/output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .

如图11所示为本发明实施例提供的存储介质的结构示意图,参照图11,本发明实施例还提供了一种存储介质,存储介质为计算机可读存储介质,用于计算机可读存储,存储介质存储有一个或者多个程序1101,一个或者多个程序1101可被一个或者多个处理器执行,以实现上述勒索攻击和数据破坏攻击检测方法。As shown in Figure 11, it is a structural schematic diagram of the storage medium provided by an embodiment of the present invention. Referring to Figure 11, an embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs 1101, and the one or more programs 1101 can be executed by one or more processors to implement the above-mentioned ransomware attack and data destruction attack detection method.

存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

本发明实施例还公开了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存介质中。计算机设备的处理器可以从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行图1所示的方法。The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method shown in FIG1.

在一些可选择的实施例中,在方框图中提到的功能/操作可以不按照操作示图提到的顺序发生。例如,取决于所涉及的功能/操作,连续示出的两个方框实际上可以被大体上同时地执行或上述方框有时能以相反顺序被执行。此外,在本发明的流程图中所呈现和描述的实施例以示例的方式被提供,目的在于提供对技术更全面的理解。所公开的方法不限于本文所呈现的操作和逻辑流程。可选择的实施例是可预期的,其中各种操作的顺序被改变以及其中被描述为较大操作的一部分的子操作被独立地执行。In some optional embodiments, the function/operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function/operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the above-mentioned boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. The optional embodiment is expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

此外,虽然在功能性模块的背景下描述了本发明,但应当理解的是,除非另有相反说明,上述的功能和/或特征中的一个或多个可以被集成在单个物理装置和/或软件模块中,或者一个或多个功能和/或特征可以在单独的物理装置或软件模块中被实现。还可以理解的是,有关每个模块的实际实现的详细讨论对于理解本发明是不必要的。更确切地说,考虑到在本文中公开的装置中各种功能模块的属性、功能和内部关系的情况下,在工程师的常规技术内将会了解该模块的实际实现。因此,本领域技术人员运用普通技术就能够在无需过度试验的情况下实现在权利要求书中所阐明的本发明。还可以理解的是,所公开的特定概念仅仅是说明性的,并不意在限制本发明的范围,本发明的范围由所附权利要求书及其等同方案的全部范围来决定。In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the above-mentioned functions and/or features can be integrated into a single physical device and/or software module, or one or more functions and/or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

上述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例上述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,“计算机可读介质”可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。The logic and/or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印上述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得上述程序,然后将其存储在计算机存储器中。More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the above-mentioned program is printed, since the above-mentioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in other suitable ways as necessary, and then stored in a computer memory.

应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

在本说明书的上述描述中,参考术语“一个实施方式/实施例”、“另一实施方式/实施例”或“某些实施方式/实施例”等的描述意指结合实施方式或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。In the above description of this specification, the description with reference to the terms "one embodiment/example", "another embodiment/example" or "certain embodiments/examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

尽管已经示出和描述了本发明的实施方式,本领域的普通技术人员可以理解:在不脱离本发明的原理和宗旨的情况下可以对这些实施方式进行多种变化、修改、替换和变型,本发明的范围由权利要求及其等同物限定。Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

以上是对本发明的较佳实施进行了具体说明,但本发明并不限于上述实施例,熟悉本领域的技术人员在不违背本发明精神的前提下还可做作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims (10)

1.一种勒索攻击和数据破坏攻击检测方法,其特征在于,包括以下步骤:1. A method for detecting ransomware attacks and data destruction attacks, comprising the following steps: 获取用户端创建的若干个第一真实文件,通过网关创建与所述第一真实文件对应的第一哨兵文件,并将所述第一真实文件和所述第一哨兵文件作为目标数据文件存储至服务器;Acquire several first real files created by the user end, create first sentinel files corresponding to the first real files through the gateway, and store the first real files and the first sentinel files as target data files in the server; 通过所述服务器监测各所述目标数据文件的文件状态,并将所述文件状态上报至所述网关;Monitoring the file status of each of the target data files through the server, and reporting the file status to the gateway; 通过所述网关根据所述文件状态判断所述第一哨兵文件是否发生改变;Determining, by the gateway according to the file status, whether the first sentinel file has changed; 当所述第一哨兵文件发生改变,判定所述服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息;When the first sentinel file changes, it is determined that the server is subjected to a ransomware attack or a data destruction attack, and an alarm message is generated; 其中,所述第一哨兵文件的哨兵文件清单由所述网关维护,使得所述用户端无法感知所述第一哨兵文件,且所述服务器无法区分所述目标数据文件中的所述第一真实文件与所述第一哨兵文件。The sentinel file list of the first sentinel file is maintained by the gateway, so that the user end cannot perceive the first sentinel file, and the server cannot distinguish between the first real file and the first sentinel file in the target data file. 2.根据权利要求1所述的一种勒索攻击和数据破坏攻击检测方法,其特征在于,所述获取用户端创建的若干个第一真实文件,通过网关创建与所述第一真实文件对应的第一哨兵文件,并将所述第一真实文件和所述第一哨兵文件作为目标数据文件存储至服务器这一步骤,其具体包括:2. A method for detecting a ransomware attack and a data destruction attack according to claim 1, characterized in that the step of obtaining a plurality of first real files created by a user terminal, creating a first sentinel file corresponding to the first real file through a gateway, and storing the first real file and the first sentinel file as target data files in a server specifically comprises: 响应于所述用户端的文件创建操作,通过所述网关获取所述用户端创建的若干个所述第一真实文件;In response to the file creation operation of the user terminal, acquiring, through the gateway, a plurality of first real files created by the user terminal; 通过所述网关检测所述第一真实文件的文件属性,根据所述文件属性和预设的哨兵文件配备策略生成与所述第一真实文件对应的所述第一哨兵文件,并将所述第一哨兵文件的文件信息加入所述哨兵文件清单;Detecting the file attribute of the first real file through the gateway, generating the first sentinel file corresponding to the first real file according to the file attribute and a preset sentinel file configuration strategy, and adding the file information of the first sentinel file to the sentinel file list; 通过所述网关将所述第一真实文件与所述第一哨兵文件作为所述目标数据文件发送至所述服务器,使得所述服务器对所述目标数据文件进行存储;Sending the first real file and the first sentinel file as the target data file to the server through the gateway, so that the server stores the target data file; 其中,所述文件属性包括文件类型和文件路径。The file attributes include file type and file path. 3.根据权利要求2所述的一种勒索攻击和数据破坏攻击检测方法,其特征在于,所述根据所述文件属性和预设的哨兵文件配备策略生成与所述第一真实文件对应的所述第一哨兵文件这一步骤,其具体为:3. A method for detecting ransomware attacks and data destruction attacks according to claim 2, characterized in that the step of generating the first sentinel file corresponding to the first real file according to the file attributes and a preset sentinel file configuration strategy is specifically: 根据所述文件类型从预设的哨兵文件样本库中随机获取一个同类型的哨兵文件样本,将所述哨兵文件样本作为所述第一哨兵文件,并根据所述文件路径确定所述第一哨兵文件的存储位置;randomly acquiring a sentinel file sample of the same type from a preset sentinel file sample library according to the file type, using the sentinel file sample as the first sentinel file, and determining a storage location of the first sentinel file according to the file path; 或,or, 获取所述文件类型对应的填充模板,通过特定内容对所述填充模板进行填充处理得到所述第一哨兵文件,并根据所述文件路径确定所述第一哨兵文件的存储位置。A filling template corresponding to the file type is obtained, the filling template is filled with specific content to obtain the first sentinel file, and a storage location of the first sentinel file is determined according to the file path. 4.根据权利要求1所述的一种勒索攻击和数据破坏攻击检测方法,其特征在于,所述通过所述服务器监测各所述目标数据文件的文件状态,并将所述文件状态上报至所述网关这一步骤,其具体包括:4. A method for detecting a ransomware attack and a data destruction attack according to claim 1, characterized in that the step of monitoring the file status of each target data file by the server and reporting the file status to the gateway specifically comprises: 通过所述服务器实时/定时监测各所述目标数据文件的文件状态;Real-time/regular monitoring of the file status of each of the target data files by the server; 根据所述文件状态和监测时间生成文件状态日志,并将所述文件状态日志上报至所述网关。A file status log is generated according to the file status and the monitoring time, and the file status log is reported to the gateway. 5.根据权利要求4所述的一种勒索攻击和数据破坏攻击检测方法,其特征在于,所述通过所述网关根据所述文件状态判断所述第一哨兵文件是否发生改变这一步骤,其具体包括:5. A method for detecting a ransomware attack and a data destruction attack according to claim 4, characterized in that the step of determining whether the first sentinel file has been changed according to the file status by the gateway specifically comprises: 通过所述网关根据所述哨兵文件清单和所述文件状态日志确定所述第一哨兵文件的文件状态;Determining, by the gateway, the file status of the first sentinel file according to the sentinel file list and the file status log; 根据确定的所述第一哨兵文件的文件状态判断所述第一哨兵文件是否发生改变。It is determined whether the first sentinel file has been changed according to the determined file status of the first sentinel file. 6.根据权利要求4所述的一种勒索攻击和数据破坏攻击检测方法,其特征在于,所述当所述第一哨兵文件发生改变,判定所述服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息这一步骤,其具体包括:6. A method for detecting a ransomware attack and a data destruction attack according to claim 4, characterized in that when the first sentinel file changes, the step of determining that the server is subjected to a ransomware attack or a data destruction attack and generating an alarm message specifically comprises: 当确定所述第一哨兵文件发生改变,判定所述服务器遭遇勒索攻击或数据破坏攻击,并根据所述文件状态日志的相应信息确定攻击发生时间;When it is determined that the first sentinel file has changed, it is determined that the server has been subjected to a ransomware attack or a data destruction attack, and the time of the attack is determined according to corresponding information in the file status log; 根据所述攻击发生时间生成告警信息,并将所述告警信息发送至管理员。Generate alarm information according to the attack occurrence time, and send the alarm information to the administrator. 7.根据权利要求1至6中任一项所述的一种勒索攻击和数据破坏攻击检测方法,其特征在于,所述勒索攻击和数据破坏攻击检测方法还包括以下步骤:7. A method for detecting a ransomware attack and a data destruction attack according to any one of claims 1 to 6, characterized in that the method for detecting a ransomware attack and a data destruction attack further comprises the following steps: 当所述网关检测到所述用户端新创建的第二真实文件与所述服务器已存储的第二哨兵文件的文件路径和文件名均相同,对所述第二哨兵文件进行重命名,并根据重命名后的所述第二哨兵文件更新所述哨兵文件清单,或,通过所述第二真实文件覆盖所述第二哨兵文件,并将所述第二哨兵文件的文件信息从所述哨兵文件清单中移除。When the gateway detects that the second real file newly created by the user terminal has the same file path and file name as the second sentinel file stored on the server, the second sentinel file is renamed and the sentinel file list is updated according to the renamed second sentinel file, or the second sentinel file is overwritten by the second real file and the file information of the second sentinel file is removed from the sentinel file list. 8.一种勒索攻击和数据破坏攻击检测系统,其特征在于,包括:8. A ransomware attack and data destruction attack detection system, comprising: 哨兵文件创建模块,用于获取用户端创建的若干个第一真实文件,通过网关创建与所述第一真实文件对应的第一哨兵文件,并将所述第一真实文件和所述第一哨兵文件作为目标数据文件存储至服务器;A sentinel file creation module, used for acquiring a plurality of first real files created by a user terminal, creating a first sentinel file corresponding to the first real file through a gateway, and storing the first real file and the first sentinel file as target data files in a server; 文件状态上报模块,用于通过所述服务器监测各所述目标数据文件的文件状态,并将所述文件状态上报至所述网关;A file status reporting module, used to monitor the file status of each target data file through the server, and report the file status to the gateway; 文件状态判断模块,用于通过所述网关根据所述文件状态判断所述第一哨兵文件是否发生改变;A file status judgment module, used to judge whether the first sentinel file has changed according to the file status through the gateway; 告警信息生成模块,用于当所述第一哨兵文件发生改变,判定所述服务器遭遇勒索攻击或数据破坏攻击,并生成告警信息;An alarm information generation module, configured to determine that the server is subjected to a ransomware attack or a data destruction attack and generate an alarm information when the first sentinel file changes; 其中,所述第一哨兵文件的哨兵文件清单由所述网关维护,使得所述用户端无法感知所述第一哨兵文件,且所述服务器无法区分所述目标数据文件中的所述第一真实文件与所述第一哨兵文件。The sentinel file list of the first sentinel file is maintained by the gateway, so that the user end cannot perceive the first sentinel file, and the server cannot distinguish between the first real file and the first sentinel file in the target data file. 9.一种电子设备,其特征在于,所述电子设备包括存储器、处理器、存储在所述存储器上并可在所述处理器上运行的程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,所述程序被所述处理器执行时实现如权利要求1至7中任一项所述的勒索攻击和数据破坏攻击检测方法的步骤。9. An electronic device, characterized in that the electronic device comprises a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the program is executed by the processor, the steps of the ransomware attack and data destruction attack detection method as described in any one of claims 1 to 7 are realized. 10.一种存储介质,所述存储介质为计算机可读存储介质,用于计算机可读存储,其特征在于,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如权利要求1至7中任一项所述的勒索攻击和数据破坏攻击检测方法的步骤。10. A storage medium, which is a computer-readable storage medium used for computer-readable storage, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the ransomware attack and data destruction attack detection method as described in any one of claims 1 to 7.
CN202410619902.7A 2024-05-17 2024-05-17 Ransomware attack and data destruction attack detection method, system, device and medium Pending CN118400165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410619902.7A CN118400165A (en) 2024-05-17 2024-05-17 Ransomware attack and data destruction attack detection method, system, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410619902.7A CN118400165A (en) 2024-05-17 2024-05-17 Ransomware attack and data destruction attack detection method, system, device and medium

Publications (1)

Publication Number Publication Date
CN118400165A true CN118400165A (en) 2024-07-26

Family

ID=91992216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410619902.7A Pending CN118400165A (en) 2024-05-17 2024-05-17 Ransomware attack and data destruction attack detection method, system, device and medium

Country Status (1)

Country Link
CN (1) CN118400165A (en)

Similar Documents

Publication Publication Date Title
US8544099B2 (en) Method and device for questioning a plurality of computerized devices
US10154066B1 (en) Context-aware compromise assessment
US10445495B2 (en) Buffer overflow exploit detection
CN112073389B (en) Cloud host security situation awareness system, method, device and storage medium
CN109922062B (en) Source code leakage monitoring method and related equipment
US20080183603A1 (en) Policy enforcement over heterogeneous assets
US10708300B2 (en) Detection of fraudulent account usage in distributed computing systems
CN111083093B (en) Method, device, electronic device and storage medium for calling end capability
EP4338075B1 (en) Abnormally permissive role definition detection systems
US11838329B1 (en) Curating actionable intrusion detection system rules
WO2023151238A1 (en) Ransomware detection method and related system
JP2024521121A (en) Confidence scoring of user compliance with organizational security policies
US12511382B2 (en) Performing a security action based on a suspicious cross authorization event
CN114124414B (en) Method and device for generating honey service, method for capturing attack behavior data, computer equipment and storage medium
WO2022047415A1 (en) System and method for secure evaluation of cyber detection products
CN107786551B (en) Method for accessing intranet server and device for controlling access to intranet server
US20240155006A1 (en) Secure verification of detection rules on test sensors
CN116415240A (en) A kind of blackmail virus detection method and related system
CN105978908A (en) Non-real-time information website security protection method and apparatus
CN112187787A (en) Digital marketing advertisement page tamper-proof method, device and equipment based on knowledge graph
CN111324872A (en) Method and system for redirected centralized audit of login records and operation records
CN118400165A (en) Ransomware attack and data destruction attack detection method, system, device and medium
CN111967058A (en) Tamper-proof method supporting user white list, electronic device and storage medium
US12282546B2 (en) Abnormal classic authorization detection systems
US9037608B1 (en) Monitoring application behavior by detecting file access category changes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination