Industrial Control Systems (ICS) are frequently used in manufacturing and critical infrastructures like water treatment, chemical plants, and transportation schemes. Citizens tend to take modern-day conveniences such as trains, planes or tap water for granted without considering the critical systems involved for their operations. Interrupting these industries could lead to disastrous consequences, leading to financial losses or even costing human lives. For that reason, researchers have been actively investigating the threats targeting ICS. In this paper, the authors propose a mechanism of attack detection and mitigation for attacks focusing on the input memory of Programming Logic Controllers (PLCs). To help investigate this concept, a testbed that models a clean water supply system was built using components and technologies currently used in the industry. The mechanism supporting attack detection and response for the input memory is implemented within the PLC itself as part of its programming. The mechanism of response involves three different techniques: optimised datablocks, switching between control strategies and obtaining the sensor readings directly from its analogue channel. The results demonstrate the feasibility of the proposed approach along with the effectiveness of each response mechanism.