CN104715202A - Hidden process detecting method and hidden process detecting device in virtual machine - Google Patents
Hidden process detecting method and hidden process detecting device in virtual machine Download PDFInfo
- Publication number
- CN104715202A CN104715202A CN201510150439.7A CN201510150439A CN104715202A CN 104715202 A CN104715202 A CN 104715202A CN 201510150439 A CN201510150439 A CN 201510150439A CN 104715202 A CN104715202 A CN 104715202A
- Authority
- CN
- China
- Prior art keywords
- address
- virtual machine
- exit
- event
- specified virtual
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
本发明公开了一种虚拟机中的隐藏进程检测方法,其中,该方法包括:截获指定虚拟机内的进程退出事件,以及截获所述指定虚拟机内的进程创建事件;根据截获的所述指定虚拟机内的进程退出和进程创建事件,维护一个记录所述指定虚拟机内真实运行进程的可信进程列表;通过遍历记录有所述指定虚拟机中的进程信息的相关数据结构,获得记录所述指定虚拟机内的进程的一个或多个不可信进程列表;通过比较可信进程列表和不可信进程列表,判断出所述指定虚拟机中的隐藏进程。本发明提供的技术方案与现有技术相比,检测更加全面和有效,特别地,能够检测针对内核对象攻击的问题,符合云服务提供商和用户的共同需求。
The invention discloses a method for detecting a hidden process in a virtual machine, wherein the method includes: intercepting a process exit event in a specified virtual machine, and intercepting a process creation event in the specified virtual machine; according to the intercepted specified Process exit and process creation events in the virtual machine, maintaining a trusted process list that records the real running process in the specified virtual machine; by traversing the relevant data structure that records the process information in the specified virtual machine, the recorded One or more untrusted process lists of the processes in the specified virtual machine; by comparing the trusted process list and the untrusted process list, the hidden process in the specified virtual machine is determined. Compared with the prior art, the technical solution provided by the present invention is more comprehensive and effective in detection, especially capable of detecting attacks on kernel objects, and meets the common needs of cloud service providers and users.
Description
技术领域technical field
本发明涉及计算机技术领域,具体涉及一种虚拟机中的隐藏进程检测方法和装置。The invention relates to the field of computer technology, in particular to a method and device for detecting hidden processes in a virtual machine.
背景技术Background technique
虚拟化技术实现了计算、存储、网络等IT资源的虚拟化,是云计算行业快速发展的基础。虚拟机(Virtual Machine)是云环境对外提供的一种最基本的服务形式,云服务提供商向个人、组织用户提供单个虚拟机或者多个虚拟机组成的虚拟网络,以满足用户对易维护、高可用性的弹性云服务的需求。在虚拟化环境中,服务以虚拟机的形式提供给用户使用,云服务提供商只能利用Libvirt等接口从虚拟机外部获得目标虚拟机的CPU、内存、磁盘、网络等资源分配和使用的信息,并不能监视到虚拟机中运行的进程行为的粒度,一旦虚拟机被攻击者植入的恶意软件控制,其对同一虚拟网络中虚拟机的安全乃至云平台本身的安全与稳定都是巨大的威胁,因此对虚拟机运行时的安全监测成为云服务提供商和用户的共同需求。Virtualization technology realizes the virtualization of computing, storage, network and other IT resources, and is the basis for the rapid development of the cloud computing industry. Virtual Machine (Virtual Machine) is the most basic form of service provided by the cloud environment. Cloud service providers provide individual and organizational users with a single virtual machine or a virtual network composed of multiple virtual machines to meet the needs of users for easy maintenance, Requirements for highly available elastic cloud services. In a virtualized environment, services are provided to users in the form of virtual machines, and cloud service providers can only use interfaces such as Libvirt to obtain resource allocation and usage information such as CPU, memory, disk, and network of the target virtual machine from outside the virtual machine , and cannot monitor the granularity of the process behavior running in the virtual machine. Once the virtual machine is controlled by malware implanted by the attacker, it will have a huge impact on the security of the virtual machine in the same virtual network and even the security and stability of the cloud platform itself. Therefore, security monitoring of virtual machine runtime has become a common requirement of cloud service providers and users.
恶意软件之所以有较大的检测难度,一个很重要的原因就是目前恶意软件广泛使用的隐藏技术。恶意软件将可执行代码注入宿主进程运行,本身便是一种隐藏进程的方法,另外,该类恶意软件往往会对注入的代码进行一些隐藏的操作,以增加检测的难度;像Rootkit这样独立执行的程序则是通过IAT HOOK、SSDT HOOK或者Inline Hook的方式在内核中修改正常内核代码的执行路径或者执行结果,经常与病毒、木马、僵尸等配合使用实现隐藏的效果。因此,针对恶意软件感染后产生的隐藏性的特点,需要研究隐藏特征在虚拟化层次上的检测方法。One of the most important reasons why malware is difficult to detect is the hidden technology widely used by malware. Malware injects executable code into the host process to run, which is itself a method of hiding the process. In addition, this type of malware often performs some hidden operations on the injected code to increase the difficulty of detection; independent execution like Rootkit The program is to modify the execution path or execution result of the normal kernel code in the kernel through IAT HOOK, SSDT HOOK or Inline Hook, and is often used in conjunction with viruses, Trojan horses, zombies, etc. to achieve hidden effects. Therefore, in view of the hidden features generated by malware infection, it is necessary to study the detection method of hidden features at the virtualization level.
现有技术中,分析Linux操作系统的内核数据结构,采用用户视图投影技术,通过遍历语义重构出来的进程控制块得到客户机的可信视图,将它和内部代理程序获得的进程列表对比,确定是否有隐藏的进程,该方法存在无法检测针对内核对象攻击的问题。In the prior art, the kernel data structure of the Linux operating system is analyzed, the user view projection technology is adopted, and the trusted view of the client is obtained by traversing the semantically reconstructed process control block, and compared with the process list obtained by the internal agent program, To determine whether there are hidden processes, this method has the problem of not being able to detect attacks against kernel objects.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的一种虚拟机中的隐藏进程检测方法和装置。In view of the above problems, the present invention is proposed to provide a hidden process detection method and device in a virtual machine that overcomes the above problems or at least partially solves the above problems.
依据本发明的一个方面,提供了一种虚拟机中的隐藏进程检测方法,该方法包括:According to one aspect of the present invention, a method for detecting hidden processes in a virtual machine is provided, the method comprising:
截获指定虚拟机内的进程退出事件,以及截获所述指定虚拟机内的进程创建事件;Intercepting a process exit event in a specified virtual machine, and intercepting a process creation event in the specified virtual machine;
根据截获的所述指定虚拟机内的进程退出和进程创建事件,维护一个记录所述指定虚拟机内真实运行进程的可信进程列表;According to the intercepted process exit and process creation events in the specified virtual machine, maintain a trusted process list that records the real running process in the specified virtual machine;
通过遍历记录有所述指定虚拟机中的进程信息的相关数据结构,获得记录所述指定虚拟机内的进程的一个或多个不可信进程列表;Obtaining one or more untrusted process lists recording processes in the specified virtual machine by traversing a related data structure that records process information in the specified virtual machine;
通过比较可信进程列表和不可信进程列表,判断出所述指定虚拟机中的隐藏进程。By comparing the trusted process list and the untrusted process list, the hidden process in the specified virtual machine is determined.
可选地,所述通过遍历记录有所述指定虚拟机中的进程信息的相关数据结构,获得记录所述指定虚拟机内的进程的一个或多个不可信进程列表包括:Optionally, the step of obtaining one or more untrusted process lists that record the processes in the specified virtual machine by traversing the relevant data structure that records the process information in the specified virtual machine includes:
通过遍历内核地址空间中的_EPROCESS数据结构、PspCidTable句柄表或者csrss.exe句柄表中的一个或多个,相应获得所述虚拟机内的一组或多组进程信息;By traversing one or more of the _EPROCESS data structure in the kernel address space, the PspCidTable handle table or the csrss.exe handle table, correspondingly obtain one or more groups of process information in the virtual machine;
根据所获得的一组或多组进程信息,生成相应的一个或多个不可信进程列表。According to the obtained one or more sets of process information, corresponding one or more untrusted process lists are generated.
可选地,所述截获指定虚拟机内的进程退出事件包括:Optionally, the intercepting the process exit event in the specified virtual machine includes:
获取进程退出关键位置地址;其中,系统对进程退出的处理在内核中都会调用NtTerminateProcess服务例程,NtTerminateProcess服务例程在完成关闭进程操作后会将退出进程的_EPROCESS管理结构的地址在进程管理结构组成的链表中解链并释放到指定地址,将该指定地址作为进程退出关键位置地址;Obtain the address of the key location of process exit; among them, the system will call the NtTerminateProcess service routine in the kernel to process the process exit, and the NtTerminateProcess service routine will put the address of the _EPROCESS management structure of the exit process in the process management structure after completing the operation of closing the process The linked list is unlinked and released to the specified address, and the specified address is used as the address of the key position for process exit;
监视进程退出关键位置地址执行事件,当该地址的代码被调用时表明一个进程结束,从该地址获得退出进程的_EPROCESS管理结构的地址。The monitoring process exits the key position address execution event, when the code at this address is called, it indicates that a process ends, and the address of the _EPROCESS management structure of the exiting process is obtained from this address.
可选地,获取进程退出关键位置地址包括:获取NtTerminateProcess服务例程的地址,根据NtTerminateProcess服务例程的地址获取进程退出关键位置地址;Optionally, obtaining the process exit key location address includes: obtaining the address of the NtTerminateProcess service routine, and obtaining the process exit key location address according to the address of the NtTerminateProcess service routine;
所述获取NtTerminateProcess服务例程的地址包括:The address of obtaining the NtTerminateProcess service routine includes:
获得KeServiceDescriptorTable数据结构的地址;Obtain the address of the KeServiceDescriptorTable data structure;
从KeServiceDescriptorTable数据结构中获得SSDT表的地址以及确定NtTerminateProcess服务例程在SSDT表中的偏移量;Obtain the address of the SSDT table from the KeServiceDescriptorTable data structure and determine the offset of the NtTerminateProcess service routine in the SSDT table;
在SSDT表的指定偏移量处获得NtTerminateProcess服务例程的地址。Gets the address of the NtTerminateProcess service routine at the specified offset in the SSDT table.
可选地,所述根据NtTerminateProcess服务例程的地址获取进程退出关键位置地址包括:Optionally, the acquisition of the process exit key location address according to the address of the NtTerminateProcess service routine includes:
获取相对于NtTerminateProcess服务例程的地址偏移0x13c的地址,该地址即为ecx寄存器的地址。Obtain the address offset by 0x13c relative to the address of the NtTerminateProcess service routine, which is the address of the ecx register.
可选地,所述监视进程退出关键位置地址执行事件包括:Optionally, the execution event of the monitoring process exiting the key location address includes:
当所述指定虚拟机发生虚拟机进入VM_ENTRY事件时:将该指定虚拟机的VCPU中的指定调试地址寄存器中地址设置为进程退出关键位置地址;置位该指定虚拟机的VCPU中的调试控制寄存器中的与所述指定调试地址寄存器对应执行控制位;置位该指定虚拟机的虚拟机控制域VMCS数据结构中的TRAP_debug控制位;When the specified virtual machine occurs when the virtual machine enters the VM_ENTRY event: the address in the specified debug address register in the VCPU of the specified virtual machine is set as the process exit key location address; the debug control register in the VCPU of the specified virtual machine is set Execute the control bit corresponding to the specified debug address register in the specified virtual machine; set the TRAP_debug control bit in the virtual machine control domain VMCS data structure of the specified virtual machine;
当所述指定虚拟机发生虚拟机退出VM_EXIT事件时:如果是调试异常事件则判断产生异常的地址是否为进程退出关键位置的地址,是则读取进程退出关键位置地址中保存的退出进程的_EPROCESS管理结构的地址。When the specified virtual machine has a virtual machine exit VM_EXIT event: if it is a debugging abnormal event, it is judged whether the address that generates the exception is the address of the key position of the process exit, and if it is, read the _ of the exit process saved in the key position address of the process exit The address of the EPROCESS management structure.
可选地,所述截获所述指定虚拟机内的进程创建事件包括:Optionally, the intercepting the process creation event in the specified virtual machine includes:
维护一个关于所述指定虚拟机的当前运行进程列表;maintaining a list of currently running processes on the specified virtual machine;
监视所述指定虚拟机内部发生的进程切换事件,当监视到该事件时获取所述指定虚拟机的VCPU的CR3寄存器中的值;所述CR3寄存器中的值为切换后进程的相关信息;Monitor the process switching event that occurs inside the specified virtual machine, and obtain the value in the CR3 register of the VCPU of the specified virtual machine when the event is monitored; the value in the CR3 register is the relevant information of the switched process;
判断获取的所述CR3寄存器中的值是否存在于所述当前运行进程列表,如果不存在则说明创建了一个进程,将获取所述CR3寄存器中的值加入所述当前运行进程列表中;Judging whether the value in the obtained CR3 register exists in the list of currently running processes, if it does not exist, it means that a process has been created, and adding the value obtained in the CR3 register to the list of currently running processes;
当截获所述指定虚拟中的进程退出事件时,从所述当前运行进程列表中删除该退出的进程。When the exit event of a process in the specified virtual is intercepted, the exited process is deleted from the list of currently running processes.
可选地,所述监视所述指定虚拟机内部发生的进程切换事件包括:Optionally, the monitoring process switching events occurring inside the specified virtual machine includes:
设置所述指定虚拟机的虚拟机控制域VMCS数据结构中的CPU_BASED_CR3_LOAD_EXITING控制位;该控制位位于VMCS数据结构的针对处理器事件的虚拟机执行控制域,决定当虚拟机执行Move to CR3指令即进程切换时是否发生虚拟机退出VM_EXIT事件。Set the CPU_BASED_CR3_LOAD_EXITING control bit in the virtual machine control domain VMCS data structure of the specified virtual machine; this control bit is located at the virtual machine execution control domain for processor events of the VMCS data structure, and determines when the virtual machine executes the Move to CR3 instruction that is the process Whether the virtual machine exits VM_EXIT event occurs when switching.
可选地,所述维护一个记录所述指定虚拟机内真实运行进程的可信进程列表包括:Optionally, said maintaining a trusted process list that records the real running process in the specified virtual machine includes:
当截获所述指定虚拟机内的一个进程创建事件时,判断该进程是否在可信进程列表中,如果不在则将该进程添加到可信进程列表中;When intercepting a process creation event in the specified virtual machine, it is judged whether the process is in the trusted process list, if not, the process is added to the trusted process list;
当截获所述指定虚拟机内的一个进程退出事件时,将该进程从可信进程列表中删除。When a process exit event in the specified virtual machine is intercepted, the process is deleted from the trusted process list.
依据本发明的另一个方面,提供了一种虚拟机中的隐藏进程检测装置,该装置包括:According to another aspect of the present invention, a hidden process detection device in a virtual machine is provided, the device comprising:
进程事件截获单元,适于截获指定虚拟机内的进程退出事件,以及截获所述指定虚拟机内的进程创建事件;A process event intercepting unit, adapted to intercept a process exit event in a specified virtual machine, and a process creation event in the specified virtual machine;
可信进程列表维护单元,适于根据截获的所述指定虚拟机内的进程退出和进程创建事件,维护一个记录所述指定虚拟机内真实运行进程的可信进程列表;The trusted process list maintenance unit is adapted to maintain a trusted process list recording the real running process in the specified virtual machine according to the intercepted process exit and process creation events in the specified virtual machine;
不可信进程列表维护单元,适于通过遍历记录有所述指定虚拟机中的进程信息的相关数据结构,获得记录所述指定虚拟机内的进程的一个或多个不可信进程列表;The untrusted process list maintenance unit is adapted to obtain one or more untrusted process lists that record the processes in the specified virtual machine by traversing the relevant data structures that record the process information in the specified virtual machine;
比较单元,适于通过比较可信进程列表和不可信进程列表,判断出所述指定虚拟机中的隐藏进程。The comparing unit is adapted to determine the hidden process in the specified virtual machine by comparing the trusted process list and the untrusted process list.
可选地,不可信进程列表维护单元,适于通过遍历内核地址空间中的_EPROCESS数据结构、PspCidTable句柄表或者csrss.exe句柄表中的一个或多个,相应获得所述虚拟机内的一组或多组进程信息;根据所获得的一组或多组进程信息,生成相应的一个或多个不可信进程列表。Optionally, the untrusted process list maintenance unit is adapted to obtain one or more of the _EPROCESS data structure in the kernel address space, the PspCidTable handle table or the csrss.exe handle table correspondingly in the virtual machine. One or more sets of process information; according to the obtained one or more sets of process information, generate corresponding one or more untrusted process lists.
可选地,所述进程事件截获单元包括:Optionally, the process event intercepting unit includes:
进程退出事件截获子单元,适于获取进程退出关键位置地址;其中,系统对进程退出的处理在内核中都会调用NtTerminateProcess服务例程,NtTerminateProcess服务例程在完成关闭进程操作后会将退出进程的_EPROCESS管理结构的地址在进程管理结构组成的链表中解链并释放到指定地址,将该指定地址作为进程退出关键位置地址;以及适于监视进程退出关键位置地址执行事件,当该地址的代码被调用时表明一个进程将要结束,从该地址获得退出进程的_EPROCESS管理结构的地址。The process exit event interception subunit is suitable for obtaining the address of the key location of the process exit; among them, the system will call the NtTerminateProcess service routine in the kernel to process the process exit. The address of the EPROCESS management structure is unlinked in the linked list formed by the process management structure and released to the specified address, and the specified address is used as the address of the key position of the process exit; and it is suitable for monitoring the execution event of the key position address of the process exit, when the code at the address is executed When called, it indicates that a process is about to end, and the address of the _EPROCESS management structure of the exiting process is obtained from this address.
可选地,所述进程退出事件截获子单元,获取NtTerminateProcess服务例程的地址,根据NtTerminateProcess服务例程的地址获取进程退出关键位置地址;具体适于获得KeServiceDescriptorTable数据结构的地址,从KeServiceDescriptorTable数据结构中获得SSDT表的地址以及确定NtTerminateProcess服务例程在SSDT表中的偏移量,在SSDT表的指定偏移量处获得NtTerminateProcess服务例程的地址。Optionally, the process exit event intercepting subunit obtains the address of the NtTerminateProcess service routine, and obtains the address of the key location of the process exit according to the address of the NtTerminateProcess service routine; it is specifically suitable for obtaining the address of the KeServiceDescriptorTable data structure, from the KeServiceDescriptorTable data structure Obtain the address of the SSDT table and determine the offset of the NtTerminateProcess service routine in the SSDT table, and obtain the address of the NtTerminateProcess service routine at the specified offset of the SSDT table.
可选地,所述进程退出事件截获子单元,获取相对于NtTerminateProcess服务例程的地址偏移0x13c的地址,该地址即为ecx寄存器的地址,将该地址作为进程退出关键位置地址。Optionally, the process exit event intercepting subunit obtains an address offset by 0x13c relative to the address of the NtTerminateProcess service routine, which is the address of the ecx register, and this address is used as the address of the key position of process exit.
可选地,所述进程退出事件截获子单元适于,Optionally, the process exit event interception subunit is adapted to,
当所述指定虚拟机发生虚拟机进入VM_ENTRY事件时:将该指定虚拟机的VCPU中的指定调试地址寄存器中地址设置为进程退出关键位置地址;置位该指定虚拟机的VCPU中的调试控制寄存器中的与所述指定调试地址寄存器对应执行控制位;置位该指定虚拟机的虚拟机控制域VMCS数据结构中的TRAP_debug控制位;When the specified virtual machine occurs when the virtual machine enters the VM_ENTRY event: the address in the specified debug address register in the VCPU of the specified virtual machine is set as the process exit key location address; the debug control register in the VCPU of the specified virtual machine is set Execute the control bit corresponding to the specified debug address register in the specified virtual machine; set the TRAP_debug control bit in the virtual machine control domain VMCS data structure of the specified virtual machine;
当所述指定虚拟机发生虚拟机退出VM_EXIT事件时:如果是调试异常事件则判断产生异常的地址是否为进程退出关键位置的地址,是则读取进程退出关键位置地址中保存的退出进程的_EPROCESS管理结构的地址。When the specified virtual machine has a virtual machine exit VM_EXIT event: if it is a debugging abnormal event, it is judged whether the address that generates the exception is the address of the key position of the process exit, and if it is, read the _ of the exit process saved in the key position address of the process exit The address of the EPROCESS management structure.
可选地,所述进程事件截获单元包括:Optionally, the process event intercepting unit includes:
进程创建事件截获子单元,适于维护一个关于所述指定虚拟机的当前运行进程列表;监视所述指定虚拟机内部发生的进程切换事件,当监视到该事件时获取所述指定虚拟机的VCPU的CR3寄存器中的值;所述CR3寄存器中的值为切换后进程的相关信息;判断获取的所述CR3寄存器中的值是否存在于所述当前运行进程列表,如果不存在则说明创建了一个进程,将获取所述CR3寄存器中的值加入所述当前运行进程列表中;当截获所述指定虚拟中的进程退出事件时,从所述当前运行进程列表中删除该退出的进程。The process creation event intercepting subunit is adapted to maintain a list of currently running processes about the specified virtual machine; monitor the process switching event that occurs inside the specified virtual machine, and obtain the VCPU of the specified virtual machine when the event is monitored The value in the CR3 register; the value in the CR3 register is the relevant information of the process after switching; judge whether the value in the obtained CR3 register exists in the current running process list, if it does not exist, it means that one is created process, will obtain the value in the CR3 register and add it to the list of currently running processes; when intercepting the exit event of a process in the specified virtual, delete the exited process from the list of currently running processes.
可选地,所述进程创建事件截获子单元,适于设置所述指定虚拟机的虚拟机控制域VMCS数据结构中的CPU_BASED_CR3_LOAD_EXITING控制位;该控制位位于VMCS数据结构的针对处理器事件的虚拟机执行控制域,决定当虚拟机执行Move to CR3指令即进程切换时是否发生虚拟机退出VM_EXIT事件。Optionally, the process creation event interception subunit is adapted to set the CPU_BASED_CR3_LOAD_EXITING control bit in the virtual machine control domain VMCS data structure of the specified virtual machine; the control bit is located in the virtual machine for processor event of the VMCS data structure The execution control domain determines whether the virtual machine exits the VM_EXIT event when the virtual machine executes the Move to CR3 instruction, that is, process switching.
可选地,可信进程列表维护单元,适于当截获所述指定虚拟机内的一个进程创建事件时,判断该进程是否在可信进程列表中,如果不在则将该进程添加到可信进程列表中;当截获所述指定虚拟机内的一个进程退出事件时,将该进程从可信进程列表中删除。Optionally, the trusted process list maintenance unit is adapted to, when intercepting a process creation event in the specified virtual machine, judge whether the process is in the trusted process list, and if not, add the process to the trusted process in the list; when a process exit event in the specified virtual machine is intercepted, the process is deleted from the trusted process list.
本发明提供的技术方案针对虚拟机被恶意软件感染后体现出的隐藏性的特点,分别维护记录指定虚拟机内真实运行进程的可信进程列表和记录指定虚拟机内的进程的不可信进程列表,通过比较可信进程列表和不可信进程列表,确定虚拟机内的进程隐藏行为的存在。与现有技术相比,本方案的检测更加全面和有效,特别地,能够检测针对内核对象攻击的问题,符合云服务提供商和用户的共同需求。The technical solution provided by the present invention aims at the hidden characteristics of the virtual machine after being infected by malicious software, respectively maintaining the trusted process list recording the real running process in the specified virtual machine and the untrusted process list recording the process in the specified virtual machine , by comparing the list of trusted processes and the list of untrusted processes, it is determined that the process hiding behavior in the virtual machine exists. Compared with the existing technology, the detection of this scheme is more comprehensive and effective. In particular, it can detect the attack on kernel objects, which meets the common needs of cloud service providers and users.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:
图1示出了根据本发明一个实施例的一种虚拟机中的隐藏进程检测方法的流程图;FIG. 1 shows a flowchart of a method for detecting hidden processes in a virtual machine according to an embodiment of the present invention;
图2示出了根据本发明一个实施例的_EPROCESS数据结构组成的双向链表的示意图;Fig. 2 shows a schematic diagram of a doubly linked list made up of _EPROCESS data structure according to one embodiment of the present invention;
图3示出了根据本发明一个实施例的Windows进程退出的流程图;Fig. 3 shows the flow chart of the exit of Windows process according to one embodiment of the present invention;
图4示出了根据本发明一个实施例的NtTerminateProcess服务例程相关数据结构的示意图;FIG. 4 shows a schematic diagram of a data structure related to an NtTerminateProcess service routine according to an embodiment of the present invention;
图5示出了根据本发明一个实施例的DR7控制位示意图;Fig. 5 shows a schematic diagram of DR7 control bits according to one embodiment of the present invention;
图6示出了根据本发明另一个实施例的Xen内核截获虚拟机内进程退出事件的流程图;FIG. 6 shows a flow chart of the Xen kernel intercepting a process exit event in a virtual machine according to another embodiment of the present invention;
图7示出了根据本发明一个实施例的影子页表模式下的地址转换示意图;FIG. 7 shows a schematic diagram of address translation in shadow page table mode according to an embodiment of the present invention;
图8示出了根据本发明一个实施例的扩展页表模式下的内存映射示意图;FIG. 8 shows a schematic diagram of memory mapping in extended page table mode according to an embodiment of the present invention;
图9示出了根据本发明一个实施例的维护一个记录指定虚拟机内真实运行进程的可信进程列表的流程图;FIG. 9 shows a flow chart of maintaining a trusted process list that records a real running process in a specified virtual machine according to an embodiment of the present invention;
图10示出了根据本发明一个实施例的一种虚拟机中的隐藏进程检测装置的示意图;FIG. 10 shows a schematic diagram of a hidden process detection device in a virtual machine according to an embodiment of the present invention;
图11示出了根据本发明一个实施例的一种虚拟机中的隐藏进程检测装置中的进程事件截获单元的示意图。Fig. 11 shows a schematic diagram of a process event intercepting unit in a hidden process detection device in a virtual machine according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
图1示出了根据本发明一个实施例的一种虚拟机中的隐藏进程检测方法的流程图。如图1所示,该方法包括:Fig. 1 shows a flowchart of a method for detecting a hidden process in a virtual machine according to an embodiment of the present invention. As shown in Figure 1, the method includes:
步骤S110,截获指定虚拟机内的进程退出事件,以及截获指定虚拟机内的进程创建事件。Step S110, intercepting the process exit event in the specified virtual machine, and intercepting the process creation event in the specified virtual machine.
步骤S120,根据截获的指定虚拟机内的进程退出和进程创建事件,维护一个记录该指定虚拟机内真实运行进程的可信进程列表。Step S120, according to the intercepted process exit and process creation events in the specified virtual machine, maintain a trusted process list that records the real running process in the specified virtual machine.
步骤S130,通过遍历记录有指定虚拟机中的进程信息的相关数据结构,获得记录该指定虚拟机内的进程的一个或多个不可信进程列表。Step S130, by traversing the relevant data structures that record the process information in the specified virtual machine, to obtain one or more untrusted process lists that record the processes in the specified virtual machine.
步骤S140,通过比较可信进程列表和不可信进程列表,判断出指定虚拟机中的隐藏进程。Step S140, by comparing the trusted process list and the untrusted process list, determine the hidden process in the specified virtual machine.
可见,图1所示的方法针对虚拟机被恶意软件感染后体现出的隐藏性的特点,分别维护记录指定虚拟机内真实运行进程的可信进程列表和记录指定虚拟机内的进程的不可信进程列表,通过比较可信进程列表和不可信进程列表,确定虚拟机内的进程隐藏行为的存在。与现有技术相比,本方案的检测更加全面和有效,特别地,能够检测针对内核对象攻击的问题,符合云服务提供商和用户的共同需求。It can be seen that the method shown in Figure 1 aims at the hidden characteristics of the virtual machine after it is infected by malware, respectively maintains and records the trusted process list of the real running process in the specified virtual machine and records the untrustworthy process of the specified virtual machine. The process list, by comparing the trusted process list and the untrusted process list, determines the existence of the process hiding behavior in the virtual machine. Compared with the existing technology, the detection of this scheme is more comprehensive and effective. In particular, it can detect the attack on kernel objects, which meets the common needs of cloud service providers and users.
Windows操作系统在内核地址空间中使用一个以_EPROCESS数据结构为节点的双向链表来维护运行中的进程信息,图2示出了根据本发明一个实施例的_EPROCESS数据结构组成的双向链表的示意图,操作系统中包括任务管理器在内的工具以及ZwQuerySystemInformation在内的常用系统调用获得进程列表的功能都是通过遍历如图2所示的双向链表实现,将某个_EPROCESS节点从该双向链表中解链并不影响系统的调度运行,因此成为直接内核对象操作技术(DKOM,Direct Kernel Object Manipulation)中使用最多的隐藏进程的手段,可见,遍历内核地址空间中的_EPROCESS数据结构可以作为构建不可信进程列表的方法之一。此外,还可以通过遍历PspCidTable句柄表或者csrss.exe句柄表构建不可信进程列表,构建多个不可信进程列表使得图1所示方法中对可信进程列表和不可信进程列表进行比较的结果更加全面。The Windows operating system uses a doubly linked list with the _EPROCESS data structure as a node to maintain the process information in operation in the kernel address space, and Fig. 2 shows a schematic diagram of a doubly linked list formed according to an embodiment of the present invention. , the tools in the operating system including the task manager and the common system calls including ZwQuerySystemInformation can obtain the process list by traversing the doubly linked list shown in Figure 2. Unlinking does not affect the scheduling operation of the system, so it has become the most used means of hiding processes in Direct Kernel Object Manipulation (DKOM, Direct Kernel Object Manipulation). It can be seen that traversing the _EPROCESS data structure in the kernel address space can be used as an unavailable One of the ways to send process list. In addition, the untrusted process list can also be constructed by traversing the PspCidTable handle table or the csrss.exe handle table, and multiple untrusted process lists are constructed so that the result of comparing the trusted process list and the untrusted process list in the method shown in Figure 1 is more accurate. comprehensive.
因此,基于上述说明,在本发明的一个实施例中,图1所示方法的步骤S130通过遍历记录有指定虚拟机中的进程信息的相关数据结构,获得记录指定虚拟机内的进程的一个或多个不可信进程列表包括:Therefore, based on the above description, in one embodiment of the present invention, step S130 of the method shown in FIG. 1 obtains one or Multiple untrusted process lists include:
步骤S131,通过遍历内核地址空间中的_EPROCESS数据结构、PspCidTable句柄表或者csrss.exe句柄表中的一个或多个,相应获得指定虚拟机内的一组或多组进程信息;Step S131, by traversing one or more of the _EPROCESS data structure in the kernel address space, the PspCidTable handle table or the csrss.exe handle table, correspondingly obtain one or more groups of process information in the specified virtual machine;
步骤S132,根据所获得的一组或多组进程信息,生成相应的一个或多个不可信进程列表。Step S132, according to the obtained one or more sets of process information, generate corresponding one or more untrusted process lists.
操作系统将运行时权限状态分为用户模式和内核模式,应用程序在大多数的时间里运行在用户模式,当遇到特权指令时进入内核模式,通过这种方式实现对系统内核的隔离和保护。系统调用是操作系统内核对用户模式下的应用程序提供的接口,应用程序通过系统调用实现对内核提供的服务的调用,当应用程序使用系统调用时,操作系统通过int 0x2E中断或者快速系统调用进入内核模式,内核调用该系统调用服务例程实现对系统调用的处理。The operating system divides the runtime permission state into user mode and kernel mode. Applications run in user mode most of the time, and enter kernel mode when encountering privileged instructions. In this way, the system kernel is isolated and protected. . The system call is the interface provided by the operating system kernel to the application program in the user mode. The application program implements the call to the service provided by the kernel through the system call. When the application program uses the system call, the operating system enters through the int 0x2E interrupt or fast system call In the kernel mode, the kernel calls the system call service routine to realize the processing of the system call.
用户模式下进程退出有多种不同的方式,包括正常的入口函数执行完毕返回、主动调用win32接口提供的进程退出的API,接收到其他进程发送的进程关闭信号等,然而无论是主动还是被动结束的进程都要经历从用户模式到内核模式转换的整个过程。图3示出了根据本发明一个实施例的Windows进程退出的流程图,如图3所示,产生退出行为的进程需要依次调用win32接口、Native API以及内核模式中的服务例程,在这个过程中,win32接口调用Native API的过程是由操作系统进行的。进程退出有多种方式,但是这些方式的函数调用关系最终会集中到两个Native API上,即Nt/ZwTerminateProcess,这两个API在内核中分别有对应的服务例程,但是ZwTerminateProcess服务例程会调用到NtTerminateProcess服务例程完成进程结束的资源释放的功能。There are many different ways for a process to exit in user mode, including returning after the normal entry function is executed, actively calling the process exit API provided by the win32 interface, receiving a process shutdown signal sent by other processes, etc. However, whether it is actively or passively terminated Every process has to go through the whole process of transition from user mode to kernel mode. Fig. 3 has shown the flowchart of the exit of Windows process according to one embodiment of the present invention, as shown in Fig. 3, the process that produces exit behavior needs to call the service routine in win32 interface, Native API and kernel mode successively, in this process Among them, the process of calling the Native API by the win32 interface is carried out by the operating system. There are many ways for a process to exit, but the function call relationship of these ways will eventually be concentrated on two Native APIs, namely Nt/ZwTerminateProcess. These two APIs have corresponding service routines in the kernel, but the ZwTerminateProcess service routine will Call the NtTerminateProcess service routine to complete the resource release function of the process termination.
从上述如图3所示的对进程退出流程的描述中可以看出,操作系统对进程退出的处理在内核中都会调用到NtTerminateProcess服务例程,通过逆向分析该服务例程的汇编代码,获知到:当虚拟机内发生进程退出事件,系统会调用NtTerminateProcess服务例程,NtTerminateProcess服务例程在完成关闭进程操作后,会将退出进程的_EPROCESS管理结构的地址在进程管理结构组成的链表中解链并释放到指定地址,本发明将该指定地址作为进程退出关键位置地址。可知,通过对该进程退出关键位置地址的监视,即可实现对指定虚拟机内的进程退出事件的截获,具体地,在本发明的一个实施例中,图1所示方法的步骤S110截获指定虚拟机内的进程退出事件包括:获取进程退出关键位置地址;监视进程退出关键位置地址执行事件,当该地址的代码被调用时表明一个进程结束,从该地址获得退出进程的_EPROCESS管理结构的地址。From the description of the process exit process shown in Figure 3 above, it can be seen that the operating system will call the NtTerminateProcess service routine in the kernel to process the process exit. By reverse analyzing the assembly code of the service routine, it is known that : When a process exit event occurs in the virtual machine, the system will call the NtTerminateProcess service routine. After the NtTerminateProcess service routine finishes closing the process, it will unlink the address of the _EPROCESS management structure of the exiting process in the linked list composed of the process management structure And released to the specified address, the present invention uses the specified address as the process exit key position address. It can be seen that by monitoring the address of the process exit key location, the interception of the process exit event in the specified virtual machine can be realized. Specifically, in one embodiment of the present invention, step S110 of the method shown in FIG. 1 intercepts the specified The process exit event in the virtual machine includes: obtaining the address of the key location of process exit; monitoring the execution event of the address of the key location of process exit, when the code at this address is called, it indicates that a process ends, and the _EPROCESS management structure of the exit process is obtained from this address address.
其中,进程退出关键位置地址的获取依赖于对NtTerminateProcess服务例程的分析,因此,在本发明的一个实施例中,上述获取进程退出关键位置地址包括:获取NtTerminateProcess服务例程的地址,根据NtTerminateProcess服务例程的地址获取进程退出关键位置地址。为了获取NtTerminateProcess服务例程的地址,本发明对Windows内核中系统调用服务例程相关的管理结构进行了逆向分析,图4示出了根据本发明一个实施例的NtTerminateProcess服务例程相关数据结构的示意图,如图4所示,NtTerminateProcess服务例程相关的数据结构包括:KeServiceDescripterTable和SSDT表,KeServiceDescripterTable是由内核导出的数据结构,保存着SSDT表的基地址以及SSDT表中服务例程入口的数量;SSDT表以数组的行书保存着各个服务例程的入口地址。因此,在本发明的一个实施例中,获取NtTerminateProcess服务例程的地址包括以下过程:首先,获得KeServiceDescriptorTable数据结构的地址;其次,从KeServiceDescriptorTable数据结构中获得SSDT表的地址以及确定NtTerminateProcess服务例程在SSDT表中的偏移量;最后,在SSDT表的指定偏移量处获得NtTerminateProcess服务例程的地址。Wherein, the acquisition of the address of the key location for process exit depends on the analysis of the NtTerminateProcess service routine. Therefore, in one embodiment of the present invention, the above-mentioned acquisition of the address of the key location for process exit includes: obtaining the address of the NtTerminateProcess service routine, according to the NtTerminateProcess service The address of the routine obtains the address of the key location of the process exit. In order to obtain the address of the NtTerminateProcess service routine, the present invention reversely analyzes the management structure related to the system call service routine in the Windows kernel, and Fig. 4 shows a schematic diagram of the relevant data structure of the NtTerminateProcess service routine according to an embodiment of the present invention , as shown in Figure 4, the data structures related to the NtTerminateProcess service routine include: KeServiceDescripterTable and SSDT table, KeServiceDescripterTable is a data structure derived by the kernel, which stores the base address of the SSDT table and the number of service routine entries in the SSDT table; SSDT The table saves the entry address of each service routine in the form of an array. Therefore, in one embodiment of the present invention, obtaining the address of the NtTerminateProcess service routine includes the following processes: first, obtain the address of the KeServiceDescriptorTable data structure; secondly, obtain the address of the SSDT table and determine that the NtTerminateProcess service routine is in the KeServiceDescriptorTable data structure offset in the SSDT table; finally, the address of the NtTerminateProcess service routine is obtained at the specified offset in the SSDT table.
在本发明的一个具体的实施例中,通过逆向分析NtTerminateProcess服务例程的汇编代码,获知当该服务例程完成关闭进程操作后,会在0x13c偏移处执行释放退出进程的_EPROCESS管理结构的功能,代码片段如下所示:In a specific embodiment of the present invention, by reversely analyzing the assembly code of the NtTerminateProcess service routine, it is known that after the service routine completes the closing process operation, it will execute the _EPROCESS management structure of releasing the exit process at the 0x13c offset function, the code snippet is as follows:
可知,在调用ObfDereferenceObject函数之前,NtTerminateProcess服务例程会把参数信息放入ecx寄存器中,此时放入ecx寄存器中的是退出进程的_EPROCESS管理结构的地址,因此,将相对于NtTerminateProcess服务例程的地址偏移0x13c的地址作为监视对象,即作为上文中所述的进程退出关键位置地址。因此,在本发明的一个实施例中,在获取到NtTerminateProcess服务例程的地址后,根据NtTerminateProcess服务例程的地址获取进程退出关键位置地址包括:获取相对于NtTerminateProcess服务例程的地址偏移0x13c的地址,该地址即为ecx寄存器的地址,也是进程退出关键位置地址。当执行到该地址时说明一个进程将要结束,从ecx寄存器中获得该进程的_EPROCESS管理结构的地址,即可确定发生退出事件的目标进程。It can be seen that before calling the ObfDereferenceObject function, the NtTerminateProcess service routine will put the parameter information into the ecx register. At this time, the address of the _EPROCESS management structure of the exiting process is put into the ecx register. Therefore, it will be relative to the NtTerminateProcess service routine The address with an address offset of 0x13c is used as the monitoring object, that is, as the key address of the process exit described above. Therefore, in one embodiment of the present invention, after obtaining the address of the NtTerminateProcess service routine, obtaining the process exit key position address according to the address of the NtTerminateProcess service routine includes: obtaining the address offset 0x13c relative to the address of the NtTerminateProcess service routine Address, the address is the address of the ecx register, and it is also the address of the key location of the process exit. When the address is executed, it means that a process will end, and the address of the _EPROCESS management structure of the process can be obtained from the ecx register to determine the target process where the exit event occurs.
基于上述各实施例的说明,可知,本发明通过截获虚拟机执行到进程退出关键位置地址的事件来截获虚拟机内的进程退出事件,该方法结合了虚拟化技术的特征以及CPU提供的调试机制,概括来说,图1所示方法的步骤S110截获指定虚拟机内进程退出事件的方法可以分为以下两个步骤:Based on the descriptions of the above-mentioned embodiments, it can be seen that the present invention intercepts the process exit event in the virtual machine by intercepting the event of the virtual machine executing to the key position address of the process exit. This method combines the characteristics of virtualization technology and the debugging mechanism provided by the CPU. In general, step S110 of the method shown in FIG. 1 intercepts the method of process exit event in the specified virtual machine can be divided into the following two steps:
首先,设置虚拟机VCPU中调试寄存器的控制位、地址;这样当虚拟机执行到进程退出关键位置地址时会产生调试异常。First, set the control bit and address of the debug register in the virtual machine VCPU; in this way, when the virtual machine executes to the key position address of the process exit, a debugging exception will be generated.
其次,Xen内核截获虚拟机内产生的调试异常事件,判断触发调试事件的地址是否为需要监视的进程退出关键位置地址,由此实现对该地址执行的监视功能。Secondly, the Xen kernel intercepts the debugging exception event generated in the virtual machine, and judges whether the address triggering the debugging event is the key location address of the process that needs to be monitored, thereby realizing the monitoring function executed on the address.
X86架构的CPU(包括物理CPU和VCPU)为了支持调试机制,提供了八个调试寄存器,DR0~DR7,通过设置这几个调试寄存器可以实现指定数据断点和指令断点触发调试异常的功能。DR0~DR3被称为调试地址寄存器,用来存放断点的线性地址,也就是说最多可以同时实现对4个线性地址的调试监视;DR6被称为调试状态寄存器,当发生调试异常时记录异常由哪一个调试地址寄存器产生以及异常触发的条件等信息;DR7被称为调试控制寄存器,通过它使得调试地址寄存器生效,并设置断点的触发条件。图5示出了根据本发明一个实施例的DR7控制位示意图,如图5所示,Ln(n=0,1,2,3)控制位置位表明DRn设置的地址只在当前的进程下触发断点;Gn(n=0,1,2,3)控制位置位表明DRn设置的地址在所有进程中都会触发断点;GD位用来启用保护调试地址寄存器的功能;R/Wn(n=0,1,2,3)由两个比特位组成,指明DRn地址触发调试异常的条件,包括指令执行(00)、数据写(01)、I/O读写(10)和不包括指令读的数据读写(11);LENn(n=0,1,2,3)由两个比特位组成,指明DRn监视地址的长度。In order to support the debugging mechanism, the CPU of X86 architecture (including physical CPU and VCPU) provides eight debugging registers, DR0~DR7. By setting these debugging registers, the function of triggering debugging exceptions by specifying data breakpoints and instruction breakpoints can be realized. DR0~DR3 are called debug address registers, which are used to store the linear addresses of breakpoints, that is to say, debugging and monitoring of up to 4 linear addresses can be realized at the same time; DR6 is called a debug status register, which records exceptions when debugging exceptions occur Information such as which debug address register is generated and the conditions for abnormal triggering; DR7 is called the debug control register, through which the debug address register takes effect and the trigger condition for the breakpoint is set. Fig. 5 shows the schematic diagram of DR7 control bit according to an embodiment of the present invention, as shown in Fig. 5, Ln (n=0,1,2,3) control bit setting shows that the address that DRn sets is only triggered under the current process Breakpoint; the Gn (n=0,1,2,3) control bit setting indicates that the address set by DRn will trigger a breakpoint in all processes; the GD bit is used to enable the function of protecting the debug address register; R/Wn (n= 0,1,2,3) consists of two bits, indicating the condition of DRn address triggering debugging exception, including instruction execution (00), data writing (01), I/O reading and writing (10) and not including instruction reading The data reading and writing (11); LENn (n=0, 1, 2, 3) consists of two bits, indicating the length of the DRn monitoring address.
与执行到特定地址产生调试异常相比,Xen内核对调试异常的截获方法相对来说比较直接,VMCS控制结构在异常位图区提供了对调试异常的截获控制位,对该控制位置位可实现对调试异常的截获。Compared with executing to a specific address to generate debugging exceptions, the interception method of the Xen kernel for debugging exceptions is relatively straightforward. The VMCS control structure provides a control bit for intercepting debugging exceptions in the exception bitmap area. Setting this control bit can realize Interception of debug exceptions.
基于上述分析,在本发明的一个实施例中,图1所示方法的步骤S110中,Xen内核监视进程退出关键位置地址执行事件,以截获指定虚拟机内的进程退出事件包括:Based on the above analysis, in one embodiment of the present invention, in the step S110 of the method shown in Figure 1, the Xen kernel monitoring process exits the execution event of the key location address, so as to intercept the process exit event in the specified virtual machine and include:
步骤S111,当指定虚拟机发生虚拟机进入VM_ENTRY事件时:将该指定虚拟机的VCPU中的指定调试地址寄存器中地址设置为进程退出关键位置地址;置位该指定虚拟机的VCPU中的调试控制寄存器中的与指定调试地址寄存器对应执行控制位;置位该指定虚拟机的虚拟机控制域VMCS数据结构中的TRAP_debug控制位。Step S111, when a virtual machine enters a VM_ENTRY event in the specified virtual machine: the address in the specified debugging address register in the VCPU of the specified virtual machine is set as the process exit key position address; the debugging control in the VCPU of the specified virtual machine is set The execution control bit corresponding to the specified debug address register in the register; the TRAP_debug control bit in the virtual machine control domain VMCS data structure of the specified virtual machine is set.
本步骤中,置位指定虚拟机的VCPU中的调试控制寄存器中的与指定调试地址寄存器对应执行控制位使得指定调试地址寄存器生效,并且,为了实现Xen内核对进程退出事件的截获,修改了Xen内核中处理虚拟机进入事件的函数,添加了设置虚拟CPU调试寄存器的部分以及置位TRAP_debug控制位的实现。In this step, the execution control bit corresponding to the specified debug address register in the debug control register in the VCPU of the specified virtual machine is set to make the specified debug address register take effect, and, in order to realize the interception of the process exit event by the Xen kernel, the Xen The function of processing the virtual machine entry event in the kernel has added the part of setting the virtual CPU debug register and the implementation of setting the TRAP_debug control bit.
步骤S112,当指定虚拟机发生虚拟机退出VM_EXIT事件时:如果是调试异常事件则判断产生异常的地址是否为进程退出关键位置的地址,是则读取进程退出关键位置地址中保存的退出进程的_EPROCESS管理结构的地址。Step S112, when the virtual machine exits the VM_EXIT event in the specified virtual machine: if it is a debugging abnormal event, then judge whether the address that generates the exception is the address of the process exit key location, and if so, read the exit process stored in the process exit key location address The address of the _EPROCESS management structure.
图6示出了根据本发明另一个实施例的Xen内核截获虚拟机内进程退出事件的流程图,在如图6所示的具体的实施例中,进程退出关键位置地址为A,指定调试地址寄存器为DR3,调试控制寄存器为DR7,其中,当指定虚拟机发生虚拟机退出VM_EXIT事件时:如果是调试异常事件则判断产生异常的地址是否为进程退出关键位置的地址,是则读取进程退出关键位置地址中保存的退出进程的_EPROCESS管理结构的地址;进一步地,本实施例还读取退出进程的页目录地址U,由于该进程已退出,因此将U从本domain记录CR3的链表中删除,将U传送到Domain0,即将退出进程从进程列表中删除,并回复VCPU中调试寄存器相关的设置。Fig. 6 shows the flow chart of the Xen kernel intercepting the process exit event in the virtual machine according to another embodiment of the present invention. In the specific embodiment shown in Fig. 6, the process exit key location address is A, and the designated debug address The register is DR3, and the debug control register is DR7. When a virtual machine exits VM_EXIT event occurs in the specified virtual machine: if it is a debugging exception event, it is judged whether the abnormal address is the address of the process exit key position, and if it is, read the process exit The address of the _EPROCESS management structure of the exit process saved in the key location address; further, this embodiment also reads the page directory address U of the exit process, and since the process has exited, U is recorded from the linked list of CR3 in this domain Delete, transfer U to Domain0, delete the exiting process from the process list, and restore the settings related to the debug register in the VCPU.
前面介绍了截获进程退出事件的方法,相对于截获NtTerminateProcess就能截获到进程退出事件来说,Windows系统中进程创建的过程比进程退出的过程复杂很多,虽然操作系统提供了类似于NtTerminateProcess的NtCreateProcess系统调用,但是进程创建并不等价于NtCreateProcess被调用,进程被创建也可以不通过调用NtCreateProcess来实现,另外,Windows各个版本执行进程创建功能的系统调用各不相同,从NtCreateProcess、NtCreateProcessEx发展到现在的NtCreateUserProcess。考虑到这两个问题,提出了适合虚拟化环境下的进程创建行为截获的方案。The method of intercepting the process exit event was introduced earlier. Compared with the process exit event that can be intercepted by intercepting NtTerminateProcess, the process creation process in the Windows system is much more complicated than the process exit process. Although the operating system provides the NtCreateProcess system similar to NtTerminateProcess Call, but process creation is not equivalent to NtCreateProcess being called, and process creation can also be realized without calling NtCreateProcess. In addition, the system calls for executing the process creation function of each version of Windows are different, from NtCreateProcess, NtCreateProcessEx to the current NtCreateUserProcess. Considering these two problems, a scheme suitable for process creation behavior interception in virtualization environment is proposed.
为了支持多任务的调度和管理,CPU提供了一系列的控制寄存器,其中CR3寄存器是操作系统实现段页式的内存管理技术中非常重要的一个控制寄存器。根据操作系统是否运行在物理地址扩展(PAE)模式,CR3寄存器中存放着不同的内容:当操作系统运行在非PAE模式时,地址空间被划分为两级:页目录(Page Directory Table,PDT)和页表(Page Table),其中页目录记录着下一级页表所在的地址,使一个进程可以有多个页表。在这种情况下CR3寄存器中存放的是当前进程的页目录所在的物理地址;当操作系统运行在PAE模式时,地址空间被划分成为三级,在页目录上一级添加了页目录指针表(Page Directory-Pointer Table,PDPT),使得一个进程可以拥有多个页目录,在这种情况下CR3寄存器中存放的是当前进程的页目录指针表的物理地址。In order to support multi-task scheduling and management, the CPU provides a series of control registers, among which the CR3 register is a very important control register for the operating system to implement the segment page memory management technology. Depending on whether the operating system is running in physical address extension (PAE) mode, different contents are stored in the CR3 register: when the operating system is running in non-PAE mode, the address space is divided into two levels: Page Directory Table (PDT) And page table (Page Table), where the page directory records the address of the next-level page table, so that a process can have multiple page tables. In this case, the CR3 register stores the physical address of the page directory of the current process; when the operating system is running in PAE mode, the address space is divided into three levels, and a page directory pointer table is added to the upper level of the page directory (Page Directory-Pointer Table, PDPT), so that a process can have multiple page directories. In this case, the CR3 register stores the physical address of the page directory pointer table of the current process.
CR3寄存器中存放的PDT/PDPT地址具有以下的特性:进程创建时会分配一个PDT/PDPT地址,该地址在进程运行的过程中不会发生变化,具有固定性;当前运行的进程拥有各自的PDT/PDPT地址,具有唯一性;进程只要被调度就会将PDT/PDPT地址加载到CR3寄存器中,具有必要性。考虑到对CR3寄存器存放的地址具有固定性、唯一性和必要性,因此可以把CR3寄存器中出现新的地址作为进程创建的标志。The PDT/PDPT address stored in the CR3 register has the following characteristics: a PDT/PDPT address will be allocated when the process is created, and the address will not change during the running of the process and is fixed; the currently running process has its own PDT The /PDPT address is unique; as long as the process is scheduled, it will load the PDT/PDPT address into the CR3 register, which is necessary. Considering that the address stored in the CR3 register is fixed, unique and necessary, a new address in the CR3 register can be used as a sign of process creation.
在虚拟化环境中,Xen内核维护着虚拟机每个VCPU的虚拟寄存器等信息,用于调度时的上下文切换。虚拟机中CR3寄存器根据内存虚拟化的不同方式存储不同的地址类型。虚拟化环境中存在下面几类地址:虚拟机虚拟地址(Guest Virtual Address,GVA):该地址对应于普通物理机中的虚拟地址,经过分页机制转换为虚拟物理地址;虚拟机物理地址(Guest PysicalAddress,GPA):对应于普通物理机的物理地址,但是因为虚拟化技术的引入虚拟机物理地址并不是真正的物理地址,也是一种逻辑的地址空间;宿主机虚拟地址(Hardware Virtual Address,HVA):Xen内核管理内存也通过分页机制完成,因此同样具有虚拟地址;宿主机物理地址(Hardware PhysicalAddress,HPA):该地址是虚拟化平台访问内存的真实的物理地址。In a virtualization environment, the Xen kernel maintains information such as virtual registers of each VCPU of a virtual machine for context switching during scheduling. The CR3 register in the virtual machine stores different address types according to different methods of memory virtualization. There are the following types of addresses in the virtualization environment: Virtual machine virtual address (Guest Virtual Address, GVA): this address corresponds to the virtual address in the ordinary physical machine, and is converted into a virtual physical address through the paging mechanism; virtual machine physical address (Guest PhysicalAddress , GPA): corresponds to the physical address of an ordinary physical machine, but because of the introduction of virtualization technology, the physical address of the virtual machine is not a real physical address, but also a logical address space; the host virtual address (Hardware Virtual Address, HVA) : The Xen kernel manages memory through the paging mechanism, so it also has a virtual address; Host Physical Address (Hardware Physical Address, HPA): This address is the real physical address for the virtualization platform to access the memory.
虚拟化技术为支持内存虚拟化提供了两种解决方案,分别是影子页表方案和扩展页表(Extended Page Table)方案。Virtualization technology provides two solutions to support memory virtualization, namely the shadow page table solution and the extended page table (Extended Page Table) solution.
图7示出了根据本发明一个实施例的影子页表模式下的地址转换示意图。如图7所示,在影子页表方案中,Xen内核为虚拟机中的每一个进程维护着和虚拟机内部同样结构和数目的页表,当虚拟机内的页表发生添加、修改、删除变化时,影子页表也要发生对应的变化,与原页表不同的是,影子页表中存储的是GVA到HPA的映射关系,当虚拟机进程发生切换时,实际上加载到CR3寄存器中的是影子页表中的页目录地址。随着硬件技术的发展,现在推出的CPU已经提供了内存虚拟化的硬件支持,即扩展页表技术(Extended Page Table,EPT),添加了GPA到HPA转换的硬件支持,如图7所示,Xen内核为每一个虚拟机维护一套实现从GPA到HPA的映射的页表以及一个指向最高级页表的指针EPT指针,每次虚拟机内存访问的请求均需经过这套页表以及EPT指针的辅助完成从GPA到HPA的转换,虚拟机内依然是通过本机页表完成GVA到GPA的转换,该过程并没有发生变化,此时CR3中存放的是GPA。FIG. 7 shows a schematic diagram of address translation in shadow page table mode according to an embodiment of the present invention. As shown in Figure 7, in the shadow page table scheme, the Xen kernel maintains the same structure and number of page tables as the virtual machine for each process in the virtual machine. When the page table in the virtual machine is added, modified, or deleted When changing, the shadow page table also needs to change accordingly. Unlike the original page table, the shadow page table stores the mapping relationship from GVA to HPA. When the virtual machine process switches, it is actually loaded into the CR3 register. is the page directory address in the shadow page table. With the development of hardware technology, the current CPU has provided hardware support for memory virtualization, that is, Extended Page Table Technology (Extended Page Table, EPT), adding hardware support for GPA to HPA conversion, as shown in Figure 7. The Xen kernel maintains a set of page tables for mapping from GPA to HPA and a pointer EPT pointer to the highest-level page table for each virtual machine. Every memory access request of a virtual machine needs to go through this set of page tables and EPT pointers. assisted to complete the conversion from GPA to HPA, the virtual machine still completes the conversion from GVA to GPA through the local page table, and the process has not changed. At this time, GPA is stored in CR3.
图8示出了根据本发明一个实施例的扩展页表模式下的内存映射示意图。可见,在EPT模式的内存虚拟化解决方案中,虚拟机CR3寄存器中存放的是虚拟机物理地址,因此具有和物理机CR3寄存器中地址同样的固定性、惟一性和必要性,因此依然可以把CR3寄存器中出现新的地址作为进程创建的标志。FIG. 8 shows a schematic diagram of memory mapping in extended page table mode according to an embodiment of the present invention. It can be seen that in the EPT mode memory virtualization solution, the virtual machine CR3 register stores the virtual machine physical address, so it has the same fixedness, uniqueness and necessity as the address in the physical machine CR3 register, so it can still be A new address appears in the CR3 register as a sign of process creation.
和截获进程退出事件使用的方法相似,为了实现对进程创建事件的截获,同样需要设置VMCS控制结构中的控制位,即CPU_BASED_CR3_LOAD_EXITING控制位,该控制位位于VMCS的针对处理器事件的虚拟机执行控制域,决定当虚拟机执行Move to CR3指令即进程切换时是否发生VM_EXIT事件。另外,在Xen内核里为每一个虚拟机维护当前运行的CR3地址链表,当虚拟机内部发生进程切换时,获得当前VCPU的CR3的值,如果该值没有出现在CR3地址链表中,说明出现了一个新的进程,把该值加入CR3地址链表中。Similar to the method used to intercept process exit events, in order to intercept process creation events, it is also necessary to set the control bit in the VMCS control structure, that is, the CPU_BASED_CR3_LOAD_EXITING control bit, which is located in the virtual machine execution control of the VMCS for processor events. Domain, which determines whether the VM_EXIT event occurs when the virtual machine executes the Move to CR3 instruction, that is, process switching. In addition, the currently running CR3 address list is maintained for each virtual machine in the Xen kernel. When a process switch occurs inside the virtual machine, the CR3 value of the current VCPU is obtained. If the value does not appear in the CR3 address list, it means that A new process adds this value to the CR3 address list.
基于上述说明,在本发明的一个实施例中,图1所示方法的步骤S110截获指定虚拟机内的进程创建事件包括:Based on the above description, in one embodiment of the present invention, step S110 of the method shown in FIG. 1 intercepting the process creation event in the specified virtual machine includes:
步骤S113,维护一个关于指定虚拟机的当前运行进程列表。Step S113, maintaining a list of currently running processes of the specified virtual machine.
步骤S114,监视指定虚拟机内部发生的进程切换事件,当监视到该事件时获取指定虚拟机的VCPU的CR3寄存器中的值;CR3寄存器中的值为切换后进程的相关信息。Step S114, monitor the process switching event that occurs inside the specified virtual machine, and obtain the value in the CR3 register of the VCPU of the specified virtual machine when the event is monitored; the value in the CR3 register is the relevant information of the switched process.
步骤S115,判断获取的CR3寄存器中的值是否存在于当前运行进程列表,如果不存在则说明创建了一个进程,将获取CR3寄存器中的值加入当前运行进程列表中。Step S115, judging whether the obtained value in the CR3 register exists in the current running process list, if not, it means that a process has been created, and adding the obtained value in the CR3 register to the current running process list.
步骤S116,当截获指定虚拟中的进程退出事件时,从当前运行进程列表中删除该退出的进程。Step S116, when intercepting the exit event of a process in the specified virtual, delete the exited process from the list of currently running processes.
其中,在一个实施例中,上述步骤S114监视指定虚拟机内部发生的进程切换事件包括:设置指定虚拟机的虚拟机控制域VMCS数据结构中的CPU_BASED_CR3_LOAD_EXITING控制位;该控制位位于VMCS数据结构的针对处理器事件的虚拟机执行控制域,决定当虚拟机执行Move to CR3指令即进程切换时是否发生虚拟机退出VM_EXIT事件。Wherein, in one embodiment, the above-mentioned step S114 monitors the process switching event that occurs inside the specified virtual machine includes: setting the CPU_BASED_CR3_LOAD_EXITING control bit in the virtual machine control domain VMCS data structure of the specified virtual machine; the control bit is located in the VMCS data structure for The virtual machine execution control domain of the processor event determines whether the virtual machine exits the VM_EXIT event when the virtual machine executes the Move to CR3 instruction, that is, process switching.
通过虚拟机内进程创建和退出事件的截获技术,可以实现可靠地监视虚拟机中每一个进程完整的生存周期,从而建立起虚拟机内真实运行的进程列表。具体来说,图9示出了根据本发明一个实施例的维护一个记录指定虚拟机内真实运行进程的可信进程列表的流程图,如图9所示,在Xen内核代码保存运行着的虚拟机信息的数据结构struct hvm_domain中添加保存可信进程列表的链表结构process_cr3_list。Through the interception technology of process creation and exit events in the virtual machine, it is possible to reliably monitor the complete life cycle of each process in the virtual machine, thereby establishing a list of processes actually running in the virtual machine. Specifically, Fig. 9 shows a flow chart of maintaining a trusted process list that records a real running process in a specified virtual machine according to an embodiment of the present invention. As shown in Fig. 9, the Xen kernel code saves the running virtual Add the linked list structure process_cr3_list to save the trusted process list in the data structure struct hvm_domain of machine information.
在本发明的另一个实施例中,图1所示方法的步骤S120维护一个记录指定虚拟机内真实运行进程的可信进程列表包括:In another embodiment of the present invention, step S120 of the method shown in FIG. 1 maintains a trusted process list that records the real running process in the specified virtual machine, including:
步骤S121,当截获指定虚拟机内的一个进程创建事件时,判断该进程是否在可信进程列表中,如果不在则将该进程添加到可信进程列表中;Step S121, when intercepting a process creation event in the specified virtual machine, judge whether the process is in the trusted process list, if not, add the process to the trusted process list;
步骤S122,当截获指定虚拟机内的一个进程退出事件时,将该进程从可信进程列表中删除。Step S122, when a process exit event in the specified virtual machine is intercepted, the process is deleted from the trusted process list.
图10示出了根据本发明一个实施例的一种虚拟机中的隐藏进程检测装置的示意图。如图10所示,该虚拟机中的隐藏进程检测装置1000包括:Fig. 10 shows a schematic diagram of an apparatus for detecting hidden processes in a virtual machine according to an embodiment of the present invention. As shown in Figure 10, the hidden process detection device 1000 in the virtual machine includes:
进程事件截获单元1010,适于截获指定虚拟机内的进程退出事件,以及截获所述指定虚拟机内的进程创建事件;The process event intercepting unit 1010 is adapted to intercept the process exit event in the specified virtual machine, and intercept the process creation event in the specified virtual machine;
可信进程列表维护单元1020,适于根据截获的所述指定虚拟机内的进程退出和进程创建事件,维护一个记录所述指定虚拟机内真实运行进程的可信进程列表;The trusted process list maintenance unit 1020 is adapted to maintain a trusted process list that records the actual running process in the specified virtual machine according to the intercepted process exit and process creation events in the specified virtual machine;
不可信进程列表维护单元1030,适于通过遍历记录有所述指定虚拟机中的进程信息的相关数据结构,获得记录所述指定虚拟机内的进程的一个或多个不可信进程列表;The untrusted process list maintenance unit 1030 is adapted to obtain one or more untrusted process lists that record the processes in the specified virtual machine by traversing the relevant data structures that record the process information in the specified virtual machine;
比较单元1040,适于通过比较可信进程列表和不可信进程列表,判断出所述指定虚拟机中的隐藏进程。The comparison unit 1040 is adapted to determine the hidden process in the specified virtual machine by comparing the trusted process list and the untrusted process list.
可见,图10所示的装置针对虚拟机被恶意软件感染后体现出的隐藏性的特点,分别维护记录指定虚拟机内真实运行进程的可信进程列表和记录指定虚拟机内的进程的不可信进程列表,通过比较可信进程列表和不可信进程列表,确定虚拟机内的进程隐藏行为的存在。与现有技术相比,本方案的检测更加全面和有效,特别地,能够检测针对内核对象攻击的问题,符合云服务提供商和用户的共同需求。It can be seen that the device shown in Figure 10 maintains and records the trusted process list of the real running process in the specified virtual machine and records the untrustworthy process of the specified virtual machine in view of the hidden characteristics of the virtual machine after being infected by malware. The process list, by comparing the trusted process list and the untrusted process list, determines the existence of the process hiding behavior in the virtual machine. Compared with the existing technology, the detection of this scheme is more comprehensive and effective. In particular, it can detect the attack on kernel objects, which meets the common needs of cloud service providers and users.
在本发明的一个实施例中,不可信进程列表维护单元1030,适于通过遍历内核地址空间中的_EPROCESS数据结构、PspCidTable句柄表或者csrss.exe句柄表中的一个或多个,相应获得所述虚拟机内的一组或多组进程信息;根据所获得的一组或多组进程信息,生成相应的一个或多个不可信进程列表。In one embodiment of the present invention, the untrusted process list maintenance unit 1030 is adapted to obtain the corresponding process by traversing one or more of the _EPROCESS data structure in the kernel address space, the PspCidTable handle table, or the csrss.exe handle table. One or more sets of process information in the virtual machine; and one or more corresponding untrusted process lists are generated according to the obtained one or more sets of process information.
图11示出了根据本发明另一个实施例的一种虚拟机中的隐藏进程检测装置的示意图。如图11所示,在本实施例中,在图10所示虚拟机中的隐藏进程检测装置的基础上,其中,进程事件截获单元1010包括:进程退出事件截获子单元1011和进程创建事件截获子单元1012。Fig. 11 shows a schematic diagram of an apparatus for detecting hidden processes in a virtual machine according to another embodiment of the present invention. As shown in Figure 11, in this embodiment, on the basis of the hidden process detection device in the virtual machine shown in Figure 10, wherein the process event interception unit 1010 includes: a process exit event interception subunit 1011 and a process creation event interception Subunit 1012.
进程退出事件截获子单元1011,适于获取进程退出关键位置地址;其中,系统对进程退出的处理在内核中都会调用NtTerminateProcess服务例程,NtTerminateProcess服务例程在完成关闭进程操作后会将退出进程的_EPROCESS管理结构的地址在进程管理结构组成的链表中解链并释放到指定地址,将该指定地址作为进程退出关键位置地址;以及适于监视进程退出关键位置地址执行事件,当该地址的代码被调用时表明一个进程将要结束,从该地址获得退出进程的_EPROCESS管理结构的地址。The process exit event intercepting subunit 1011 is adapted to obtain the address of the key location of the process exit; wherein, the system will call the NtTerminateProcess service routine in the kernel for the process exit process, and the NtTerminateProcess service routine will exit the process after completing the closing process operation. The address of the _EPROCESS management structure is unlinked in the linked list composed of the process management structure and released to the specified address, and the specified address is used as the address of the key position of process exit; and the address execution event suitable for monitoring the key position of process exit, when the code When called, it indicates that a process is about to end, and the address of the _EPROCESS management structure of the exiting process is obtained from this address.
在本发明的一个实施例中,进程退出事件截获子单元1011,获取NtTerminateProcess服务例程的地址,根据NtTerminateProcess服务例程的地址获取进程退出关键位置地址;具体适于获得KeServiceDescriptorTable数据结构的地址,从KeServiceDescriptorTable数据结构中获得SSDT表的地址以及确定NtTerminateProcess服务例程在SSDT表中的偏移量,在SSDT表的指定偏移量处获得NtTerminateProcess服务例程的地址。In one embodiment of the present invention, the process exit event intercepting subunit 1011 obtains the address of the NtTerminateProcess service routine, and obtains the process exit key location address according to the address of the NtTerminateProcess service routine; it is specifically suitable for obtaining the address of the KeServiceDescriptorTable data structure, from Obtain the address of the SSDT table in the KeServiceDescriptorTable data structure and determine the offset of the NtTerminateProcess service routine in the SSDT table, and obtain the address of the NtTerminateProcess service routine at the specified offset of the SSDT table.
在本发明的一个实施例中,进程退出事件截获子单元1011,获取相对于NtTerminateProcess服务例程的地址偏移0x13c的地址,该地址即为ecx寄存器的地址,将该地址作为进程退出关键位置地址。In one embodiment of the present invention, the process exit event interception subunit 1011 obtains an address offset by 0x13c relative to the address of the NtTerminateProcess service routine, which is the address of the ecx register, and is used as the process exit key position address .
在本发明的一个实施例中,进程退出事件截获子单元1011适于:当所述指定虚拟机发生虚拟机进入VM_ENTRY事件时:将该指定虚拟机的VCPU中的指定调试地址寄存器中地址设置为进程退出关键位置地址;置位该指定虚拟机的VCPU中的调试控制寄存器中的与所述指定调试地址寄存器对应执行控制位;置位该指定虚拟机的虚拟机控制域VMCS数据结构中的TRAP_debug控制位;当所述指定虚拟机发生虚拟机退出VM_EXIT事件时:如果是调试异常事件则判断产生异常的地址是否为进程退出关键位置的地址,是则读取进程退出关键位置地址中保存的退出进程的_EPROCESS管理结构的地址。In one embodiment of the present invention, the process exit event intercepting subunit 1011 is adapted to: when a virtual machine entry VM_ENTRY event occurs in the specified virtual machine: set the address in the specified debug address register in the VCPU of the specified virtual machine to The process exits the key location address; the corresponding execution control bit in the debug control register in the VCPU of the specified virtual machine is set; the TRAP_debug in the virtual machine control domain VMCS data structure of the specified virtual machine is set Control bit; when the virtual machine exits the VM_EXIT event in the specified virtual machine: if it is a debugging exception event, then it is judged whether the abnormal address is the address of the process exiting the key position, and if it is, the exit stored in the process exiting the key position address is read The address of the process's _EPROCESS management structure.
在本发明的一个实施例中,进程创建事件截获子单元1012,适于维护一个关于所述指定虚拟机的当前运行进程列表;监视所述指定虚拟机内部发生的进程切换事件,当监视到该事件时获取所述指定虚拟机的VCPU的CR3寄存器中的值;所述CR3寄存器中的值为切换后进程的相关信息;判断获取的所述CR3寄存器中的值是否存在于所述当前运行进程列表,如果不存在则说明创建了一个进程,将获取所述CR3寄存器中的值加入所述当前运行进程列表中;当截获所述指定虚拟中的进程退出事件时,从所述当前运行进程列表中删除该退出的进程。In one embodiment of the present invention, the process creation event interception subunit 1012 is adapted to maintain a list of currently running processes of the specified virtual machine; Obtain the value in the CR3 register of the VCPU of the specified virtual machine during the event; the value in the CR3 register is the relevant information of the process after switching; judge whether the value in the obtained CR3 register exists in the current running process list, if it does not exist, it means that a process has been created, and the value in the CR3 register will be obtained and added to the current running process list; when the process exit event in the specified virtual is intercepted, from the current running process list delete the exiting process.
在本发明的一个实施例中,进程创建事件截获子单元1012,适于设置所述指定虚拟机的虚拟机控制域VMCS数据结构中的CPU_BASED_CR3_LOAD_EXITING控制位;该控制位位于VMCS数据结构的针对处理器事件的虚拟机执行控制域,决定当虚拟机执行Move to CR3指令即进程切换时是否发生虚拟机退出VM_EXIT事件。In one embodiment of the present invention, the process creation event interception subunit 1012 is adapted to set the CPU_BASED_CR3_LOAD_EXITING control bit in the VMCS data structure of the virtual machine control domain of the specified virtual machine; the control bit is located in the processor-specific The virtual machine execution control domain of the event determines whether the virtual machine exits the VM_EXIT event when the virtual machine executes the Move to CR3 instruction, that is, process switching.
在本发明的一个实施例中,可信进程列表维护单元1020,适于当截获所述指定虚拟机内的一个进程创建事件时,判断该进程是否在可信进程列表中,如果不在则将该进程添加到可信进程列表中;当截获所述指定虚拟机内的一个进程退出事件时,将该进程从可信进程列表中删除。In one embodiment of the present invention, the trusted process list maintenance unit 1020 is adapted to, when intercepting a process creation event in the specified virtual machine, determine whether the process is in the trusted process list, and if not, set the The process is added to the trusted process list; when a process exit event in the specified virtual machine is intercepted, the process is deleted from the trusted process list.
上述各单元在实施过程中的具体的实施原理和实施例在上文中均已详细说明,在此不再赘述。The specific implementation principles and embodiments of the above-mentioned units in the implementation process have been described in detail above, and will not be repeated here.
综上所述,本发明提供的技术方案针对虚拟机被恶意软件感染后体现出的隐藏性的特点,分别维护记录指定虚拟机内真实运行进程的可信进程列表和记录指定虚拟机内的进程的不可信进程列表,通过比较可信进程列表和不可信进程列表,确定虚拟机内的进程隐藏行为的存在。与现有技术相比,本方案的检测更加全面和有效,特别地,能够检测针对内核对象攻击的问题,符合云服务提供商和用户的共同需求。To sum up, the technical solution provided by the present invention aims at the hidden characteristics of the virtual machine after being infected by malware, respectively maintains and records the trusted process list of the real running process in the specified virtual machine and records the process in the specified virtual machine The untrusted process list of the virtual machine is determined by comparing the trusted process list with the untrusted process list to determine the existence of the process hiding behavior in the virtual machine. Compared with the existing technology, the detection of this scheme is more comprehensive and effective. In particular, it can detect the attack on kernel objects, which meets the common needs of cloud service providers and users.
需要说明的是:It should be noted:
在此提供的算法和显示不与任何特定计算机、虚拟装置或者其它设备固有相关。各种通用装置也可以与基于在此的示教一起使用。根据上面的描述,构造这类装置所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual appliance, or other device. Various general purpose devices can also be used with the teachings based on this. The structure required to construct such an apparatus will be apparent from the foregoing description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的一种虚拟机中的隐藏进程检测装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the components in the device for detecting hidden processes in a virtual machine according to an embodiment of the present invention Or full functionality. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
本发明公开了A1、一种虚拟机中的隐藏进程检测方法,其中,该方法包括:The invention discloses A1, a hidden process detection method in a virtual machine, wherein the method includes:
截获指定虚拟机内的进程退出事件,以及截获所述指定虚拟机内的进程创建事件;Intercepting a process exit event in a specified virtual machine, and intercepting a process creation event in the specified virtual machine;
根据截获的所述指定虚拟机内的进程退出和进程创建事件,维护一个记录所述指定虚拟机内真实运行进程的可信进程列表;According to the intercepted process exit and process creation events in the specified virtual machine, maintain a trusted process list that records the real running process in the specified virtual machine;
通过遍历记录有所述指定虚拟机中的进程信息的相关数据结构,获得记录所述指定虚拟机内的进程的一个或多个不可信进程列表;Obtaining one or more untrusted process lists recording processes in the specified virtual machine by traversing a related data structure that records process information in the specified virtual machine;
通过比较可信进程列表和不可信进程列表,判断出所述指定虚拟机中的隐藏进程。By comparing the trusted process list and the untrusted process list, the hidden process in the specified virtual machine is determined.
A2、如A1所述的方法,其中,所述通过遍历记录有所述指定虚拟机中的进程信息的相关数据结构,获得记录所述指定虚拟机内的进程的一个或多个不可信进程列表包括:A2. The method as described in A1, wherein, by traversing the relevant data structure that records the process information in the specified virtual machine, one or more untrusted process lists that record the processes in the specified virtual machine are obtained include:
通过遍历内核地址空间中的_EPROCESS数据结构、PspCidTable句柄表或者csrss.exe句柄表中的一个或多个,相应获得所述虚拟机内的一组或多组进程信息;By traversing one or more of the _EPROCESS data structure in the kernel address space, the PspCidTable handle table or the csrss.exe handle table, correspondingly obtain one or more groups of process information in the virtual machine;
根据所获得的一组或多组进程信息,生成相应的一个或多个不可信进程列表。According to the obtained one or more sets of process information, corresponding one or more untrusted process lists are generated.
A3、如A1所述的方法,其中,所述截获指定虚拟机内的进程退出事件包括:A3. The method as described in A1, wherein the intercepting the process exit event in the specified virtual machine includes:
获取进程退出关键位置地址;监视进程退出关键位置地址执行事件,当该地址的代码被调用时表明一个进程结束,从该地址获得退出进程的_EPROCESS管理结构的地址。Obtain the process exit key location address; monitor the process exit key location address execution event, when the code at this address is called, it indicates that a process ends, and obtain the address of the _EPROCESS management structure of the exit process from this address.
A4、如A3所述的方法,其中,获取进程退出关键位置地址包括:获取NtTerminateProcess服务例程的地址,根据NtTerminateProcess服务例程的地址获取进程退出关键位置地址;A4. The method as described in A3, wherein obtaining the process exit key location address comprises: obtaining the address of the NtTerminateProcess service routine, and obtaining the process exit key location address according to the address of the NtTerminateProcess service routine;
所述获取NtTerminateProcess服务例程的地址包括:The address of obtaining the NtTerminateProcess service routine includes:
获得KeServiceDescriptorTable数据结构的地址;Obtain the address of the KeServiceDescriptorTable data structure;
从KeServiceDescriptorTable数据结构中获得SSDT表的地址以及确定NtTerminateProcess服务例程在SSDT表中的偏移量;Obtain the address of the SSDT table from the KeServiceDescriptorTable data structure and determine the offset of the NtTerminateProcess service routine in the SSDT table;
在SSDT表的指定偏移量处获得NtTerminateProcess服务例程的地址。Gets the address of the NtTerminateProcess service routine at the specified offset in the SSDT table.
A5、如A4所述的方法,其中,所述根据NtTerminateProcess服务例程的地址获取进程退出关键位置地址包括:A5, the method as described in A4, wherein, the address acquisition process exit key location address according to the NtTerminateProcess service routine includes:
获取相对于NtTerminateProcess服务例程的地址偏移0x13c的地址。Get the address at offset 0x13c relative to the address of the NtTerminateProcess service routine.
A6、如A3所述的方法,其中,所述监视进程退出关键位置地址执行事件包括:A6. The method as described in A3, wherein the monitoring process exiting the execution event of the key location address includes:
当所述指定虚拟机发生虚拟机进入VM_ENTRY事件时:将该指定虚拟机的VCPU中的指定调试地址寄存器中地址设置为进程退出关键位置地址;置位该指定虚拟机的VCPU中的调试控制寄存器中的与所述指定调试地址寄存器对应执行控制位;置位该指定虚拟机的虚拟机控制域VMCS数据结构中的TRAP_debug控制位;When the specified virtual machine occurs when the virtual machine enters the VM_ENTRY event: the address in the specified debug address register in the VCPU of the specified virtual machine is set as the process exit key location address; the debug control register in the VCPU of the specified virtual machine is set Execute the control bit corresponding to the specified debug address register in the specified virtual machine; set the TRAP_debug control bit in the virtual machine control domain VMCS data structure of the specified virtual machine;
当所述指定虚拟机发生虚拟机退出VM_EXIT事件时:如果是调试异常事件则判断产生异常的地址是否为进程退出关键位置的地址,是则读取进程退出关键位置地址中保存的退出进程的_EPROCESS管理结构的地址。When the specified virtual machine has a virtual machine exit VM_EXIT event: if it is a debugging abnormal event, it is judged whether the address that generates the exception is the address of the key position of the process exit, and if it is, read the _ of the exit process saved in the key position address of the process exit The address of the EPROCESS management structure.
A7、如A1所述的方法,其中,所述截获所述指定虚拟机内的进程创建事件包括:A7. The method according to A1, wherein the intercepting the process creation event in the specified virtual machine includes:
维护一个关于所述指定虚拟机的当前运行进程列表;maintaining a list of currently running processes on the specified virtual machine;
监视所述指定虚拟机内部发生的进程切换事件,当监视到该事件时获取所述指定虚拟机的VCPU的CR3寄存器中的值;所述CR3寄存器中的值为切换后进程的相关信息;Monitor the process switching event that occurs inside the specified virtual machine, and obtain the value in the CR3 register of the VCPU of the specified virtual machine when the event is monitored; the value in the CR3 register is the relevant information of the switched process;
判断获取的所述CR3寄存器中的值是否存在于所述当前运行进程列表,如果不存在则说明创建了一个进程,将获取所述CR3寄存器中的值加入所述当前运行进程列表中;Judging whether the value in the obtained CR3 register exists in the list of currently running processes, if it does not exist, it means that a process has been created, and adding the value obtained in the CR3 register to the list of currently running processes;
当截获所述指定虚拟中的进程退出事件时,从所述当前运行进程列表中删除该退出的进程。When the exit event of a process in the specified virtual is intercepted, the exited process is deleted from the list of currently running processes.
A8、如A7所述的方法,其中,所述监视所述指定虚拟机内部发生的进程切换事件包括:A8. The method according to A7, wherein the monitoring the process switching event occurring inside the specified virtual machine includes:
设置所述指定虚拟机的虚拟机控制域VMCS数据结构中的CPU_BASED_CR3_LOAD_EXITING控制位;该控制位位于VMCS数据结构的针对处理器事件的虚拟机执行控制域,决定当虚拟机执行Move to CR3指令即进程切换时是否发生虚拟机退出VM_EXIT事件。Set the CPU_BASED_CR3_LOAD_EXITING control bit in the virtual machine control domain VMCS data structure of the specified virtual machine; this control bit is located at the virtual machine execution control domain for processor events of the VMCS data structure, and determines when the virtual machine executes the Move to CR3 instruction that is the process Whether the virtual machine exits VM_EXIT event occurs when switching.
A9、如A1所述的方法,其中,所述维护一个记录所述指定虚拟机内真实运行进程的可信进程列表包括:A9. The method as described in A1, wherein said maintaining a list of trusted processes that records the real running processes in the specified virtual machine includes:
当截获所述指定虚拟机内的一个进程创建事件时,判断该进程是否在可信进程列表中,如果不在则将该进程添加到可信进程列表中;When intercepting a process creation event in the specified virtual machine, it is judged whether the process is in the trusted process list, if not, the process is added to the trusted process list;
当截获所述指定虚拟机内的一个进程退出事件时,将该进程从可信进程列表中删除。When a process exit event in the specified virtual machine is intercepted, the process is deleted from the trusted process list.
本发明还公开了B10、一种虚拟机中的隐藏进程检测装置,其中,该装置包括:The present invention also discloses B10, a hidden process detection device in a virtual machine, wherein the device includes:
进程事件截获单元,适于截获指定虚拟机内的进程退出事件,以及截获所述指定虚拟机内的进程创建事件;A process event intercepting unit, adapted to intercept a process exit event in a specified virtual machine, and a process creation event in the specified virtual machine;
可信进程列表维护单元,适于根据截获的所述指定虚拟机内的进程退出和进程创建事件,维护一个记录所述指定虚拟机内真实运行进程的可信进程列表;The trusted process list maintenance unit is adapted to maintain a trusted process list recording the real running process in the specified virtual machine according to the intercepted process exit and process creation events in the specified virtual machine;
不可信进程列表维护单元,适于通过遍历记录有所述指定虚拟机中的进程信息的相关数据结构,获得记录所述指定虚拟机内的进程的一个或多个不可信进程列表;The untrusted process list maintenance unit is adapted to obtain one or more untrusted process lists that record the processes in the specified virtual machine by traversing the relevant data structures that record the process information in the specified virtual machine;
比较单元,适于通过比较可信进程列表和不可信进程列表,判断出所述指定虚拟机中的隐藏进程。The comparing unit is adapted to determine the hidden process in the specified virtual machine by comparing the trusted process list and the untrusted process list.
B11、如B10所述的装置,其中,B11. The device as described in B10, wherein,
不可信进程列表维护单元,适于通过遍历内核地址空间中的_EPROCESS数据结构、PspCidTable句柄表或者csrss.exe句柄表中的一个或多个,相应获得所述虚拟机内的一组或多组进程信息;根据所获得的一组或多组进程信息,生成相应的一个或多个不可信进程列表。The untrusted process list maintenance unit is adapted to obtain one or more groups in the virtual machine by traversing one or more of the _EPROCESS data structure in the kernel address space, the PspCidTable handle table or the csrss.exe handle table Process information; according to one or more sets of obtained process information, generate corresponding one or more untrusted process lists.
B12、如B10所述的装置,其中,所述进程事件截获单元包括:B12. The device according to B10, wherein the process event interception unit includes:
进程退出事件截获子单元,适于获取进程退出关键位置地址;以及适于监视进程退出关键位置地址执行事件,当该地址的代码被调用时表明一个进程将要结束,从该地址获得退出进程的_EPROCESS管理结构的地址。The process exit event interception subunit is suitable for obtaining the address of the key position of process exit; and it is suitable for monitoring the execution event of the key position address of process exit. When the code at this address is called, it indicates that a process is about to end, and the _ of the exit process is obtained from this address. The address of the EPROCESS management structure.
B13、如B12所述的装置,其中,B13. The device of B12, wherein,
所述进程退出事件截获子单元,获取NtTerminateProcess服务例程的地址,根据NtTerminateProcess服务例程的地址获取进程退出关键位置地址;具体适于获得KeServiceDescriptorTable数据结构的地址,从KeServiceDescriptorTable数据结构中获得SSDT表的地址以及确定NtTerminateProcess服务例程在SSDT表中的偏移量,在SSDT表的指定偏移量处获得NtTerminateProcess服务例程的地址。The process exit event intercepts the subunit, obtains the address of the NtTerminateProcess service routine, and obtains the process exit key position address according to the address of the NtTerminateProcess service routine; it is specifically suitable for obtaining the address of the KeServiceDescriptorTable data structure, and obtains the SSDT table from the KeServiceDescriptorTable data structure The address and the offset of the NtTerminateProcess service routine in the SSDT table are determined, and the address of the NtTerminateProcess service routine is obtained at the specified offset of the SSDT table.
B14、如B13所述的装置,其中,B14. The device of B13, wherein,
所述进程退出事件截获子单元,获取相对于NtTerminateProcess服务例程的地址偏移0x13c的地址,将该地址作为进程退出关键位置地址。The process exit event intercepting subunit obtains an address offset by 0x13c relative to the address of the NtTerminateProcess service routine, and uses this address as the address of a key location for process exit.
B15、如B12所述的装置,其中,所述进程退出事件截获子单元适于,B15. The device according to B12, wherein the process exit event intercepting subunit is adapted to,
当所述指定虚拟机发生虚拟机进入VM_ENTRY事件时:将该指定虚拟机的VCPU中的指定调试地址寄存器中地址设置为进程退出关键位置地址;置位该指定虚拟机的VCPU中的调试控制寄存器中的与所述指定调试地址寄存器对应执行控制位;置位该指定虚拟机的虚拟机控制域VMCS数据结构中的TRAP_debug控制位;When the specified virtual machine occurs when the virtual machine enters the VM_ENTRY event: the address in the specified debug address register in the VCPU of the specified virtual machine is set as the process exit key location address; the debug control register in the VCPU of the specified virtual machine is set Execute the control bit corresponding to the specified debug address register in the specified virtual machine; set the TRAP_debug control bit in the virtual machine control domain VMCS data structure of the specified virtual machine;
当所述指定虚拟机发生虚拟机退出VM_EXIT事件时:如果是调试异常事件则判断产生异常的地址是否为进程退出关键位置的地址,是则读取进程退出关键位置地址中保存的退出进程的_EPROCESS管理结构的地址。When the specified virtual machine has a virtual machine exit VM_EXIT event: if it is a debugging abnormal event, it is judged whether the address that generates the exception is the address of the key position of the process exit, and if it is, read the _ of the exit process saved in the key position address of the process exit The address of the EPROCESS management structure.
B16、如B10所述的装置,其中,所述进程事件截获单元包括:B16. The device according to B10, wherein the process event interception unit includes:
进程创建事件截获子单元,适于维护一个关于所述指定虚拟机的当前运行进程列表;监视所述指定虚拟机内部发生的进程切换事件,当监视到该事件时获取所述指定虚拟机的VCPU的CR3寄存器中的值;所述CR3寄存器中的值为切换后进程的相关信息;判断获取的所述CR3寄存器中的值是否存在于所述当前运行进程列表,如果不存在则说明创建了一个进程,将获取所述CR3寄存器中的值加入所述当前运行进程列表中;当截获所述指定虚拟中的进程退出事件时,从所述当前运行进程列表中删除该退出的进程。The process creation event intercepting subunit is adapted to maintain a list of currently running processes about the specified virtual machine; monitor the process switching event that occurs inside the specified virtual machine, and obtain the VCPU of the specified virtual machine when the event is monitored The value in the CR3 register; the value in the CR3 register is the relevant information of the process after switching; judge whether the value in the obtained CR3 register exists in the current running process list, if it does not exist, it means that one is created process, will obtain the value in the CR3 register and add it to the list of currently running processes; when intercepting the exit event of a process in the specified virtual, delete the exited process from the list of currently running processes.
B17、如B16所述的装置,其中,B17. The device of B16, wherein,
所述进程创建事件截获子单元,适于设置所述指定虚拟机的虚拟机控制域VMCS数据结构中的CPU_BASED_CR3_LOAD_EXITING控制位;该控制位位于VMCS数据结构的针对处理器事件的虚拟机执行控制域,决定当虚拟机执行Move to CR3指令即进程切换时是否发生虚拟机退出VM_EXIT事件。The process creation event interception subunit is adapted to set the CPU_BASED_CR3_LOAD_EXITING control bit in the VMCS data structure of the virtual machine control domain of the specified virtual machine; the control bit is located in the virtual machine execution control domain for processor events of the VMCS data structure, Determines whether the virtual machine exits VM_EXIT event when the virtual machine executes the Move to CR3 instruction, that is, process switching.
B18、如B10所述的装置,其中,B18. The device of B10, wherein,
可信进程列表维护单元,适于当截获所述指定虚拟机内的一个进程创建事件时,判断该进程是否在可信进程列表中,如果不在则将该进程添加到可信进程列表中;当截获所述指定虚拟机内的一个进程退出事件时,将该进程从可信进程列表中删除。The trusted process list maintenance unit is adapted to determine whether the process is in the trusted process list when intercepting a process creation event in the specified virtual machine, and if not, add the process to the trusted process list; When a process exit event in the specified virtual machine is intercepted, the process is deleted from the trusted process list.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510150439.7A CN104715202B (en) | 2015-03-31 | 2015-03-31 | Hidden process detection method and device in a kind of virtual machine |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510150439.7A CN104715202B (en) | 2015-03-31 | 2015-03-31 | Hidden process detection method and device in a kind of virtual machine |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN104715202A true CN104715202A (en) | 2015-06-17 |
| CN104715202B CN104715202B (en) | 2018-06-12 |
Family
ID=53414520
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510150439.7A Active CN104715202B (en) | 2015-03-31 | 2015-03-31 | Hidden process detection method and device in a kind of virtual machine |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104715202B (en) |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105488415A (en) * | 2015-11-30 | 2016-04-13 | 福建天晴数码有限公司 | System process scanning method and apparatus |
| CN106529299A (en) * | 2016-12-26 | 2017-03-22 | 郑州云海信息技术有限公司 | Method for detecting and repairing malicious software Rootkit in linux system |
| CN106682494A (en) * | 2016-11-16 | 2017-05-17 | 腾讯科技(深圳)有限公司 | Information access method, device and equipment |
| CN107688481A (en) * | 2017-08-17 | 2018-02-13 | 中国电子科技集团公司第五十四研究所 | A kind of KVM virtual machine hides process detection systems for supporting multinode |
| CN107729132A (en) * | 2017-10-09 | 2018-02-23 | 武汉斗鱼网络科技有限公司 | A kind of video decoding process guard method and device |
| CN109324952A (en) * | 2018-09-30 | 2019-02-12 | 武汉斗鱼网络科技有限公司 | A method and device for detecting the number of process instances based on a memory-mapped file |
| CN110381009A (en) * | 2018-04-16 | 2019-10-25 | 北京升鑫网络科技有限公司 | A kind of detection method of the rebound shell of Behavior-based control detection |
| CN113950668A (en) * | 2019-06-24 | 2022-01-18 | 奥迪股份公司 | Motor vehicle computer system with virtual machine management device and motor vehicle |
| WO2023178915A1 (en) * | 2022-03-22 | 2023-09-28 | 三六零科技集团有限公司 | Method and system for auditing process behavior, and storage medium and computer device |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102521537A (en) * | 2011-12-06 | 2012-06-27 | 北京航空航天大学 | Detection method and device for hidden process based on virtual machine monitor |
| CN103065084A (en) * | 2012-12-27 | 2013-04-24 | 武汉大学 | Windows hidden process detection method performed at external machine of virtual machine |
| WO2013133842A1 (en) * | 2012-03-08 | 2013-09-12 | Empire Technology Development Llc | Secure migration of virtual machines |
| CN103927484A (en) * | 2014-04-21 | 2014-07-16 | 西安电子科技大学宁波信息技术研究院 | Malicious program behavior capture method based on Qemu |
| CN103996003A (en) * | 2014-05-20 | 2014-08-20 | 金航数码科技有限责任公司 | Data wiping system in virtualization environment and method thereof |
-
2015
- 2015-03-31 CN CN201510150439.7A patent/CN104715202B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102521537A (en) * | 2011-12-06 | 2012-06-27 | 北京航空航天大学 | Detection method and device for hidden process based on virtual machine monitor |
| WO2013133842A1 (en) * | 2012-03-08 | 2013-09-12 | Empire Technology Development Llc | Secure migration of virtual machines |
| CN103065084A (en) * | 2012-12-27 | 2013-04-24 | 武汉大学 | Windows hidden process detection method performed at external machine of virtual machine |
| CN103927484A (en) * | 2014-04-21 | 2014-07-16 | 西安电子科技大学宁波信息技术研究院 | Malicious program behavior capture method based on Qemu |
| CN103996003A (en) * | 2014-05-20 | 2014-08-20 | 金航数码科技有限责任公司 | Data wiping system in virtualization environment and method thereof |
Non-Patent Citations (1)
| Title |
|---|
| 罗斌: "《Lenix嵌入式操作系统》", 31 July 2014, 北京航空航天大学出版社 * |
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105488415B (en) * | 2015-11-30 | 2019-09-03 | 福建天晴数码有限公司 | The method and apparatus of scanning system process |
| CN105488415A (en) * | 2015-11-30 | 2016-04-13 | 福建天晴数码有限公司 | System process scanning method and apparatus |
| CN106682494A (en) * | 2016-11-16 | 2017-05-17 | 腾讯科技(深圳)有限公司 | Information access method, device and equipment |
| CN106529299A (en) * | 2016-12-26 | 2017-03-22 | 郑州云海信息技术有限公司 | Method for detecting and repairing malicious software Rootkit in linux system |
| CN107688481A (en) * | 2017-08-17 | 2018-02-13 | 中国电子科技集团公司第五十四研究所 | A kind of KVM virtual machine hides process detection systems for supporting multinode |
| CN107688481B (en) * | 2017-08-17 | 2023-12-15 | 中国电子科技集团公司第五十四研究所 | Multi-node-supporting KVM virtual machine hiding process detection system |
| CN107729132A (en) * | 2017-10-09 | 2018-02-23 | 武汉斗鱼网络科技有限公司 | A kind of video decoding process guard method and device |
| CN110381009A (en) * | 2018-04-16 | 2019-10-25 | 北京升鑫网络科技有限公司 | A kind of detection method of the rebound shell of Behavior-based control detection |
| CN109324952A (en) * | 2018-09-30 | 2019-02-12 | 武汉斗鱼网络科技有限公司 | A method and device for detecting the number of process instances based on a memory-mapped file |
| CN109324952B (en) * | 2018-09-30 | 2021-09-07 | 武汉斗鱼网络科技有限公司 | A method and device for detecting the number of process instances based on a memory-mapped file |
| CN113950668A (en) * | 2019-06-24 | 2022-01-18 | 奥迪股份公司 | Motor vehicle computer system with virtual machine management device and motor vehicle |
| US12373234B2 (en) | 2019-06-24 | 2025-07-29 | Audi Ag | Motor vehicle computer system with hypervisor, and motor vehicle |
| WO2023178915A1 (en) * | 2022-03-22 | 2023-09-28 | 三六零科技集团有限公司 | Method and system for auditing process behavior, and storage medium and computer device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN104715202B (en) | 2018-06-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104715202B (en) | Hidden process detection method and device in a kind of virtual machine | |
| US20240211618A1 (en) | Inhibiting Memory Disclosure Attacks using Destructive Code Reads | |
| Zhang et al. | Spectre: A dependable introspection framework via system management mode | |
| CN109923546B (en) | Event filtering for virtual machine security applications | |
| CN103460179B (en) | Method and apparatus for transparently instrumenting an application | |
| Azab et al. | HIMA: A hypervisor-based integrity measurement agent | |
| Sharif et al. | Secure in-vm monitoring using hardware virtualization | |
| Amit et al. | The design and implementation of hyperupcalls | |
| Jang et al. | Atra: Address translation redirection attack against hardware-based external monitors | |
| US20080127114A1 (en) | Framework for stealth dynamic coarse and fine-grained malware analysis | |
| More et al. | Virtual machine introspection: towards bridging the semantic gap | |
| Willems et al. | Cxpinspector: Hypervisor-based, hardware-assisted system monitoring | |
| Zhao et al. | Seeing through the same lens: introspecting guest address space at native speed | |
| Deng et al. | Dancing with wolves: Towards practical event-driven vmm monitoring | |
| Ding et al. | HyperVerify: A VM-assisted architecture for monitoring hypervisor non-control data | |
| Zhou et al. | A coprocessor-based introspection framework via intel management engine | |
| Xuan et al. | Toward revealing kernel malware behavior in virtual execution environments | |
| Wang et al. | Making information hiding effective again | |
| Mahapatra et al. | An online cross view difference and behavior based kernel rootkit detector | |
| Wen et al. | Implicit detection of hidden processes with a feather-weight hardware-assisted virtual machine monitor | |
| Wang et al. | Exploring efficient and robust virtual machine introspection techniques | |
| Wang et al. | NOR: towards non-intrusive, real-time and OS-agnostic introspection for virtual machines in cloud environment | |
| Gadaleta et al. | Hyperforce: Hypervisor-enforced execution of security-critical code | |
| Paakkola | Assessing performance overhead of Virtual Machine Introspection and its suitability for malware analysis | |
| Tang et al. | Virtav: An agentless antivirus system based on in-memory signature scanning for virtual machine |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20220726 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |