CN111125701A - File detection method, equipment, storage medium and device - Google Patents

File detection method, equipment, storage medium and device Download PDF

Info

Publication number
CN111125701A
CN111125701A CN201911354487.2A CN201911354487A CN111125701A CN 111125701 A CN111125701 A CN 111125701A CN 201911354487 A CN201911354487 A CN 201911354487A CN 111125701 A CN111125701 A CN 111125701A
Authority
CN
China
Prior art keywords
file
detection
operated
operation request
information
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.)
Granted
Application number
CN201911354487.2A
Other languages
Chinese (zh)
Other versions
CN111125701B (en
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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201911354487.2A priority Critical patent/CN111125701B/en
Publication of CN111125701A publication Critical patent/CN111125701A/en
Application granted granted Critical
Publication of CN111125701B publication Critical patent/CN111125701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection

Abstract

The invention relates to the technical field of computer security, and discloses a file detection method, file detection equipment, a file detection storage medium and a file detection device. The method comprises the steps of obtaining a current file operation request; if the request type of the current file operation request belongs to a preset type, acquiring a file to be operated corresponding to the current file operation request; detecting the file to be operated through a file detection engine to obtain a detection result; and transmitting a corresponding operation instruction to a file system according to the detection result, responding the current file operation request through the file system, analyzing according to the operation request, and actively detecting the malicious file according to the analysis result without overall scanning, thereby improving the detection efficiency of the malicious file.

Description

File detection method, equipment, storage medium and device
Technical Field
The present invention relates to the field of file operation detection technologies, and in particular, to a file detection method, a file detection device, a file detection storage medium, and a file detection apparatus.
Background
In order to ensure the security of the computer, the current file processing information is monitored by a monitoring program, but the full-disk file monitoring is generally performed, that is, each changed file is scanned and identified, so that the huge consumption of performance is caused, the card speed of the whole system is caused, and the user experience is seriously influenced.
Disclosure of Invention
The invention mainly aims to provide a file detection method, a file detection device, a storage medium and a file detection device, and aims to solve the technical problem of how to improve the file detection efficiency.
In order to achieve the above object, the present invention provides a file detection method, including the steps of:
acquiring a current file operation request;
if the request type of the current file operation request belongs to a preset type, acquiring a file to be operated corresponding to the current file operation request;
detecting the file to be operated through a file detection engine to obtain a detection result;
and transmitting a corresponding operation instruction to a file system according to the detection result, and responding to the current file operation request through the file system.
Preferably, the current file operation request is an open file operation request;
before the file detection engine detects the file to be operated and obtains a detection result, the method further comprises:
and if the file to be operated is not the target file information, acquiring formatting standard path information of the file to be operated, and detecting the file to be operated according to the formatting standard path information to obtain a detection result.
Preferably, the current file operation request is a rewrite file operation request;
before the file detection engine detects the file to be operated and obtains a detection result, the method further comprises:
setting label records for the file to be operated;
and judging whether the set file to be operated is closed or not, and executing the step of detecting the file to be operated through the file detection engine according to the judgment result and the label record to obtain a detection result.
Preferably, the current file operation request is a request for closing a file operation;
before the file detection engine detects the file to be operated and obtains a detection result, the method further comprises:
and judging whether the file to be operated has label information or not, and executing the step of detecting the file to be operated through the file detection engine according to a judgment result to obtain a detection result.
Preferably, the detecting the file to be operated by the file detection engine to obtain a detection result includes:
judging the operation type of the current file operation request;
inquiring whether the file to be operated has an operation path table of the file detection engine or not to obtain an inquiry result;
and detecting the file to be operated through a file detection engine according to the operation type and the query result to obtain a detection result.
Preferably, before querying whether the file to be operated has the operation path table of the file detection engine, and obtaining a query result, the method further includes:
acquiring file operation information of the file detection engine;
and generating an operation path table of the file detection engine according to the file operation information.
Preferably, after the corresponding operation instruction is transmitted to the file system according to the detection result and the current file operation request is responded by the file system, the method further includes:
constructing identification information by adopting a balanced binary tree for the detection result, and storing the identification information and the detected file information into a cache region;
acquiring an operation request of the detected file information, and judging whether authentication identification information corresponding to the detected file information in the operation request exists in the cache region;
and if the cache region has the identification information corresponding to the detected file information in the operation request, responding to the operation request of the detected file information.
In addition, in order to achieve the above object, the present invention also provides a document detecting apparatus, including: a memory, a processor and a file detection program stored on the memory and running on the processor, the file detection program when executed by the processor implementing the steps of the file detection method as described above.
Furthermore, to achieve the above object, the present invention further provides a storage medium having a file detection program stored thereon, which when executed by a processor implements the steps of the file detection method as described above.
In addition, in order to achieve the above object, the present invention further provides a document detecting apparatus, including:
the acquisition module is used for acquiring a current file operation request;
the obtaining module is further configured to obtain a file to be operated corresponding to the current file operation request if the request type of the current file operation request belongs to a preset type;
the detection module is used for detecting the file to be operated through a file detection engine to obtain a detection result;
and the response module is used for transmitting a corresponding operation instruction to the file system according to the detection result and responding the current file operation request through the file system.
According to the technical scheme provided by the invention, a current file operation request is obtained; if the request type of the current file operation request belongs to a preset type, acquiring a file to be operated corresponding to the current file operation request; detecting the file to be operated through a file detection engine to obtain a detection result; and transmitting a corresponding operation instruction to a file system according to the detection result, responding the current file operation request through the file system, analyzing according to the operation request, and actively detecting the malicious file according to the analysis result without overall scanning, thereby improving the detection efficiency of the malicious file.
Drawings
FIG. 1 is a schematic structural diagram of a file detection device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart illustrating a document detection method according to an embodiment of the present invention;
FIG. 3 is a schematic overall flowchart of malicious file detection according to an embodiment of the file detection method of the present invention;
FIG. 4 is a schematic flowchart of another embodiment of a document detection method according to the present invention;
FIG. 5 is a schematic diagram illustrating kernel filter driver file operation filtering according to an embodiment of the file detection method of the present invention;
FIG. 6 is a flowchart illustrating a file detection method according to yet another embodiment of the present invention;
FIG. 7 is a schematic view of a process of determining an open file according to an embodiment of the file detection method of the present invention;
FIG. 8 is a schematic view of a closed file determining process according to an embodiment of the file detecting method of the present invention;
FIG. 9 is a block diagram of a file detection apparatus according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a file detection device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the document detecting apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), the optional user interface 1003 may also include a standard wired interface and a wireless interface, and the wired interface of the user interface 1003 may be a Universal Serial Bus (USB) interface in the present invention. The network interface 1004 may optionally include a standard wired interface as well as a wireless interface (e.g., WI-FI interface). The Memory 1005 may be a high speed Random Access Memory (RAM); or a stable Memory, such as a Non-volatile Memory (Non-volatile Memory), and may be a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in FIG. 1 does not constitute a limitation of the document sensing device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a file detection program.
In the file detection device shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting peripheral equipment; the file detection apparatus calls a file detection program stored in the memory 1005 through the processor 1001, and executes the file detection method provided by the embodiment of the present invention.
Based on the hardware structure, the embodiment of the file detection method is provided.
Referring to fig. 2, fig. 2 is a schematic flow chart of an embodiment of the file detection method of the present invention.
In the embodiment of fig. 2, the file detection method includes the following steps:
step S10: and acquiring a current file operation request.
It should be noted that, the execution subject of the embodiment is a file detection device, and may also be other devices that can implement the same or similar functions.
In this embodiment, the minifilter file filtering framework refers to an interface framework provided by microsoft for file operation monitoring of a developer, and the developer can develop related file monitoring and filtering functionalization according to this framework, where the current file operation request can be obtained based on the minifilter file filtering framework monitoring, and the current file operation request is operation information of a user on the current file, where the operation information includes opening operation information of the file, change operation information of the file, closing operation information of the file, and the like, and may further include operation information in other forms, which is not limited in this embodiment.
Step S20: and if the request type of the current file operation request belongs to a preset type, acquiring a file to be operated corresponding to the current file operation request.
It should be noted that, in general, in order to consider security, the file is scanned in a full disk manner as long as the file is modified, so that the processing efficiency of the system is greatly reduced.
Step S30: and detecting the file to be operated through a file detection engine to obtain a detection result.
It should be noted that, as shown in fig. 3, the overall flow diagram of malicious file detection is divided into an application layer and a driver layer, where the application layer includes a user using process, for example, a file operation from process a to the driver layer, and further includes a malicious file detection engine, where the malicious file detection engine is configured to detect whether a file is a malicious file, that is, perform file detection and return a detection result to a kernel file filtering driver module in the driver layer.
In this embodiment, the process a and the file operation generally refer to all processes of the system and the file operations performed by the processes, including opening a file, reading a file, writing a file, and the like, all of which are driven by a file kernel filter, the file kernel filter drives a module for monitoring the file operations of all processes of the operating system, and the file system filter module is developed based on a microsoft microfilter minifilter framework, and can select filter operations such as release, rejection, or redirection for the related file operations, the file detection engine is configured to analyze information such as a standard formatting path transmitted according to the file filter driver, and identify the black and white attributes of the file by a malicious file detection engine, and then return the engine to the file kernel filter driver, and release the file if the file is returned to non-black, add the path to a cache if the file is returned to black, for querying when the file is opened next time, and then returning to reject, wherein the returned white file is represented as a safe file, and the returned grey file is represented as an unknown or intermediate file, so that the detection of the malicious file is realized.
Step S40: and transmitting a corresponding operation instruction to a file system according to the detection result, and responding to the current file operation request through the file system.
It can be understood that the file system is a module of the operating system, the actual file operation implementation is realized here, and the process file operation behaviors released by the file kernel filter driver are all transmitted to the module, so that the operation on the file is realized.
According to the scheme, the current file operation request is obtained; if the request type of the current file operation request belongs to a preset type, acquiring a file to be operated corresponding to the current file operation request; detecting the file to be operated through a file detection engine to obtain a detection result; and transmitting a corresponding operation instruction to a file system according to the detection result, responding the current file operation request through the file system, analyzing according to the operation request, and actively detecting the malicious file according to the analysis result without overall scanning, thereby improving the detection efficiency of the malicious file.
Referring to fig. 4, fig. 4 is a schematic flowchart of another embodiment of the file detection method according to the present invention, and based on the embodiment shown in fig. 2, another embodiment of the file detection method according to the present invention is proposed, where the current file operation request is an open file operation request; the step S30 includes:
and extracting the information of the file to be processed of the current file operation request, and judging whether the information of the file to be processed is the information of the target file.
In the embodiment, active detection is performed by matching all file operations of a monitoring operating system with a malicious file detection engine, and first, the file operations need to be monitored, mainly by paying attention to the opening of files, the change of files, the release of file operations and the like through a windows file filtering framework minifilter provided by microsoft.
It should be noted that, the target file information is a disk volume file, a folder, a new file, or the like, and since the operation information does not pose a threat to the system, malicious file detection is not required to be performed on the operation information, so that the efficiency of malicious file detection is improved.
In a specific implementation, if the information of the file to be processed is the information of the target file, the file is directly released without malicious file detection, and if the information of the file to be processed is not the information of the target file, the current operation is dangerous, and then the malicious file detection is performed.
Further, if the information of the file to be processed is the information of the target file, the information of the file to be processed is subjected to release filtering.
Further, if the file information to be processed is not the target file information, analyzing the formatted standard path information of the file information to be processed.
It should be noted that the formatted standard path information is a scan path, i.e. a full-disc scan path or a partial scan path.
Accordingly, before the step S30, the method includes:
step S301, if the file to be operated is not the target file information, acquiring formatting standard path information of the file to be operated, and detecting the file to be operated according to the formatting standard path information to obtain a detection result.
In this embodiment, it should be noted that the target file information is at least one of file information such as a disk volume, a folder, or a newly-created file, and by determining that the file to be operated is not the target file information, the method performs obtaining of formatting standard path information of the file to be operated, and detects the file to be operated according to the formatting standard path information, so as to obtain a detection result.
In the specific implementation, the operation of opening the operating system file is monitored, the opened file is judged whether the file is a file which is not concerned by the user, namely whether the file is target file information such as a disk volume, a folder or a newly-built file, the file which is not concerned by the user is subjected to release filtering, whether the file is a file which is identified once and marked as a virus is judged through a maintained blacklist cache, and the file is directly returned to fail to the virus file, so that the process is refused to open the file. In this embodiment, if the information to be operated is not target file information, that is, file information such as a disk volume, a folder, or a newly-built file, it indicates that the information to be operated is risky operation information, in this case, the formatted standard path information of the file to be operated needs to be acquired, the file to be operated is detected according to the formatted standard path information, and if the information to be operated is target file information, that is, file information such as a disk volume, a folder, or a newly-built file, it indicates that the information to be operated is risky operation information, and thus detection is not required, thereby improving detection efficiency. As shown in the schematic view of the kernel filtering driver file operation filtering shown in fig. 5, if it is detected that a file is opened, it is determined whether the file is concerned, if so, the file is scanned by a malicious file detection engine to detect the malicious file, and if not, the process is rejected to open the file, so that corresponding detection is performed according to the operation information.
According to the scheme provided by the embodiment, the operation information of the file monitored by the operating system is monitored, and all file operations of the monitored operating system are actively detected by matching with the malicious file detection engine, so that the malicious file detection efficiency is improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a file detection method according to still another embodiment of the present invention, and based on the embodiment shown in fig. 2, a file detection method according to still another embodiment of the present invention is provided, where the current file operation request is an overwrite file operation request, and before the step S30, the method further includes:
setting label records for the file to be operated; and judging whether the set file to be operated is closed or not, and executing the step of detecting the file to be operated through the file detection engine according to the judgment result and the label record to obtain a detection result.
In a specific implementation, the operation of rewriting the file of the operating system is monitored, a tag record is performed on the changed file, the file is marked to be changed, and the re-authentication of the malicious file detection engine is required when the file is closed.
Further, the current file operation request is a file closing operation request; before S30, the method further includes:
and judging whether the file to be operated has label information or not, and executing the step of detecting the file to be operated through the file detection engine according to a judgment result to obtain a detection result.
In the specific implementation, the file closing operation of an operating system is monitored, the closed file is judged to have a label of the changed file, if yes, a formatted standard file path of the file is analyzed, and then the file is submitted to a malicious file detection engine for re-identification. If there is no label over which the file was overwritten, then the file is certified by the malicious file detection engine and is not altered, so re-certification is not required.
For the malicious files identified by the malicious file detection engine, the result needs to be returned to the kernel file monitoring engine before cleaning, then the file monitoring engine maintains a malicious file cache table, and when the files are found to be malicious files during file operation, the files are refused to access.
Continuing with fig. 5, when a rewritten file appears, malicious file detection is performed when the file is closed, whether the file is changed is determined when the file is closed, malicious file detection is performed when the file is changed, and the closing process is directly performed when the file is not changed.
Further, the step S30 includes:
judging the operation type of the current file operation request; inquiring whether the file to be operated has an operation path table of the file detection engine or not to obtain an inquiry result; and detecting the file to be operated through a file detection engine according to the operation type and the query result to obtain a detection result.
It should be noted that the operation types are an operation of opening a file and an operation of closing a file, and since the operation of opening and reading a file is performed when the changed file is identified as malicious file identification, at this time, a file permission conflict is caused when third-party software adopts exclusive opening of a file, which causes a compatibility error of the third-party software, that is, the file needs to be opened when a malicious file identification engine scans a file, and then an opening failure is caused when the third-party software exclusively opens the file, which affects a normal execution flow of the third-party software. Fig. 7 is a schematic diagram illustrating a process for determining an open file and fig. 8 is a schematic diagram illustrating a process for determining a closed file.
In a specific implementation, the file opening and closing process is monitored in the file kernel filtering process, and the life cycle of the file opening by the malicious file detection engine is tracked. When a file is opened, whether the file is opened by a malicious file detection engine is judged, if so, a hash table is used for carrying out cache processing, and the path count of the file is +1, the situation that the file is opened for multiple times may exist, if the file is opened by a non-malicious file detection engine, such as a file opened by a third-party program, whether the file exists is checked in the hash cache table, if so, the file opening request is blocked, and repeated retry is carried out within three seconds until the file is opened successfully or the file is released after time out. And when the file is closed, detecting whether the file is closed by a malicious file detection engine, and if so, counting to 1 in the hash cache table.
It is to be understood that the recording of the path may be performed by other label recording algorithms that can achieve the same or similar functions besides the hash algorithm, and the embodiment is not limited thereto.
In this embodiment, a path cache process is performed on a file opened by a malicious file detection engine by monitoring an operation of the file, and for the file opened by a third-party file, if the malicious file detection engine is not closed, a blocking retry is performed within a time period until the malicious file detection engine closes the file or times out, so as to solve third-party software compatibility.
Further, before querying whether the file to be operated has the operation path table of the file detection engine, and obtaining a query result, the method further includes:
acquiring file operation information of the file detection engine; and generating an operation path table of the file detection engine according to the file operation information.
In this case, as long as the file detection engine performs a file opening operation, the file detection engine performs recording and generates an operation path table of the file detection engine, so as to implement tracking management on the file detection engine.
Further, after the step S40, the method further includes:
step S401, constructing identification information from the detection result by using a balanced binary tree, and storing the identification information and the detected file information in a cache region.
In this embodiment, the preset tag information is authenticated tag information, and no authentication is needed for an authenticated file, so that efficiency of malicious file detection is improved.
Step S402, obtaining the operation request of the detected file information, and judging whether the identification information corresponding to the file information detected in the operation request exists in the cache region.
Step S403, if there is identification information corresponding to the detected file information in the operation request in the cache region, responding to the operation request of the detected file information.
For the engine scan and return-driven authentication result, the file path or the file path hash is usually saved as a key by using a cache structure (streamcontext) provided by an operating system, because streamcontext is destroyed when no file is referenced, repeated opening of the same unmodified file may be performed for multiple times, thereby reducing efficiency. For this case, an authentication result is set by the unique identifier of the file, the authentication result is represented in the form of a Value, for example, Value is 0 or 1, where 0 represents that the authentication does not pass, 1 represents that the authentication passes, and the self-built balanced binary tree is cached by using FileId in the authentication result data as key, the cache is queried each time the file is opened, and the up-cast scanning is abandoned for the authenticated file.
According to the scheme provided by the embodiment, the identification information is constructed by adopting the balanced binary tree, the identification information of the identified files is not required to be identified, and the efficiency of malicious file detection is improved.
In addition, an embodiment of the present invention further provides a storage medium, where a file detection program is stored on the storage medium, and the file detection program, when executed by a processor, implements the steps of the terminal network access method described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
In addition, referring to fig. 9, an embodiment of the present invention further provides a file detection apparatus, where the file detection apparatus includes:
the obtaining module 10 is configured to obtain a current file operation request.
It should be noted that, the execution subject of the embodiment is a file detection device, and may also be other devices that can implement the same or similar functions.
In this embodiment, the minifilter file filtering framework refers to an interface framework provided by microsoft for file operation monitoring of a developer, and the developer can develop related file monitoring and filtering functionalization according to this framework, where the current file operation request can be obtained based on the minifilter file filtering framework monitoring, and the current file operation request is operation information of a user on the current file, where the operation information includes opening operation information of the file, change operation information of the file, closing operation information of the file, and the like, and may further include operation information in other forms, which is not limited in this embodiment.
The obtaining module 10 is further configured to obtain a file to be operated corresponding to the current file operation request if the request type of the current file operation request belongs to a preset type.
It should be noted that, in general, in order to consider security, the file is scanned in a full disk manner as long as the file is modified, so that the processing efficiency of the system is greatly reduced.
And the detection module 20 is configured to detect the file to be operated through a file detection engine to obtain a detection result.
It should be noted that, as shown in fig. 3, the overall flow diagram of malicious file detection is divided into an application layer and a driver layer, where the application layer includes a user using process, for example, a file operation from process a to the driver layer, and further includes a malicious file detection engine, where the malicious file detection engine is configured to detect whether a file is a malicious file, that is, perform file detection and return a detection result to a kernel file filtering driver module in the driver layer.
In this embodiment, the process a and the file operation generally refer to all processes of the system and the file operations performed by the processes, including opening a file, reading a file, writing a file, and the like, all of which are driven by a file kernel filter, the file kernel filter drives a module for monitoring the file operations of all processes of the operating system, and the file system filter module is developed based on a microsoft microfilter minifilter framework, and can select filter operations such as release, rejection, or redirection for the related file operations, the file detection engine is configured to analyze information such as a standard formatting path transmitted according to the file filter driver, and identify the black and white attributes of the file by a malicious file detection engine, and then return the engine to the file kernel filter driver, and release the file if the file is returned to non-black, add the path to a cache if the file is returned to black, for querying when the file is opened next time, and then returning to reject, wherein the returned white file is represented as a safe file, and the returned grey file is represented as an unknown or intermediate file, so that the detection of the malicious file is realized.
And the response module 30 is configured to transmit a corresponding operation instruction to the file system according to the detection result, and respond to the current file operation request through the file system.
It can be understood that the file system is a module of the operating system, the actual file operation implementation is realized here, and the process file operation behaviors released by the file kernel filter driver are all transmitted to the module, so that the operation on the file is realized.
According to the scheme, the current file operation request is obtained; if the request type of the current file operation request belongs to a preset type, acquiring a file to be operated corresponding to the current file operation request; detecting the file to be operated through a file detection engine to obtain a detection result; and transmitting a corresponding operation instruction to a file system according to the detection result, responding the current file operation request through the file system, analyzing according to the operation request, and actively detecting the malicious file according to the analysis result without overall scanning, thereby improving the detection efficiency of the malicious file.
The file detection device of the present invention adopts all the technical solutions of all the embodiments described above, so that at least all the beneficial effects brought by the technical solutions of the embodiments described above are achieved, and no further description is given here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order, but rather the words first, second, third, etc. are to be interpreted as names.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory, a RAM, a magnetic disk, and an optical disk), and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A file detection method is characterized by comprising the following steps:
acquiring a current file operation request;
if the request type of the current file operation request belongs to a preset type, acquiring a file to be operated corresponding to the current file operation request;
detecting the file to be operated through a file detection engine to obtain a detection result;
and transmitting a corresponding operation instruction to a file system according to the detection result, and responding to the current file operation request through the file system.
2. The file detection method of claim 1, wherein the current file operation request is an open file operation request;
before the file detection engine detects the file to be operated and obtains a detection result, the method further comprises:
and if the file to be operated is not the target file information, acquiring formatting standard path information of the file to be operated, and detecting the file to be operated according to the formatting standard path information to obtain a detection result.
3. The file detection method according to claim 1, wherein the current file operation request is a rewrite file operation request;
before the file detection engine detects the file to be operated and obtains a detection result, the method further comprises:
setting label records for the file to be operated;
and judging whether the set file to be operated is closed or not, and executing the step of detecting the file to be operated through the file detection engine according to the judgment result and the label record to obtain a detection result.
4. The file detection method according to claim 1, wherein the current file operation request is a close file operation request;
before the file detection engine detects the file to be operated and obtains a detection result, the method further comprises:
and judging whether the file to be operated has label information or not, and executing the step of detecting the file to be operated through the file detection engine according to a judgment result to obtain a detection result.
5. The file detection method according to any one of claims 1 to 4, wherein the detecting the file to be operated by the file detection engine to obtain a detection result comprises:
judging the operation type of the current file operation request;
inquiring whether the file to be operated has an operation path table of the file detection engine or not to obtain an inquiry result;
and detecting the file to be operated through a file detection engine according to the operation type and the query result to obtain a detection result.
6. The file detection method according to claim 5, wherein before querying whether the file to be operated has the operation path table of the file detection engine, the method further comprises:
acquiring file operation information of the file detection engine;
and generating an operation path table of the file detection engine according to the file operation information.
7. The file detection method according to any one of claims 1 to 4, wherein the corresponding operation instruction is transmitted to a file system according to the detection result, and after the current file operation request is responded to by the file system, the method further comprises:
constructing identification information by adopting a balanced binary tree for the detection result, and storing the identification information and the detected file information into a cache region;
acquiring an operation request of the detected file information, and judging whether authentication identification information corresponding to the detected file information in the operation request exists in the cache region;
and if the cache region has the identification information corresponding to the detected file information in the operation request, responding to the operation request of the detected file information.
8. A document sensing device, comprising: memory, a processor and a file detection program stored on the memory and running on the processor, the file detection program when executed by the processor implementing the steps of the file detection method according to any one of claims 1 to 7.
9. A storage medium having stored thereon a file detection program which, when executed by a processor, implements the steps of the file detection method according to any one of claims 1 to 7.
10. A document sensing device, comprising:
the acquisition module is used for acquiring a current file operation request;
the obtaining module is further configured to obtain a file to be operated corresponding to the current file operation request if the request type of the current file operation request belongs to a preset type;
the detection module is used for detecting the file to be operated through a file detection engine to obtain a detection result;
and the response module is used for transmitting a corresponding operation instruction to the file system according to the detection result and responding the current file operation request through the file system.
CN201911354487.2A 2019-12-24 2019-12-24 File detection method, equipment, storage medium and device Active CN111125701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911354487.2A CN111125701B (en) 2019-12-24 2019-12-24 File detection method, equipment, storage medium and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911354487.2A CN111125701B (en) 2019-12-24 2019-12-24 File detection method, equipment, storage medium and device

