Ensuring Application Integrity: A Survey on Techniques and Tools