The invention discloses a kernel-level
code reuse type
attack detection method based on QEMU. The method mainly solves the problem of relying on hardware or need of modifying kernel
source code in the prior art. According to the method, a function module of a QEMU
virtual machine manager is expanded; each instruction which operates on the function module and in an
operating system kernel is traversed and detected;
jumping instructions relevant to the
control flow process are recognized from the instructions, wherein the
jumping instructions include ret and indirect call instructions; the
jumping target addresses of the instructions are recorded; then, the target addresses are compared with legal target addresses in the
system normal execution flow process for detecting whether a
system is normally executed or not; and meanwhile, the interruption return addresses pushed into a stack during the interruption occurrence and the return addresses used during interruption actual return are subjected to comparison
verification, so that whether
attack occurs or not is judged. The kernel-level
code reuse type
attack detection method has the advantages that by aiming at the characteristic that the
system original execution flow process needs to be changed for the
code reuse type attack, the attack can be effectively discovered by monitoring the kernel execution flow process change instructions (and positions), and the kernel-level code reuse type attack detection method can be used for protecting the security of an
operating system.