The invention belongs to the technical field of
software protection, and particularly relates to a
control flow confusion method based on Gilbreath conjecture. According to the method, the opaque predicate based on the Gilbreath sequence is constructed, and a
control flow flattening and dynamic assignment mechanism is combined, so that the
control flow structure is recombined, and the code logic shows the characteristics of
high complexity and difficulty in analysis. According to the method, the mathematical characteristics of the Gilbreath conjecture are utilized, so that the generated opaque predicate has the characteristics of pseudo-randomness and low
predictability, and the anti-analysis capability of control flow
confusion is enhanced. Experimental results show that compared with a traditional
confusion method depending on simple grammar replacement or rearrangement, the opaque predicate based on the Gilbreath conjecture constructed by the method can effectively enhance the complexity of control flow confusion, so that a
reverse analysis tool is difficult to recover original execution logic. Meanwhile, compared with a traditional confusion method, on the premise that high safety is guaranteed, the influence of confusion on the program running efficiency is reduced, and good practicability and adaptability are achieved.