Penetration testing is a form of ethical hacking in which one uses tools to see whether a system can be penetrated. This is usually done in the professional world by professional analysts, and by request of the owner of the system to be tested. There are three main forms of penetration testing:
Black box testing: The tester has no knowledge of the workings of the system to be penetrated. They must deduce the operation of the system. This tests for attacks without inside information.
White box testing: The tester has knowledge of the system's operation, but not passwords, encryption keys, etc. They may obtain this info by being given the source code of the infrastructure. This helps test against attacks carried out with inside information.
Gray box testing: A cross between black box and white box testing, the tester has some knowledge. Used to test against attacks during a partial leak of information regarding infrastructure.