Notes
Three hats
Hackers are sorted by hat colour, a habit borrowed from old western films. A white hat has permission. They test a system because its owner asked, and they report what they find. A black hat has no permission and attacks for money, revenge or damage. A grey hat sits between: no permission, no bad intent, perhaps they even report the flaw. It is still illegal, and companies do prosecute. Good intentions are not a legal defense.
- white hat: has permission, reports what they find
- black hat: no permission, attacks for money or harm
- grey hat: no permission, no bad intent, still illegal
- the skill is the same; the permission is not
Who attacks
Companies face five broad kinds of attacker. Script kiddies copy tools they do not understand: low skill, lots of noise, and they still succeed against unpatched systems. Hacktivists act for a cause, defacing sites and leaking data. Criminal groups want money, through ransomware and fraud, and run like businesses. Nation-state teams spy for governments, with skill, money and patience. And insiders are already inside: an angry employee, or a careless one.
- script kiddies: copy tools, low skill, lots of noise
- hacktivists: a cause; deface and leak
- criminal groups: money; ransomware, fraud
- nation-state teams: spying; skilled and patient
- insiders: already inside
Know your enemy
Knowing who might attack you decides how you defend. A small online shop mostly faces criminals and automated scans, so patching, strong logins and good backups stop most of it. A bank faces organised fraud and must add deep monitoring and controls on its own staff. A defense contractor faces nation-state teams and has to assume someone is already inside. This thinking has a name, threat modeling, and you will practise it in Part eight.
- a small shop: criminals and automated scans answer: patch, MFA, backups
- a bank: organised fraud answer: add monitoring, fraud and insider controls
- a defense firm: nation states answer: assume breach
Red, blue, purple
Inside a company the hats become team colours. The red team attacks, with permission, the way a real enemy would. The blue team defends: it prevents, detects and responds. A purple team exercise puts both in one room, so every attack the red team runs becomes a detection the blue team improves. Penetration testers and bug bounty hunters are white hats too. All of them are paid to break things so the company can fix them first.
- red team: attacks, with permission, like a real enemy
- blue team: defends, detects and responds
- purple team: both together, every attack tunes an alert
- pentesters and bug bounty hunters are white hats too
Permission
So what makes hacking legal? Written permission, from someone with the authority to give it. Before any test, professionals agree a scope: exactly which systems are included and which are off limits. They agree rules of engagement: the dates and hours, how aggressive the testing may be, and what is banned, such as deleting data or flooding a server. And they name a contact for emergencies. No document, no test. A verbal yes from a friend who works there is not permission.
- written permission from someone who owns the system
- scope: which systems, which are off limits
- rules of engagement: when, how hard, what is banned
- a contact for emergencies
- no document, no test
The law
The law is clear in almost every country. In India it is the Information Technology Act of 2000, mainly sections forty three and sixty six. In the United States it is the Computer Fraud and Abuse Act, and in the United Kingdom the Computer Misuse Act. The details differ, but the core idea is shared: accessing a computer without authorisation is an offence, even if you only look and change nothing. This is general information, not legal advice.
- India: IT Act 2000, sections 43 and 66
- USA: Computer Fraud and Abuse Act
- UK: Computer Misuse Act 1990
- the core idea is shared: access without authorisation is an offence, even if you change nothing
Responsible disclosure
Sometimes you find a flaw by accident. The right way to handle it is responsible disclosure. Check whether the company publishes a security.txt file or a bug bounty page, which states what testing it allows. Stop as soon as you can prove the issue. Never keep, copy or share data you saw. Report it privately, give the company reasonable time to fix it, and only then talk about it. A bug bounty programme is permission in advance, but only inside its published scope.
- look for /.well-known/ security.txt or a bug bounty page: it states the rules
- stop as soon as you can prove the issue
- never keep or share the data
- report privately, give time to fix, then publish
Your rules
Here are the rules for this track. Attack only three things: your own lab, ShopRung running on your own machine, and sites built for legal practice. Never test your college, your employer or a friend's website without written permission, however harmless it feels. Keep your lab network isolated, so a tool pointed at the wrong address cannot reach a real system. And when you are unsure whether something is in scope, the answer is simple: do not touch it.
- attack only: your own lab, ShopRung on your machine, sites built for practice
- never: your college, your employer, a friend's site, without written permission
- keep the lab network isolated
- when unsure, do not touch it
Ethics
Beyond the law are the habits of a professional. Do the least harm needed to prove a point: read one record, not the whole table. Protect any data you see as if it were your own. Report everything you did, including your mistakes, because a tester who hides an accident cannot be trusted. Do not show off access to friends. And write it up clearly, because a finding nobody understands never gets fixed.
- does the least harm needed to prove a point
- protects any data they see
- reports everything, including their own mistakes
- does not show off access
- writes it down so it gets fixed
Common mistakes
Mistakes that get beginners into real trouble. Believing that only testing is a defense. Scanning real websites for practice. Treating a verbal yes as permission. Wandering outside the agreed scope because a neighbouring system looked interesting. Keeping stolen data as proof. Posting a flaw publicly before the owner can fix it. And trying security tools on your employer's network, which can end a job on the same day.
- "I was only testing"
- scanning sites for practice
- a verbal yes as permission
- going outside the scope
- keeping data as proof
- posting the flaw publicly
- trying tools on work systems
Say it like this
In the interview: what makes a hacker ethical is permission and scope. An ethical hacker has written authorisation from the system owner, stays inside the agreed scope and rules of engagement, does the least harm needed to prove an issue, protects any data they see, and reports everything so it can be fixed. The techniques are the same as a criminal's. The authorisation and the purpose are not.
- "Permission and scope. An ethical hacker has written
- authorisation, stays inside the agreed scope and rules of engagement, does the least
- harm needed, protects any data
- seen, and reports everything
- so it can be fixed."