A penetration test (pentest) is an authorised, simulated cyberattack on networks, servers or web applications. Security specialists use tools and manual analysis to check whether vulnerabilities can actually be exploited, and deliver a report with prioritised recommendations. It rests on a clearly agreed scope, written authorisation and recognised methodologies such as the BSI implementation concept, OWASP or PTES.
Key takeaways
- Define objectives, scope, test depth, emergency contacts and abort criteria in advance, and commission the test in writing with liability and confidentiality terms.
- Combine regular vulnerability scans for breadth with a penetration test for depth, because only exploitation proves a vulnerability with certainty.
- Do not prioritise findings by the CVSS base score alone, but also by the threat situation and the protection requirements of the affected systems.
- Choose independent testers with proven qualifications who were not involved in designing, building or operating the infrastructure under test.
- With ransomware in mind, specifically test remote access, the path from a compromised user account to domain admin and whether backups can be reached.
Short answer: what is a penetration test?
A penetration test – pentest for short – is an authorised, controlled attack on your own infrastructure. Security specialists take the attacker's perspective and check whether vulnerabilities in networks, servers and applications can actually be exploited, and how far an intruder would get. Germany's Federal Office for Information Security (BSI) describes the penetration test as a proven way to determine the attack potential against a network, a single system or a (web) application: it estimates the chances of success of a deliberate attack and checks how effective the security measures in place really are.
The US National Institute of Standards and Technology (NIST) defines penetration testing in similar terms: assessors mimic real-world attacks to identify ways of circumventing the security features of an application, system or network – often using the same tools and techniques that attackers use.
For information security, a pentest is therefore a proactive tool: it should uncover security gaps before cybercriminals exploit them and cause damage. It complements controls such as firewalls, monitoring and awareness training, and adds something audits and policies cannot provide – the attacker's view.
The outcome is not a seal of approval but a report: which vulnerabilities were found, how severe they are, how they can be reproduced and how to fix them.
Definition: pentest vs. vulnerability scan, audit and red teaming
The terms are often used interchangeably. When commissioning work, however, the difference matters, because effort, output and objectives vary considerably.
| Method | Key question | Approach | Output |
|---|---|---|---|
| Vulnerability scan | Which known vulnerabilities exist? | automated, mostly based on versions and configurations | list of potential findings, often with false positives |
| Vulnerability assessment | How relevant are the findings? | scan plus manual triage | prioritised list of vulnerabilities |
| Penetration test | Can the vulnerabilities be exploited? | manual attacks within the agreed scope, supported by tools | proof of exploitability, attack paths, recommendations |
| Audit / IS audit | Have the agreed controls been implemented? | review of documentation, processes and samples | deviations from requirements |
| Red teaming | Can an attacker reach a specific objective unnoticed? | covert attack simulation over a longer period | assessment of prevention, detection and response |
Pentest vs. vulnerability scan
According to the BSI guide, a non-invasive vulnerability scan is a separate, lower test depth: scanners flag suspicious points, but they are not exploited. Because most vulnerability scanners infer weaknesses from version numbers, false positives are common – for example when an old version is deliberately used but has been patched.
There are also breach and attack simulation (BAS) platforms that replay known attack techniques automatically and continuously, as well as managed services in which a provider runs vulnerability scans on an ongoing basis. Such solutions provide regular insight into your security status but do not replace the creative analysis of a penetration test.
Automated scanners still have their place: they are worthwhile when a large number of servers and clients need to be checked in a short time.
Pentest vs. audit
An IS audit based on the BSI's IT-Grundschutz (the German baseline protection methodology) checks whether defined security measures have been implemented as agreed. The penetration test goes a step further and deliberately looks for ways to bypass those measures.
Pentest vs. red teaming
In a red team exercise, an attacking team takes on the defenders, the so-called blue team. It simulates a real adversary with a specific objective – such as access to a particular database – and combines attacks on networks and applications with social engineering and physical access. Unlike classic pentesting, the focus is less on a complete list of vulnerabilities and more on whether detection, escalation and incident response work. For such scenarios, the BSI study describes a covert approach: if secondary security systems such as an IDS or escalation procedures are to be tested, at least the initial phase uses methods that are not directly recognisable as an attack.
For AI applications such as chatbots or assistants based on large language models, the term AI red teaming has become established. It refers to the targeted search for ways to misuse such systems and complements testing of the underlying web application and its interfaces.
Objectives of a penetration test
The BSI study "Implementation Concept for Penetration Tests" groups a client's objectives into four categories:
- Improving the security of technical systems – for example firewalls, routers or web servers.
- Identifying vulnerabilities – for example before two networks are connected after a merger.
- Confirmation of IT security by an independent third party – as evidence for business partners, regulators or compliance purposes.
- Improving the security of organisational and personnel infrastructure – for example by testing escalation processes or social engineering scenarios.
According to NIST, a penetration test also shows how well a system tolerates real-world attack patterns, what level of sophistication an attacker would need to compromise it, which additional countermeasures could mitigate threats, and whether defenders can detect attacks and respond appropriately.
A clear objective before the start is essential. If goals cannot be achieved efficiently, the testers should say so and suggest alternatives such as an audit or security consulting.
Benefits at a glance:
- a realistic view of attack vectors and security risks instead of theoretical lists
- demonstrated exploitability and therefore robust prioritisation
- verification that security measures, policies and processes work in practice
- independent confirmation for auditors, partners and regulators
- greater resilience against cyberattacks before an emergency occurs
When does a pentest make sense?
Typical triggers are the commissioning of a new system, significant changes to infrastructure or applications, and the period after a security incident. In such cases the test object can usually be narrowed down easily.
The purpose is not a certificate for the wall but the identification of real security risks. The assets that need the most protection – data, processes, technologies – determine the focus. Results support risk management within the ISMS, help improve security processes and raise security maturity over time. It is also important to understand the limits: a penetration test cannot find every flaw. Results apply only to the time of testing, and because resources are limited there is no guarantee that all existing vulnerabilities will be found.
Types of penetration tests
Pentests differ by target, starting point and technique. The BSI study classifies them according to six criteria: information basis, aggressiveness, scope, approach, technique and starting point.
External and internal pentest
In an external pentest, the specialists attack via the internet – targeting firewalls, VPN gateways, mail servers, web servers and other publicly reachable components. The focus is on external interfaces through which potential attackers could gain entry; typical findings are configuration errors and unpatched vulnerabilities.
An internal pentest starts inside the corporate network, for example from a prepared endpoint or with a standard user account. It answers the question: what happens if an attacker already has a foot in the door, for instance after a phishing email or with stolen credentials? This perspective is crucial for defending against modern cyberattacks, because attackers usually move laterally through the network after initial access.
Web applications, APIs and apps
Web applications, online shops, customer portals and APIs are often directly reachable from the internet and process sensitive data. Web application penetration testing covers functions such as login and password reset as well as authentication, session management, access rights and input validation. Typical findings are broken access controls, injection flaws such as SQL injection, cross-site scripting (XSS) or misconfigurations. The OWASP Top 10:2025 lists "Broken Access Control" in first place, "Security Misconfiguration" in second and "Injection" in fifth.
Cloud pentest
In cloud environments such as AWS or Azure, the focus is on identities, roles, permissions, publicly accessible storage and misconfigurations. The rules of the respective cloud provider must be observed before testing begins. The shared responsibility model applies: the provider is responsible for the security of the platform, the customer for configurations, identities and data. If services are outsourced to a hosting provider, the provider must be included in the engagement;
Active Directory
Active Directory is at the heart of many Windows networks; organisations use it to manage users, groups and permissions. An AD pentest looks for ways to get from a normal account to domain admin rights. Typical attack vectors: weak passwords, incorrectly delegated rights, outdated protocols and unprotected service accounts. Why this matters so much for defence is explained in our article on Active Directory as an attack target.
IoT and OT
For IoT devices and OT systems such as production and building controls, availability is the top priority. Many controllers run on outdated operating systems and cannot easily be patched. The BSI guide explicitly lists infrastructure facilities such as access control and building management as possible test objects.
Social engineering and phishing simulation
Many real attacks start with people. A social engineering assessment checks, for example, whether employees respond to a phishing email or disclose passwords over the phone. Such simulations should only take place under precisely defined conditions, with the involvement of employee representatives and by specialists trained for the task, because otherwise staff may feel exposed.
Physical pentest
This type of test checks whether an unauthorised person can get into buildings, server rooms or unlocked workstations. Security staff should know in advance how to verify that testers are legitimate, for example via a point of contact or an authorisation letter.
Approaches: white box, grey box and black box
The choice of approach shapes the entire engagement: how much prior knowledge do the testers receive? The information basis is one of the central planning criteria.
| Approach | Prior knowledge | Simulates | Strengths | Limitations |
|---|---|---|---|---|
| White box | extensive: network diagrams, IP addresses, configurations, possibly source code | informed insider or service provider | greatest test depth, efficient | less realism for initial access |
| Grey box | partial: e.g. a user account, architecture overview | attacker with initial access | good balance of depth and realism | boundaries must be clearly agreed |
| Black box | target addresses only | external hacker without insider knowledge | realistic outside view | more time required, gaps more likely to be missed |
In a black box approach, testers only receive the address information of the target, simulating a typical outside attacker; in a white box approach, they have extensive knowledge of the target systems.
Standards, methodologies and frameworks
Reputable teams follow a transparent, structured methodology. The following standards are widely used in Germany and internationally:
- BSI implementation concept for penetration tests: The study by Germany's Federal Office for Information Security divides a penetration test into five phases and provides a classification scheme with six criteria.
[2] The BSI's practical guide for IS penetration tests additionally describes framework conditions, test depth and report structure. [1] A special case is the IS web check, which assesses the security of a website largely through automated methods over the internet. [1] - OWASP Web Security Testing Guide (WSTG): The OWASP project's guide is a comprehensive basis for testing web applications. Version 4.2 is currently published; version 5.0 is in development.
[4] The OWASP Top 10 names the most important risk categories for web applications and was released in a new edition in 2025. [5] - PTES (Penetration Testing Execution Standard): The standard defines seven main sections: pre-engagement interactions, intelligence gathering, threat modeling, vulnerability analysis, exploitation, post exploitation and reporting.
[6] Separate technical guidelines support practical implementation. [6] - OSSTMM (Open Source Security Testing Methodology Manual): The ISECOM manual looks at security testing beyond data networks, including human and physical aspects.
- NIST SP 800-115: The "Technical Guide to Information Security Testing and Assessment" is intended to help organisations plan and conduct technical security tests, analyse findings and develop mitigation strategies.
[3] Its appendix contains a rules of engagement template. [3] - IT-Grundschutz and ISO/IEC 27001: Both standards describe how to build an ISMS, i.e. structured management of information security. Pentests provide insight into how well systems are actually protected; within IT-Grundschutz, the IS audit checks whether measures have been implemented.
[1] - CVSS (Common Vulnerability Scoring System): The FIRST scoring system, currently at version 4.0, rates vulnerabilities on a scale from 0.0 to 10.0.
[7]
No standard replaces experience and creativity. Attackers do not work from checklists either; they target the environment they find – which is why a good penetration test adapts flexibly to each situation.
Process: the phases of a pentest
The BSI implementation concept describes five consecutive phases: preparation, information gathering and evaluation, assessment of information and risk analysis, active intrusion attempts, and final analysis.
1. Preparation, scope and authorisation
Without thorough preparation, it is hard to meet the client's expectations.
Written authorisation is central. Testers should never test without a written mandate; the contract should define the test period, test object and test depth and cover liability and confidentiality.
2. Information gathering and OSINT
Next, the team gathers information about the target. The BSI study also calls this step a passive penetration test; the goal is as complete an overview as possible of installed systems, potential points of attack and known security weaknesses.
3. Scanning and risk analysis
Scanning identifies open ports and services and thus potential attack vectors; version information can be recorded through banner grabbing, for example.
4. Exploitation: active intrusion attempts
In this phase, the selected target systems are actively attacked. According to the BSI study, it carries the greatest risk and shows whether suspected vulnerabilities represent real risks.
5. Post-exploitation
Once initial access succeeds, testers try to go further: privilege escalation, lateral movement to other servers, access to confidential data or backups. The aim is to show access to sensitive databases without altering them. PTES treats post exploitation as a separate section.
6. Reporting and debrief
The final report must make the test steps and the vulnerabilities found traceable and include an assessment of the risks and detailed recommendations.
7. Remediation and retest
After reporting, the real work begins: prioritise findings, implement security measures, verify their effect. The BSI guide advises having the remediation of identified gaps checked by internal quality assurance or in-house IT staff so that the independence of the external testers is preserved.
Pentest tools
Automation speeds up the work but does not replace manual analysis. Tools must be selected carefully and understood thoroughly, because incorrect use can impair systems.
| Tool | Purpose |
|---|---|
| Nmap | network and port scanning, service and version detection |
| OpenVAS, Nessus | automated vulnerability scanners |
| Metasploit | framework with an extensive library of exploit modules |
| Burp Suite | proxy and platform for testing web applications |
| ZAP | open-source proxy for web applications (Zed Attack Proxy, formerly OWASP ZAP) |
| Wireshark | capturing and analysing network traffic |
| John the Ripper | testing the strength of password hashes |
There are also tools for fuzzing, which can uncover unknown flaws, for analysing permissions in Active Directory or for cloud configurations, usually running on specialised Linux distributions. Wireshark can show, for example, whether credentials are transmitted without encryption; ZAP is also suitable for automated scans during development. Both open-source and commercial products exist; according to the BSI, the advantage of commercial tools is that they are often better documented.
The report and prioritisation with CVSS
The report is the most important deliverable. The BSI recommends this structure: a description of the test object and test conditions, followed by a management summary with the key messages, then the vulnerabilities with precise descriptions and recommendations for technical staff.
A good pentest report contains:
- scope, time frame, approach and methodology
- a management summary in plain language
- for each identified vulnerability: description, affected components, evidence, impact, severity and recommendation
- areas not tested, with reasons
- notes on identical systems, so that the same finding is not repeated a hundred times
[1]
Rating severity
For rating, the BSI guide refers to established industry standards such as CVSS (still version 2 in the guide) or DREAD; the rating helps administrators and security teams decide on the order of remediation.
CVSS v4.0 maps scores to qualitative ratings: None (0.0), Low (0.1–3.9), Medium (4.0–6.9), High (7.0–8.9) and Critical (9.0–10.0).
Compliance and regulation
Whether you are a critical infrastructure operator, a financial institution or a supplier: in many sectors, penetration testing is not an end in itself but part of regulatory requirements and compliance. It is important to assume only what the regulations actually require.
- DORA (financial sector): The EU Digital Operational Resilience Act requires financial entities other than microenterprises to maintain a digital operational resilience testing programme as an integral part of their ICT risk management framework.
[8] This includes appropriate tests such as vulnerability assessments and scans, source code reviews where feasible, and penetration tests. [8] Financial entities identified by the authorities must carry out advanced testing by means of TLPT (threat-led penetration testing) on live production systems at least every three years. [8] DORA also sets requirements for TLPT testers, such as demonstrated expertise in threat intelligence, penetration testing and red team testing, and professional indemnity insurance. [8] - NIS 2: The NIS 2 Directive requires essential and important entities to take cybersecurity risk-management measures, including vulnerability handling and disclosure as well as policies and procedures to assess the effectiveness of those measures.
[9] Authorities may subject essential entities to regular and targeted security audits and to security scans; the audits are carried out by an independent body or the authority itself. [9] A pentest is not explicitly required, but it is an obvious way to demonstrate the effectiveness of cybersecurity measures. The detailed obligations depend on national transposition; critical infrastructure operators may face additional requirements. - GDPR: The General Data Protection Regulation requires appropriate technical and organisational measures to protect personal data. A pentest can help demonstrate the effectiveness of these measures and thus support GDPR compliance.
- Cyber Resilience Act: For manufacturers of products with digital elements, the EU Cyber Resilience Act introduces its own security requirements, which make security testing during software development an obvious step.
- ISO/IEC 27001, PCI DSS and TISAX: In an ISMS under ISO/IEC 27001, under the card payment standard PCI DSS or in TISAX assessments in the automotive industry, security tests often serve as evidence. Which type of test is required and how often follows from the current version of the respective framework and should be agreed with the auditor or assessor.
Which obligations apply depends on your sector, size and role. For a definitive assessment, consult your legal department, data protection officer or a specialist lawyer; a pentest is no substitute for legal advice.
How much does a pentest cost? Cost drivers
There are no meaningful flat prices because no two projects are alike. According to the BSI study, effort usually depends directly on the scope of the systems to be examined.
- Scope and size: number of IP addresses, sites, web applications, APIs or cloud accounts
- Complexity: custom software, many user roles, a grown architecture
- Test depth and approach: white box or black box, scanning only or real exploitation, additional social engineering or physical testing
- Test type: a single web check, an internal infrastructure pentest, a covert attack simulation or TLPT
- Conditions: on-site work, testing outside business hours, special security clearances for the test team
- Reporting: presentations to management, translations, retests
The BSI guide recommends specifying in the contract which costs will be incurred and what is expected besides the test itself, such as a presentation to management or a particularly detailed report.
Many providers only quote on request once scope details are clear. It helps to include target systems, the preferred approach and the time frame in your request. When comparing offers, check which services are included: retest, presentation, support with remediation? Additional services at the customer's request should be listed separately.
Choosing a provider: what to look for
A pentester gains access to sensitive information about your infrastructure and its weaknesses. Choosing a provider is therefore a matter of trust.
Certified test labs: Ideally, the provider is certified as a testing body and demonstrably complies with data protection, secure data handling and information security.
Independence: The BSI generally recommends external testers who were not involved in the design, set-up or operation of the systems under test.
Qualifications and certifications: The BSI cites certificates for testing bodies or individuals as evidence, such as its own personnel certification or CREST, both of which include practical exams, and the Certified Ethical Hacker, which is based on a theoretical exam.
References: References provide useful pointers. Because many clients do not agree to be named, a provider can instead confirm the sectors and company sizes it has worked for.
Test team: The BSI recommends at least two people so that the four-eyes principle is maintained.
Contract, NDA and data handling: Agree in writing on target systems, time frame, test depth, liability, confidentiality, data retention and deletion, and the client's obligations to cooperate.
Initial consultation and quote: A non-binding initial consultation clarifies objectives and scope. A good quote describes the test methods, scope, people involved and report format specifically. Make sure that the people named in the quote actually carry out the work.
Pentesting as ransomware prevention
Ransomware groups rarely use exotic techniques. Typical entry points are poorly secured remote access such as VPN and Remote Desktop Protocol (RDP), unpatched systems with publicly known vulnerabilities (CVEs), stolen credentials and weak Active Directory configurations. In such cyberattacks, criminals often copy data out of the corporate network before encryption and then threaten to leak it.
A pentest can check exactly these entry points before cybercriminals find them:
- From the outside: Are VPN gateways, remote desktop access and web applications hardened and up to date?
- From the inside (assumed breach scenario): How far can an attacker get with a single compromised user account? How short is the path to domain admin?
- Backup access: Can backup servers and storage be reached with captured credentials?
- Detection: Does monitoring pick up the test team's activities? Our guide to detecting an attack early explains what warning signs look like.
A penetration test answers the question "Where can an attacker get in, and how far?". Whether the organisation as a whole is prepared – with an incident response plan, backups and recovery – is what a readiness assessment clarifies. Both belong in a security strategy for greater cyber resilience. No security test can rule out an incident, but it reduces the attack surface and buys time for incident response.
Vulnerabilities often come to light after data loss or a ransomware incident. Our data recovery partner DATA REVERSE therefore also offers an IT security analysis with penetration testing (external link) (in German).
Checklist: preparing for and following up a pentest
- Test objectives defined: which questions should the security analysis answer?
- Scope defined: servers, applications, IP ranges, sites – and what is explicitly excluded
- Approach chosen: white box, grey box or black box; external, internal or both
- Written authorisation and contract covering liability, NDA and data deletion in place
- Hosting providers, cloud providers and other third parties informed or involved
- Data protection officer and, where applicable, employee representatives involved
- Contacts, emergency contacts and abort criteria agreed
- Documentation provided: network diagrams, system lists, configurations
- No maintenance work or changes to target systems during the test period
[1] - Report with management summary and prioritised findings received
- Remediation plan created: owners and deadlines set
- Retest carried out and next test cycle scheduled
Conclusion
A penetration test shows what attackers could actually achieve today – not in theory, but with evidence. Its strength lies in combining tools, methodology and human experience. To be effective, it needs clear objectives, a clean scope, written authorisation and a provider with demonstrable qualifications. What happens afterwards is decisive: prioritise findings, fix them, test again and repeat the exercise regularly. That turns a snapshot into a continuous process that raises the security level, strengthens the protection of critical applications and steadily shrinks the attack surface.
Frequently asked questions
What is a penetration test in simple terms?
Hired security specialists attack an organisation's IT in a controlled way and with written permission. They look for vulnerabilities, try to exploit them and document how far a real attacker could get. The result is a report with rated findings and recommendations for remediation.
What is the difference between a pentest and a vulnerability scan?
A vulnerability scan is largely automated and reports known weaknesses, mostly based on software versions. A penetration test goes further: testers check manually whether findings can really be exploited and chained into an attack path. Scans suit regular checks; the pentest provides depth.
How often should a pentest be carried out?
There is no universal interval. Germany's Federal Office for Information Security (BSI) recommends repeat tests every two to three years; according to the BSI, typical triggers for additional tests are the initial commissioning of new systems, significant changes or an attack that has already taken place. The higher the protection requirements, the more often you should test; frameworks such as DORA set their own intervals.
Is penetration testing legal?
Yes, provided the client is entitled to commission it and there is a written engagement with a clearly defined scope. Without that authorisation, attacking third-party systems can have criminal and civil consequences. If hosting or cloud providers are involved, their terms also apply; when in doubt, seek legal advice.
How much does a pentest cost?
Cost depends mainly on factors such as scope, the number and complexity of target systems, test depth, the chosen approach and reporting requirements. Flat prices are therefore of little use. A serious quote is only possible on request after a scoping conversation that clarifies objectives and boundaries.
What is the difference between a pentest and red teaming?
A penetration test looks for as many vulnerabilities as possible within a defined scope and rates them. A covert attack simulation pursues a specific objective over a longer period, stays undetected for as long as possible and also tests whether defenders notice the attack and respond correctly.
Can a penetration test damage systems?
There is a residual risk, for instance if an exploit crashes a service. That is why test depth, time windows, emergency contacts and abort criteria are agreed in advance. The BSI recommends a moderate attack intensity and only exploits whose effects have been tested beforehand.
What happens after the penetration test?
The organisation receives a final report with a management summary, technical findings and recommendations. Findings are prioritised by severity and remediated. A retest then shows whether the fixes work.
Related ransomware profiles
- Akira
.akira - Lockbit 3.0
.lockbit - BlackBasta
.basta
Read next
Sources and further reading
- [1]BSI – A Practical Guide for IS Penetration Tests (Ein Praxis-Leitfaden für IS-Penetrationstests, version 1.2, German) bsi.bund.de
- [2]BSI – Study: Implementation Concept for Penetration Tests (Durchführungskonzept für Penetrationstests, German) bsi.bund.de
- [3]NIST – SP 800-115: Technical Guide to Information Security Testing and Assessment csrc.nist.gov
- [4]OWASP – Web Security Testing Guide (WSTG) owasp.org
- [5]OWASP – Top 10:2025 owasp.org
- [6]PTES – Penetration Testing Execution Standard pentest-standard.org
- [7]FIRST – CVSS v4.0 Specification Document first.org
- [8]Regulation (EU) 2022/2554 (DORA) – Articles 24 to 27 eur-lex.europa.eu
- [9]Directive (EU) 2022/2555 (NIS 2) – Articles 21 and 32 eur-lex.europa.eu