What is a pentest (penetration test): types, stages and what goes into the report
A pentest, or penetration test, is an authorized attack simulation to find out how someone could break into a system and how far they would get. See the types (black, gray and white box), the stages, when to do one, how it differs from a scan and where AI helps.
Published on November 24, 2026. 10 min read
A pentest, or penetration test, is an authorized attack simulation carried out by specialists to find out how someone could break into a system, a network or an app, and what they could do once inside. The result is a report with the flaws found, proof of each one, the risk to the business and how to fix it.
This is a term from the UEEK glossary of technology, AI and security, in the Security area. Here are the short definition, the types of pentest, the stages, when it is worth doing one, the difference from a vulnerability scan, what goes into the report and where AI helps at each stage.
What is a pentest?
The name is short for _penetration test_. It is also called an intrusion test or ethical hacking.
In practice, a security professional or team receives an agreed scope (a website, an API, an app, the company network, the cloud account) and tries to exploit the flaws in that target using the same techniques an attacker would. What sets it apart is authorization: everything is agreed in writing beforehand, with dates, limits and contacts in case something goes wrong.
The value of a pentest is showing what a flaw really allows. A list of vulnerabilities says there is a door that is not properly locked. A pentest shows whether that door can be opened, what data is on the other side and whether a small flaw, combined with another, turns into full access.
What are the types of pentest?
The most common way to classify them is by how much information the tester gets before starting:
| Type | What the tester gets | When it makes sense |
|---|---|---|
| Black box | Only the address or name of the target, with no access or documentation | Seeing the system as an outside attacker, with no inside knowledge |
| Gray box | A regular test user and some documentation | Testing what a logged-in customer or a compromised account could do. The most common format for web applications |
| White box | Source code, architecture, credentials and access to the team | Deeper review, for critical systems or before an important launch |
They can also be classified by target: web application, API, mobile app, internal network, external network, cloud and even social engineering, when the test measures whether people in the company fall for a fake email. And by origin: external pentest, done over the internet, and internal, done as if the attacker were already inside the network.
What are the stages of a pentest?
Market methods use different names, but the sequence is usually similar. For web applications, the OWASP testing guide is one of the most used references.
- Scope and authorization: Targets, dates, limits, test type and emergency contacts agreed in writing.
- Reconnaissance: Mapping what is exposed: domains, services, technologies and entry points.
- Mapping: Scanning and analysis to list the possible flaws at each entry point.
- Exploitation: Controlled attempt to use the flaws to get in, without taking the system down or deleting data.
- Impact: How far the access goes: what data shows up, what permissions are gained, which flaws add up.
- Report: Findings with proof, business risk and fix recommendations.
- Fix and retest: The team fixes and the tester confirms the flaw is closed.
The retest closes the cycle: it confirms the fixes solved what was found.
1. Scope and authorization
Before any test, the company and the tester define what is in and out of scope, the type of test, dates and times, whether the test runs in production or staging, and who to call if something goes wrong. Without this written authorization, the test is an intrusion.
Where AI helps: organizing the inventory of what exists (domains, APIs, environments) from documentation and repositories, so the scope does not miss any system. The decision on what goes in belongs to the company.
2. Reconnaissance
The tester gathers what is visible: subdomains, open services, software versions, technologies in use, emails and public information that helps build an attack.
Where AI helps: gathering and summarizing a large volume of public information and pointing out what looks unusual, such as a forgotten test environment open to the internet.
3. Mapping and scanning
With the map in hand, scanning tools and manual analysis list the possible flaws at each entry point: outdated versions, weak settings, forms that accept malicious input, poorly built access controls.
Where AI helps: cross-checking tool results, removing duplicates and setting aside likely false positives, so the specialist spends time on the flaws worth testing.
4. Exploitation
This is the stage that defines a pentest. The specialist tries to actually use the flaws to get in, taking care not to take the system down or delete data. Often the path goes through several small flaws, each low risk when seen alone.
Where AI helps: suggesting attack paths based on the flaws found and helping build test variations. Execution and judgment on what is safe to try stay with the person, who is accountable for the test.
5. Impact assessment
Once inside, the tester measures how far the access goes: whether they can see other customers' data, gain admin permissions, reach the database or other company systems. This is what turns a technical flaw into a business risk.
Where AI helps: relating what was accessed to the type of data involved, such as personal data protected by privacy laws like Brazil's LGPD, to give each finding the right weight.
6. Report
Everything goes into a document with findings, proof and recommendations. The next section details what a good report needs.
Where AI helps: drafting the descriptions and recommendations from the technical notes, in language a manager understands. The specialist reviews every finding before delivery.
7. Fix and retest
The system team fixes the flaws in order of risk, and the tester tests again to confirm each one is closed. Without a retest, there is no way to know whether the fix solved the problem or only hid it.
Where AI helps: suggesting the code fix for each finding, which the team reviews and tests before releasing, and turning the case into an automated test so the flaw does not come back.
When should you do a pentest?
A pentest is a snapshot of the system at one point in time. It makes the most sense when risk changes:
- Before launching a system that stores customer data, processes payments or is open to the internet.
- After a major change, such as a new architecture, a cloud migration or a new login and permissions module.
- When a client or contract requires it: large companies, banks and regulated sectors often ask for a recent pentest before hiring a vendor.
- Periodically, for critical systems, to keep up with what changed since the last test.
- After an incident, to understand how the attack got in and whether there are similar paths.
On the Itaú Mulher Empreendedora platform, security was handled in three layers, code, infrastructure and delivery, with CI/CD including SAST, SCA and DAST analysis and external pentests, to banking-sector standards. The pentest was one of the layers, alongside the automated analysis that runs on every release.
What is the difference between a pentest and a vulnerability scan?
The two are often confused, and both have their place.
- Scan
- Automated: Tools compare the system with a database of known flaws.
- Frequent: Can run on every release in the pipeline or every week.
- List of possible flaws: Points out what may be a problem, with false positives.
- Pentest
- Led by a specialist: A person uses tools and creativity the way an attacker would.
- Point in time: Done at key moments, with agreed scope and dates.
- Proven flaws and impact: Shows what can really be exploited and how far the access goes.
The scan keeps up with day-to-day work. The pentest goes deeper at key moments.
A scan is cheap to repeat and catches known flaws early, such as an outdated library. That is why it is part of the CI/CD pipeline for teams that practice DevSecOps. A pentest finds what the tool cannot see: business logic flaws, such as a user who changes a number in the URL and starts seeing another customer's order, and chains of flaws that only a person links together.
A pentest on a system with no day-to-day scanning usually spends much of its time finding obvious flaws. With the pipeline handling the basics, the specialist goes straight to what is harder to find.
What goes into a pentest report?
A good report serves two audiences: management, which needs to decide priority and investment, and the technical team, which will fix things. It usually includes:
- Executive summary: what was tested, the overall risk level and the most serious findings, in business language.
- Scope and method: targets, dates, type of test (black, gray or white box) and references used.
- Findings: each flaw with a description, location, steps to reproduce and proof, such as screenshots or requests.
- Risk rating: severity of each finding, considering how easy it is to exploit and the business impact. Scales such as CVSS are common.
- Recommendations: how to fix each flaw and what to change in the process so it does not come back.
- Retest results: when there is one, the status of each finding after the fix.
Does AI replace the pentester?
No. AI speeds up the repetitive parts, such as gathering information, cross-checking tool results, removing false positives and writing the report. What gives a pentest its value is still a person's judgment: understanding the business logic, deciding what is safe to try on a production system and assessing the real impact of each flaw.
The same applies to systems that use AI. An app with an AI agent or a chat connected to company data has new attack points, such as instructions hidden in a text the model reads, and these also need to be in the test scope.
What should you do between pentests?
A pentest shows how the system looked that week. Between tests, the code changes, new flaws appear in libraries and someone may try to break in for real. Three things cover that gap:
- Security in the pipeline: automated checks that block known flaws on every change. In a hybrid squad, they also apply to code written by AI agents.
- Maintenance: software maintenance keeps dependencies up to date and applies the fixes from the report.
- Monitoring in operation: someone needs to watch what happens to the live system. UEEK does this with Urutau Sec, UEEK's 24x7 security monitoring, which covers cloud, email, servers and computers. AI analyzes logs and alerts and separates what needs a person to look at. AI-powered SOC explains this model in detail.
Frequently asked questions
Are pentest and penetration test the same thing?
Yes. Pentest is short for penetration test. Intrusion test and ethical hacking are also used with a similar meaning.
Can a pentest take the system down?
It can, if poorly planned. That is why the scope defines times, limits and whether the test runs in production or staging. Tests that can affect availability are usually left out of scope or done in a separate environment.
How often should you do a pentest?
It depends on the system's risk. A common reference is at least once a year for critical systems and always before launches and after major changes. Contracts and industry rules may require a specific frequency.
Does a small company need a pentest?
It depends on what the system stores. An app with customer data or payments benefits from a pentest before it grows. For most small companies, the first step is covering the basics and monitoring, as the guide on basic security or monitoring for small businesses shows.
Does a pentest replace DevSecOps?
No. A DevSecOps pipeline finds known flaws on every change. A pentest tests the system the way an attacker would, at key moments. Each covers what the other does not.
Does an app built with an AI tool need a pentest?
It needs a security review before it gets real users, because code generated without review often repeats common flaws. The audit of apps built with AI has a checklist of the most frequent risks, and a pentest comes in when the app stores sensitive data.
How UEEK can help
In the DevSecOps assessment, UEEK reviews the delivery pipeline, secrets, infrastructure and monitoring, and delivers the weak points ranked by real risk, which prepares the system for a pentest and for fixing what it finds. In the DevSecOps implementation, it builds the pipeline with automated checks that run on every release. With the system live, Urutau Sec watches the operation 24x7, and the free exposure test shows what your company leaves visible on the internet. That is 14 years in the market and more than 500 projects delivered for more than 200 clients in 6 countries.
Other terms and guides on systems, AI and security are in the UEEK glossary.
Topics
- pentest
- penetration test
- what is a pentest
- information security
- DevSecOps
- glossary