Wireless Sensor Networks (WSNs) have been deployed for a wide variety of commercial, scientific, or military applications for the purposes of surveillance and critical data collection. Malicious code injection is a serious threat to the sensor nodes which enable fake data delivery or private data disclosure. The technique of memory attestation used to verify the integrity of a device's firmware is a potential solution against the aforementioned threat, and among which low cost software-based schemes are particularly suitable for protecting the resource-constraint sensor nodes. Unfortunately, the software-based attestation usually requires additional mechanisms to provide a reliable protection when the sensor nodes communicate with the verifier via multi-hop. Alternative hardware-based attestation (e.g., TPM) guarantees a reliable integrity measurement while it is impractical for the WSN applications primary due to the high computational overhead and hardware cost. This paper proposes a lightweight hardware-based memory attestation scheme by employing a simple tamper-resistant trusted local agent which is free from any cryptographic computation and is particularly suitable for the sensor nodes. The experimental results show the effectiveness of the proposed scheme.