WO2020132877A1 - 一种操作检测方法、系统及电子设备 - Google Patents

一种操作检测方法、系统及电子设备 Download PDF

Info

Publication number
WO2020132877A1
WO2020132877A1 PCT/CN2018/123535 CN2018123535W WO2020132877A1 WO 2020132877 A1 WO2020132877 A1 WO 2020132877A1 CN 2018123535 W CN2018123535 W CN 2018123535W WO 2020132877 A1 WO2020132877 A1 WO 2020132877A1
Authority
WO
WIPO (PCT)
Prior art keywords
execution subject
permission set
execution
state
operation state
Prior art date
Application number
PCT/CN2018/123535
Other languages
English (en)
French (fr)
Inventor
徐贵斌
Original Assignee
奇安信安全技术(珠海)有限公司
奇安信科技集团股份有限公司
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 奇安信安全技术(珠海)有限公司, 奇安信科技集团股份有限公司 filed Critical 奇安信安全技术(珠海)有限公司
Priority to PCT/CN2018/123535 priority Critical patent/WO2020132877A1/zh
Publication of WO2020132877A1 publication Critical patent/WO2020132877A1/zh

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/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities

Definitions

  • the present disclosure belongs to the field of network security, and specifically relates to an operation detection method, system and electronic equipment.
  • An aspect of the present disclosure provides an operation detection method, including: S1, before performing a specific operation, obtaining an execution subject performing the specific operation; S2, judging whether the execution subject has performed the specific operation according to the first set of permissions If not, execute operation S3; S3, obtain the operation state of the execution subject, and obtain the corresponding second permission set according to the operation state of the execution subject; S4, determine the execution subject according to the second permission set Whether it has the authority to perform the specific operation, if yes, perform operation S5, and if not, process the execution subject; S5, obtain a task including the specific operation, the task corresponds to an operation flow to perform at least one operation S6, judging whether the operation flow satisfies the preset operation flow, and if not, processing the execution body.
  • step S6 determining whether the operation flow satisfies the preset operation flow includes: obtaining at least one operation corresponding to the operation flow; determining whether each operation in the at least one operation is consistent with the preset The corresponding operations in the operation flow are consistent.
  • the judging whether each operation in the at least one operation is consistent with the corresponding operation in the preset operation flow includes: judging whether the execution subject of each operation in the at least one operation is consistent with the preset operation The execution body of the operation corresponding to the process is consistent.
  • step S1 it further includes: S0, creating a first permission set, where the first permission set includes operation permissions of at least one execution subject in any operation state.
  • the method further includes: S0', creating at least one second permission set, wherein each second permission set corresponds to an operation state of an execution subject, and each of the The second set of rights includes the operation rights of the corresponding execution subject in the corresponding operation state.
  • the at least one second permission set is stored at the remote end, and in step S3, acquiring the corresponding second permission set according to the operating state of the execution subject includes: sending a request to the remote end, the request includes The execution subject information and its operation status; obtaining a second permission set sent by the remote end, where the second permission set is returned by the remote end in response to the request.
  • step S3 acquiring the operation state of the execution subject includes at least: determining the operation state of the execution subject according to the calling mode of the execution subject, where the execution subject is directly called by the user, It is determined that the operation state of the execution body is the first operation state, and when the execution body is called by another execution body, it is determined that the operation state of the execution body is the second operation state.
  • an operation detection system including: a first acquisition module for acquiring an execution subject performing a specific operation before performing a specific operation; a first determination module for determining based on a first set of permissions Whether the execution subject has the authority to perform the specific operation, if not, the second acquisition module is executed; the second acquisition module is used to acquire the operation state of the execution subject, and obtain the corresponding according to the operation state of the execution subject A second set of permissions; a second judgment module, used to determine whether the execution subject has the permission to perform the specific operation according to the second set of permissions, if so, execute the third acquisition module, and if not, perform the execution on the subject Processing; the third obtaining module is used to obtain the task including the specific operation, and the task corresponds to an operation flow for performing at least one operation; the third judgment module is used to judge whether the operation flow satisfies the preset operation flow, if If not, the execution subject is processed.
  • determining whether the operation flow satisfies the preset operation flow includes: acquiring at least one operation corresponding to the operation flow; determining whether each operation in the at least one operation is different from the operation The corresponding operations in the preset operation flow are consistent.
  • the third determination module determines whether each operation in the at least one operation is consistent with the corresponding operation in the preset operation flow, including: determining whether the execution subject of each operation in the at least one operation is It is assumed that the execution body of the operation corresponding to the operation flow is consistent.
  • the operation detection system further includes: a first creation module, configured to create a first set of permissions, the first set of permissions includes operation permissions of at least one execution subject in any operation state.
  • a first creation module configured to create a first set of permissions, the first set of permissions includes operation permissions of at least one execution subject in any operation state.
  • the operation detection system further includes: a second creation module for creating at least one second permission set, wherein each second permission set corresponds to an operating state of an execution subject, and each The second permission set includes the operation permission of the corresponding execution subject in the corresponding operation state.
  • a second creation module for creating at least one second permission set, wherein each second permission set corresponds to an operating state of an execution subject, and each The second permission set includes the operation permission of the corresponding execution subject in the corresponding operation state.
  • At least one second permission set is stored at the remote end, and the second acquiring module acquiring the corresponding second permission set according to the operating state of the execution subject includes: sending a request to the remote end, the request including the Execution subject information and its operation status; obtaining a second permission set sent by the remote end, where the second permission set is returned by the remote end in response to the request.
  • the second acquiring module acquiring the operation state of the execution subject includes at least: determining the operation state of the execution subject according to the calling mode of the execution subject, where the execution subject is directly called by the user, It is determined that the operation state of the execution body is the first operation state, and when the execution body is called by another execution body, it is determined that the operation state of the execution body is the second operation state.
  • an electronic device including: a processor: a memory, storing computer-executable instructions, which when executed by the processor, causes the processor to execute: S1, Before performing a specific operation, obtain an execution subject performing the specific operation; S2, determine whether the executing subject has the authority to perform the specific operation according to the first set of permissions, if not, perform operation S3; S3, obtain the execution The operating state of the subject, and obtain the corresponding second permission set according to the operating state of the executing subject; S4, judging whether the executing subject has the permission to perform the specific operation according to the second permission set, and if so, performing operation S5, if No, the execution body is processed; S5, a task including the specific operation is obtained, and the task corresponds to an operation flow for performing at least one operation; S6, whether the operation flow satisfies the preset operation flow is determined, if not , Then the execution body is processed.
  • S1 Before performing a specific operation, obtain an execution subject performing the specific operation
  • S2 determine whether the executing subject has the authority to
  • determining whether the operation flow satisfies the preset operation flow includes: acquiring at least one operation corresponding to the operation flow; determining whether each operation in the at least one operation is The corresponding operations in the preset operation flow are consistent.
  • the processor determining whether each operation in the at least one operation is consistent with a corresponding operation in the preset operation flow includes: determining whether an execution subject of each operation in the at least one operation is consistent with the preset operation The execution body of the operation corresponding to the process is consistent.
  • the processor before executing the step S1, the processor further executes: S0, creating a first permission set, where the first permission set includes operation permissions of at least one execution subject in any operation state.
  • the processor before executing the step S1, the processor further executes: S0' to create at least one second permission set, where each second permission set corresponds to an operation state of an execution subject, and each Each of the second permission sets includes operation permissions of the corresponding execution subject in the corresponding operation state.
  • At least one second permission set is stored at the remote end, and when the processor executes the step S3, acquiring the corresponding second permission set according to the operating state of the execution subject includes: sending a request to the remote end, The request includes the execution subject information and its operation status; obtaining a second permission set sent by the remote end, where the second permission set is returned by the remote end in response to the request.
  • acquiring the operation state of the execution body includes at least: determining the operation state of the execution body according to the calling mode of the execution body, wherein the execution body is When directly called by a user, it is determined that the operation state of the execution body is the first operation state, and when the execution body is called by another execution body, the operation state of the execution body is determined to be the second operation state.
  • Another aspect of the present disclosure provides a computer-readable medium storing computer-executable instructions, which when executed are used to implement the method as described in any one of the above.
  • Another aspect of the present disclosure provides a computer program, the computer program including computer-executable instructions, which when executed are used to implement the method according to any one of the above.
  • FIG. 1 schematically shows a flowchart of an operation detection method according to an embodiment of the present disclosure.
  • FIG. 2 schematically shows a legal operation flowchart of “remotely launching Shell program cmd.exe” in an embodiment of the present disclosure.
  • FIG. 3 schematically shows an illegal operation flowchart of “remotely launching Shell program cmd.exe” in an embodiment of the present disclosure.
  • FIG. 4 schematically shows a block diagram of an operation detection system according to an embodiment of the present disclosure.
  • FIG. 5 schematically shows a block diagram of an electronic device according to another embodiment of the present disclosure.
  • the technology of the present disclosure may be implemented in the form of hardware and/or software (including firmware, microcode, etc.).
  • the technology of the present disclosure may take the form of a computer program product on a computer-readable medium storing instructions, which may be used by or in conjunction with an instruction execution system.
  • a computer-readable medium may be any medium that can contain, store, transfer, propagate, or transfer instructions.
  • computer-readable media may include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, devices, or propagation media.
  • Computer-readable media include: magnetic storage devices, such as magnetic tape or hard disk (HDD); optical storage devices, such as compact disk (CD-ROM); memory, such as random access memory (RAM) or flash memory; and/or wired /Wireless communication link.
  • magnetic storage devices such as magnetic tape or hard disk (HDD)
  • optical storage devices such as compact disk (CD-ROM)
  • memory such as random access memory (RAM) or flash memory
  • RAM random access memory
  • FIG. 1 schematically shows a flowchart of an operation detection method according to an embodiment of the present disclosure.
  • the operation detection method of the embodiment of the present disclosure includes the following operations:
  • Specific operations in this disclosure refer to some sensitive operations that may cause dangerous consequences, including but not limited to executable file loading, memory operations, file operations, network access, port monitoring, registry key operations, sensitive windows Message sending, etc.
  • the present disclosure monitors the above-mentioned specific operations in real time in the operating system, and there may be multiple monitoring methods.
  • "hooking” technology can be used.
  • "hooking” is a security monitoring method commonly used in the field of computer security. It can hook some application programming interfaces (APIs).
  • APIs application programming interfaces
  • execution subject performing this specific operation includes but is not limited to the operating system itself, applications installed on the operating system, and the like. Before executing the specific operation, the execution subject will obtain the information of the execution subject through the above monitoring means, including but not limited to the name of the execution subject, creation time, location index, etc.
  • the Windows 10 platform has 35 million applications
  • the IOS platform has 2.1 million applications
  • the Android platform has 2.6 million applications.
  • the operations involved in these applications are countless.
  • the specific operations of each application are determined by means of a blacklist or whitelist, which requires huge resources to collect the specific operations and legality of each application.
  • a first permission set is created, which is called a "minimum behavior permission set", and the set includes operation permissions of at least one execution subject in any operation state.
  • the operation state of the execution subject in the present disclosure refers to the state that the execution subject is in when performing the specific operation, for example, the execution subject is a winword program, which can open a word document at runtime, if the winword program is actively run by the user , Then its operating state is active running state, if the winword program is run by other program calls, then its operating state is passive running state.
  • the opened word document will be displayed in the form of a window, then its operating state is the window state. If the opened word document will only run in the background and not display, then its operating state is Non-windowed state.
  • the first permission set in the present disclosure only relates to the operation permission of the execution subject in "any operation state", and the operation permission in the "different operation state" will be described later.
  • the first set of permissions provided by the present disclosure includes at least the operating permissions of the execution subject in any operating state:
  • the application can only operate (read, write, open, delete, etc.) files created by itself or directly or indirectly created by the same installation package with itself;
  • the application does not allow cross-process operations on other processes
  • User private data includes but is not limited to documents, photos, etc.
  • the default editing program is subject to the registration in the operating system registry, for example, the word document only allows winword program or WPS operation;
  • the key registry entries include but are not limited to the browser homepage, self-starting items, default program settings for various types of files, system startup settings, etc.;
  • System function programs include, but are not limited to, shell programs, registry editors, scheduled tasks, and disk file registry permission change programs;
  • S103 Acquire the operation state of the execution subject, and acquire the corresponding second permission set according to the operation state of the execution subject.
  • the operation state of the execution subject has been explained in the above operation S102, and will not be repeated here.
  • the first permission set set in the above operation S102 can filter any risky operation.
  • security software which has the operation of detecting whether the system-wide executable files are infected by viruses, but is limited by The limitation of the first permission set cannot operate other applications. Therefore, if only the first permission set of the present disclosure is used for the determination, some special applications such as security software will generate "false positives".
  • the present disclosure needs to further determine the execution subject that does not satisfy the first permission set, thereby introducing the second permission set of the present disclosure.
  • each second permission set corresponds to an operating state of an execution subject, and each second permission set Including the operation authority of the corresponding execution subject in the corresponding operation state.
  • the second set of permissions provides:
  • the winword program When the user actively executes the winword program, it does not have the authority to operate the non-corresponding object, that is: when opening the word document A, the winword program only has the single authority to operate A, and does not have the authority to operate B, C and other word documents or non- Word document permissions.
  • the second permission set specifies the different permissions of the winword program under the two operating states of "active running state” and "passive running state”.
  • the operating state of the executive body can be determined according to the calling mode of the executive body, where the executive body is directly called by the user, and the operating state of the executive body is determined to be the active running state. When other executive bodies are called, it is determined that the operating state of the executive body is a passive running state.
  • the operation state of the execution subject can be determined according to the operation mode of the execution subject on the execution object.
  • the winword program is used as an example. If the opened word document is displayed in the form of a window, Then its operation state is window state. If the opened word document will only run in the background and not display, then its operation state is non-window state.
  • the above-mentioned embodiments are merely examples for explaining different operating states of the execution body, and the operating states are not limited to the above two embodiments.
  • the operation state acquired in operation S103 is not limited to one operation state, and multiple operation states to which it belongs can also be acquired for the same execution body at the same time (for example, the winword program that can be acquired simultaneously is the active execution state and the window state) For subsequent determination.
  • each second permission set corresponds to at least one operating state of an execution subject, so the number of second permission sets is extremely large. Therefore, the present disclosure may store the created second permission set at the remote end (eg, server side, cloud, etc.), and when the client implements the present disclosure, the client sends a request to the remote end, the request includes the execution subject information and its operation status, The remote end responds to the request, retrieves the corresponding second permission set according to the execution subject information and its operation status, and sends it to the client. Furthermore, after obtaining the second permission set, the client may locally cache the execution subject information and the operation state of the second permission set.
  • the remote end eg, server side, cloud, etc.
  • the client When the client needs to obtain the second permission set again, it can first query from the local cache, and if it does not exist, then send a request to the remote end.
  • the client when the client installs the application program (or other execution agent), it obtains the second permission set of various operating states corresponding to the application program (or other execution agent) from the remote end And save it locally. In this way, when the second permission set is subsequently acquired, it can be directly called from the local.
  • the second permission set includes the operation permission of the corresponding execution subject in the corresponding operation state, so it is easy to understand the judgment flow in operation S104, and it will not be repeated here.
  • the present disclosure makes permission determination from the operating state of the executive body, and is no longer limited to “application behavior, application function and type”, and can more accurately determine the “over-authority behavior” of the executive body. .
  • the second authority set is required to further judge it.
  • its corresponding second permission set specifies that it has the permission of “can be run automatically and can be connected to the network without user operation”, so it can pass the determination of the second permission set. It can be seen from the above example that the setting of the second permission set can avoid the "false positive" of the first permission set to some specific execution subjects.
  • the present disclosure sets the second permission set on the one hand, it not only prevents the "false positives" of the first permission set, but also strengthens the division of permissions on the execution subject, so that the execution subject can be protected from the first permission
  • the set of "false positives” affects its normal function, and can restrict it from other specific operations with security threats.
  • Xshell Taking Xshell as an example, it is mostly used to remotely manage servers, but there are backdoors in multiple versions of it, and users will secretly upload user server accounts and passwords when using it.
  • the first permission set specifies "the application is not allowed to access the internal and external networks and device nodes in the network", it does not meet the determination of the first permission set.
  • the second permission set of the present disclosure can determine different network connection permissions according to the type of application program, so that different application programs can accurately connect to a certain type or a certain network or networks. For example, printers, cameras, etc. can only be connected to a fixed IP address; applications for intranet communication can only be connected to the intranet; server management tools such as xshell can only connect to the network connected by the user for this operation; applications can only use specific Network protocol to connect to the network etc. Taking Xshell as an example again, its second set of permissions in various operating states is:
  • Xshell When Xshell is determined based on the above second permission set, it does not allow Xshell to access the network other than the network to which the user is connected in this operation, and cuts off the network path for uploading the user's server account and password to avoid security threats.
  • the "task” is the smallest unit that realizes the corresponding function.
  • Each task includes one or more operations (including specific operations) that are executed in sequence. Performing these operations in a fixed order to complete the task is the task. Operating procedures.
  • the acquired task may specifically include: one or more operations included in the task, the execution order of the one or more operations, and the execution object of each operation (for example, opening a word document through a winword program, the word document is For the implementation object).
  • the execution object of each operation for example, opening a word document through a winword program, the word document is For the implementation object.
  • This disclosure determines whether the operation flow of a task is legal by determining whether it conforms to a preset operation flow.
  • Each task should have a set of legal operation flow in order to realize the corresponding function, which is the preset operation flow mentioned in this disclosure .
  • the following uses "remote start Shell program cmd.exe” as an example to explain the legal operation flow and the illegal operation flow of the present disclosure.
  • FIG. 2 illustrates a legal operation flowchart of “remotely launching Shell program cmd.exe” in an embodiment of the present disclosure.
  • a task generated by the normal remote control machine A is “start the Shell program cmd.exe on the target server B”, and the operation process performed by the task is:
  • FIG. 3 illustrates an illegal operation flowchart of “remotely launching Shell program cmd.exe” in an embodiment of the present disclosure.
  • a task generated by the hacker remote control machine A is “starting the Shell program cmd.exe on the target server B”, and the operation process performed by the task is:
  • the attacker's virus attack code injects the command to start the shell into spoolsv.exe;
  • FIGS. 2 to 3 of the present disclosure the two same tasks and the functions achieved are to start the shell program cmd.exe, but the operation flow performed by them is different.
  • the illegal operation process is: start cmd.exe through "printer management service program: spoolsv.exe”.
  • operation S106 of the present disclosure by determining whether the operation flow of the task is legal is by determining whether it conforms to the preset operation flow, it can be determined whether the task to which the specific operation belongs is legal. Specifically, when determining the operation flow, the present disclosure first obtains the operation corresponding to the operation flow, and then needs to determine whether each operation is consistent with the corresponding operation in the preset operation flow.
  • the illegal operation process includes “start spoolsv.exe” and “spoolsv.exe start Shell program cmd.exe”; the corresponding legal operation process is “tlntsvr.exe start tlntsess.exe”, “Tlntsess.exe starts Shell program cmd.exe”.
  • operation S106 of the present disclosure it is also necessary to determine whether the execution body of each operation is consistent with the execution body of the operation corresponding to the preset operation flow. If they are not consistent, the entire operation flow is considered illegal.
  • FIG. 4 schematically shows a block diagram of an operation detection system according to an embodiment of the present disclosure.
  • the operation detection system 400 includes a first acquisition module 410, a first judgment module 420, a second acquisition module 430, a second judgment module 440, a third acquisition module 450, and a third judgment module 460.
  • the operation detection system 400 may perform the method described above with reference to FIG. 1 to implement detection of specific operations.
  • the first obtaining module 410 is used to obtain the executing subject performing the specific operation before performing the specific operation; the first determining module 420 is used to determine whether the executing subject has the right to perform the specific operation according to the first set of permissions, If not, the second obtaining module 430 is executed; the second obtaining module 430 is used to obtain the operating state of the executing subject, and obtains the corresponding second permission set according to the operating state of the executing subject; Two sets of permissions determine whether the execution subject has the permission to perform the specific operation.
  • the third acquisition module 450 is executed; if not, the execution subject is processed; the third acquisition module 450 is used to acquire the task including the specific operation
  • the task corresponds to an operation flow for performing at least one operation; the third determination module is used to determine whether the operation flow satisfies the preset operation flow, and if not, the execution subject is processed.
  • first acquisition module 410, the first judgment module 420, the second acquisition module 430, the second judgment module 440, the third acquisition module 450, and the third judgment module 460 can be combined into one module, or Any one of the modules can be split into multiple modules. Alternatively, at least part of functions of one or more of these modules may be combined with at least part of functions of other modules and implemented in one module.
  • At least one of the first acquisition module 410, the first judgment module 420, the second acquisition module 430, the second judgment module 440, the third acquisition module 450, and the third judgment module 460 may be at least partially Can be implemented as a hardware circuit, such as field programmable gate array (FPGA), programmable logic array (PLA), system-on-chip, system on a substrate, system on a package, application specific integrated circuit (ASIC), or can Integrated or packaged in any other reasonable way, such as hardware or firmware, or a suitable combination of software, hardware, and firmware.
  • FPGA field programmable gate array
  • PLA programmable logic array
  • ASIC application specific integrated circuit
  • At least one of the first acquisition module 410, the first judgment module 420, the second acquisition module 430, the second judgment module 440, the third acquisition module 450, and the third judgment module 460 may be at least partially implemented as a computer program Module, when the program is run by the computer, it can perform the function of the corresponding module.
  • FIG. 5 schematically shows a block diagram of an electronic device according to another embodiment of the present disclosure.
  • the electronic device 500 includes a processor 510 and a computer-readable storage medium 520.
  • the electronic device 500 may perform the method described above with reference to FIG. 1 to implement detection of specific operations.
  • the processor 510 may include, for example, a general-purpose microprocessor, an instruction set processor and/or related chipsets, and/or a dedicated microprocessor (for example, an application specific integrated circuit (ASIC)), and so on.
  • the processor 510 may also include on-board memory for caching purposes.
  • the processor 510 may be a single processing unit or a plurality of processing units for performing different actions of the method flow according to the embodiment of the present disclosure described with reference to FIG. 1.
  • the computer-readable storage medium 520 may be, for example, any medium capable of containing, storing, transmitting, transmitting, or transmitting instructions.
  • readable storage media may include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, devices, or propagation media.
  • Specific examples of readable storage media include: magnetic storage devices such as magnetic tapes or hard disks (HDD); optical storage devices such as compact disks (CD-ROM); memories such as random access memory (RAM) or flash memory; and/or wired /Wireless communication link.
  • the computer-readable storage medium 520 may include a computer program 521, which may include code/computer-executable instructions that, when executed by the processor 510, cause the processor 510 to perform, for example, the method flow described above in connection with FIG. 1 and Any deformation.
  • the computer program 521 may be configured to have computer program code including, for example, computer program modules.
  • the code in the computer program 521 may include one or more program modules, for example, including 521A, module 521B,... It should be noted that the division method and number of modules are not fixed, and those skilled in the art may use appropriate program modules or program module combinations according to actual situations.
  • the processor 510 may be For example, the method flow described above in connection with FIGS. 2 to 3D and any variations thereof are performed.
  • At least one of the first acquisition module 410, the first judgment module 420, the second acquisition module 430, the second judgment module 440, the third acquisition module 450, and the third judgment module 460 may be implemented as a reference

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

