Dynamic integrity measurement and attestation: towards defense against return-oriented programming attacks