The paper considers the problem of detecting cyber-attacks occurring in communication networks for distributed control schemes. A distributed methodology is proposed to detect the presence of malicious attacks aimed at compromising the stability of large-scale interconnected systems and multi-agent systems governed by consensus-based controllers. Only knowledge of the local model is required. The detectability properties of the proposed method are analyzed. A class of undetectable attacks is identified. Preliminary simulation resultsshow the effectiveness of the proposed approach.