The invention discloses a full context-sensitive
program control flow integrity protection method and
system. According to the method, during an
offline analysis stage,
control flow information of a program is collected through simulative execution; an executive path is tracked during operation; the executive path, reaching a same
indirect branch, of a process is tracked; path information is matched with the
control flow information; if the matching succeeds, it is showed that a simulative executive path during
offline analysis is the same as a real executive path during operation, and a subsequent legal target address can be judged according to the
control flow information in the
offline analysis; and if a target address during operation is different from the legal target address, it is judged that the program suffers from control flow hijack
attack, so that a control flow check module notifies a process tracking module to stop the process. The invention furthermore discloses the full context-sensitive
program control flow integrity
protection system. The integrity protection is realized by tracking and checking executive path information, so that the program is prevented from being threatened by the control flow hijack
attack.