Book a free call

What Is Penetration Testing and When Do You Need It?

Penetration testing is an authorised, simulated cyberattack that finds exploitable weaknesses in your systems before attackers do, with a report you can act on.

Hertiv engineering teamReviewed by a senior engineer
7 min read
What Is Penetration Testing and When Do You Need It?
On this page

Short answer

Penetration testing is an authorised, simulated attack on a system to find and prove exploitable weaknesses. A tester chains real vulnerabilities, documents the evidence and gives your team a prioritised fix list — unlike a scanner, it shows what an attacker could actually do.

What is penetration testing?

Penetration testing is a contracted, authorised attempt to break into a defined system — application, network, cloud account, API or even people and physical premises — using the same techniques a real attacker would. The tester works to an agreed goal, such as reaching customer data or gaining domain administrator rights, and records every step with evidence.

The output is not a scanner dump. It is a narrative: what was found, how it was chained, what it exposed, and what to fix first. That distinction matters for engineering teams, because a finding is only useful if someone can reproduce it and verify the fix.

A pentest is a point-in-time assessment. It does not replace secure code review, threat modelling or continuous monitoring; it validates whether those controls hold up against someone actively trying to bypass them. Teams often pair it with cybersecurity services that cover the ongoing work between tests.

How is it different from vulnerability scanning and bug bounties?

A vulnerability scanner runs automated checks and returns a list of possible issues; a pentest uses a human to confirm which of those issues can actually be exploited and what damage follows. A scanner might flag an outdated library; a pentester shows whether it is reachable from the internet and what it lets them reach next.

  • Scanner: broad coverage, high volume, low depth, prone to false positives and false negatives.
  • Pentest: narrow, goal-driven scope, verified proof, business context in the report.
  • Bug bounty: continuous, crowd-sourced, pays per valid finding; complements a pentest but does not replace its structured coverage.

Most mature teams run scanners continuously in CI, commission a pentest at defined milestones, and run a bounty programme once their triage process can keep up. The three answer different questions.

What types of penetration test are there?

Tests are usually described by target and by how much information the tester starts with. The target tells you what is being assessed; the access model tells you how realistic the simulation is.

Type What is tested Typical trigger
Web application Login, session, input handling, business logic Major release or new product
API Auth, object-level access, rate limits, data exposure Public API launch
Network / internal Segmentation, lateral movement, AD or identity Office move, merger, flat network
Cloud configuration IAM, storage, keys, logging, cross-account trust New cloud account or landing zone
Mobile app Local storage, transport, backend trust, jailbreak App store release
Social engineering Phishing resilience, helpdesk procedures Annual awareness cycle
Physical Building access, tailgating, device theft New site or data centre

Access models:

  • Black-box: tester knows only what a public attacker would know.
  • Grey-box: some credentials or documentation, mimicking an insider or a leaked account.
  • White-box: full source and architecture access, closest to a code review with exploitation.

None is inherently better. Black-box tests the perimeter; white-box finds deeper logic flaws faster.

How does a penetration test run, step by step?

A well-run engagement has clear phases, and the contract is signed long before the first packet is sent.

  1. Define scope and rules of engagement. List in-scope hosts, out-of-scope systems, testing windows, emergency contacts and what is forbidden (for example, no denial-of-service or destructive payloads).
  2. Get written authorisation. The document names the signatory, the dates and the permitted techniques. Testing without it is a crime in most jurisdictions, even against your own supplier's system.
  3. Reconnaissance. Map the attack surface: subdomains, exposed services, leaked credentials, public code, third-party integrations.
  4. Exploitation. Attempt to prove impact. Good testers stop at the minimum evidence needed — a screenshot of an admin panel, not a wiped database.
  5. Post-exploitation and lateral movement. Where permitted, show how far an initial foothold reaches.
  6. Reporting. Written findings with severity, reproduction steps, evidence and remediation advice, plus a debrief call.
  7. Remediation and retest. Your team fixes; the tester confirms. Retest is normally a separate line item.

Example (hypothetical): a team schedules a 10-day grey-box web and API test, with a two-day retest window four weeks after the report. The retest is what converts findings into verified fixes.

If you lack the internal capacity to remediate at that pace, staff augmentation can fill the gap while findings are still fresh.

When should you commission one?

Commission a pentest when a change increases risk faster than your existing controls can absorb it. Common triggers are predictable.

  • Before a major launch of a customer-facing product, payment flow or authentication change.
  • When entering a new market or handling new data categories, such as health, financial or children's data.
  • For compliance or contractual obligations — PCI DSS, SOC 2, ISO 27001, or a customer's security questionnaire.
  • After significant architecture change: moving to cloud, adopting SSO, exposing a new API, adding a third-party integration.
  • Following a merger or acquisition, to understand what you inherited.
  • After an incident, to confirm the root cause is closed and nothing else was left open.

