Ethical Hacking & Cyber Defense · Unit 1 of 8
Unit 1: The job, the law and the method
What ethical hackers and security analysts really do, why written permission is everything, the phases of a professional test and the risk ideas every security job uses.
Opens the first lesson of this unit in Ethical Hacking & Cyber Defense. Every lesson is open from the start.
Lesson 1: What ethical hackers actually do
Goal: Describe the main security roles and the difference between a penetration test, a vulnerability scan, a red team exercise and a bug bounty.
An ethical hacker uses the same knowledge as a criminal attacker, with one difference that changes everything: they work with the owner's written permission, inside agreed limits, to find weaknesses so they can be fixed. The goal is never to cause damage or to keep access. The goal is a clear report that makes the organization safer.
Security work splits into two broad sides. The red team (offence) simulates attackers to find gaps. The blue team (defence) builds protections, watches for attacks and responds to incidents. When the two work together in the open, sharing what each sees, that is called purple teaming. Most entry-level jobs are on the blue side, and the best testers understand defence deeply.
| Activity | What happens | Who usually does it |
|---|---|---|
| Vulnerability scan | An automated tool checks systems for known weaknesses and produces a list of possible problems. | Security analysts, IT teams |
| Penetration test | A person safely tries to use weaknesses, within a fixed scope and time, to show real impact. | Penetration testers |
| Red team exercise | A longer, goal-based simulation of a real attacker, often testing whether the blue team notices. | Experienced red teams |
| Bug bounty | A company publishes rules and invites outside researchers to report bugs for rewards. | Independent researchers |
Worked example: a clinic hires a tester
A small dental clinic stores patient records in a web portal and wants to know if it is safe.
- The clinic and the testing company sign a contract and a scope document naming the portal and the dates.
- The tester maps the portal, checks for known weaknesses and safely confirms two real problems: an outdated plugin and a page that shows other patients' appointments if you change a number in the address.
- The tester stops, documents the evidence, and the clinic is told about the appointment leak the same day because it exposes private data.
- The final report ranks the findings, explains each in plain language and gives exact fixes. A retest a month later confirms both are closed.
The clinic paid to be “attacked” once, safely, so that a criminal would find nothing useful later. That is the whole job.
- Ethical hacker
- A security professional who tests systems with the owner's written permission, inside agreed limits, so weaknesses can be fixed.
- Red team
- The offensive side of security: people who simulate attackers to find gaps.
- Blue team
- The defensive side of security: people who protect systems, monitor for attacks and respond to incidents.
- Purple teaming
- Red and blue teams working together openly, sharing what they see so defences improve faster.
- Penetration test
- A time-boxed, authorized attempt to safely use weaknesses in a defined scope to show real-world impact.
Remember: Same skills as an attacker, opposite purpose: permission, limits, and a report that gets things fixed.
Lesson 2: Permission, scope and the law
Goal: Explain why written authorization comes first, what a scope document and rules of engagement contain, and why “good intentions” are not a legal defence.
Accessing a computer system without permission is a crime in most countries. In the United States the main federal law is the Computer Fraud and Abuse Act; the United Kingdom has the Computer Misuse Act; most other countries have similar laws. Scanning, logging in with a guessed password or reading data you were not given can all count. Saying “I was only testing” or “I was going to tell them” does not make unauthorized access legal.
That is why every professional test starts with paperwork. A signed authorization letter (sometimes called a permission slip or “get out of jail free” letter) states who approved the test and that they have the right to approve it. The scope lists exactly which systems, addresses and applications may be tested, and which may not. The rules of engagement describe how: dates and hours, allowed techniques, what is off limits (for example, no denial-of-service and no phishing of executives), who to call in an emergency and what to do if you find something serious.
| Document | Answers the question | Example line |
|---|---|---|
| Authorization letter | Who allowed this, and can they? | “The CTO of Example Dental authorizes ACME Testing to assess the systems listed in Appendix A.” |
| Scope | What exactly may be tested? | “In scope: portal.example.com and 203.0.113.10–20. Out of scope: the payment provider.” |
| Rules of engagement | How, when, and what if? | “Testing 9 p.m.–5 a.m. only. Stop and call the security lead at once if patient data is exposed.” |
Watch out: Owning a laptop does not give you permission to test the network it is connected to. A school, employer, landlord or coffee shop network belongs to someone else. Bug bounty programs give permission only inside their published rules; anything outside the listed targets is still unauthorized.
Worked example: an out-of-scope surprise
- During an approved test of portal.example.com, a tester notices the site loads files from a storage server run by a different company.
- The storage server is not in the scope document, and the clinic cannot give permission for a system it does not own.
- The tester does not touch it, notes the observation in the report, and suggests the clinic ask the provider about its own testing program.
Scope protects everyone: the client, the third party and the tester. When in doubt, stop and ask in writing.
- Authorization letter
- A signed document in which someone with the right to do so approves a security test.
- Scope
- The written list of exactly which systems may be tested, and which may not.
- Rules of engagement
- The agreed conditions of a test: timing, allowed techniques, exclusions, contacts and what to do if something serious is found.
- Computer Fraud and Abuse Act
- The main US federal law against unauthorized access to computers.
- Safe harbor
- A promise in a bug bounty or disclosure policy not to pursue legal action against researchers who follow its rules.
Remember: No signature, no test. If a system is not in the scope document, it does not exist for you.
Lesson 3: The testing method, phase by phase
Goal: Put the phases of a professional penetration test in order and say what each one produces.
Professional testing follows a method so that it is safe, thorough and repeatable. Different standards name the steps slightly differently. The Penetration Testing Execution Standard (PTES) and NIST's technical testing guide (SP 800-115) describe the same flow: agree the rules, learn about the target, find weaknesses, safely confirm them, and report.
| Phase | What you do | What it produces |
|---|---|---|
| 1. Pre-engagement | Agree scope, rules of engagement, contacts and goals; get written authorization. | Signed authorization and scope |
| 2. Reconnaissance | Gather information: public sources first, then approved scanning. | A map of hosts, services and people-facing details |
| 3. Vulnerability analysis | Compare what you found against known weaknesses and misconfigurations. | A list of candidate vulnerabilities |
| 4. Exploitation | Safely confirm which candidates are real and what they allow, within the rules. | Proof of impact, with evidence |
| 5. Post-exploitation | Assess what an attacker could reach next, then clean up anything you created. | Impact assessment and cleanup notes |
| 6. Reporting | Explain each finding, its risk and the fix; present to the client; retest later. | The report, the debrief and a retest |
Two habits run through every phase. First, keep notes and evidence as you go: commands, timestamps, screenshots and results. A finding you cannot prove is a finding nobody will fix. Second, minimize harm: use the least disruptive technique that answers the question, avoid touching real customer data where possible, and remove any test accounts or files you created.
Worked example: one finding moving through the phases
- Recon: an approved scan shows a server running a web admin panel on port 8080.
- Vulnerability analysis: the panel's version is listed in the public vulnerability database as having a default password problem.
- Exploitation (safely): the rules allow login tests, and the vendor's default password works. The tester takes one screenshot of the dashboard and changes nothing.
- Post-exploitation: the dashboard could restart services for the whole office, so the impact is high. No accounts were created, so there is nothing to clean up.
- Reporting: the finding explains the risk, shows the evidence and says “change the default password and limit the panel to the IT network”.
Each phase feeds the next, and the evidence collected along the way becomes the report.
- PTES
- The Penetration Testing Execution Standard: a widely used description of the phases of a professional penetration test.
- Reconnaissance
- Gathering information about a target before testing it, from public sources and approved scanning.
- Exploitation
- In an authorized test, safely confirming that a vulnerability is real and showing what it allows.
- Post-exploitation
- Assessing what an attacker could reach after an initial weakness, then cleaning up anything created during the test.
Remember: Agree, learn, find, confirm safely, report. Notes and evidence at every step.
Lesson 4: Risk, the CIA triad and the professional mindset
Goal: Use the CIA triad and the threat–vulnerability–risk ideas to judge how serious a weakness is.
Security is about protecting three things, known as the CIA triad. Confidentiality means only the right people can see information. Integrity means information is not changed by the wrong people. Availability means systems and data are there when the right people need them. Almost every attack hurts at least one of the three: a data leak hurts confidentiality, a tampered invoice hurts integrity, and a crashed website hurts availability.
Three words get mixed up constantly, and using them correctly marks you as a professional. A vulnerability is a weakness, such as an unpatched server. A threat is something that could take advantage of it, such as a criminal group or an automated worm. Risk combines how likely it is to happen with how bad it would be. A serious weakness on an isolated test machine can be lower risk than a modest one on the public website that holds customer data.
| Likelihood \ Impact | Low impact | Medium impact | High impact |
|---|---|---|---|
| High likelihood | Medium | High | Critical |
| Medium likelihood | Low | Medium | High |
| Low likelihood | Low | Low | Medium |
The professional mindset combines curiosity with restraint. Think like an attacker: “What did the builders assume? What happens if I send something unexpected?” Then act like a professional: stay in scope, use the gentlest technique that proves the point, protect any data you see, and tell the client immediately if you find something that is already being abused or that exposes people's private information. Defense in depth is the defender's answer: several layers, so one failure is not a disaster.
Worked example: ranking two findings
- Finding A: an internal test server is missing a year of updates. It is not reachable from the internet and holds no real data.
- Finding B: the public login page has no limit on password guesses, and it protects 40,000 customer accounts.
- A is a bigger technical gap, but its likelihood and impact are low. B is easy to abuse from anywhere, and the impact would be large.
B is the higher risk and should be fixed first. Risk is likelihood and impact together, not how embarrassing the weakness looks.
- CIA triad
- Confidentiality, integrity and availability: the three properties security protects.
- Vulnerability
- A weakness in a system, process or configuration that could be used to cause harm.
- Threat
- Someone or something that could take advantage of a vulnerability.
- Risk
- The combination of how likely a harmful event is and how much damage it would cause.
- Defense in depth
- Using several independent layers of protection so that one failure does not lead to a breach.
Remember: Vulnerability is the weakness, threat is who could use it, risk is likelihood times impact.
Practise it in Ethical Hacking & Cyber Defense
Each lesson ends with three questions that check you can use the idea, not just recognise it. Wrong answers explain why and come back in Review. The unit ends with a 6-question quiz; pass it with 80% or more to master the unit.
Every lesson is free: no ads, no lives and no paywall.