Publications (2)

Publication Number Publication Date
CN111125701A true CN111125701A (en) 2020-05-08
CN111125701B CN111125701B (en) 2022-04-29

Family

ID=70503259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911354487.2A Active CN111125701B (en) 2019-12-24 2019-12-24 File detection method, equipment, storage medium and device

Country Status (1)

Country Link
CN (1) CN111125701B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343241A (en) * 2021-07-20 2021-09-03 南京中孚信息技术有限公司 Dynamic label generation method based on online malicious software scanning platform

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010271963A (en) * 2009-05-22 2010-12-02 Hitachi Ltd Storage system with file change notification interface
CN103198253A (en) * 2013-03-29 2013-07-10 北京奇虎科技有限公司 Method and system of file operation
CN103810428A (en) * 2014-02-24 2014-05-21 珠海市君天电子科技有限公司 Method and device for detecting macro virus
CN107846381A (en) * 2016-09-18 2018-03-27 阿里巴巴集团控股有限公司 Network security processing method and equipment
CN109726547A (en) * 2019-01-28 2019-05-07 北京和利时工业软件有限公司 A kind of file executes management method and relevant apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010271963A (en) * 2009-05-22 2010-12-02 Hitachi Ltd Storage system with file change notification interface
CN103198253A (en) * 2013-03-29 2013-07-10 北京奇虎科技有限公司 Method and system of file operation
CN103810428A (en) * 2014-02-24 2014-05-21 珠海市君天电子科技有限公司 Method and device for detecting macro virus
CN107846381A (en) * 2016-09-18 2018-03-27 阿里巴巴集团控股有限公司 Network security processing method and equipment
CN109726547A (en) * 2019-01-28 2019-05-07 北京和利时工业软件有限公司 A kind of file executes management method and relevant apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113343241A (en) * 2021-07-20 2021-09-03 南京中孚信息技术有限公司 Dynamic label generation method based on online malicious software scanning platform

