Every Wednesday evening about two dozen teenagers and 20-somethings gather in a New York City computer lab and start hacking.

But they're not shadowy criminals: They're students training to become "white-hat" hackers, cybersecurity experts dedicated to protecting data and information for businesses and governments.

Hacking attempts against federal agencies and companies have become an almost daily occurrence—and experts say there's a dearth of highly trained experts with real-world experience.

That's why students from the Polytechnic Institute of New York University are increasingly being trained to develop hands-on skills.

Instead of just , they're honing their hacking skills with weekly Hack Night events, competing in hacking competitions and attempting to discover for companies like Samsung and through so-called bug bounty programs.