to safeguard against insider threats and unauthorized access attempts, which can exploit single points of failure within the system [14].  
In response to these security challenges, alternative paradigms like FL have gained traction [15]. FL decentralizes data processing and model training, thereby distributing the risk associated with data breaches across multiple devices [16; 17]. By keeping data local to where they are generated, FL mitigates the exposure of sensitive information during transmission and storage [18]. This decentralized approach not only enhances data security but also reduces the potential impact of security breaches, offering a more resilient framework for machine learning in IoT and other data-intensive applications [19; 20].  
FL emerges as a promising solution to the inefficiencies of centralized data systems. By distributing the model training across decentralized devices while keeping the data localized, FL addresses the concerns regarding data privacy [20; 21; 22] and server failure [20]. Despite its potential, however, FL introduces its own set of security challenges. The decentralized nature of FL systems can render them vulnerable to various attacks targeting models, data, and privacy. This paper presents an in-depth survey of the FL techniques used against data, privacy, and model attacks. Table 1 presents a comparison with the state-of-the-art surveys. Evidently, some of the presented techniques fail to mention all the defense frameworks used to defend FL.  
The main contributions of this paper are as follows:  
1. The paper offers an exhaustive overview of the defense mechanisms in FL, categorizing them into pre-aggregation, in-aggregation, and post-aggregation defenses. It systematically explores how these defenses protect against data, privacy, and model attacks, making it a critical resource for researchers and practitioners.
2. The paper provides a comparative analysis of the existing surveys, identifying gaps in the literature. It demonstrates that the previous surveys have not comprehensively covered all the defense frameworks, thus positioning this paper as a more complete resource in the domain of FL security.
3. The paper not only reviews the existing defenses but also outlines the critical areas for future research. It calls for innovations in handling unreliable participants, improving the energy efficiency in FL, and developing new defense mechanisms that can adapt to the evolving threat landscape.
4. Recognizing the dynamic nature of the threats in FL environments, the paper stresses the need for continuous innovation in defense strategies. It advocates for comprehensive strategies that can adapt to new challenges, ensuring the integrity and reliability of decentralized machine learning systems.  
\begin{table}
\begin{tabular}{l c c c c c c c c c c c c c c c c c} \hline \hline
**Ref.** & **AT** & **P** & **BRA** & **R** & **D\&R** & **RCS** & **AUA** & **Ho** & **KD** & **SMP** & **TEE** & **SL** & **PG** & **DP** & **BC** & **In** \\ \hline [23] & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ \\ [24] & ✓ & ✗ & ✓ & ✓ & ✓ & ✗ & ✓ & ✓ & ✓ & ✗ & ✓ & ✓ & ✗ & ✓ & ✓ & ✗ & ✗ \\ [25] & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✓ & ✗ & ✗ & ✓ & ✓ & ✗ & ✗ \\ [26] & ✗ & ✗ & ✓ & ✗ & ✓ & ✗ & ✗ & ✓ & ✗ & ✗ &The remainder of this paper is organized as follows and is presented Figure 1: Section 2 provides an overview of FL. Section 3 discusses the different types of FL. Section 4 offers a comprehensive overview of the various attacks that can target FL systems, categorizing them into data, model, and privacy attacks. Section 5 explores the defense strategies to mitigate these attacks, with an in-depth look at pre-aggregation, in-aggregation, and post-aggregation defenses. Section 6 presents the defense frameworks against model and data attacks, while Section 7 focuses on the privacy frameworks. Section 8 discusses the challenges, Section 9 outlines the future directions, and Section 11 concludes the paper.