The book chapter presents a solution to enhance the resilience of multi-agent cooperative systems against cyber-attacks. Specifically, the threat involves adversaries aiming to prevent the cooperative systems from achieving consensus by launching false data injection (FDI) or denial-of-service (DoS) attacks on the communication network. First, a distributed algorithm is proposed to identify critical edges, via online estimation/learning of the network’s parameters, whose removals disconnect the network. An adaptive network reconfiguration algorithm is then presented to remove those critical edges, thus ensuring the resilient operation of the cooperative systems against arbitrary DoS attacks. Additionally, a digital twin, interconnected with the cooperative systems, is introduced to simultaneously ensure the resiliency of the cooperative systems against FDI attacks and increase the redundancy of the network. Finally, it is illustrated how the proposed defense framework also allows for detecting and identifying in real-time both attack vectors in the network. The efficacy of the proposed solution is demonstrated through numerical simulations, showcasing their effectiveness in protecting the cooperative systems against cyber threats.