一种操作检测方法,包括:S1,在执行特定操作之前,获取执行该特定操作的执行主体(S101);S2,根据第一权限集合判断所述执行主体是否具有执行该特定操作的权限(S102),若否,则执行操作S3;S3,获取所述执行主体的操作状态,并根据该执行主体的操作状态获取对应的第二权限集合(S103);S4,根据第二权限集合判断所述执行主体是否具有执行该特定操作的权限(S104),若是,则执行操作S5,若否,则对所述执行主体进行处理;S5,获取包括所述特定操作的任务(S105),该任务对应有执行至少一个操作的操作流程;S6,判断所述操作流程是否满足预设操作流程(S106),若否,则对所述执行主体进行处理。另一方面还提供一种操作检测系统及电子设备。

Description

一种操作检测方法、系统及电子设备 技术领域
本公开属于网络安全领域,具体涉及一种操作检测方法、系统及电子设备。
背景技术
随着计算机网络的发展,网络安全越来越受到业界的重视。对于计算机网络被黑客攻击的情况,人们希望能在攻击发生的过程中或者危害结果发生之前发现此攻击,以在最大程度上避免侵害。现有技术中所采用的网络安全手段有多种,例如:“恶意软件检测”、“攻击发现”、“恶意行为检测”等等,这些技术虽然能够进行安全防护,但随着攻击手段的提高,已不能满足日益增长的网络安全需求。
发明内容
本公开的一个方面提供了一种操作检测方法,包括:S1,在执行特定操作之前,获取执行该特定操作的执行主体;S2,根据第一权限集合判断所述执行主体是否具有执行该特定操作的权限,若否,则执行操作S3;S3,获取所述执行主体的操作状态,并根据该执行主体的操作状态获取对应的第二权限集合;S4,根据第二权限集合判断所述执行主体是否具有执行该特定操作的权限,若是,则执行操作S5,若否,则对所述执行主体进行处理;S5,获取包括所述特定操作的任务,该任务对应有执行至少一个操作的操作流程;S6,判断所述操作流程是否满足预设操作流程,若否,则对所述执行主体进行处理。
可选地,步骤S6中,判断所述操作流程是否满足预设操作流程,包括:获取所述操作流程所对应的至少一个操作;判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应的操作一致。
可选地,所述判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应操作一致,包括:判断所述至少一个操作中每个操作的执行主体是否与预设操作流程所对应操作的执行主体一致。
可选地,在所述步骤S1之前,还包括:S0,创建第一权限集合,所述第一权限集合包括至少一个执行主体在任意操作状态下的操作权限。
可选地,在所述步骤S1之前,还包括:S0’,创建至少一个第二权限集合,其中,每个所述第二权限集合对应一个执行主体的一个操作状态,并且,每个所述第二权限集合包括对应执行主体在对应操作状态下的操作权限。
可选地,所述至少一个第二权限集合存储在远端,所述步骤S3中,根据该执行主体的操作状态获取对应的第二权限集合,包括:向远端发送请求,所述请求包括所述执行主体信息及其操作状态;获取远端发送的第二权限集合,其中,该第二权限集合是由所述远端响应所述请求而返回。
可选地,步骤S3中,获取所述执行主体的操作状态,至少包括:根据所述执行主体的调用方式确定所述执行主体的操作状态,其中,所述执行主体是由用户直接调用时,确定所述执行主体的操作状态为第一操作状态,当所述执行主体是由其他执行主体调用时,确定所述执行主体的操作状态为第二操作状态。
本公开的另一方面提供了一种操作检测系统,包括:第一获取模块,用于在执行特定操作之前,获取执行特定操作的执行主体;第一判断模块,用于根据第一权限集合判断所述执行主体是否具有执行该特定操作的权限,若否,则执行第二获取模块;第二获取模块,用于获取所述执行主体的操作状态,并根据该执行主体的操作状态获取对应的第二权限集合;第二判断模块,用于根据第二权限集合判断所述执行主体是否具有执行该特定操作的权限,若是,则执行第三获取模块,若否,则对所述执行主体进行处理;第三获取模块,用于获取包括所述特定操作的任 务,该任务对应有执行至少一个操作的操作流程;第三判断模块,用于判断所述操作流程是否满足预设操作流程,若否,则对所述执行主体进行处理。
可选地,第三判断模块中,判断所述操作流程是否满足预设操作流程,包括:获取所述操作流程所对应的至少一个操作;判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应的操作一致。
可选地,第三判断模块判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应操作一致,包括:判断所述至少一个操作中每个操作的执行主体是否与预设操作流程所对应操作的执行主体一致。
可选地,操作检测系统还包括:第一创建模块,用于创建第一权限集合,所述第一权限集合包括至少一个执行主体在任意操作状态下的操作权限。
可选地,操作检测系统,还包括:第二创建模块,用于创建至少一个第二权限集合,其中,每个所述第二权限集合对应一个执行主体的一个操作状态,并且,每个所述第二权限集合包括对应执行主体在对应操作状态下的操作权限。
可选地,至少一个第二权限集合存储在远端,所述第二获取模块根据该执行主体的操作状态获取对应的第二权限集合,包括:向远端发送请求,所述请求包括所述执行主体信息及其操作状态;获取远端发送的第二权限集合,其中,该第二权限集合是由所述远端响应所述请求而返回。
可选地,第二获取模块获取所述执行主体的操作状态,至少包括:根据所述执行主体的调用方式确定所述执行主体的操作状态,其中,所述执行主体是由用户直接调用时,确定所述执行主体的操作状态为第一操作状态,当所述执行主体是由其他执行主体调用时,确定所述执行主体的操作状态为第二操作状态。
本公开的另一方面提供了一种电子设备,包括:处理器:存储器,存储有计算机可执行指令,该计算机可执行指令在被所述处理器执行时,使得所述处理器执行:S1,在执行特定操作之前,获取执行该特定操作 的执行主体;S2,根据第一权限集合判断所述执行主体是否具有执行该特定操作的权限,若否,则执行操作S3;S3,获取所述执行主体的操作状态,并根据该执行主体的操作状态获取对应的第二权限集合;S4,根据第二权限集合判断所述执行主体是否具有执行该特定操作的权限,若是,则执行操作S5,若否,则对所述执行主体进行处理;S5,获取包括所述特定操作的任务,该任务对应有执行至少一个操作的操作流程;S6,判断所述操作流程是否满足预设操作流程,若否,则对所述执行主体进行处理。
可选地,处理器在执行步骤S6时,判断所述操作流程是否满足预设操作流程,包括:获取所述操作流程所对应的至少一个操作;判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应的操作一致。
可选地,处理器判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应操作一致,包括:判断所述至少一个操作中每个操作的执行主体是否与预设操作流程所对应操作的执行主体一致。
可选地,处理器在执行所述步骤S1之前,还执行:S0,创建第一权限集合,所述第一权限集合包括至少一个执行主体在任意操作状态下的操作权限。
可选地,处理器在执行所述步骤S1之前,还执行:S0’,创建至少一个第二权限集合,其中,每个所述第二权限集合对应一个执行主体的一个操作状态,并且,每个所述第二权限集合包括对应执行主体在对应操作状态下的操作权限。
可选地,至少一个第二权限集合存储在远端,所述处理器在执行所述步骤S3时,根据该执行主体的操作状态获取对应的第二权限集合,包括:向远端发送请求,所述请求包括所述执行主体信息及其操作状态;获取远端发送的第二权限集合,其中,该第二权限集合是由所述远端响应所述请求而返回。
可选地,处理器在执行所述步骤S3时,获取所述执行主体的操作状态,至少包括:根据所述执行主体的调用方式确定所述执行主体的操 作状态,其中,所述执行主体是由用户直接调用时,确定所述执行主体的操作状态为第一操作状态,当所述执行主体是由其他执行主体调用时,确定所述执行主体的操作状态为第二操作状态。
本公开的另一方面提供了一种计算机可读介质,存储有计算机可执行指令,所述指令在被执行时用于实现如上任一项所述的方法。
本公开的另一方面提供了一种计算机程序,所述计算机程序包括计算机可执行指令,所述指令在被执行时用于实现如上任一项所述的方法。
附图说明
图1示意性示出了根据本公开实施例的操作检测方法的流程图。
图2示意性示出了本公开实施例中“远程启动Shell程序cmd.exe”的合法操作流程图。
图3示意性示出了本公开实施例中“远程启动Shell程序cmd.exe”的非法操作流程图。
图4示意性示出了根据本公开实施例的操作检测系统的框图。
图5示意性示出了根据本公开另一实施例的电子设备的框图。
具体实施方式
以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。
在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。这里使用的词语“一”、“一个(种)”和“该”等也应包括“多个”、“多种”的意思,除非上下文另外明确指出。此外,在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。
在此使用的所有术语(包括技术和科学术语)具有本领域技术人员 通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。
附图中示出了一些方框图和/或流程图。应理解,方框图和/或流程图中的一些方框或其组合可以由计算机程序指令来实现。这些计算机程序指令可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器,从而这些指令在由该处理器执行时可以创建用于实现这些方框图和/或流程图中所说明的功能/操作的装置。
因此,本公开的技术可以硬件和/或软件(包括固件、微代码等)的形式来实现。另外,本公开的技术可以采取存储有指令的计算机可读介质上的计算机程序产品的形式,该计算机程序产品可供指令执行系统使用或者结合指令执行系统使用。在本公开的上下文中,计算机可读介质可以是能够包含、存储、传送、传播或传输指令的任意介质。例如,计算机可读介质可以包括但不限于电、磁、光、电磁、红外或半导体系统、装置、器件或传播介质。计算机可读介质的具体示例包括:磁存储装置,如磁带或硬盘(HDD);光存储装置,如光盘(CD-ROM);存储器,如随机存取存储器(RAM)或闪存;和/或有线/无线通信链路。
图1示意性示出了根据本公开实施例的操作检测方法的流程图。
具体地,如图1所示,本公开实施例的操作检测方法包括以下操作:
S101,在执行特定操作之前,获取执行该特定操作的执行主体。
在操作系统的中为了完成任务,会执行各种各样的操作,这些操作经常会涉及到系统中的服务、程序、文件、数据等。本公开的“特定操作”是指一些敏感的、有可能导致危险后果的操作,其包括但不限于可执行文件加载、内存操作、文件操作、网络访问、端口监听、注册表项操作、敏感窗口消息发送等等。
本公开在操作系统中会实时对上述的特定操作进行监控,其监控手段可以有多种。例如可以采用“挂钩(HOOK)技术”,“挂钩”是计算机安全领域常用的一种安全监控方法,可以对一些应用程序编程接口(Application Programming Interface,API)进行挂钩,当系统执行特定操作 时,就会进入到HOOK处理流程中;又例如可以采用操作系统提供的各类的功能过滤驱动,比如:文件过滤驱动、网络过滤驱动等等,可以对涉及相应文件、网络等的特定操作进行监控。
本公开所提及的“执行该特定操作的执行主体”包括但不限于操作系统本身、安装在操作系统上的应用程序等。当执行主体在执行特定操作之前,会通过上述监控手段获取该执行主体的信息,包括但不限于执行主体的名称、创建时间、位置索引等等。
S102,根据第一权限集合判断执行主体是否具有执行该特定操作的权限,若是,则对该特定操作放行,若否,则执行操作S103。
由于目前的应用程序繁多,其中,Windows10平台拥有3500万个应用程序、IOS平台拥有210万个应用程序、安卓平台拥有260万个应用程序,这些应用程序所涉及的操作更是不计其数,若通过黑名单或者白名单的方式对每个应用程序的特定操作都进行判定,需要耗费巨大的资源收集每个应用程序的特定操作及合法性。
本公开出于上述考虑,在执行上述操作S101之前,会创建第一权限集合,称之为“最小行为权限集合”,该集合包括至少一个执行主体在任意操作状态下的操作权限。其中,本公开中执行主体的操作状态是指执行主体在执行该特定操作时所处于的状态,例如执行主体为winword程序,其在运行时可以打开word文档,如果该winword程序是用户主动运行的,那么其操作状态为主动运行状态,如果该winword程序是被其他程序调用所运行的,那么其操作状态为被动运行状态。还是以winword程序为例,若其打开的word文档会以一个窗口的形式进行显示,那么其操作状态为窗口状态,若其打开的word文档会只在后台运行并不显示,那么其操作状态为非窗口状态。本公开中第一权限集合只涉及执行主体在“任意操作状态下”的操作权限,其“不同操作状态下”的操作权限将在后文中描述。
本公开所提供的第一权限集合至少包括如下执行主体在任意操作状态下的操作权限:
·非特定的应用程序的运行方式为非自动运行
解释:一般的应用程序不可以自动运行,只能由用户手动执行,特定的需要自动运行的程序由程序专属行为集合进行处理;
·应用程序只能操作自身直接和/或间接创建的文件
解释:应用程序只可以全权操作(读、写、打开、删除等)自己创建的或与自己一起由同一安装包直接或间接创建的文件;
·应用程序对操作系统文件仅有只读的权限;
·应用程序不能操作除了自身直接和/或间接创建的文件外的非系统文件
解释:应用程序不可以操作(读、写、打开、删除等)除自身直接和/或间接创建的文件外的、任何非系统的文件;
·应用程序不允许访问内外网络及网内设备节点
·在非用户操作时,应用程序不允许对其它进程进行跨进程操作;
·操作系统本身及应用程序,不允许不通过文件系统而直接操作磁盘;
·在非用户操作时,操作系统及应用程序不允许下载或执行另一个程序,不可以加载驱动;
·在非用户操作时,操作系统及应用程序不允许读写用户私有数据
解释:用户私有数据包括但不限于文档、照片等;
·在用户操作时,只有数据所对应的默认编辑程序可以操作对应数据类型的文档
解释:默认编辑程序以操作系统注册表中的登记为准,例如,word文档只允许winword程序或WPS操作;
·在用户操作时,对应的行为主体,只有对单一客体进行操作的权限
解释:比如用户调用winword程序打开了word文档A,那winword程序将拥有对A的操作权限,但对用户并没有显示主动打开的word文档B,winword程序并不具备操作权限;
·在非用户操作时,操作系统及应用程序不具备添加账户的权限;
·在非用户操作时,操作系统及应用程序不具备写关键注册表项的 权限
解释:关键注册表项包括但不限于浏览器主页、自启动项、各类型文件的默认程序设置、系统启动设置等;
·在非用户操作时,操作系统本身及应用程序不具备调用系统功能类程序的权限
解释:系统功能类程序包括但不限于shell程序、注册表编辑器、计划任务、磁盘文件注册表的权限更改类程序;
·在非用户操作时,操作系统及应用程序不具备创建并执行脚本文件的权限。
通过上述第一权限集合的设定,能够有效判定大多数的执行主体是否具有执行该特定操作的权限,无需对每个执行主体及相应的特定操作建立黑名单或者白名单,从而节省了系统开销。在本操作中,若执行主体所执行的特定操作符合上述第一权限集合,则对该特定操作放行,并使该特定操作执行,若执行主体所执行的特定操作不符合上述第一权限集合,则执行操作S103,以对其进行进一步判定。
S103,获取执行主体的操作状态,并根据该执行主体的操作状态获取对应的第二权限集合。
在上述操作S102中已解释了执行主体的操作状态,在此就不再赘述。另外,上述操作S102所设定的第一权限集合能够对任何有风险的操作进行过滤。然而,对于一些特殊的应用程序,其在正常运行时即会超出第一权限集合所限制的权限,比如:安全软件,它有检测全系统可执行文件是否被病毒感染的操作,但受限于第一权限集合的限制,其并不能操作其它的应用程序。因此,如果仅采用本公开的第一权限集合来进行判定,会对例如安全软件等一些特殊的应用程序产生“误报”。对于上述情形,本公开需要对不满足第一权限集合的执行主体进行进一步判定,由此引入本公开的第二权限集合。
本公开出于上述考虑,在执行上述操作S101之前,还会创建一个以上的第二权限集合,其中,每个第二权限集合对应一个执行主体的一个操作状态,并且,每个第二权限集合包括对应执行主体在对应操作状 态下的操作权限。
例如,针对winword程序,第二权限集合规定:
·用户主动执行winword程序时,拥有操作对应客体的权限,即:用户主动通过winword程序打开word文档A时,winword程序即拥有word文档A的操作权限。(注:双击word文档,由操作系统调用winword程序来打开;与双击winword程序再通过菜单或拖拽操作打开文档,都是因用户操作触发的行为,都被视为“主动运行状态”)
·非用户主动执行winword程序时(被动运行状态),并不具备操作word文档的权限。
·用户主动执行winword程序时,也并不具备操作非对应客体的权限,即:打开word文档A时,winword程序只具备操作A的单一权限,并不具备操作B、C等其它word文档或非word文档的权限。
通过上述例子可以看出,第二权限集合规定了winword程序在“主动运行状态”及“被动运行状态”这两种操作状态下的不同权限。
在本公开操作S103中,可以通过不同的方式确定执行主体的不同操作状态。
根据本公开的一种实施方式,可以根据执行主体的调用方式确定执行主体的操作状态,其中,执行主体是由用户直接调用时,确定执行主体的操作状态为主动运行状态,当执行主体是由其他执行主体调用时,确定执行主体的操作状态为被动运行状态。
根据本公开的另一种实施方式,可以根据执行主体对执行客体的操作方式来确定执行主体的操作状态,例如,winword程序为例,若其打开的word文档会以一个窗口的形式进行显示,那么其操作状态为窗口状态,若其打开的word文档会只在后台运行并不显示,那么其操作状态为非窗口状态。
上述实施方式仅为说明执行主体的不同操作状态而举出的例子,其操作状态并不限定于上述两种实施方式。另外,操作S103中所获取的操作状态并不局限于一种操作状态,也可以针对同一执行主体同时获取多个其所属的操作状态(例如可以同时获取的winword程序为主动执行 状态及窗口状态),用于后续判定。
另外还需要说明的是,每一个第二权限集合对应一个执行主体的至少一个操作状态,所以说第二权限集合的数量极为庞大。因此,本公开可将创建的第二权限集合存储在远端(例如服务器端、云端等),客户端在实施本公开时,向远端发送请求,该请求包括执行主体信息及其操作状态,远端响应请求,根据执行主体信息及其操作状态检索出对于的第二权限集合,并发送给客户端。更进一步地,客户端在获取到第二权限集合后,可以将此第二权限集合联合对于的执行主体信息及其操作状态进行本地缓存。当客户端再次需要获取该第二权限集合后,可以先从本地缓存中进行查询,若不存在,再向远端发送请求。在本公开的另外一种实施方式中,客户端在安装应用程序(或其他执行主体)时,即从远端获取应用程序(或其他执行主体)所对应的各种操作状态的第二权限集合,并进行本地保存。这样在后续获取第二权限集合时,即可直接从本地调用。
S104,根据第二权限集合判断执行主体是否具有执行该特定操作的权限,若是,则执行操作S105,若否,则对执行主体进行处理。
以上已经介绍了第二权限集合包括对应执行主体在对应操作状态下的操作权限,因此容易理解操作S104中的判断流程,在此就不再赘述。但需要强调的是,本公开从执行主体的操作状态层面上进行了权限判定,不再局限于“应用程序本身行为、应用程序功能与种类”,能够较为准确地判定执行主体的“越权行为”。
再以上述安全软件为例,其由于在正常运行时会检测全系统可执行文件是否被病毒感染的操作,故需要有无需用户干预自动进行安全检测的功能,且进行安全检测时一般都需要连接云端的病毒特征库,这些功能显然已经超出了上述第一权限集合所规定的权限。因此,其必定不能通过第一权限集合的判定,此时,需要第二权限集合对其进行进一步判定。在安全软件的任意操作状态下,其对应的第二权限集合规定了其具有“可以自动运行、可以非经用户操作连接网络”的权限,所以其能通过第二权限集合的判定。通过上例可以看出,第二权限集合的设定可以 避免第一权限集合对一些特定执行主体的“误报”。
另外,本公开设定第二权限集合一方面不仅仅是防止了第一权限集合的“误报”,另一方面还加强了对执行主体的权限划分,以使得执行主体能够不被第一权限集合的“误报”影响其正常功能,又能限制其进行其他具有安全威胁的特定操作。以Xshell为例,其多被用来远程管理服务器,但在其多个版本中存在后门,使用时会偷偷上传用户服务器账户与密码。Xshell在由本公开第一权限集合判定时,由于第一权限集合规定了“应用程序不允许访问内外网络及网内设备节点”,故其不符合第一权限集合的判定。对于本公开的第二权限集合,其可以根据应用程序类型确定不同的网络连接权限,以使得不同应用程序能够精确地连接某一类或某一个或多个网络。例如,打印机、摄像头等只可以连接固定的IP地址;内网通信用的应用程序只可以连接内网;xshell类的服务器管理工具只可以连接用户本次操作所连接的网络;应用程序只可以使用特定的网络协议连接网络等。再以Xshell为例,其在各种操作状态下的第二权限集合为:
·在用户主动执行、且具备交互窗口的双状态下,拥有与指定网络地址(主动连接的服务器IP或域名)进行网络通信的权限
·非用户主动执行、或无窗口都不可进行网络通信
·不可与本次用户操作所指向管理的服务器地址无关的网络地址通信
基于上述第二权限集合判定Xshell时,其不允许Xshell访问用户本次操作所连接的网络之外的其他网络,切断了其上传用户服务器账户与密码的网络通路,避免了安全威胁。
通过上述例子可以看出,根据第一权限集合的判定对其进行了“拦截”后,再由第二权限集合对其判定,对于远程管理服务器等正常功能进行“放行”,对于非法连接其他网络进行“拦截”,实现了更精准的权限控制。
当执行主体在对应操作状态下不满足所规定的第二权限集合,则可以充分认定该执行主体或其对应的特定操作具有安全威胁,即对该执行 主体进行拦截,以中断其即将执行的特定操作。
但是,当执行主体在对应操作状态下满足所规定的第二权限集合(其已经操作S102中判定该执行主体不满足第一权限集合)时,即可认定通过第一权限集合进行判定的结果存在“误报”的可能,需要在后续进行进一步的判定。
S105,获取包括特定操作的任务,该任务对应有执行至少一个操作的操作流程。
在操作系统中“任务”是实现对应功能的最小单元,每个任务包括有一个或多个按顺序执行的操作(包括特定操作),以固定的顺序执行这些操作以完成任务即是该任务的操作流程。
在操作S105中,获取的任务可以具体包括:任务所包含的一个或多个操作,一个或多个操作的执行顺序、每个操作的执行客体(例如,通过winword程序打开word文档,word文档即为执行客体)。通过上述的信息即可判定任务的操作流程是否合法。
S106,判断操作流程是否满足预设操作流程,若否,则对执行主体进行处理。
本公开判定任务的操作流程是否合法是通过判定其是否符合预设操作流程,每个任务为了实现对应的功能都应具备一套合法的操作流程,即为本公开所提及的预设操作流程。下面以“远程启动Shell程序cmd.exe”为例,来解释本公开的合法操作流程及非法操作流程。
图2绘示出本公开实施例中“远程启动Shell程序cmd.exe”的合法操作流程图。如图2所示,在正常远控机A产生一任务为“启动目标服务器B上的Shell程序cmd.exe”,该任务执行的操作流程为:
S201,在正常远控机A上启动Telnet.exe程序;
S202,在正常远控机上A,通过Telnet.exe程序发送与目标服务器B建立远程连接的请求;
S203,在目标服务器B上通过tlntsvr.exe接收正常远控机A发送的远程连接的请求;
S204,在目标服务器B上,通过tlntsvr.exe启动tlntsess.exe,以建 立与正常远控机A的连接;
S205,在正常远控机A上发送启动Shell程序cmd.exe的指令;
S206,在目标服务器B上通过tlntsess.exe接收到上述指令;
S207,在目标服务器B上通过tlntsess.exe启动Shell程序cmd.exe。
图3绘示出本公开实施例中“远程启动Shell程序cmd.exe”的非法操作流程图。如图3所示,在黑客远控机A产生一任务为“启动目标服务器B上的Shell程序cmd.exe”,该任务执行的操作流程为:
S301,在黑客远控机A上,通过ms17-010漏洞(此漏洞为勒索者病毒Wannacry实际使用的漏洞)向目标服务器B发送数据包(该数据包为特殊构建的、包含有勒索者病毒的攻击代码);
S302,在目标服务器B上,由于ms17-010漏洞存在,执行数据包中的勒索者病毒的攻击代码;
S303,在目标服务器B上,索者病毒的攻击代码,将启动shell的指令注入到spoolsv.exe中;
S304,在目标服务器B上,通过spoolsv.exe启动Shell程序cmd.exe。
从本公开的图2~图3可以看出,两个同样地任务,实现的功能均是启动Shell程序cmd.exe,但是其执行的操作流程不一样。
但合法操作流程是:“系统专用的远程管理服务程序:tlntsvr.exe、tlntsess.exe”共同完成了任务的执行,tlntsvr.exe接受连接进行身份认证,然后启动tlntsess.exe来接受用户的命令,最终启动cmd.exe。
而非法操作流程是:通过“打印机管理服务程序:spoolsv.exe”启动cmd.exe。
显然地,本公开操作S106中,通过判定任务的操作流程是否合法是通过判定其是否符合预设操作流程,能够判定特定操作所属的任务是否合法。具体地,本公开在判定操作流程时,首先获取操作流程所对应的操作,然后需要判定每个操作是否与预设操作流程中所对应的操作一致。
以图2~图3为例,非法操作流程中有“启动spoolsv.exe”、“spoolsv.exe启动Shell程序cmd.exe”;其对应的合法操作流程为“tlntsvr.exe启动 tlntsess.exe”、“tlntsess.exe启动Shell程序cmd.exe”。虽然两者都有“启动Shell程序cmd.exe”这个操作,但缺少“tlntsvr.exe启动tlntsess.exe”环节,而且“spoolsv.exe启动cmd.exe”也与预设任务流程中的tlntsess.exe启动Shell程序cmd.exe不一致,因此图3所示的任务操作流程不符合预设操作流程,进而不合法。
另外,假如恶意攻击代码不是选择注入spoolsv.exe而是启动并注入到tlntsess.exe中,再执行启动shell程序cmd.exe的操作,是否就能判定此操作合法呢?仍然不能,因为tlntsess.exe在预设的合法流程中,必须由tlntsvr.exe启动才是合法的,而不是任何其它的服务或程序。
因此,本公开在操作S106中,还需要判断每个操作的执行主体是否与预设操作流程所对应操作的执行主体一致,如果不一致,则认为整个操作流程不合法。
为了更加准确地判定操作流程是否合法,还可以增加“判定每个操作的执行客体是否”合法的步骤,其原理与“判断每个操作的执行主体是否与预设操作流程所对应操作的执行主体一致”一样,在此就不再赘述。
通过本公开的操作S106,可以将“未通过第一权限集合的判定”,但又“通过了第二权限集合的判断”的执行主体及特定操作进行准确甄别,以确定其是“误报”还是“确实存在安全威胁”。因此,在判定出操作流程不满足预设操作流程时,可充分认定该执行主体或其对应的特定操作具有安全威胁,即对该执行主体进行拦截,以中断其即将执行的特定操作;在判定出操作流程满足预设操作流程时,可充分认定在操作S2中存在“误报”现象,对该执行主体及对应的特定操作进行“放行”,以使该执行主体执行该特定操作。
图4示意性示出了根据本公开实施例的操作检测系统的框图。
如图4所示,操作检测系统400包括第一获取模块410、第一判断模块420、第二获取模块430、第二判断模块440、第三获取模块450及第三判断模块460。该操作检测系统400可以执行上面参考图1描述的方法,以实现对特定操作的检测。
具体地,第一获取模块410用于在执行特定操作之前,获取执行特定操作的执行主体;第一判断模块420用于根据第一权限集合判断所述执行主体是否具有执行该特定操作的权限,若否,则执行第二获取模块430;第二获取模块430用于获取执行主体的操作状态,并根据该执行主体的操作状态获取对应的第二权限集合;第二判断模块440用于根据第二权限集合判断执行主体是否具有执行该特定操作的权限,若是,则执行第三获取模块450,若否,则对所述执行主体进行处理;第三获取模块450用于获取包括特定操作的任务,该任务对应有执行至少一个操作的操作流程;第三判断模块用于判断所述操作流程是否满足预设操作流程,若否,则对执行主体进行处理。
可以理解的是,第一获取模块410、第一判断模块420、第二获取模块430、第二判断模块440、第三获取模块450及第三判断模块460可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本发明的实施例,第一获取模块410、第一判断模块420、第二获取模块430、第二判断模块440、第三获取模块450及第三判断模块460中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以以对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式的适当组合来实现。或者,第一获取模块410、第一判断模块420、第二获取模块430、第二判断模块440、第三获取模块450及第三判断模块460中的至少一个可以至少被部分地实现为计算机程序模块,当该程序被计算机运行时,可以执行相应模块的功能。
图5示意性示出了根据本公开另一实施例的电子设备的框图。
如图5所示,电子设备500包括处理器510、计算机可读存储介质520。该电子设备500可以执行上面参考图1描述的方法,以实现对特定操作的检测。
具体地,处理器510例如可以包括通用微处理器、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC)),等等。处理器510还可以包括用于缓存用途的板载存储器。处理器510可以是用于执行参考图1描述的根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。
计算机可读存储介质520,例如可以是能够包含、存储、传送、传播或传输指令的任意介质。例如,可读存储介质可以包括但不限于电、磁、光、电磁、红外或半导体系统、装置、器件或传播介质。可读存储介质的具体示例包括:磁存储装置,如磁带或硬盘(HDD);光存储装置,如光盘(CD-ROM);存储器,如随机存取存储器(RAM)或闪存;和/或有线/无线通信链路。
计算机可读存储介质520可以包括计算机程序521,该计算机程序521可以包括代码/计算机可执行指令,其在由处理器510执行时使得处理器510执行例如上面结合图1所描述的方法流程及其任何变形。
计算机程序521可被配置为具有例如包括计算机程序模块的计算机程序代码。例如,在示例实施例中,计算机程序521中的代码可以包括一个或多个程序模块,例如包括521A、模块521B、……。应当注意,模块的划分方式和个数并不是固定的,本领域技术人员可以根据实际情况使用合适的程序模块或程序模块组合,当这些程序模块组合被处理器510执行时,使得处理器510可以执行例如上面结合图2~图3D所描述的方法流程及其任何变形。
根据本发明的实施例,第一获取模块410、第一判断模块420、第二获取模块430、第二判断模块440、第三获取模块450及第三判断模块460中的至少一个可以实现为参考图5描述的计算机程序模块,其在被处理器510执行时,可以实现上面描述的相应操作。
本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合或/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结 合。所有这些组合和/或结合均落入本公开的范围。
尽管已经参照本公开的特定示例性实施例示出并描述了本公开,但是本领域技术人员应该理解,在不背离所附权利要求及其等同物限定的本公开的精神和范围的情况下,可以对本公开进行形式和细节上的多种改变。因此,本公开的范围不应该限于上述实施例,而是应该不仅由所附权利要求来进行确定,还由所附权利要求的等同物来进行限定。

