Protego field desk

Foundations: Law, Ethics and Scope · PTES: Pre-engagement

L1. What Ethical Hacking Is (and Is Not)

Define ethical hacking, tell the common assessment types apart, and explain why written authorization is what separates a security test from a crime.

Lesson 1 of 21 · About 20 minutes including the lab

By the end of this lesson you can

  • Define ethical hacking and penetration testing in one sentence each.
  • Compare a vulnerability scan, a penetration test, a red team exercise and a bug bounty.
  • Name the computer misuse laws that commonly apply and why intent is not a defense.
  • Apply the five habits of a professional tester to your own practice.
Video transcript

Same tools as an attacker. So what makes it ethical? Ethical hacking is authorized security testing that finds weaknesses so the owner can fix them. Permission, scope and a report separate it from an attack. The owner approves the test in writing before any traffic is sent. The tester works only on the agreed systems and stops at the boundary. Every finding goes back to the owner, so it can be fixed. The owner agreed, the work stays in bounds, and the findings go back to them. Without consent, the same scan may break computer misuse laws. Ask who owns the system and who can approve testing. Get the scope and the permission in writing. Report findings to the owner, and never use them for gain. Every lesson in this course starts from permission. Check your understanding in the knowledge check.

Course outlineLesson 1 of 21

Lesson notes

Ethical hacking is the use of attacker techniques, with the system owner’s written permission, to find weaknesses and help fix them before a criminal exploits them. A penetration test is a time-boxed ethical hacking engagement with an agreed scope and a written report at the end.

The tools and techniques are often the same ones criminals use. What makes the work ethical and legal is three things: explicit authorization from someone entitled to give it, staying inside the agreed scope, and reporting everything you find to the owner instead of using it.

A vulnerability scan asks which known weaknesses an automated tool can detect; its output needs human validation. A penetration test asks whether weaknesses can actually be exploited in scope and what the business impact would be. A red team exercise tests whether the organization can detect and respond to a realistic adversary over a longer period. A bug bounty invites outside researchers to report issues under a published policy, often for a reward.

Tests are also described by how much the tester knows up front. In a black-box test you start with little more than a name or address. In a grey-box test you get some help, such as test accounts or API documentation; most web application tests, and the labs in this course, work this way. In a white-box test you see source code and architecture diagrams.

Most countries make it a crime to access a computer without authorization or to exceed the access you were given, even if you cause no damage and mean well. Examples include the US Computer Fraud and Abuse Act (18 U.S.C. § 1030), the UK Computer Misuse Act 1990 and Israel’s Computers Law, 5755-1995. In 2022 the US Department of Justice said it would not charge good-faith security research under the CFAA, but that is a charging policy for federal prosecutors. It does not bind state law, civil lawsuits or other countries, and it does not turn unauthorized testing into authorized testing. This lesson is not legal advice.

Professional testers share five habits. Get permission in writing before touching anything. Stay inside the scope and the time window. Do no harm: avoid denial of service, data destruction and reading more data than you need to prove an issue. Keep the client’s data and findings confidential. Report everything, including your own mistakes.

Every hands-on exercise in this course uses a legal target: applications you run on your own machine (OWASP Juice Shop and DVWA) or platforms built for practice (TryHackMe, Hack The Box and the PortSwigger Web Security Academy). Never point these techniques at real websites, your school or employer’s network, or Wi-Fi you do not own, even “just to look”.

Hands-on labs

Practice only on these legal targets: your own local lab or machines a platform assigns to you. Never use these techniques on systems you do not have written permission to test.

  • TryHackMe

    Create a free TryHackMe account

    Sign up and complete an introductory pre-security or “intro to offensive security” room. Read the platform’s rules on what you may and may not attack.

  • PortSwigger Web Security Academy

    Create a free Academy account

    Register so you can open the hosted labs used later in this course. Each lab runs a private, intentionally vulnerable site that you are authorized to attack.

Practice task

In your own words, write two sentences: one explaining the difference between a vulnerability scan and a penetration test, and one explaining what would make the same Nmap scan legal in one situation and illegal in another.

Key takeaways

  • Authorization, scope and reporting turn attacker techniques into ethical hacking.
  • A scan finds candidate weaknesses; a penetration test validates exploitability and impact.
  • Good intentions are not a legal defense for unauthorized access.
  • Practice only on your own lab or on platforms that explicitly authorize you.
Knowledge Check

1. What most clearly separates an ethical hacker from a criminal using the same tool?

2. A client wants to know whether its weaknesses can actually be exploited and what the business impact would be. Which assessment fits?

3. You receive two test accounts and the API documentation before testing. What kind of test is this?

4. A friend says scanning a random website is fine because “I won’t break anything”. What is the best response?