The skill of gathering information about your target is an essential skill that any penetration tester should have.
There is a big difference between passive and active information gathering. Passive information gathering leverages publicly available information. Active information gathering involves direct interaction with the target system. Active information gathering crosses the line when it comes to laws in specific countries, as some countries deem it illegal to perform any type of penetration test without permission—this is where your "get out of jail free card" (as discussed in Chapter 1, Introduction to Penetration Testing) comes in. It's important to have the right authorizations before you perform any active information gathering.
The information you gather about your target will be used to plan your attack. In...