Skip to content
Sovereign SecureSovereign Secure

Glossary

What Is a White Hat Hacker? White, Black and Grey Hats Compared

Updated

A white hat hacker breaks into systems with permission so the weaknesses can be fixed. Here is how white, black and grey hats differ, and where UK law draws the line.

Prefer to talk? Call +44 161 523 5276

  • White, grey, black, red and blue hats compared
  • How authorised testing is set up in writing
  • Computer Misuse Act 1990 position, checked October 2026

The short answer

A white hat hacker is a security professional who uses hacking skills with the system owner's permission to find and fix weaknesses, usually as a penetration tester or bug bounty researcher. A black hat hacker breaks in without permission for gain or harm. A grey hat hacks without permission, but usually without malicious intent.

On this page
  1. What is an ethical hacker?
  2. What is the difference between white hat, black hat and grey hat hackers?
  3. How do white hat hackers work?
  4. Is white hat hacking legal in the UK?
  5. How do you hire a white hat hacker?
  6. Why Sovereign Secure

A white hat hacker is a security specialist who hacks computer systems with the owner’s permission, to find weaknesses and get them fixed before criminals exploit them. Most work as penetration testers, in-house security staff or bug bounty researchers, and the role is also called ethical hacking.

The label comes from old Western films, where the heroes wore white hats and the villains wore black. In cyber security the colour stands for one thing above all: whether the hacker has permission. This entry is part of our cyber security glossary.

What is an ethical hacker?

An ethical hacker is a security professional who uses the same tools and techniques as criminal hackers, but with the system owner’s written permission, to find weaknesses so they can be fixed. “Ethical hacker” and “white hat hacker” mean the same thing: ethical hacker is the more common job title, and most ethical hackers work as penetration testers, red teamers or bug bounty researchers.

What makes the hacking ethical is the agreement around it rather than the techniques: permission from the owner, an agreed scope, care not to cause harm, and private reporting of everything found. If you need one for your own systems, see how do you hire a white hat hacker? below, or our penetration testing services.

What is the difference between white hat, black hat and grey hat hackers?

The difference is authorisation and intent. A white hat has permission, a black hat has neither permission nor good intent, and a grey hat acts without permission but usually without malice.

White hat vs black hat vs grey hat hackers: permission, aim and UK legal position compared
The three main hat colours at a glance. Only the white hat has the system owner's permission.

The table compares the types of hackers you will see named by hat colour, including the less common red and blue hats:

Type Permission from the system owner Typical motive What happens to findings UK legal position
White hat Yes, agreed in writing Find and fix weaknesses Reported privately to the owner Lawful within the agreed authorisation
Grey hat No Curiosity, recognition or a reward after the fact Often told to the owner, sometimes published or offered for payment Can be an offence under the Computer Misuse Act 1990
Black hat No Money, data theft, disruption or espionage Exploited, sold or used for extortion An offence under the Computer Misuse Act 1990, often alongside other crimes
Red hat No Stopping black hats, often by attacking their systems in return Used to disrupt or take down criminal infrastructure Still unauthorised access, so it can be an offence whatever the target
Blue hat Usually yes, as an invited outside tester Finding flaws in a product before it launches Reported to the vendor Lawful within the agreed authorisation

Typical white hat roles are penetration tester, red teamer and researcher in a disclosure programme; typical black hats are ransomware operators, fraudsters and data thieves. Red and blue hat meanings vary from source to source: “blue hat” is also used for someone hacking out of revenge, which is an offence like any other unauthorised access, and “green hat” usually means a beginner still learning. Don’t confuse any of these with red and blue teams, which are defined roles in security testing: the red team plays the attacker with permission and the blue team defends. Our guide to red teaming explains how those exercises run.

How do white hat hackers work?

They work inside an agreed authorisation. Before testing starts, a professional engagement fixes five things in writing:

  • Who authorises it. Someone with authority over the systems signs the approval. Where a cloud or hosting provider runs the systems, its testing rules apply too.
  • Scope. The exact addresses, applications, accounts or sites that may be tested, and anything excluded.
  • Rules of engagement. Test windows, techniques that are off limits (such as denial of service), emergency contacts and how to stop the test.
  • Data handling. How any data seen during testing is protected, kept and deleted.
  • Reporting. Findings go to the client in a report with severity ratings and fixes, not to the public.

That structure is what separates a penetration test from an attack: the techniques can be the same, but the permission differs. White hats also work through vulnerability disclosure and bug bounty programmes, where an organisation publishes what researchers may test and how to report. The NCSC’s vulnerability disclosure toolkit helps organisations set one up.

Yes, when the owner has authorised it and the hacker stays within that authorisation. Without permission, it can be a criminal offence. Section 1 of the Computer Misuse Act 1990 makes it an offence to make a computer perform any function intending to secure access you know is unauthorised. Motive is irrelevant, so a grey hat who breaks in “to help” can commit the same offence as a criminal.

