Cybersecurity Topics: Threats, Defences and Careers · Course book
Chapter 13: What Is Ethical Hacking?
The word "hacker" usually conjures up a criminal in a dark room breaking into systems. Yet many of the people who understand attack techniques best work to protect organisations, not harm them. Ethical hacking is the authorised practice of probing systems, networks and applications for weaknesses, using the same knowledge as criminals, so that the weaknesses can be fixed before criminals find them. What separates an ethical hacker from a criminal is not skill or tools but permission, purpose and conduct. This chapter explains what ethical hacking is and why organisations pay for it, the different kinds of hacker and hacking, the legal framework that makes authorisation essential, and the first phase of any engagement, reconnaissance, with its two main techniques of footprinting and fingerprinting. It ends with responsible disclosure and bug bounty programmes, which channel independent researchers' skills into improving security.
What ethical hacking is and why it matters
An ethical hacker, often called a penetration tester or security tester, is engaged by an organisation to attempt to break into its systems under agreed conditions. The goal is to discover vulnerabilities and demonstrate their real-world impact, then report them so they can be fixed. Organisations commission such work because their own staff, who built and run the systems, tend to see them as they are meant to work rather than as an attacker might abuse them. An outside tester brings a fresh, adversarial perspective.
Ethical hacking complements, rather than replaces, other security activities. Automated scanners find known vulnerabilities quickly; ethical hackers combine findings in creative ways, test business logic and show how small weaknesses can be chained into serious breaches. Many regulations and industry standards, including the payment card standard PCI DSS, require regular penetration testing, and large customers often ask suppliers for recent test results before signing contracts.
Ethical hackers follow a code of conduct. They act only within written permission; they respect the confidentiality of everything they see; they avoid causing damage or disruption, stopping and reporting immediately if something unexpected happens; and they report all findings honestly, including those that might embarrass the client. These principles are what make it possible for organisations to trust outsiders with deep access to their systems.
Types of hackers and types of hacking
Hackers are traditionally classified by "hat colour", a metaphor borrowed from old Western films in which heroes wore white hats and villains black ones.
| Type | Permission | Intent | Description |
|---|---|---|---|
| White hat | Yes, written authorisation | Protective | Ethical hackers and penetration testers working for or with the organisation |
| Black hat | No | Malicious, often financial | Criminals who break in to steal, extort or damage |
| Grey hat | No | Mixed; often to expose flaws | Probe systems without permission, then report or publicise what they find; still illegal in most countries |
| Hacktivist | No | Political or social | Attack organisations to promote a cause, for example by defacing websites |
| State-sponsored | Authorised by a government, not the target | Espionage or disruption | Highly skilled teams working for national intelligence or military bodies |
| Script kiddie | No | Curiosity, notoriety | Use ready-made tools without understanding them; can still cause real harm |
The grey-hat category is important to understand. Good intentions do not make unauthorised access legal. A person who scans a company's website without permission, finds a flaw and then emails the company about it may genuinely want to help, but they have still accessed a computer system without authorisation, and they may face prosecution, particularly if they ask for payment, which can look like extortion.
Ethical hacking itself is divided by target. Web application testing examines websites and online services for flaws such as injection and broken access control. Network testing examines servers, routers and firewalls, both from the internet and from inside. Wireless testing examines Wi-Fi security. Social engineering testing assesses how staff respond to phishing emails, phone calls or attempts to enter buildings. Physical testing checks locks, badges and access to equipment. Cloud and mobile testing examine cloud configurations and mobile apps. A single engagement may cover one area or several, depending on what the client most needs to know.
Authorisation and the law
In almost every country, accessing a computer system without permission is a criminal offence, regardless of motive and even if no damage is done. In the United Kingdom, the Computer Misuse Act 1990 makes unauthorised access an offence; in the United States, the Computer Fraud and Abuse Act plays a similar role; and most other countries have comparable laws. For an ethical hacker, written authorisation is therefore not a formality but the legal foundation of the work.
Before testing begins, the tester and the client agree a set of documents. A contract or statement of work sets out the services and responsibilities. The scope lists exactly which systems, addresses and applications may be tested, and which may not, such as a third-party payment system the client does not own. The rules of engagement specify when testing may happen, which techniques are allowed (for example, whether denial-of-service tests or social engineering are permitted), how sensitive data must be handled, and whom to contact in an emergency. The authorisation must come from someone who genuinely has the right to give it; a junior employee cannot authorise a test of systems they do not control, and a company cannot authorise testing of a cloud provider's own infrastructure. Testers keep the signed authorisation with them during physical or social engineering tests, in case they are challenged.
For learners, the same principle applies on a small scale: practise only on your own devices, on deliberately vulnerable training applications installed in a home lab, or on online training platforms and capture-the-flag competitions that explicitly invite participants to attack their systems.
Reconnaissance: footprinting and fingerprinting
Every engagement begins with reconnaissance, gathering information about the target. The more a tester understands about an organisation, the more realistic the assessment, because real attackers do exactly the same. Reconnaissance has two main parts.
Footprinting builds a broad picture of the organisation and its exposure: its domain names and the addresses they point to, its email address format and staff names, the technologies mentioned in job adverts, its suppliers, its office locations and any information accidentally exposed, such as documents with hidden metadata or code shared publicly by developers. Footprinting can be passive, using only public sources without touching the target's systems, or active, interacting with the target, for example by querying its DNS servers directly.
Fingerprinting narrows the focus to identify the specific systems and software in use. A tester might determine which operating system a server runs, which web server software and version a site uses, or which services are listening on which ports. Fingerprinting matters because vulnerabilities are usually tied to particular versions: knowing that a server runs an outdated version of a program with a published flaw tells the tester where to look first. Fingerprinting is almost always active, since it involves sending requests and analysing the responses, and it must stay within the agreed scope.
Reconnaissance findings are often valuable to the client in themselves. Many organisations are surprised to learn how much they reveal: forgotten test servers, staff lists that make phishing easy, or software versions displayed in error messages. Reducing this exposure is one of the cheapest security improvements available.
Responsible disclosure and bug bounties
Independent researchers who are not hired by an organisation sometimes discover vulnerabilities, for example while studying software they use. Responsible disclosure, also called coordinated vulnerability disclosure, is the accepted way to handle such discoveries. The researcher reports the flaw privately to the organisation, gives it reasonable time to fix the problem before any details are published, and avoids accessing more data than necessary to demonstrate the issue. Many organisations publish a vulnerability disclosure policy explaining how to report flaws and promising not to take legal action against researchers who follow its rules; a standard file called security.txt placed on a website tells researchers whom to contact. Some well-known research teams use a fixed deadline, often 90 days, after which they publish details whether or not a fix has been released, to encourage prompt action.
Bug bounty programmes go a step further by offering payment for valid reports. Organisations such as technology companies, banks and government agencies run them, either directly or through specialist platforms, specifying which systems are in scope and how much different kinds of flaw are worth. Bug bounties give organisations access to many skilled testers, reward researchers for their work and, crucially, provide a legal, structured route for people who might otherwise be tempted into grey-hat activity. They work best alongside, not instead of, regular professional testing.
Check your understanding
- What three things distinguish an ethical hacker from a criminal hacker?
- Explain why a grey-hat hacker who reports a flaw may still be breaking the law.
- List the documents that should be agreed before a penetration test begins and what each contains.
- Distinguish between footprinting and fingerprinting, giving two examples of information each might reveal.
- Why might an organisation be pleased to receive a reconnaissance report even if no vulnerabilities were exploited?
- Describe the steps of responsible disclosure and explain why organisations publish disclosure policies.
This course book is available to read online only at chrysolites.org.