Ethics, Law & Rules of Engagement
Ethical hacking in one sentence
An ethical hacker uses the same knowledge as a criminal attacker, but only with written permission, inside an agreed scope, and reports everything found so it can be fixed.
Hat colours
- White hat – authorised testing and defence.
- Black hat – unauthorised, malicious.
- Grey hat – unauthorised but without clear malicious intent; still illegal in most countries.
Red team vs penetration test vs purple team
| Penetration test | Red team exercise | |
|---|---|---|
| Goal | Find as many vulnerabilities as possible in a defined scope | Emulate a real adversary to test detection and response |
| Stealth | Usually not required | Essential – the blue team is often not told |
| Duration | Days to a few weeks | Weeks to months |
A purple team is red and blue working together, testing techniques one by one and improving detections in real time.
The paperwork that makes it legal
- Statement of Work / contract – what is being tested and why.
- Rules of Engagement (RoE) – in-scope and out-of-scope targets, allowed techniques, testing windows, emergency contacts, data handling.
- Authorisation letter – signed by someone with authority over the systems (“get-out-of-jail letter”).
- NDA – protects client data.
Laws
Unauthorised access is a crime almost everywhere: the Information Technology Act 2000 (India, sections 43 and 66), the Computer Fraud and Abuse Act (USA), the Computer Misuse Act 1990 (UK) and similar laws. Good intentions are not a defence. Practise only on your own lab or on legal platforms built for training.
Building a safe practice lab
Use virtual machines on an isolated (host-only) network: an attacker VM (for example Kali or Parrot Linux) and deliberately vulnerable targets such as Metasploitable, DVWA or OWASP Juice Shop. Take snapshots so you can reset.
Unlock this course for ₹99, or get every subject with a monthly or yearly pass.