I have recently completed CEH exam and am planning to enroll myself for OSCP certification. I did research on penetration testing and read penetration testing: A hands-on introduction to hacking written by Georgia Weidman. But I am not able to understand one thing; how to determine the exploit to gain access to different machines?
For example to gain access to Windows XP machine there will be plenty of exploits and for Linux as well. So how to conclude that certain exploit can be used to gain access to the servers?
I am in learning phase of penetration testing. Any help would be really appreciated.