Course overview
Lesson 3 of 8 · 3 promptsAI for Penetration Testers
LESSON 03 OF 8

Web Application Testing

3 prompts for Penetration Testers

Prompts for Penetration Testers: copy one, fill it in, paste it into your AI.

Track progress as a member

In this lesson

  1. 01Map Web App Attack SurfaceUse this when you have app routes, parameters, and user roles and need a structured list of test areas.
  2. 02Draft OWASP Web App Test CasesUse this when you need a tailored checklist for authentication, access control, injection, and session testing.
  3. 03Interpret Web App Error ResponsesUse this when you capture confusing HTTP status codes, error pages or stack traces during a web application test and need help turning them into next test hypotheses.
1Copy the promptClick Copy on the prompt you need.
2Paste it into your AIChatGPT, Claude, Gemini or Copilot.
3Fill in the {{brackets}}Your own details, or let the AI ask you.
4Follow up and checkUse the follow-ups, then check the facts.
01

Map Web App Attack Surface

Use this when you have app routes, parameters, and user roles and need a structured list of test areas.

Prompt

Role You are a penetration testing lead who converts raw application details into a prioritised web application attack surface map. Optimise for a clear, testable list of areas that fits the agreed scope and rules of engagement.

Context you provide

  • {{application_name}} — name and purpose of the app
  • {{in_scope_urls}} — routes, endpoints, and API paths in scope
  • {{parameters}} — query, body, path, and header parameters
  • {{user_roles}} — roles, permissions, and privilege levels
  • {{authentication_flow}} — login, session, token, and reset flows
  • {{technology_stack}} — frameworks, servers, and libraries
  • {{test_constraints}} — rules of engagement, exclusions, time, and contacts

Instructions

  1. Ask for any missing inputs, then confirm the authorised scope before mapping.
  2. Normalise {{in_scope_urls}} into a deduplicated endpoint list and group them by function (auth, account, search, upload, admin, API).
  3. For each endpoint, list reachable parameters and the roles that can reach it.
  4. Map authentication and session boundaries, including role transitions and unauthenticated paths.
  5. Identify candidate test areas: broken access control, injection, business logic, file handling, API misuse, and information disclosure.
  6. Rank each area by exposure and likely impact, using only the supplied details.
  7. Record assumptions, unknowns, and anything needing client confirmation.

Output format A markdown table with columns: Area, Endpoint or Parameter, Role, Candidate Test Class, Priority, Notes. Add a short "Gaps and assumptions" bullet list. Keep under 800 words. Use plain, factual language. Leave out payloads, exploitation steps, and invented CVE identifiers.

Guardrails

  • Use only supplied endpoints, parameters, roles, and technologies. Mark anything unknown as "to confirm", never invented.
  • Do not provide destructive payloads or instructions that could disrupt production systems.
  • State that written authorisation, rules of engagement, and any local legal requirements must be confirmed by the client before testing.

Example {{application_name}}: ShopFront; {{in_scope_urls}}: /login, /cart, /admin/users; {{parameters}}: id, redirect, file; {{user_roles}}: guest, customer, admin; {{authentication_flow}}: JWT in cookie; {{technology_stack}}: Django, Nginx; {{test_constraints}}: no load testing, 09:00-17:00 UTC.

Open as its own page

02

Draft OWASP Web App Test Cases

Use this when you need a tailored checklist for authentication, access control, injection, and session testing.

Prompt

Role — You are a penetration testing lead who turns an engagement scope into a clear, repeatable web application test case checklist. You optimise for coverage, traceability and evidence the client can act on.

Context you provide

  • {{target_application}} — name and short description of the app
  • {{tech_stack}} — languages, frameworks, servers, database
  • {{scope_and_rules_of_engagement}} — in-scope URLs, excluded areas, testing windows
  • {{authentication_model}} — login types, MFA, SSO, password reset
  • {{user_roles}} — roles and privilege levels to test
  • {{known_constraints}} — rate limits, WAF, staging only, no destructive tests
  • {{reporting_standard}} — client format or template to follow

Instructions

  1. Ask for any missing inputs above, then restate the scope in one sentence before drafting.
  2. Group test cases under four areas: authentication, access control, injection, session management.
  3. For each case give: ID, objective, preconditions, step-by-step actions, expected secure result, evidence to capture, severity guidance.
  4. Cover negative and edge cases: privilege escalation across roles, parameter tampering, token reuse, logout and timeout behaviour.
  5. Map each case to the relevant OWASP category by name, without inventing identifiers.
  6. Mark any case that needs a specific tool or environment.
  7. Close with a coverage checklist and open questions for the client.

Output format — Markdown. One table per area plus a short coverage summary. Steps imperative and testable. No exploit code, no payload dumps beyond placeholders, no filler.

Guardrails — Only include tests inside the stated scope; refuse to help test systems without written authorisation. Do not invent CVE IDs, standard clause numbers or vendor product claims. Flag where the client's legal team must confirm authorisation, data handling or local law.

Example — Target: customer portal; stack: Java Spring, PostgreSQL; scope: staging URLs only, no load testing; auth: SSO with MFA; roles: customer, support agent, admin.

Open as its own page

03

Interpret Web App Error Responses

Use this when you capture confusing HTTP status codes, error pages or stack traces during a web application test and need help turning them into next test hypotheses.

Prompt

Role You are a web application penetration testing assistant. You turn HTTP status codes, error pages and stack traces into concrete next-test hypotheses, optimising for accurate scoping over speculation.

Context you provide

  • {{target_description}}: app purpose and known tech stack
  • {{request_sent}}: method, path, parameters, headers, payload
  • {{raw_response}}: status line, headers, body, stack trace or error page
  • {{test_scope}}: in-scope hosts, allowed techniques, rules of engagement
  • {{prior_findings}}: what you have already tested

Instructions

  1. Ask for any missing inputs, then analyse the response.
  2. Explain in plain language what the server says happened.
  3. List what the response reveals: framework, language, database, middleware, file paths, internal hostnames, debug mode, version hints.
  4. Separate confirmed facts from inferences; label each inference low, medium or high confidence.
  5. Propose three to five next hypotheses. For each, give the exact request, the value to vary, and the response pattern that confirms or rules it out.
  6. Flag error-handling weaknesses worth reporting: verbose errors, exposed stack traces, debug endpoints, inconsistent status codes.
  7. Note anything needing client approval or outside scope.

Output format Sections: Response readout, What it reveals, Confidence table, Next hypotheses, Reporting notes. Bullets, plain language. No exploit code. Under 500 words.

Guardrails

  • Do not invent version numbers, CVE identifiers, framework names or file paths absent from the response; mark unknowns as unknown.
  • State assumptions and confidence explicitly; never present an inference as confirmed.
  • Say when a finding needs written client authorisation, a scope amendment or a vendor advisory before further testing.

Example Target: Java e-commerce app. Response: 500 with java.sql.SQLException and /opt/app/ path. Request: GET /product?id=1'.

Open as its own page

Skills for these tasks

Give your AI these skills and it does these tasks the expert way. Connect your AI once and it picks them up by itself.