Enterprise networks constantly face new security challenges. Obtaining complete network security is almost impossible, especially when usability requirements are taken into account. Previous research have provided ways to identify attack paths due to network vulnerabilities and misconfiguration, but few have addressed ways to correct them, especially when considering usability requirements. This thesis presents an approach based on the learning algorithm Population Based Incremental Learning in order to solve a constrained optimization problem with the intention of increasing network security. Preliminary results show that this approach is effective, scalable and reliable.