Skip to content

AI prompt · Infrastructure and AD pentesting · OSINT · Cloud

Prompt: attack surface analysis to prioritise testing

Prompt that analyses an asset inventory from the authorised scope (domains, IPs, services, cloud) to prioritise testing: exposure, criticality, checks.

By Steven Carrier Published

Works with: Claude, other chat assistants

You are a security tester. Analyse the asset inventory below, taken from the engagement's authorised scope, to prioritise testing.

Authorised scope: {{scope}}
Organisation context: {{context}}
Asset inventory (domains, IP addresses, services and versions, cloud resources): {{inventory}}
Engagement constraints: {{constraints}}

Answer in four parts:
1. a table of assets, one row per asset, with: exposure (Internet, partners, internal), likely role, estimated criticality (high, medium, low) and the reason for that estimate;
2. for each high or medium criticality asset, the plausible weaknesses to verify, worded as test hypotheses (default configuration, exposed administration service, version to check, missing or weak authentication) and not as findings;
3. quick wins: inexpensive, low-intrusion checks that can rule out or confirm a risk early in the engagement;
4. a proposed test order, with the reasoning and the assets to handle with care (production, fragile service, third party).

Rules:
- deal only with assets that are listed and tied to the scope; flag separately any asset that seems out of scope or to belong to a third party, without proposing to test it;
- do not present any weakness as established: anything not in the inventory remains a hypothesis;
- if a version number is quoted, mention a known vulnerability only if you are certain of its identifier; otherwise write "to be verified";
- finish with the missing information that would change the prioritisation.

Replace the highlighted variables before use.

This prompt helps move from a raw inventory (discovery output, tool export, client-supplied list) to an ordered test plan: which assets to examine first, which hypotheses to verify and which quick checks to run. It structures the tester’s thinking; the tester keeps the decision.

When to use it

  • After the discovery phase, when the inventory is too long to examine asset by asset.
  • To split the work between several testers according to exposure and criticality.
  • To justify to the client the order and depth of testing.

Fill in the variables

Variable Example
{{scope}} domain example.org and its subdomains, range 198.51.100.0/24, cloud accounts listed in the engagement letter
{{context}} small services firm, showcase website, customer portal, hosted email, one cloud account for pre-production
{{inventory}} www.example.org 198.51.100.10 ports 80 and 443; vpn.example.org 198.51.100.20 port 443; 198.51.100.30 port 3389 open; storage bucket exports-example (public? to be confirmed)
{{constraints}} no intrusive testing on production during the day, no denial-of-service testing, email provider out of scope

Paste the inventory as obtained, with its source (port scan, DNS resolution, client export): the source determines reliability. For the collection itself, see the OSINT and exposure methodology and the pentest scoping checklist.

Review the output

  • Check every asset against the signed scope: a discovered asset is not necessarily authorised.
  • Treat the proposed weaknesses as leads to verify, never as findings to report.
  • Check the versions and vulnerabilities quoted against official sources (vendor advisories, vulnerability databases): a model gets affected versions wrong.
  • Adjust criticality with what you know of the client’s business: the model knows neither the data nor the business stakes.
  • Do not paste into the prompt any client information (real IP addresses, domain names, cloud resource names) that your agreement does not allow you to share with an AI service; anonymise where needed.

Sources

Related resources

  • Methodology · Web pentesting · Infrastructure and AD pentesting · Cloud

    Pentest scoping checklist

    Penetration test scoping checklist: scope, written authorisation, emergency contacts, test accounts, testing windows and data handling.

    Published

  • Methodology · Infrastructure and AD pentesting · Red teaming

    Active Directory config review

    Defensive Active Directory review checklist for audits: privileged accounts, krbtgt, delegation, LAPS, legacy protocols, GPOs, ADCS and logging.

    Published

  • Cheatsheet · Infrastructure and AD pentesting · Red teaming

    Active Directory enumeration

    Authenticated AD enumeration for an internal test: domain, accounts, groups, password policy, shares, LDAP queries and BloodHound collection.

    Published

BEAROPS

Need a penetration test?

BEAROPS experts test your applications, infrastructure and cloud, black box or grey box, following OWASP, NIST and ANSSI guidance.