Skip to content
Tutorials Center
My learning

Topics

Lesson 32 of 37 ยท Labs and Ethics

Law, Ethics and Authorization

Why written authorization matters, what computer-misuse laws cover, how scope and consent work, and a professional code of conduct for using Metasploit.

Metasploit is legal software. Using it against a system without permission is not. The tools of a penetration tester and a criminal are the same; the difference is authorization. This lesson explains why that single word carries so much weight, what laws apply in general terms, and the habits that keep a tester out of trouble.

This is general education, not legal advice. Laws differ by country and by region, so check the rules where you live and where the target is located.

Why authorization is everything

Computer-misuse laws, such as the US Computer Fraud and Abuse Act, the UK Computer Misuse Act 1990 and the Budapest Convention-inspired laws across Europe and elsewhere, generally make it an offence to access or interfere with a computer system without authorization. Important points that surprise beginners:

  • Intent to harm is not required. "I was only curious" or "I wanted to help" is not a defence.
  • Scanning can be enough in some places, and attempting access is often an offence even if it fails.
  • Third parties count. Cloud providers, hosting companies and your client's vendors have their own rules and legal rights.
  • Employees and students need permission too; having an account does not authorize testing.

The three documents

Professionals do not start without paperwork.

Document What it says
Contract / statement of work Who is testing, for whom, for how long, and the fees
Rules of engagement (RoE) Allowed techniques, forbidden actions, hours, contacts
Authorization letter Signed permission from someone with authority over the systems ("get-out-of-jail letter")

The signer must have the authority to approve the test. Someone in marketing cannot authorize testing of a hosting provider's servers.

flowchart LR
    A["Request from client"] --> B["Scope and RoE agreed"]
    B --> C["Signed authorization"]
    C --> D["Testing starts"]
    D --> E["Report and cleanup"]

Authorization comes before the first packet.

Scope

Scope defines exactly what may be tested: addresses, domains, applications, times and methods. Anything outside it is off limits, even if it looks related.

Python Check targets against scope

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Build a check like this into any tooling you write: a scanner should refuse an out-of-scope address, not rely on a person to notice.

Rules a professional follows

  1. Stay in scope, in time and in technique.
  2. Do no harm. Avoid denial of service and destructive modules unless the client has explicitly approved them for a safe window.
  3. Protect data. Touch the minimum, redact secrets in reports, encrypt your notes and delete data after the engagement.
  4. Stop and tell if you find evidence of a real crime or a previous breach, or if you accidentally leave scope.
  5. Report honestly, including what you could not test.
  6. Disclose responsibly. Vulnerabilities in third-party software go to the vendor privately first, usually with a deadline.

Bug bounty and vulnerability disclosure

Some organisations publish a policy that allows testing of named systems under stated rules, a bug bounty or vulnerability disclosure program. The policy is your authorization, and it is only as wide as it says. Read the safe-harbour language, the exclusions (often no social engineering, no denial of service) and the reporting channel.

Python A pre-engagement checklist

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Ethics beyond the law

Some things are legal but still wrong: testing a hospital's equipment without safety arrangements, publishing exploit details before a fix exists, or keeping client secrets in an unprotected folder. A professional code (such as those of EC-Council, ISC2 or OffSec) comes down to honesty, respect for privacy, competence and avoiding harm.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What makes using Metasploit legal rather than criminal?

    Intent does not make access legal; permission does.
  2. 2. What does the rules of engagement document specify?

    RoE sets the boundaries of the test in operational detail.
  3. 3. You notice an IP address outside your scope that looks related to the client. What do you do?

    Anything outside written scope is off limits until authorized.
  4. 4. Where should a vulnerability in a vendor's product be reported first?

    Responsible disclosure gives the vendor time to fix before details are public.

Summary

  • Authorization, not intent, separates testing from crime.
  • Contract, rules of engagement and a signed authorization letter come first.
  • Scope is exact; enforce it in code as well as in process.
  • Do no harm, protect data, stop and report if something unexpected appears.
  • Follow disclosure policies and a professional code of conduct.

Next: Building a Home Lab Safely