Each host is a node. An infected host (state I) contacts each healthy neighbour at rate β; a contact succeeds with probability reduced by patching (1−p) and, across departments, by segmentation (1−s). After a mean time 1/γ its data are fully encrypted (E) and it stops spreading. At detection time td responders isolate infected hosts at rate 1/τ (state C, contained).
R0 = β(1−p)(k_in + (1−s)k_out) / γ well-mixed final size: z = 1 − exp(−R0 z) recovery time = (n_backup t_restore + n_nobackup t_rebuild) / crews
R0 < 1 means an outbreak fades out; above 1 a large fraction is hit unless detection or segmentation cut it short. Simplifications: a 40-host graph, one seed, constant rates, no attacker adaptation, backups assumed offline and uncompromised. This page contains no malware or attack technique; it is a defensive planning toy. The checks compare the stochastic code against the textbook SIR final-size equation.