In the field of covert data integrity attacks, considerable attention has focused on two important issues. One is the issue of how to change the state of a plant, and the other is how to avoid being detected by anomaly detectors. A two-loop covert attack is presented to provide an integrated solution for these two issues. As an exploratory attempt to establish the feasibility of machine learning-based covert attacks, it applies the least squares support vector machine to constructing covert attacks. The proposed attack consists of an attack loop and a covert loop, which are based on an attack agent and a covert agent, respectively. The attack agent can move the steady state of a target plant to a desired state, and the covert agent can closely imitate the normal steady state of the plant to cover up the attack agent. In particular, the attack is directed to proportional-integral-derivative algorithms. Experiments are carried out to demonstrate the feasibility of the proposed attack and show the applicability of machine learning methods in constructing covert attacks.