  Attack graphs are commonly used to analyse the security of medium-sized to
large networks. Based on a scan of the network and likelihood information of
vulnerabilities, attack graphs can be transformed into Bayesian Attack Graphs
(BAGs). These BAGs are used to evaluate how security controls affect a network
and how changes in topology affect security. A challenge with these
automatically generated BAGs is that cycles arise naturally, which make it
impossible to use Bayesian network theory to calculate state probabilities. In
this paper we provide a systematic approach to analyse and perform computations
over cyclic Bayesian attack graphs. %thus providing a generic approach to
handle cycles as well as unifying the theory of Bayesian attack graphs. Our
approach first formally introduces two commonly used versions of Bayesian
attack graphs and compares their expressiveness. We then present an
interpretation of Bayesian attack graphs based on combinational logic circuits,
which facilitates an intuitively attractive systematic treatment of cycles. We
prove properties of the associated logic circuit and present an algorithm that
computes state probabilities without altering the attack graphs (e.g., remove
an arc to remove a cycle). Moreover, our algorithm deals seamlessly with all
cycles without the need to identify their types. A set of experiments using
synthetically created networks demonstrates the scalability of the algorithm on
computer networks with hundreds of machines, each with multiple
vulnerabilities.