Claims (22)

  1. 一种操作检测方法,包括:
    S1,在执行特定操作之前,获取执行该特定操作的执行主体;
    S2,根据第一权限集合判断所述执行主体是否具有执行该特定操作的权限,若否,则执行操作S3;
    S3,获取所述执行主体的操作状态,并根据该执行主体的操作状态获取对应的第二权限集合;
    S4,根据第二权限集合判断所述执行主体是否具有执行该特定操作的权限,若是,则执行操作S5,若否,则对所述执行主体进行处理;
    S5,获取包括所述特定操作的任务,该任务对应有执行至少一个操作的操作流程;
    S6,判断所述操作流程是否满足预设操作流程,若否,则对所述执行主体进行处理。
  2. 根据权利要求1所述的操作检测方法,其中,所述步骤S6中,判断所述操作流程是否满足预设操作流程,包括:
    获取所述操作流程所对应的至少一个操作;
    判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应的操作一致。
  3. 根据权利要求2所述的操作检测方法,其中,所述判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应操作一致,包括:
    判断所述至少一个操作中每个操作的执行主体是否与预设操作流程所对应操作的执行主体一致。
  4. 根据权利要求1-3任意一项所述的操作检测方法,其中,在所述步骤S1之前,还包括:
    S0,创建第一权限集合,所述第一权限集合包括至少一个执行主体在任意操作状态下的操作权限。
  5. 根据权利要求1-4任意一项所述的操作检测方法,其中,在所述 步骤S1之前,还包括:
    S0’,创建至少一个第二权限集合,其中,每个所述第二权限集合对应一个执行主体的一个操作状态,并且,每个所述第二权限集合包括对应执行主体在对应操作状态下的操作权限。
  6. 根据权利要求5所述的操作检测方法,其中,所述至少一个第二权限集合存储在远端,所述步骤S3中,根据该执行主体的操作状态获取对应的第二权限集合,包括:
    向远端发送请求,所述请求包括所述执行主体信息及其操作状态;
    获取远端发送的第二权限集合,其中,该第二权限集合是由所述远端响应所述请求而返回。
  7. 根据权利要求1-6任意一项所述的操作检测方法,其中,所述步骤S3中,获取所述执行主体的操作状态,至少包括:
    根据所述执行主体的调用方式确定所述执行主体的操作状态,其中,所述执行主体是由用户直接调用时,确定所述执行主体的操作状态为第一操作状态,当所述执行主体是由其他执行主体调用时,确定所述执行主体的操作状态为第二操作状态。
  8. 一种操作检测系统,包括:
    第一获取模块,用于在执行特定操作之前,获取执行特定操作的执行主体;
    第一判断模块,用于根据第一权限集合判断所述执行主体是否具有执行该特定操作的权限,若否,则执行第二获取模块;
    第二获取模块,用于获取所述执行主体的操作状态,并根据该执行主体的操作状态获取对应的第二权限集合;
    第二判断模块,用于根据第二权限集合判断所述执行主体是否具有执行该特定操作的权限,若是,则执行第三获取模块,若否,则对所述执行主体进行处理;
    第三获取模块,用于获取包括所述特定操作的任务,该任务对应有执行至少一个操作的操作流程;
    第三判断模块,用于判断所述操作流程是否满足预设操作流程,若 否,则对所述执行主体进行处理。
  9. 根据权利要求1所述的操作检测系统,其中,所述第三判断模块中,判断所述操作流程是否满足预设操作流程,包括:
    获取所述操作流程所对应的至少一个操作;
    判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应的操作一致。
  10. 根据权利要求9所述的操作检测系统,其中,所述第三判断模块判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应操作一致,包括:
    判断所述至少一个操作中每个操作的执行主体是否与预设操作流程所对应操作的执行主体一致。
  11. 根据权利要求8-10任意一项所述的操作检测系统,还包括:
    第一创建模块,用于创建第一权限集合,所述第一权限集合包括至少一个执行主体在任意操作状态下的操作权限。
  12. 根据权利要求7-11任意一项所述的操作检测系统,还包括:
    第二创建模块,用于创建至少一个第二权限集合,其中,每个所述第二权限集合对应一个执行主体的一个操作状态,并且,每个所述第二权限集合包括对应执行主体在对应操作状态下的操作权限。
  13. 根据权利要求12所述的操作检测系统,其中,所述至少一个第二权限集合存储在远端,所述第二获取模块根据该执行主体的操作状态获取对应的第二权限集合,包括:
    向远端发送请求,所述请求包括所述执行主体信息及其操作状态;
    获取远端发送的第二权限集合,其中,该第二权限集合是由所述远端响应所述请求而返回。
  14. 根据权利要求8-13任意一项所述的操作检测系统,其中,所述第二获取模块获取所述执行主体的操作状态,至少包括:
    根据所述执行主体的调用方式确定所述执行主体的操作状态,其中,所述执行主体是由用户直接调用时,确定所述执行主体的操作状态为第一操作状态,当所述执行主体是由其他执行主体调用时,确定所述执行 主体的操作状态为第二操作状态。
  15. 一种电子设备,包括:
    处理器:
    存储器,存储有计算机可执行指令,该计算机可执行指令在被所述处理器执行时,使得所述处理器执行:
    S1,在执行特定操作之前,获取执行该特定操作的执行主体;
    S2,根据第一权限集合判断所述执行主体是否具有执行该特定操作的权限,若否,则执行操作S3;
    S3,获取所述执行主体的操作状态,并根据该执行主体的操作状态获取对应的第二权限集合;
    S4,根据第二权限集合判断所述执行主体是否具有执行该特定操作的权限,若是,则执行操作S5,若否,则对所述执行主体进行处理;
    S5,获取包括所述特定操作的任务,该任务对应有执行至少一个操作的操作流程;
    S6,判断所述操作流程是否满足预设操作流程,若否,则对所述执行主体进行处理。
  16. 根据权利要求15所述的电子设备,其中,所述处理器在执行步骤S6时,判断所述操作流程是否满足预设操作流程,包括:
    获取所述操作流程所对应的至少一个操作;
    判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应的操作一致。
  17. 根据权利要求16所述的电子设备,其中,所述处理器判断所述至少一个操作中每个操作是否与所述预设操作流程中所对应操作一致,包括:
    判断所述至少一个操作中每个操作的执行主体是否与预设操作流程所对应操作的执行主体一致。
  18. 根据权利要求15-17任意一项所述的电子设备,其中,所述处理器在执行所述步骤S1之前,还执行:
    S0,创建第一权限集合,所述第一权限集合包括至少一个执行主体 在任意操作状态下的操作权限。
  19. 根据权利要求15-18任意一项所述的电子设备,其中,所述处理器在执行所述步骤S1之前,还执行:
    S0’,创建至少一个第二权限集合,其中,每个所述第二权限集合对应一个执行主体的一个操作状态,并且,每个所述第二权限集合包括对应执行主体在对应操作状态下的操作权限。
  20. 根据权利要求19所述的电子设备,其中,所述至少一个第二权限集合存储在远端,所述处理器在执行所述步骤S3时,根据该执行主体的操作状态获取对应的第二权限集合,包括:
    向远端发送请求,所述请求包括所述执行主体信息及其操作状态;
    获取远端发送的第二权限集合,其中,该第二权限集合是由所述远端响应所述请求而返回。
  21. 根据权利要求15-20任意一项所述的电子设备,其中,所述处理器在执行所述步骤S3时,获取所述执行主体的操作状态,至少包括:
    根据所述执行主体的调用方式确定所述执行主体的操作状态,其中,所述执行主体是由用户直接调用时,确定所述执行主体的操作状态为第一操作状态,当所述执行主体是由其他执行主体调用时,确定所述执行主体的操作状态为第二操作状态。
  22. 一种计算机可读介质,存储有计算机可执行指令,所述指令在被执行时用于实现如权利要求1-7任意一项所述的方法。
