In this thesis two new Bayesian-Network-based models are proposed: conditional truncated densities Bayesian networks (ctdBN) and conditional densities Bayesian networks (cdBN). They model joint probability distributions of systems combining discrete and continuous random variables. We analyze the complexity of exact inference for the proposed models, concluding that they are in the same order of the one for the classical Bayesian Network model. We also analyze the challenge of learning cdBNs, proposing a score function based in the BD score as well as a whole learning algorithm based on the structural EM algorithm, assuming the existence of discrete latent variables corresponding to each continuous variable. In addition, we proof theoretically that the cdBN and ctdBN models can approximate well any Lipschitz joint probability distribution, which shows the expressiveness of these models. Within the framework of the European project SCISSOR, whose goal is cyber-security, we use the cdBN model to describe the dynamics of a SCADA system and to diagnose anomalies in observations taken in real time, interpreting an anomaly as a potential threat to the integrity of the system.