Timing is as important as frequency. A test run two weeks before a release leaves no room to fix what it finds; a test run after the architecture is frozen but before launch is usually the sweet spot. Annual testing is a common baseline, but the real driver should be change, not the calendar.

What does a good pentest report look like?

A useful report is written for two audiences: the engineers who will fix the issues and the executives who will fund the work. It should contain an executive summary in plain language, the scope and access model, the methodology, and the findings themselves.

Each finding should include:

  • A clear title and severity with a short justification.
  • Affected assets and the business impact if exploited.
  • Reproduction steps and evidence (requests, screenshots, logs).
  • A specific remediation recommendation, not "apply patches".
  • A reference to the standard category where relevant (OWASP Top 10, CWE).

Beware reports that are mostly a list of severity scores. A critical finding on an isolated test server matters less than a medium one on the payment path. Ask the tester to rank by exploitability and business impact together, and to flag anything they could chain into a full compromise.

Common mistakes

Most pentest programmes fail on process, not on the technical work. These are the recurring ones.

  • No written scope or authorisation. Tests get paused, results are contested, or worse, the tester accidentally hits a production system nobody agreed to.
  • Testing production without guardrails. Destructive payloads and load spikes can cause outages; agree limits in advance.
  • Buying a scanner and calling it a pentest. Automated output is not validated exploitation and rarely finds business-logic flaws.
  • Ignoring the report. Findings pile up, the retest never happens, and the same issues appear next year at higher severity.
  • Fixing only criticals. Medium findings chain into critical paths more often than teams expect.
  • No owner per finding. Each item needs a named owner and a date, or it will drift.
  • Skipping the retest. An unverified fix is an assumption.

If you are still designing the system, threat modelling and secure design review are cheaper than fixing after a test. Software engineering services can embed those practices into delivery.

How to choose a penetration testing partner

Look for evidence of method, not marketing. Ask the same questions of every provider and compare answers.

  1. Check credentials and insurance. Testers should hold recognised industry certifications, and the firm should carry professional indemnity cover.
  2. Ask for a sample report. Redacted is fine. You are judging clarity, prioritisation and remediation advice.
  3. Confirm the methodology. Which standards do they test against, and how do they handle business-logic flaws and chained attacks?
  4. Agree scope, windows and retest terms in writing. Include the retest, the debrief and the report format in the contract.
  5. Check data handling. Where does evidence live, who can access it, and when is it destroyed?

For teams building AI features, ask separately about prompt injection, model access controls and data leakage; these are rarely covered by a standard web app test. Hertiv's AI security work sits alongside conventional pentesting for that reason.

Key takeaways

  • Pentest = human-led, goal-driven attack simulation; vulnerability scanning is automated and broad but shallow.
  • Scope, rules of engagement and a written authorisation must be agreed before any testing starts.
  • Tests are timed around releases, compliance deadlines, new infrastructure and major architecture changes.
  • A useful report prioritises by exploitability and business impact, with reproduction steps, not just a CVSS list.
  • Black-box, grey-box and white-box describe how much access the tester gets, not how thorough the test is.
  • Retesting after fixes is part of the engagement; an unvalidated fix is an assumption, not a remediation.

Frequently asked questions

Is penetration testing legal?

Yes, when you have written authorisation from the system owner and the scope is clearly defined. Testing systems you do not own or have permission to test is a criminal offence in most jurisdictions, regardless of intent.

How often should you run a penetration test?

At least annually is a common baseline, but the real trigger should be change: major releases, new infrastructure, new data categories or compliance deadlines. High-risk systems are often tested more frequently.

How long does a penetration test take?

A focused web application test typically runs from a few days to two weeks depending on scope and access model. Enterprise network and cloud assessments take longer. Reporting and retest add time after the testing window.

Does a pentest guarantee your system is secure?

No. It shows that specific weaknesses were not found within an agreed scope and time window. It reduces risk and validates controls but cannot prove absence of vulnerabilities.

What is the difference between black-box and white-box testing?

Black-box gives the tester no internal information, mimicking an outside attacker. White-box gives source code, architecture and credentials, which finds deeper logic flaws faster but is less realistic as a simulation.

What should you do after receiving a pentest report?

Triage findings by exploitability and business impact, assign an owner and date to each, fix in priority order, and commission a retest to confirm. Share a summary with leadership and track open items to closure.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: software products in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning a penetration test or an AI security review? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Cybersecurity service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call