I am a Software Engineer currently and have done quite a bit of systems work as well. I love the idea of Penetration Testing and would love to work towards becoming a pentester/Certified Ethical Hacker. My question is: what are some ways one can learn basic skills in this field while remaining ethical/legal?
Self-teaching programming was an easier task for me--I could learn a language by building small applications, scripts, etc. I learned Linux by installing it on my personal computer and hacking around on it. Pentesting however requires a machine to test, which can quickly become a legal issue. I can certainly create a small application with known security issues that I can pentest myself, but that would take away from the aspect of actually finding the bug.
My main questions then are:
What ways can an aspiring pentester/CEH get hands-on learning experience without turning to black-hat hacking?
I have heard of sites that are online that are "designed to be hacked" and are practice for hackers. Are these legal/useful?
Is it worthwhile/ethical to offer free or low-cost pentesting services to improve skills? (Another great way to learn programming, sounds totally sketchy though to offer free hacking! ;) )
Thanks in advance!