How to setup hacking or penetration testing lab on a single machine?

Penetration testing also called pen testing is the practice of testing a computer system, network or Web application to find vulnerabilities that an attacker could...