Build Your Own Pentesting Lab with SecGen

Ethical hacking labs, CTFs, and vulnerability analysis environments are invaluable for learning penetration testing techniques against vulnerable systems and vulnerability management. However, lab availability is limited due to many constraints, and often they do not change, meaning there are no new challenges.
Security Scenario Generator (SecGen) generates randomized vulnerable systems. Virtual machines are created based on a scenario specification, which describes the constraints and properties of the virtual machines to be built. For example, a scenario might specify creating a system with a remotely exploitable vulnerability that results in user-level compromise, and a locally exploitable flaw that results in root-level compromise. This would require the attacker to discover and exploit both randomly selected vulnerabilities to gain root access to the system. Alternatively, the defined scenario can be more specific, specifying certain types of services (such as FTP or SMB) or even exact vulnerabilities (by CVE).
SecGen is a Ruby application with an XML configuration language. SecGen reads its configuration—including available vulnerabilities, services, networks, users, and content—reads the requested scenario definition, applies logic to randomize the scenario, and leverages Puppet and Vagrant to provision the required virtual machines.
You can find more information and installation instructions in the GitHub repository: