What Ethical Hacking Is
Define ethical hacking, compare vulnerability scans, penetration tests, red teaming and bug bounties, and learn the attacker mindset defenders need.
Welcome back!
Step 1 of 11Learn
Paid to break in
A hospital hires a small team to attack it. Over two weeks, the team finds an old web server that nobody remembered, guesses a weak password on an administrator account, and from there reaches a database of patient records. Then they stop, write up exactly how they did it, and help the hospital fix every step. No data leaves the building. Nobody is harmed. The hospital is far safer than before.
That's ethical hacking: using the same techniques as criminal attackers, with the owner's explicit permission, to find weaknesses before real attackers do. The goal is not to prove cleverness but to improve security.
Why would organizations pay someone to attack them? Because defenders have a hard job. They must protect every system, every account and every employee, while an attacker needs only one way in. Automated tools catch many problems, but they miss chains of small weaknesses that a creative human can link together. Seeing your systems through an attacker's eyes is the most reliable way to learn where you're actually exposed.
This course teaches the concepts, methodology and ethics of the field: how professional engagements are scoped and run, how reconnaissance and scanning work, the most common classes of vulnerabilities, and how findings are rated and reported. It focuses on understanding and defense. It doesn't teach anyone to attack systems they don't own, and nothing here authorizes testing without permission.
Step 2 of 11Note
Step 3 of 11Learn
White, black and gray hats
Security people often describe hackers by the color of their hat, borrowed from old Western films where heroes wore white and villains black.
- White hat hackers work with permission, within agreed limits, to improve security. Penetration testers, security researchers working under a disclosure policy, and bug bounty hunters following program rules fall here.
- Black hat hackers break into systems without permission for personal gain, disruption or espionage: ransomware gangs, credit card thieves, and spies.
- Gray hat hackers act without permission but without clear malicious intent, for example scanning a company's website, finding a flaw and then telling the company, sometimes asking for a reward. Their motives may be good, but their actions are usually still illegal, and companies have taken legal action against well-meaning gray hats.
The difference between a white hat and a criminal isn't the tools or the skills. Both may use the same scanner and the same exploit. The difference is authorization, scope and intent: did the owner agree, did you stay within what they agreed to, and were you trying to help them?
You'll also hear red team (attackers in an exercise) and blue team (defenders). A purple team approach has both sides working together openly, so every attack becomes a lesson for the defenders in real time.
Step 4 of 11Practice · Sort into groups
Classify each person by hat color.
Tap an item, then tap its group (or drag it there).
Step 5 of 11Learn
Four kinds of security testing
Organizations buy different kinds of testing depending on what they want to learn:
- Vulnerability assessment (or scan): automated tools check systems against databases of known weaknesses: missing patches, outdated software, weak configurations. It's broad, fast and relatively cheap, and it's often run monthly or continuously. But scanners produce false positives and can't judge how weaknesses combine.
- Penetration test: skilled humans try to actually exploit weaknesses within a defined scope and time, typically one to three weeks, to show what an attacker could really achieve. A pentest answers how far could someone get? rather than just what's missing?
- Red team exercise: a longer, stealthier simulation of a specific real-world adversary, often over weeks or months, testing not only technology but also the people and processes that are supposed to detect and respond. Only a few people in the organization know it's happening.
- Bug bounty program: the organization publishes rules and invites outside researchers to report vulnerabilities in return for rewards, paying only for valid findings. Large programs run on platforms such as HackerOne and Bugcrowd, and major tech companies have paid out tens of millions of dollars in total.
Testing can also be described by how much the testers know. In black-box testing they start with nothing but a company name, like an outside attacker. In white-box testing they get source code, architecture diagrams and credentials. Gray-box testing sits in between, for example with a normal user account.
Step 6 of 11Compare
Four kinds of security testing side by side
| Aspect | Vulnerability scan | Penetration test | Red team | Bug bounty |
|---|---|---|---|---|
| Who does it | Automated tools | Skilled testers | Small expert team | Outside researchers |
| Typical length | Minutes to hours, repeated often | One to three weeks | Weeks to months | Ongoing |
| Main question | What known weaknesses exist? | How far could an attacker get? | Would we detect and respond to a real adversary? | What can many outside eyes find? |
| Who knows it is happening | IT team | IT and security team | Only a few people | Public (published rules) |
| Cost model | Low, subscription | Fixed project fee | Highest | Pay per valid finding |
Step 7 of 11Practice · Match the pairs
Match each type of testing to what it mainly answers.
Tap an answer, then tap the place where it belongs (or drag it there).
- Vulnerability scan
- Penetration test
- Red team exercise
- Bug bounty program
Step 8 of 11Learn
The attacker mindset
Good ethical hackers think differently about systems. Most people ask how is this supposed to work? An attacker asks what happens if I do something unexpected?
- A form asks for your age. What if you enter −1, or 99999999999, or a line of code?
- A website shows your order at /orders/1043. What's at /orders/1042?
- The staff entrance needs a badge. What if you carry a box and follow someone through?
- The app hides the admin button for normal users. Does the server also refuse admin requests from them, or just the button?
This mindset rests on a few principles. Assumptions are attack surface: every users will never do that is a candidate weakness. Trust boundaries matter: data crossing from a user, a partner or the internet into your system must be treated as hostile until checked. Small issues chain: an information leak plus a weak password plus an unpatched server can add up to a full breach, even if each finding alone looks minor.
Ethical hackers combine that curiosity with discipline: careful notes, respect for scope, and a constant eye on not causing harm. The best testers are also good communicators, because a finding that nobody understands never gets fixed.
Step 9 of 11Practice · True or false
A penetration tester and a criminal hacker typically use completely different tools and techniques.
Step 10 of 11Practice · Fill in the blanks
Fill in the blanks
Testing where the testers start with no inside knowledge, like an outside attacker, is called testing, while testing with full access to source code and documentation is called testing.
Step 11 of 11Practice · Choose one
A company already runs automated vulnerability scans every month. Its board now wants to know whether an attacker could actually reach customer payment data. What should it commission?
Lesson complete!