Pentesting is always official can be done on several levels, depending on the purpose of the network or network attached infrastructure that is tested. It is not to be confused with cracking or trespassing, and thus has nothing to do with grey or black hat hacking, it's all white hat.
The purpose of pentests is to security certify network infrastructure, mostly for compliance and insurance purposes. There are several certificates that all represent a different level of testing.
It is a good business at the highest level, it is a very bad business if you're not at the top.
What do you need to make a lot of money being a penetration tester:
- you need to be a lawyer or an accountant, build up a business doing that, then hire some networking geeks that have never been outside in their entire life, and exploit them;
- you need to study computer sciences and then self-study networking technologies, Linux, GNU/Linux, hardware architectures, micro-electronics, etc... so that you can identify and exploit vulnerabilities, and then find a job at a large consultancy firm, where you get paid to get exploited by lawyers and accountants that make more than you;
- or you need to lead an exemplary lifestyle, study computer sciences, micro-electronics, social sciences, UNIX/Linux, and get really good at it... first, and than study law afterwards. Also make sure that you've never been arrested, you've never been in the press unless for completely heroic neutral patriotic acts (like - while waving your nations flag and humming the national hymn - saving a preacher's life in front of plenty of whitnesses, by rescuing him from a tree in which he went after his kitten and got stuck), make sure no one ever ever steps into your car with something in his pocket, make sure you never get caught drunk or expressing an opinion that might be considered subversive, make sure you have no debt whatsoever, etc... and then apply for a governmental security clearance, which is something you will need to get the good contracts as a pentester.
Let me explain what pentesters do from practice: they perform a set number of tests required either by legal compliance or by insurance companies, and deliver a certification about that, and a few recommendations that need to be implemented by a company, which for that company amounts to letting a secretary type some stuff and sending a memo to everyone. That's it.
You also need to be compliant yourself, which means that you have to make endless reports, and report any illegal activity you've encountered while pentesting, which you never do, because if you did encounter such illegal activity, you would have to report it, testify about it, thereby breach customer confidentiality, get burned, and lose your career, so you happen to only pentest at a time when there is no sign of illegal activity (like emails between sales managers of competing companies about product pricing of products, confidential product pricelists of competitors, confidential reports of boards of directors about accounting technology, etc...) on the network. Coincidently, at the time you perform your pentest, these things are not on the infrastructure you are performing tests on... they really aren't, you know... because you've studied so hard that you know how not to find such information, and perform the pentest like any half-witted sysadmin with a Cisco and Microsoft networking certification. Do not underestimate the amount of study and knowledge it takes to make sure you look as dumb and ignorant as possible!
You have to understand what the purpose of the job of a pentester is. Example: a large software and services company has to adopt a privacy policy that prevents them from selling personal customer data. They also need to pay the shareholders a record amount of dividend per share to look good, and so that the board of directors can cash in obscene bonuses. So they make sure that they meet and exceed all the legal and insurance compliance they have to meet, and get successful pentesters to certify that. When they are really sure that all the requirements are met, the unexpected happens: their network is compromised by some non-identifiable hacker group operating from behind a Russian or Chinese IP, and their customer data is compromised. Luckily, no company data was compromised, all the IP and research was secured, but the customer data sadly was accessed and probably stolen. But the company did everything right you know: they shut down their online services to their customers as soon as the attack was over, they immediately called their insurance company to claim compensation for the company's loss, and they issued a warning to customers that, although customers have no claim against the company because of the Terms of Service and Terms and Conditions, and although the company can't say for sure what data was compromised, customers should probably change their passwords and credit cards, and relocate to another country and change their name and get plastic surgery to be on the safe side, but don't worry, their beloved company has been amply compensated by the insurance company, and the service will continue at the same price per month as before...
See why the most successful pentesters are the "Big n", so basically lawyers and accountants? Often the very same guys that are the company's chartered accountants and lawyers in all other matters?
Of course the content of this post is completely hypothetical, and no reference to any real-life event is made, and any resemblance with companies or persons, living or dead, is entirely coincidental.
On the other hand, there is also another job, that is more technical, less lucrative, but might be more interesting for those no so inclined to study law: forensic networking specialist.
These are the guys that are hired to figure out what happens when there was an incident. It is far more technically challenging and satisfying, and if you can get into law enforcement doing this, working hours are great and there are no laws or courts that can hold you back...