Also Published As

Publication number Publication date
CN111125701B (en) 2022-04-29

Similar Documents

Publication Publication Date Title
US10997294B2 (en) Deferred malware scanning
US9282112B2 (en) System and method for determining category of trust of applications performing interface overlay
CN109299135A (en) Abnormal inquiry recognition methods, identification equipment and medium based on identification model
US20140053267A1 (en) Method for identifying malicious executables
Zhao et al. Malicious executables classification based on behavioral factor analysis
US8640233B2 (en) Environmental imaging
US10216934B2 (en) Inferential exploit attempt detection
CN110837640B (en) Malicious file searching and killing method, device, storage medium and device
AU2006200224A1 (en) End user data activation
CN112351017B (en) Transverse penetration protection method, device, equipment and storage medium
CN110417718B (en) Method, device, equipment and storage medium for processing risk data in website
CN111460445A (en) Method and device for automatically identifying malicious degree of sample program
CN113132311A (en) Abnormal access detection method, device and equipment
GB2614426A (en) Enterprise network threat detection
CN112565278A (en) Attack capturing method and honeypot system
CN109800569A (en) Program identification method and device
KR101308866B1 (en) Open type system for analyzing and managing malicious code
CN111125701B (en) File detection method, equipment, storage medium and device
CN115442109A (en) Method, device, equipment and storage medium for determining network attack result
CN113569240B (en) Method, device and equipment for detecting malicious software
CN114707144A (en) Virtual machine escape behavior detection method and device
US11763004B1 (en) System and method for bootkit detection
RU2739833C1 (en) System and method for reducing load on malware detection service
CN112688944B (en) Local area network security state detection method, device, equipment and storage medium
CN111832024B (en) Big data security protection method and system

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
GR01 Patent grant
GR01 Patent grant