The Act also makes it an offence to:

  • gain unauthorised access intending to commit further offences (section 2);
  • carry out unauthorised acts that impair a computer, such as deleting data or disrupting a service (section 3);
  • make, supply or obtain tools for use in computer misuse offences (section 3A).

The Act has no public-interest defence for security research. The government’s King’s Speech 2026 briefing notes (13 May 2026) say a proposed National Security Bill will update the Act, partly to help security professionals protect systems, but they do not set out a defence. As of October 2026 the Act contains none, so test only systems you own, systems you are authorised in writing to test, or systems covered by a published disclosure programme, and follow its rules.

How do you hire a white hat hacker?

Commission a penetration test from a firm that agrees scope, authorisation and reporting in writing. Ask who will test, how findings are rated and reported, and how your data is handled. Our guide to choosing a penetration testing company lists the questions to ask, and our penetration testing services page shows the tests we run.

Be wary of anyone who contacts you uninvited about a weakness and wants payment before explaining it. Treat it as a possible incident and check the claim with your own security provider.

Why Sovereign Secure

Our testers work as white hats under written authorisation and agreed rules of engagement. We test web applications, APIs, networks, cloud, mobile apps, hardware and IoT, wireless, AI and LLM systems and source code, and run social engineering, red team and vulnerability scanning work. Sovereign Secure is a PCI SSC Qualified Security Assessor company and ISO 27001 certified. To scope a test, request a penetration testing quote.

Your next step

Last reviewed October 2026 by the Sovereign Secure assessment team.

Trusted by banks, payment providers and global brands

  • Accor
  • Fiserv
  • JCPenney
  • Ticketmaster
  • Nitecrest
  • Cashplus
  • Ahli United Bank
  • Kuwait Finance House
  • AYA Bank
  • Bank of Palestine
  • Liquid Pay
  • DataFlow Group
  • Wilmington
  • The Growth Company
  • Wahyukart

FAQ

Frequently asked questions

Can't find your answer? Call us on +44 161 523 5276 or send us a message.

What is a white hat hacker?

A white hat hacker is someone who tests the security of systems with the owner's permission, so weaknesses can be fixed before criminals find them. Most work as penetration testers, in-house security staff or researchers in published bug bounty programmes.

What is a black hat hacker?

A black hat hacker breaks into systems without permission, usually for money, data theft, disruption or espionage. Ransomware operators and fraudsters are typical examples. Their activity is a criminal offence in the UK under the Computer Misuse Act 1990.

What is a grey hat hacker?

A grey hat hacker accesses systems without permission but without obvious malicious intent, often to find a flaw and then tell the owner. Good intentions are not a defence in UK law, so a grey hat can commit the same offence as a criminal.

What is a red hat hacker?

An informal label for a vigilante who goes after black hat hackers, for example by attacking their servers or disrupting their tools. The motive may sound good, but in the UK accessing anyone's systems without authorisation can be an offence under the Computer Misuse Act 1990. Don't confuse it with a red team, which attacks with the owner's permission.

Is ethical hacking the same as white hat hacking?

In practice, yes. Both describe hacking done with the owner's authorisation, to an agreed scope, with findings reported privately. "Ethical hacker" is the more common job title, while "white hat" is the more common informal label.

Is penetration testing the same as ethical hacking?

Penetration testing is one form of ethical hacking. Ethical hacking is the broad term for any authorised hacking, including red teaming and bug bounty research; a penetration test is a defined engagement with an agreed scope, a time limit and a written report of findings and fixes.

Can a white hat hacker be prosecuted?

Yes, if they go beyond what they were authorised to do, because the Computer Misuse Act 1990 has no public-interest defence. Unauthorised access under section 1 carries up to two years' imprisonment, and impairing a computer's operation under section 3 carries up to ten years. Within the owner's written authorisation, white hat hacking is lawful.

Do white hat hackers get paid?

Usually. Most are employed or contracted to carry out penetration tests and red team exercises, and some earn rewards through bug bounty programmes, which pay for valid findings reported under the programme's rules.

Free consultation

Talk to an assessor

We aim to reply within one working day, and send a fixed quote once your scope is confirmed.

  • PCI SSC-approved QSA, QPA, CPSA, P2PE and 3DS assessors
  • IASME-licensed Cyber Essentials certification body
  • Clients across the UK, US, Europe, Middle East and Asia since 2012

“The Cyber Security Services were delivered on time and price was competitive.”

Beverley McGowan, Director, Specialists Hub. Read the full testimonial

By sending this form you agree to us contacting you about your enquiry. See our privacy policy.

We aim to reply within one working day. The first consultation is free.