No history yet

Penetration Testing Basics

What is Penetration Testing?

Penetration testing, often called pen testing, is a controlled, authorised simulation of a cyberattack on a computer system. The goal is simple: to find and assess security weaknesses before a real attacker does. Think of it as hiring a team of ethical hackers to try and break into your digital house, not to steal anything, but to show you where the locks are weak and the windows are unlocked.

This proactive approach is crucial. Instead of just reacting to breaches, organisations use pen testing to understand their vulnerabilities from an attacker's perspective. It answers the critical question: "If someone tried to compromise our systems, could they succeed, and what damage could they do?" The findings from a pen test provide a clear, prioritised roadmap for strengthening defences and reducing the overall of the organisation.

Types of Engagements

Not all pen tests are the same. The approach depends on how much information the testing team is given beforehand. This leads to three main types of engagements, each offering a different balance of realism and thoroughness.

Test TypeTester's KnowledgeRealismSpeed & Cost
Black-BoxNone (or publicly available)HighCan be slow & costly
White-BoxFull (source code, diagrams)LowFaster & efficient
Grey-BoxPartial (e.g., user login)MediumBalanced

Black-box testing is the most realistic simulation of an external attack. The testers start with zero inside information, just like a real-world hacker would. They have to discover everything about the target's infrastructure and applications from scratch.

White-box testing, on the other hand, provides the testers with complete access to information, including network diagrams, source code, and credentials. It's less about simulating an external attacker and more about conducting a comprehensive audit to find as many vulnerabilities as possible, even those that would be hard to discover from the outside.

Grey-box testing strikes a balance. Testers are given some information, like the login credentials for a standard user account. This simulates an attack from someone who already has some level of inside access, such as a disgruntled employee or a hacker who has phished a user's password.

The Ethical Line

What separates a penetration tester from a criminal is one key thing: permission. Ethical hacking operates within a strict legal and professional framework. Before any test begins, a detailed agreement known as the is established between the testing team and the client organisation.

The Rules of Engagement document is the single most important part of any professional penetration test. It defines the scope, boundaries, and communication plan, ensuring the test is both effective and safe.

This document outlines precisely what systems can be tested, what methods are allowed, and the timeframe for the assessment. It's the ethical and legal boundary that prevents a security assessment from becoming an illegal intrusion. Operating without this explicit, written permission is not pen testing; it's a crime.

Different jurisdictions have laws like the Computer Misuse Act in the UK or the Computer Fraud and Abuse Act (CFAA) in the US, which criminalise unauthorised access to computer systems. A properly scoped engagement provides a legal safe harbour, allowing testers to perform their work without fear of prosecution. This framework is what makes ethical hacking a respected and vital profession in cybersecurity.

Let's check your understanding of these foundational concepts.

Quiz Questions 1/5

What is the primary purpose of a penetration test?

Quiz Questions 2/5

A company wants to simulate a realistic external attack. They provide the testing team with no internal information about their systems. Which type of test is this?

You now have a solid understanding of what penetration testing is, its different forms, and the critical ethical guidelines that govern it. This foundation is essential as we move on to explore the methodologies and tools used in real-world engagements.