The technology described implements attestation programs that employ “code reuse” techniques. In particular, the technology relates to auto-generating attestation programs for, among other aspects, detecting whether a program has been modified. In one non-limiting example, the technology uses a tool that scans a software program (e.g., a video game) code for usable code sequences. The tool can automatically combine code sequences to generate a large number of attestation programs of different variety (e.g., memory checks, hashing).