We consider enhancing cyber security in voltage regulation of distribution systems in the presence of malicious attacks. Due to the increase in distributed generation, the regulation of voltage has become more complicated, requiring more sensor data to be used for control. Recently, we have developed an attack detection algorithm to find data falsification attacks on voltage measurements transmitted by sectionizing switches in the feeders to a centralized controller. In this paper, the security level of the system is further improved by introducing a controller that is capable of operating the regulation in the presence of attacks by utilizing the detection results. In particular, it identifies abnormal behavior in the sensor data and ignores measurements taking extreme values among those received. Through detailed simulation studies on a small scale distribution system, we show the effectiveness of the proposed control and analyze the relation between the number of attacks and the detectability of the attacks.