PCT/CN2018/123535 2018-12-25 2018-12-25 一种操作检测方法、系统及电子设备 WO2020132877A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/123535 WO2020132877A1 (zh) 2018-12-25 2018-12-25 一种操作检测方法、系统及电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/123535 WO2020132877A1 (zh) 2018-12-25 2018-12-25 一种操作检测方法、系统及电子设备

Publications (1)

Publication Number Publication Date
WO2020132877A1 true WO2020132877A1 (zh) 2020-07-02

Family

ID=71128468

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/123535 WO2020132877A1 (zh) 2018-12-25 2018-12-25 一种操作检测方法、系统及电子设备

Country Status (1)

Country Link
WO (1) WO2020132877A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104267994A (zh) * 2014-09-30 2015-01-07 北京奇虎科技有限公司 一种运行应用程序的装置和终端设备
CN105205413A (zh) * 2015-10-26 2015-12-30 青岛海信移动通信技术股份有限公司 一种数据的保护方法及装置
CN105224868A (zh) * 2014-06-03 2016-01-06 腾讯科技(深圳)有限公司 系统漏洞攻击的检测方法及装置
US20160063266A1 (en) * 2013-05-27 2016-03-03 Huawei Device Co., Ltd. System Function Invoking Method and Apparatus, and Terminal
CN108683652A (zh) * 2018-05-04 2018-10-19 北京奇安信科技有限公司 一种基于行为权限的处理网络攻击行为的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160063266A1 (en) * 2013-05-27 2016-03-03 Huawei Device Co., Ltd. System Function Invoking Method and Apparatus, and Terminal
CN105224868A (zh) * 2014-06-03 2016-01-06 腾讯科技(深圳)有限公司 系统漏洞攻击的检测方法及装置
CN104267994A (zh) * 2014-09-30 2015-01-07 北京奇虎科技有限公司 一种运行应用程序的装置和终端设备
CN105205413A (zh) * 2015-10-26 2015-12-30 青岛海信移动通信技术股份有限公司 一种数据的保护方法及装置
CN108683652A (zh) * 2018-05-04 2018-10-19 北京奇安信科技有限公司 一种基于行为权限的处理网络攻击行为的方法及装置

