Fast policy query
By using event filters and Bloom filters to quickly filter file access events on user devices, combined with false positive cache optimization strategy database updates, the problem of query and update delay and power consumption in the file access monitoring service is solved, improving user experience and Malware defense capabilities.
Patent Information
- Application Number
- CN202280090042.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2024-09-03
AI Technical Summary
Existing file access monitoring services will cause increased system latency and power consumption when querying and updating security policies, affecting user experience, and making it difficult to defend against malware quickly and effectively.
By implementing event filters on user devices, heuristic filters and custom Bloom filters are used to quickly filter out irrelevant file access events, reducing expensive queries, and combined with false positive caching optimization strategies for database updates to ensure fast queries and security Policy updates.
It improves user experience, reduces memory usage and latency, enables fast query and policy updates, enhances defense capabilities against malware, and avoids monitoring interruptions during policy updates.
Smart Images

Figure CN118591802A
Abstract
Description
Technical Field
[0001] The present invention generally relates to a user device and an improved process for querying and updating security policies for file access monitoring. Background Art
[0002] To protect against malware, a file access monitoring service hosted on an electronic device can continuously monitor file system access by applications installed on the electronic device and perform actions required by a security policy installed on the mobile device. Such a policy can be updated periodically, for example, when a new application is installed, updated, or removed from the electronic device, or when new malware is detected.
[0003] For example, when an application needs to create, read, or write a specific file in the file system of an electronic device, this event can be captured by the file access monitoring service, which can then query the security policy to see if the operation is allowed and, if so, what other actions should be performed, such as emergency reporting. In order not to negatively impact the user experience of users using electronic devices, queries should be performed as quickly as possible. However, querying security policies can introduce delays to the system, which in turn affects the user experience. Similarly, policy updates typically take a long time and increase the power consumption of the device, which can negatively impact the user experience and / or application behavior. Summary of the invention
[0004] An object of the present invention is to provide a mechanism for quickly querying and updating file access policies on user equipment.
[0005] These and other objects are achieved by the features claimed in the independent claims.
[0006] Further implementations are apparent from the dependent claims, the description and the drawings.
[0007] The first aspect of the present invention provides a user device, the user device includes a processor, a memory coupled to the processor, the memory is used to store a first policy database including at least one policy rule, the memory is also used to store a program code executable by the processor, the program code includes one or more instructions, so that the user device: detects an event, the event has information associated with the event; determines whether to use a first set of filters to query the at least one policy rule for the detected event to determine whether the event should be processed based on the information associated with the detected event; determines whether detecting the event as a to-be-processed event includes a false alarm; queries the policy database to determine whether the information associated with the detected event matches the at least one policy rule. Therefore, the user device is able to filter out irrelevant events without expensive queries to reduce memory usage and latency, thereby improving the user experience when using the device.
[0008] Accordingly, by filtering out file access events that do not match a rule in the policy, queries can be performed quickly. Thus, queries can be performed before processing the policy using, for example, an exact membership query algorithm. This also makes it easier to reconfigure the operating system when policies change.
[0009] In an implementation of the first aspect, the event may include a file access event, the at least one policy rule may include at least one of a user ID, a path indicating a file and / or directory in the memory, an operation type, and an action to be performed by the user device based on the operation type; the information associated with the event may include at least one of a user ID and a path indicating a file and / or directory in the memory. Therefore, by monitoring access to the file system, the user device can more effectively defend against malware.
[0010] The first set of filters may include heuristic filters, so that events not managed by the policy can be quickly filtered out.
[0011] The first set of filters may include a custom Bloom filter, so that events not present in the policy can be quickly filtered out.
[0012] The program code may also include one or more instructions to cause the user device to: generate a hash value for the Bloom filter using a single pseudo-random function (PRF). In this way, the design of the filter can be simplified and the computational cost during data insertion and query can be reduced. In addition, hardware accelerators widely used in the instruction set architecture of modern CPUs can be utilized.
[0013] The program code may also include one or more instructions to enable the user device to query a false alarm cache to determine whether detecting the event as an event to be processed includes a false alarm. Therefore, the user device can more accurately determine whether an event should be processed.
[0014] The program code may also include one or more instructions to cause the user device to: in response to querying the policy database and determining that the information does not match the at least one policy rule, update the false positive cache by inserting the information associated with the event into the false positive cache. Thus, data items that will generate false positives can be efficiently learned and then safely ignored during queries.
[0015] The program code may also include one or more instructions to enable the user device to: receive a new policy and establish a second policy database based on the new policy, the second policy database including at least one updated policy rule; for each updated policy rule in the second policy database, query the first policy database to determine whether there is a policy rule including the same user ID and the same path in the first policy database. Therefore, the user device can efficiently and securely update the policy database without suspending the monitoring and interception of threats.
[0016] The program code may also include one or more instructions, so that the user device: in response to determining that the policy rule including the same user ID and the same path exists in the first policy database, verifies whether the operation type between the first policy database and the second policy database and the action to be performed by the user device based on the operation type are different. Therefore, protection against vulnerabilities can be improved.
[0017] The program code may also include one or more instructions, so that the user device: in response to determining that the policy rule including the same user ID and the same path does not exist in the first policy database, starts monitoring the user ID and the path associated with the policy rule that does not exist in the first policy database. Therefore, new rules can be added quickly and efficiently.
[0018] The program code may also include one or more instructions, so that the user device: for each policy rule in the first policy database, query the second policy database to determine whether there is a policy rule including the same user ID and the same path in the second policy database; in response to determining that the policy rule including the same user ID and the same path does not exist in the second policy database, stop monitoring the user ID and the path associated with the policy rule that does not exist in the second policy database. Therefore, rules that are no longer applicable can be safely and effectively deleted.
[0019] The second aspect of the present invention provides a machine-readable storage medium encoded with instructions for regulating file access events of a device, the instructions being executable by a processor of the device so that the device: detects an event having information associated with the event; determines whether to query the at least one policy rule for the detected event using a first set of filters to determine whether the event should be processed based on the information associated with the detected event; determines whether detecting the event as a to-be-processed event includes a false positive; queries the policy database to determine whether the information associated with the detected event matches the at least one policy rule. Thus, the instructions enable the device to filter out irrelevant events without performing expensive queries to reduce memory usage and latency, thereby improving the user experience when using the device.
[0020] The event may include a file access event, the at least one policy rule may include at least one of a user ID, a path indicating a file and / or directory in the memory, an operation type, and an action to be performed by the user device based on the operation type; the information associated with the event may include at least one of a user ID and a path indicating a file and / or directory in the memory. Therefore, by monitoring access to the file system, malware can be more effectively defended.
[0021] The first set of filters may include heuristic filters, so that events not managed by the policy can be quickly filtered out.
[0022] The first set of filters may include a custom Bloom filter, so that events not present in the policy can be quickly filtered out.
[0023] The machine-readable storage medium may also include instructions executable by the processor of the device, so that the device: generates a hash value for the Bloom filter using a single pseudo-random function (PRF). In this way, the design of the filter can be simplified and the computational cost during data insertion and query can be reduced. In addition, hardware accelerators widely used in the instruction set architecture of modern CPUs can be utilized.
[0024] The machine-readable storage medium may also include instructions executable by the processor of the device, so that the device: queries a false positive cache to determine whether detecting the event as an event to be processed includes a false positive. Therefore, it can be more accurately determined whether an event should be processed.
[0025] The machine-readable storage medium may also include instructions executable by the processor of the device, thereby causing the device to: in response to querying the policy database and determining that the information does not match the at least one policy rule, update the false positive cache by inserting the information associated with the event into the false positive cache. Thus, data items that will generate false positives can be efficiently learned and then safely ignored during queries.
[0026] The machine-readable storage medium may also include instructions executable by the processor of the device, so that the device: receives a new policy and establishes a second policy database based on the new policy, the second policy database including at least one updated policy rule; for each updated policy rule in the second policy database, queries the first policy database to determine whether there is a policy rule including the same user ID and the same path in the first policy database. Therefore, the policy database can be updated efficiently and securely without suspending the monitoring and interception of threats.
[0027] The machine-readable storage medium may also include instructions executable by the processor of the device, so that the device: in response to determining that the policy rule including the same user ID and the same path exists in the first policy database, verify whether the operation type and the action to be performed by the user device based on the operation type are different between the first policy database and the second policy database. Therefore, protection against vulnerabilities can be improved.
[0028] The machine-readable storage medium may also include instructions executable by the processor of the device, so that the device: in response to determining that the policy rule including the same user ID and the same path does not exist in the first policy database, starts monitoring the user ID and the path. Therefore, new rules can be added quickly and efficiently.
[0029] The machine-readable storage medium may also include instructions executable by the processor of the device, so that the device: for each policy rule in the first policy database, query the second policy database to determine whether there is a policy rule including the same user ID and the same path in the second policy database; in response to determining that the policy rule including the same user ID and the same path does not exist in the second policy database, stop monitoring the user ID and the path associated with the policy rule that does not exist in the second policy database. Therefore, rules that are no longer applicable can be safely and effectively deleted.
[0030] A third aspect of the present invention provides a file access monitor for: detecting an event, the event having information associated with the event; determining whether to query a policy rule for the detected event using a first set of filters to determine whether the event should be processed based on the information associated with the detected event; determining whether detecting the event as a pending event includes a false positive; querying a policy database to determine whether the information associated with the detected event matches at least one policy rule. Thus, a system service can be provided to filter out irrelevant events without expensive queries, thereby reducing memory usage and latency, thereby improving user experience.
[0031] The file access monitor is hosted on the user device. Therefore, the file access monitor can be set on an existing consumer device (such as a smart phone). BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Embodiments will now be described, by way of example only, with reference to the accompanying drawings, in which:
[0033] Figure 1 A user equipment provided by an exemplary embodiment is schematically described;
[0034] Figure 2 A method for querying a policy database provided by an exemplary embodiment is schematically described;
[0035] Figure 3 A method for querying a policy database provided by an exemplary embodiment is schematically described;
[0036] Figure 4 A method for updating a policy database provided by an exemplary embodiment is schematically described;
[0037] Figure 5 A file access monitor provided by an exemplary embodiment is schematically described. DETAILED DESCRIPTION
[0038] The exemplary embodiments are described below in sufficient detail to enable one of ordinary skill in the art to implement and practice the systems and processes described herein.It is important to understand that the embodiments may be provided in many alternative forms and should not be construed as limited to only the examples described herein.
[0039] Therefore, although the embodiments may be modified in various ways and take various alternative forms, specific embodiments thereof are shown in the drawings and described in detail below as examples. It is not intended to be limited to the specific forms disclosed. On the contrary, all modifications, equivalents and alternatives within the scope of the appended claims should be included. In all drawings and appropriate specific embodiments, the elements of the exemplary embodiments are consistently represented by the same reference numerals.
[0040] The terms used herein to describe the embodiments are not intended to limit the scope. "One" and "the" are singular because they have only one referent, but the use of the singular form in this document should not exclude the presence of multiple referents. In other words, unless the context clearly indicates otherwise, the elements mentioned in the singular form can be one or more in number. It should also be understood that the term "comprising" used herein indicates the presence of the features, items, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, items, steps, operations, elements, components and / or combinations thereof.
[0041] Unless otherwise defined, all terms (including technical and scientific terms) used in this article should be interpreted as customary usage in the art. It should also be understood that unless explicitly defined in this article, terms in common usage should also be interpreted as customary usage in the relevant art, and should not be interpreted as idealized or overly formal meanings.
[0042] Querying a strategy database is a specific type of membership query problem, i.e. checking for membership in a set of data. Starting with a set of data items S, it is desirable to devise a way of storing the data items so that when a new data item D is received, it can be determined whether the data item D exists in the set S. Typically, it is desirable to minimize the amount of time required to make the determination, to reduce the amount of storage space required, thereby reducing the amount of software code required to perform the determination, and / or to minimize the probability of error.
[0043] Membership queries can be implemented in a number of different ways. One way is to implement membership queries by storing all data items in the target set S in an array or list and searching for data item D by comparing D with all elements in the array or list until a match is found or until all elements are compared. However, the disadvantage of using this approach is that the query speed is slow, especially when the number of data items D in the target set S is large.
[0044] Alternatively, a hash table can be used, where the data items D in the target set S are stored in a table indexed by the hash value of the data item D. To search for a data item D, the hash value of D must first be calculated. The hash value is then used as an index to find the corresponding location in the table. However, special care must be taken to handle scenarios where two or more different data items D in the set S generate the same hash value. In this case, a new location must be found or added for the data item D whose hash value conflicts with the data item D already inserted into the table. In the worst scenario, all data items D in the data set S may have the same hash value, causing the algorithm to execute in the same manner as a simple array / list search. Another disadvantage of using this approach is the increased complexity of the algorithm used for membership queries and the impact on performance.
[0045] Although the above-mentioned membership query methods have relatively low error probabilities, these methods suffer from high memory usage, high latency, or both, thereby impairing the performance of electronic devices.
[0046] Membership queries can also be implemented as approximate search algorithms, such as Bloom filters. A Bloom filter is an m-bit array A with an initial value of 0 and k hash functions h1, h2, ..., h k To insert an element x into the filter, k hash values are calculated according to the hash function, used as indices into the array, and the corresponding bits are set to 1. To determine whether an element w has been previously inserted into the filter, the hash value w is calculated in the above manner, and the values of the bits are checked to determine whether they have a value of 0 or 1. Therefore, a query requires calculating k hash values and checking k positions in an array of fixed size, so the query is relatively fast.
[0047] However, approximate search algorithms have a certain error rate when answering membership queries. Specifically, Bloom filters are prone to returning false positives, that is, reporting that there are elements y in the data set that are not inserted into the filter.
[0048] Typically, there is no mechanism that can query data structures in a fast manner without affecting the error rate.
[0049] According to the present invention, it has been recognized that the problems associated with existing methods can be solved in a fast and efficient manner. Specifically, the present invention provides a mechanism for quickly querying and updating file access policies on consumer computing devices. More specifically, various aspects relate to a mechanism for performing a fast query by quickly filtering out file access events that do not have a matching rule in the file access policy before actually querying the policy.
[0050] Examples in the present invention may be provided as methods, systems or machine-readable instructions, such as any combination of software, hardware, firmware, etc. Such machine-readable instructions may be included in a computer-readable storage medium (including but not limited to disk storage, CD-ROM, optical storage, etc.) having a computer-readable program code therein or thereon.
[0051] The present invention is described in conjunction with the flowcharts and / or block diagrams of the methods, devices and systems provided by the examples of the present invention. Although the above flowcharts show a specific execution order, the execution order may be different from that described. The blocks described in conjunction with one flowchart can be combined with the blocks described in conjunction with another flowchart. In some examples, some blocks of the flowchart may not be necessary and / or additional blocks may be added. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of the processes and / or diagrams in the flowchart and / or block diagram can be implemented by the machine-readable instructions.
[0052] For example, machine-readable instructions can be executed by a processor of a machine such as a general-purpose computer, a user device such as a smart device (such as a smart phone), a special-purpose computer, an embedded processor, or other programmable data processing device to implement the functions described in the specification and the drawings. Specifically, a processor or a processing device can execute the machine-readable instructions. Therefore, a module of a device (for example, a module that implements a file access monitor) can be implemented by a processor that executes machine-readable instructions stored in a memory or a processor that runs according to instructions of an embedded logic circuit. The term "processor" should be broadly interpreted to include a CPU, a processing unit, an ASIC, a logic unit, or a programmable gate group, etc. Both the method and the module can be executed by a single processor or divided between several processors.
[0053] Such machine-readable instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a particular mode. For example, the instructions may be provided in a non-transitory computer-readable storage medium encoded with instructions that may be executed by a processor.
[0054] Figure 1 A user equipment in the form of a user device provided by an exemplary embodiment is schematically described. The user device 100 may be, for example, a consumer computing device such as a mobile phone or a tablet, a network device or a part thereof. The system 100 includes a processor 103 and a memory 105, which is coupled to the processor 103 and is used to store instructions or program codes 107 that can be executed by the processor 103. The memory 105 is also used to store a first policy database 111 including at least one policy rule 113. The memory 105 can also be used to store a first set of filters 109 to be used by the user device 100.
[0055] Processor 103 may include any type of electronic data processor. Memory 105 may include any type of non-transient system memory, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), read-only memory (ROM), or a combination thereof. In one embodiment, memory 105 may include ROM used at boot time and DRAM used to store programs and data when executing programs.
[0056] At least one policy rule 113 may include a user ID, a path ID indicating a specific file and / or directory in the memory 105, an operation type (e.g., read or write), and at least one of the actions to be performed by the user device 100 based on the operation type. In one example, when a specified user or process attempts to perform one of the specified operations on the file and / or directory specified by the path, one or more actions may need to be performed. In some mobile operating systems (such as Android), a user ID is typically assigned to an application during application installation. Therefore, the user ID may include an application ID.
[0057] Therefore, the user device 100 can implement the method for querying the policy database by the following operations: accessing the program code 107 executable by the processor 103 from the memory 105 of the user device 100, the program code including one or more instructions, so that the user device 100: detects an event, the event having information associated with the event; determines whether to query at least one policy rule 113 for the detected event using the first set of filters 109 to determine whether the event should be processed based on the information associated with the detected event; determines whether detecting the event as a to-be-processed event includes affirmation; and queries the first policy database 111 to determine whether the information associated with the detected event matches the at least one policy rule 113. Therefore, irrelevant events can be filtered out before querying, thereby improving the performance of the user device 100.
[0058] The events detected by the user device 100 may include file access events. For example, such file access events may be detected in response to an application attempting to create, read, or write a particular file in the file system of the user device 100. Information associated with the event may include at least one of a user ID (e.g., an application ID) and a path indicating a file and / or directory in the memory 105 that the application attempted to access.
[0059] Querying policy database 111 to determine whether information associated with a detected event matches at least one policy rule 113 may include checking whether a user ID and / or path associated with the event matches a user ID and / or path included in at least one policy rule 113. If a match is found, user device 100 may perform an action specified in the policy rule. Such actions may range from enabling file access to an incident report to alerting user device 100 of a potential exploit / vulnerability.
[0060] The first set of filters 109 may include heuristic filters. In this case, determining whether to query at least one policy rule 113 for the detected event using the first set of filters 109 may include: checking the heuristic rule. For example, the user ID may be compared to a known value that should be ignored, or the path ID may be compared to a known pattern. In one example, the user ID may be compared to a predefined whitelist of high-privileged users and applications to determine whether user / application file access is supported. In addition, since malware code often appears in the form of shared libraries (having, for example, an extension of ".so"), compiled Java bytecode (having an extension of ".jar" or ".dex"), heuristic filters can be used to filter out file access events where the path ID does not end with a specific pattern representing an extension.
[0061] Additionally or alternatively, the first set of filters 109 may include a custom Bloom filter, or any other approximate membership query algorithm with only a false positive probability. In this case, information associated with the event (e.g., user ID and path ID) can be used to query a Bloom filter that has been configured with information indicating or corresponding to at least one policy rule 113. Specifically, in order to determine whether to query at least one policy rule 113 for a detected event, the result of querying the Bloom filter can be used. For example, a negative result can indicate that the event does not correspond to at least one policy rule 113 in the first policy database 111, thereby supporting ignoring the event without actually querying the first policy database 111. Therefore, a positive result can indicate that the event corresponds to at least one policy rule 113 in the first policy database 111, unless the result is a false positive.
[0062] Typical Bloom filters (including their variants) need to calculate k hash functions for data insertion and query. The computational cost required to calculate the hash function can be reduced by the following operations: using a smaller k, thereby reducing the number of hash calculations, or using a simpler hash algorithm so that each hash calculation requires less time. However, the smaller the value of k, the higher the probability of false positives, and the simple hash algorithm may result in insufficient randomness of the hash value. Advantageously, the program code 107 may include one or more instructions so that the user device 100 generates a hash value for the Bloom filter using a single pseudo-random function (PRF). The function can be reused until enough data is generated to provide k hash values. In one example, the output of the pseudo-random function is retained and reused by the first set of filters 109 or a different set of filters.
[0063] In order to solve the false alarm scenario, the program code 107 executable by the processor 103 includes one or more instructions, so that the user device 100 determines whether the event detected as a pending event (i.e., an event in response to which the first policy database 111 should be queried) includes a false alarm. This determination can be made by querying a false alarm cache. The false alarm cache can be stored in the memory 105. Compared with the first group of filters 109 having only false alarms described above, the false alarm cache can be, for example, an approximate search algorithm having only false alarms. In one example, if the result of querying the false alarm cache is positive, the event can be ignored. Therefore, if the result is negative, the first policy database 111 can be queried.
[0064] In one example, in response to querying the policy database 111 and determining that the information associated with the event does not match at least one policy rule 113, the program code 107 may include one or more instructions to cause the user device 100 to: update the false positive cache by inserting the information associated with the event into the false positive cache. Inserting a new element X into the false positive cache can be performed by the user device 100 by placing the hash value of X (already calculated by the Bloom filter) at the index determined by the hash value in the fixed size array to replace the previous element at the same index. Querying element Y can be performed by checking whether element Y exists in the array at the index determined by the hash value of Y (also calculated by the Bloom filter). Therefore, data items that generate false positives in the Bloom filter can be efficiently learned so that they can be safely ignored during queries without increasing the complexity of the calculations that need to be performed by the user device 100.
[0065] Importantly, the user device 100 is not only able to implement fast policy queries by filtering out irrelevant events, but also facilitates a fast and secure mechanism for updating the policy database. From a security perspective, it is highly undesirable to temporarily stop monitoring and intercepting all file access events in order to update the policy database. This approach will miss some file access events that should be intercepted, thereby exposing the user device 100 to unnecessary risks. In addition, it is not feasible to prohibit access to all paths for all files during policy updates, as this will result in unacceptable performance losses.
[0066] To solve this problem, the program mode may further include one or more instructions so that the user device 100 receives the new policy and establishes a second policy database 115 based on the new policy. The second policy database 115 may be stored in the memory 105 of the user device 100. The second policy database 115 may include at least one updated policy rule 117. For each updated policy rule 117 in the second policy database 115, the user device 100 may query the first policy database 111 to determine whether there is a policy rule including the same user ID and the same path ID in the first policy database 111. In other words, the user device 100 may check whether the at least one updated policy rule 117 corresponds to the at least one policy rule 113.
[0067] In response to determining that at least one policy rule including the same user ID and the same path ID exists in the first policy database 111, the user device may verify whether the operation type and the action to be performed by the user device based on the operation type are different between the first policy database 111 and the second policy database 115. Therefore, if necessary, the user device 100 may reconfigure its operating system.
[0068] In response to determining that at least one policy rule including the same user ID and the same path ID does not exist in the first policy database 111, the user device 100 may begin monitoring the user ID and path ID associated with the policy rule that does not exist in the first policy database 111. In other words, if at least one updated policy rule 11 does not exist in the first policy database 111 (i.e., it only exists in the second policy database 115), the user device 100 may begin monitoring access events related to the user ID and path ID (associated with the rule).
[0069] For each policy rule 113 in the first policy database 111, the user device 100 can query the second policy database 115 to determine whether there is a policy rule including the same user ID and the same path in the second policy database 115. In response to determining that there is no policy rule including the same user ID and the same path in the second policy database 115, the user device 100 can stop monitoring the user ID and path associated with the policy rule that does not exist in the second policy database. That is, the user device 100 can process the second policy database 115 to identify the rules that are in the old policy but not in the new policy. Then, the user device 100 can reconfigure the operating system to stop monitoring the user ID and path defined in the rule that needs to be deleted.
[0070] Advantageously, the above-described policy update process eliminates the need to stop or pause monitoring of the file system during an update, as reconfiguration is only performed when a difference between the old and new policies is found, thereby minimizing security threats and not affecting the user experience.
[0071] Figure 2 A method for querying a first policy database provided by an exemplary embodiment is schematically described. In box 201, during normal execution of program code 107 by user device 100, an event is detected, and the event has information associated with the event. In box 203, it is determined whether to query at least one policy rule 113 for the detected event using the first set of filters 109 to determine whether the event should be processed based on the information associated with the detected event. In box 205, it is determined whether detecting the event as a to-be-processed event includes a false positive. In box 207, the policy database 111 is queried to determine whether the information associated with the event matches at least one policy rule 113.
[0072] Figure 3A method for querying a policy database provided by an exemplary embodiment is schematically described. In box 301, during the normal execution of program code 107 by user device 100, an event is detected, and the event has information associated with the event. In box 303, a heuristic filter is applied to determine whether the event should be ignored. If the event should be ignored, the method ends here, and the user device 100 continues to execute program code 107 normally. In box 305, a custom Bloom filter is applied. In other words, the information associated with the event is used to query the Bloom filter that has been set using information about or corresponding to at least one policy rule 113. If the result of the query is negative, the method ends here, and the user device 100 continues to execute program code 107 normally. Otherwise, in box 307, a false positive cache is queried to check whether the event is a known false positive of the Bloom filter. If the result of the query is positive, the method ends here, and the user device 100 continues to execute program code 107 normally. Otherwise, in box 309, a first policy database 111 is queried to determine whether the information associated with the event corresponds to at least one policy rule 113. If the result of the query is negative, the false positive cache is updated by inserting information associated with the event into the cache. If the result of the query is positive, the user device 100 performs an action according to the at least one policy rule 113 .
[0073] Figure 4 A method for updating a policy database provided by an exemplary embodiment is schematically described. In box 401, a new policy may be received during normal execution of program code 107 by user device 100. In box 403, user device 100 may construct a second policy database 115 based on the received new policy, and second policy database 115 includes at least one updated policy rule 117. In box 405, for each updated policy rule 117 in the second policy database 115, user device 100 may query the first policy database 111 to determine whether there is a policy rule including the same user ID and the same path ID in the first policy database 111.
[0074] If such a rule exists in the first policy database 111, then in block 407, the user device 100 may verify whether the operation type and the action to be performed by the user device 100 based on the operation type are different between the first policy database 111 and the second policy database 115. If such a rule does not exist in the first policy database 111, then in block 409, the user device 100 may start monitoring the user ID and path ID associated with the policy rule that does not exist in the first policy database 111.
[0075] Figure 5The file access monitor provided by an exemplary embodiment is schematically described. The file access monitor 501 may be hosted on the user device 500. The file access monitor 501 may be considered as a system service running on an operating system hosted on the user device 500. The user device 500 may be equivalent to Figure 1 The user equipment 100. Figure 5 In the example, the file access monitor 501 is used to: detect an event having information associated with the event; determine whether to use a first set of filters to query policy rules for the detected event to determine whether the event should be processed based on the information associated with the detected event; determine whether detecting the event as a to-be-processed event includes a false alarm; and query a policy database to determine whether the information associated with the detected event matches at least one policy rule.
[0076] According to one embodiment, the machine-readable instructions may also be loaded onto a computer or other programmable data processing device so that the computer or other programmable data processing device performs a series of operations to generate computer-implemented processing instructions, so that the instructions executed on the computer or other programmable device will provide operations for implementing the functions specified by the processes in the flowchart and / or the boxes in the block diagram.
[0077] Furthermore, the teachings herein may be implemented in the form of a computer or software product, such as a non-transitory machine-readable storage medium, in which the computer software or product is stored and includes a plurality of instructions, such as machine-readable instructions, that enable a computer device to implement the method described in the examples of the present invention.
[0078] In some examples, certain methods may be performed in a cloud computing or network-based environment. A cloud computing environment may provide various services and applications over the Internet. These cloud-based services (e.g., software as a service, platform as a service, infrastructure as a service, etc.) may be accessed, for example, through a web browser or other remote interface of a user's equipment. The various functions described herein may be provided through a remote desktop environment or any other cloud-based computing environment.
[0079] Although various embodiments are described and / or illustrated herein in the context of a fully functional computing system, one or more of these exemplary embodiments may be published as a program product in various forms, regardless of the specific type of computer-readable storage medium used to actually perform the publication. The embodiments disclosed herein may also be implemented using software modules that perform some specific tasks. These software modules may include scripts, batch processing, or other executable files that may be stored on a computer-readable storage medium or in a computing system. In some embodiments, these software modules may configure a computing system to perform one or more exemplary embodiments disclosed herein. In addition, one or more modules described herein may convert a representation of data, a physical device, and / or a physical device from one form to another.
[0080] The above description is provided to enable those skilled in the art to best utilize the various aspects of the exemplary embodiments disclosed herein. This exemplary description is not intended to ensure exhaustiveness or to limit the invention to the precise form disclosed. Various modifications and changes may be made without departing from the spirit and scope of the invention. The embodiments disclosed herein should be considered in all respects to be illustrative and not restrictive. In determining the scope of the invention, reference should be made to the appended claims and their equivalents.
Claims
1. A user equipment, characterized in that: include: processor; a memory coupled to the processor, the memory for storing a first policy database including at least one policy rule; The memory is further configured to store a program code executable by the processor, wherein the program code includes one or more instructions, so that the user equipment: detecting an event, the event having information associated with the event; determining whether to query the at least one policy rule for the detected event using a first set of filter queries to determine whether the event should be processed based on the information associated with the detected event; determining whether detecting the event as a pending event includes a false positive; The policy database is queried to determine whether the information associated with the detected event matches the at least one policy rule.
2. The user equipment according to claim 1, characterized in that The events include file access events, The at least one policy rule includes at least one of a user ID, a path indicating a file and / or directory in the memory, an operation type, and an action to be performed by the user device based on the operation type; The information associated with the event includes at least one of a user ID and a path indicating a file and / or directory in the memory.
3. The user equipment according to claim 1 or 2, characterized in that: The first set of filters includes heuristic filters.
4. The user equipment according to claim 1, 2 or 3, characterized in that: The first set of filters includes custom Bloom filters.
5. The user equipment according to claim 4, characterized in that The program code also includes one or more instructions, so that the user device: A single pseudo-random function (PRF) is used to generate a hash value for the Bloom filter.
6. The user equipment according to any one of the preceding claims, characterized in that: The program code also includes one or more instructions, so that the user device: A false positive cache is queried to determine whether detecting the event as a pending event includes a false positive.
7. The user equipment according to claim 6, characterized in that The program code also includes one or more instructions, so that the user device: In response to querying the policy database and determining that the information does not match the at least one policy rule, updating the false positive cache by inserting the information associated with the event into the false positive cache.
8. The user equipment according to any one of the preceding claims, characterized in that: The program code also includes one or more instructions, so that the user device: receiving a new policy, and establishing a second policy database based on the new policy, the second policy database including at least one updated policy rule; For each updated policy rule in the second policy database, the first policy database is queried to determine whether there is a policy rule in the first policy database that includes the same user ID and the same path.
9. The user equipment according to claim 8, characterized in that The program code also includes one or more instructions, so that the user device: In response to determining that the policy rule including the same user ID and the same path exists in the first policy database, verify whether the operation type and the action to be performed by the user device based on the operation type are different between the first policy database and the second policy database.
10. The user equipment according to claim 8 or 9, characterized in that: The program code also includes one or more instructions, so that the user device: In response to determining that the policy rule including the same user ID and the same path does not exist in the first policy database, monitoring the user ID and the path associated with the policy rule that does not exist in the first policy database is initiated.
11. The user equipment according to any one of claims 8 to 10, characterized in that: The program code also includes one or more instructions, so that the user device: For each policy rule in the first policy database, query the second policy database to determine whether there is a policy rule including the same user ID and the same path in the second policy database; In response to determining that the policy rule including the same user ID and the same path does not exist in the second policy database, monitoring the user ID and the path associated with the policy rule that does not exist in the second policy database is stopped.
12. A machine-readable storage medium, characterized in that: encoded with instructions for regulating file access events of a device, the instructions being executable by a processor of the device such that the device: detecting an event, the event having information associated with the event; determining whether to query the at least one policy rule for the detected event using a first set of filter queries to determine whether the event should be processed based on the information associated with the detected event; determining whether detecting the event as a pending event includes a false positive; The policy database is queried to determine whether the information associated with the detected event matches the at least one policy rule.
13. The machine-readable storage medium according to claim 12, wherein: The events include file access events, The at least one policy rule includes at least one of a user ID, a path indicating a file and / or directory in the memory, an operation type, and an action to be performed by the user device based on the operation type; The information associated with the event includes at least one of a user ID and a path indicating a file and / or directory in the memory.
14. The machine-readable storage medium according to claim 12 or 13, characterized in that: The first set of filters includes heuristic filters.
15. The machine-readable storage medium according to claim 12, 13 or 14, characterized in that: The first set of filters includes custom Bloom filters.
16. The machine-readable storage medium according to claim 15, wherein: Also included are instructions executable by the processor of the device, causing the device to: A single pseudo-random function (PRF) is used to generate a hash value for the Bloom filter.
17. The machine-readable storage medium according to any one of claims 12 to 16, characterized in that: Also included are instructions executable by the processor of the device, causing the device to: A false positive cache is queried to determine whether detecting the event as a pending event includes a false positive.
18. The machine-readable storage medium according to claim 17, wherein: Also included are instructions executable by the processor of the device, causing the device to: In response to querying the policy database and determining that the information does not match the at least one policy rule, updating the false positive cache by inserting the information associated with the event into the false positive cache.
19. The machine-readable storage medium according to any one of claims 12 to 18, characterized in that: Also included are instructions executable by the processor of the device, causing the device to: receiving a new policy, and establishing a second policy database based on the new policy, the second policy database including at least one updated policy rule; For each updated policy rule in the second policy database, the first policy database is queried to determine whether there is a policy rule in the first policy database that includes the same user ID and the same path.
20. The machine-readable storage medium according to claim 19, wherein: Also included are instructions executable by the processor of the device, causing the device to: In response to determining that the policy rule including the same user ID and the same path exists in the first policy database, verify whether the operation type and the action to be performed by the user device based on the operation type are different between the first policy database and the second policy database.
21. The machine-readable storage medium according to claim 19 or 20, characterized in that: Also included are instructions executable by the processor of the device, causing the device to: In response to determining that the policy rule including the same user ID and the same path does not exist in the first policy database, monitoring of the user ID and the path begins.
22. The machine-readable storage medium according to any one of claims 19 to 21, characterized in that: Also included are instructions executable by the processor of the device, causing the device to: For each policy rule in the first policy database, query the second policy database to determine whether there is a policy rule including the same user ID and the same path in the second policy database; In response to determining that the policy rule including the same user ID and the same path does not exist in the second policy database, monitoring the user ID and the path associated with the policy rule that does not exist in the second policy database is stopped.
23. A file access monitor, characterized in that: Used for: detecting an event, the event having information associated with the event; determining whether to query a policy rule for the detected event using a first set of filters to determine whether the event should be processed based on the information associated with the detected event; determining whether detecting the event as a pending event includes a false positive; A policy database is queried to determine whether the information associated with the detected event matches the at least one policy rule.
24. The file access monitor according to claim 24, characterized in that: The file access monitor is hosted on the user device.
