Software-Based Property Enforcement For Detecting Hardware Anomalies