Similar Documents

Publication Publication Date Title
EP3365828B1 (en) Methods for data loss prevention from malicious applications and targeted persistent threats
AU2016369460B2 (en) Dual memory introspection for securing multiple network endpoints
US10242186B2 (en) System and method for detecting malicious code in address space of a process
EP3671508B1 (en) Customizing operating system kernels with secure kernel modules
US10033745B2 (en) Method and system for virtual security isolation
JP6055574B2 (ja) セキュアなオペレーティングシステム環境へのコンテキストベースのスイッチング
US9058504B1 (en) Anti-malware digital-signature verification
KR20160114037A (ko) 멀웨어의 자동화된 런타임 검출
US20230035007A1 (en) Trusted cyber physical system
US10339307B2 (en) Intrusion detection system in a device comprising a first operating system and a second operating system
JP6243479B2 (ja) コンピュータセキュリティのためのイノキュレータ及び抗体
WO2019037521A1 (zh) 安全检测的方法、装置、系统以及服务器
WO2020132877A1 (zh) 一种操作检测方法、系统及电子设备
TWI711939B (zh) 用於惡意程式碼檢測之系統及方法
WO2020132876A1 (zh) 一种操作检测方法、系统及电子设备
Fledel et al. Google android: an updated security review
JP6950304B2 (ja) セキュアエレメント、コンピュータプログラム、デバイス、サーバ及びファイル情報の照合方法
Ko et al. A mantrap-inspired, user-centric data leakage prevention (DLP) approach
US20230418933A1 (en) Systems and methods for folder and file sequestration
KR101415403B1 (ko) 공유 가능한 보안공간 제공시스템 및 그 방법
Xing Resource Squatting Hazards in Modern Operating Systems: Analyses and Mitigations

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18944602

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18944602

Country of ref document: EP

Kind code of ref document: A1