The invention discloses a hardware-assisted code-reuse-
attack-resistant
defence system and method, wherein the
defence system comprises a pre-
processing module, a cache, a memory, a CPU and an
encryption and decryption architecture; and the
encryption and decryption architecture comprises a PUF module, a first key register, a first length register, a second key register, a second length register,a PUF
encryption module, a
Hamming distance coding module, a
Hamming distance decoding module, a decompression module and a judgment module. According to the hardware-assisted code-reuse-
attack-resistant
defence system and method disclosed by the invention, the ROP
attack is resisted by utilizing and matching the
Hamming distance between the return address of a program and a key; because the Hamming distance is coded, the security problem that an attacker can guess a key generated by the PUF module in a
plaintext attack manner in the past work can be eliminated; therefore, the security is high; simultaneously, an instruction-
level data hiding technology is applied to JOP attack defence; therefore, the performance cost is low; an
instruction set does not need to be changed; the universalityis good; and the security is high.