Penetration testing

Penetration testing is an authorised, simulated attack on a computer system, network or application to find exploitable security weaknesses before real attackers do.

A penetration test, or pen test, hires people to break in. The US National Institute of Standards and Technology describes it as security testing in which evaluators mimic real-world attacks to find ways around a system's security, often using the same tools and techniques as actual attackers and looking for combinations of weaknesses that together give more access than any single one. The scope, timing and rules are agreed in writing beforehand; that authorisation is what separates a penetration test from a crime.

It sits between two neighbouring practices. A vulnerability scan lists known weaknesses without trying to use them; a penetration test tries to exploit them to show what an attacker could actually reach. A red team exercise goes further, adding physical intrusion, social engineering and surprise, often without the defenders being told it is happening. NIST's guide to security testing, SP 800-115, published in September 2008, remains a standard reference for planning and running such tests.

AI products add new targets. An application built on a large language model can be attacked through prompt injection, tricked into revealing data it can reach through connected tools, or made to act outside its intended role. Microsoft's AI red team, reflecting on more than 100 generative AI products in January 2025, concluded that such models amplify existing security risks and introduce new ones, and that breaking them does not require computing gradients, the mathematical machinery behind many academic attacks. A penetration test of an AI product therefore has to cover the model, its prompts and everything it is connected to.

AI is also becoming a tester. By June 2025 XBOW, an autonomous AI penetration testing system, reached first place in the US ranking on HackerOne, a platform where companies pay or credit outside researchers for reporting flaws. The company said it had submitted nearly 1,060 vulnerability reports; 130 had been resolved and 303 triaged, while 208 were duplicates and 209 were judged informative only. Its own security team reviewed findings before submission, in line with HackerOne's rules on automated tools.

For organisations deploying AI, the practical point is that a test of the website or network is no longer enough. Ask whether the AI features themselves were tested, by whom, and what was found and fixed.

Common questions

What is the difference between penetration testing and red teaming?

A penetration test usually targets a defined system within an agreed scope and tries to exploit as many weaknesses as possible. A red team exercise emulates a real adversary more fully, often including social engineering and physical access, and may be run without warning the defenders. In AI, red teaming also covers testing a model for harmful outputs, which goes beyond security.

Is penetration testing legal?

Yes, when the owner of the system has given written permission and the testers stay within the agreed scope. Without that authorisation, the same activity can be a criminal offence under computer misuse laws.

Can AI do penetration testing?

Increasingly, yes. In 2025 the autonomous system XBOW topped HackerOne's US ranking after submitting about 1,060 vulnerability reports, though many were duplicates or judged informative only, and humans reviewed its findings before submission. AI tools now help testers work faster, but human judgement still decides what matters.

What does a penetration test of an AI application cover?

It covers the usual infrastructure and code, plus risks specific to AI: prompt injection, leaking data through the model or its connected tools, bypassing safeguards and abusing any actions the AI can take on a user's behalf. The aim is to see what an attacker could do through the AI, not just to it.

Finding more

Search for "penetration testing methodology", "NIST SP 800-115", "AI application penetration testing" or "LLM security testing" to learn more. Reliable sources include NIST and other national cybersecurity agencies, established security testing frameworks, and published reports from security researchers. Results announced by vendors of automated testing tools are worth reading closely, since leaderboard positions and report counts can hide how many findings were confirmed.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.