The invention discloses a host and guest message tunnel communication method and
system based on virtualized
black box escape. The method comprises the following steps: firstly, detecting a key function address or symbol information of a
host machine by using a QEMU
vulnerability; secondly, capturing a command input by a user, and monitoring command execution result data returned by the
host machine at the same time; and according to
vulnerability detection and monitoring results, dynamically analyzing and generating a
shellcode character string capable of triggering command execution of a
host machine, and outputting the
shellcode character string to a terminal. And finally, covering and writing the
shellcode into a corresponding file reserved area, compiling, and when the
virtual machine end runs, triggering host
machine command execution through a QEMU
vulnerability attack surface, and returning an execution result to the
virtual machine end in real time by utilizing a message tunnel constructed by the vulnerability. The method is suitable for a typical
cloud computing security scene in which a host
machine is strictly isolated from a network and a user cannot directly interact with the host
machine, and the
visibility and
troubleshooting efficiency of security problems in a virtual environment are improved.