Skip to content
Tutorials Center
My learning

Topics

Lesson 34 of 37 ยท Labs and Ethics

Rules of Engagement and Reporting

Follow a penetration-test methodology from planning to report: phases, evidence handling, severity ratings with CVSS, and writing findings clients can act on.

A penetration test is only as valuable as its report. Clients do not pay for sessions; they pay to learn what to fix first. This lesson walks through the phases of an engagement, how to keep evidence, how to rate severity, and how to write a finding that a busy engineer can act on in minutes.

It follows Law, Ethics and Authorization, where the rules of engagement were introduced, and prepares you for the projects in the last chapter.

Phases of an engagement

flowchart LR
    A["Planning and scoping"] --> B["Reconnaissance"]
    B --> C["Scanning and enumeration"]
    C --> D["Exploitation (if in scope)"]
    D --> E["Post-exploitation and impact"]
    E --> F["Reporting"]
    F --> G["Retest"]

Frameworks such as PTES and the NIST SP 800-115 guide describe a similar flow.

  • Planning: goals, scope, rules, communication plan, test windows.
  • Reconnaissance and scanning: map assets and services (Port Scanning).
  • Exploitation: only the approved techniques; stop at the agreed proof of access.
  • Post-exploitation: show impact in a measured way (Post-exploitation Modules).
  • Reporting and retest: deliver findings, then verify fixes later.

Rules to agree up front

Topic Questions
Hours When may you test? Is there a freeze window?
Techniques Is social engineering, denial of service or physical access allowed?
Contacts Who do you call if a service goes down or a crime is discovered?
Data What may you copy? How is it stored and deleted?
Stop conditions What makes you pause immediately?

Keep evidence

Take notes as you go. For each action record the time, the command or module, the target and the result. In msfconsole, spool /path/session.log saves the console output; screenshots help for web findings. Redact secrets in everything that goes into a report.

Python Keep a structured activity log

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Rating severity

Severity tells the client what to fix first. The CVSS (Common Vulnerability Scoring System) gives a 0.0 to 10.0 base score from factors such as how it is reached (network), how complex it is, what privileges are needed and how it affects confidentiality, integrity and availability. Typical bands are None (0), Low (0.1-3.9), Medium (4.0-6.9), High (7.0-8.9) and Critical (9.0-10.0).

Adjust with context. A medium bug on an internet-facing payment system can matter more than a high one on an isolated test box, so say why you rated it as you did.

Python Map CVSS scores to severity

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Anatomy of a good finding

  1. Title: short and specific ("Default credentials accepted on SSH service").
  2. Severity and affected assets: host names, addresses, versions.
  3. Description: what is wrong, in plain words.
  4. Impact: what an attacker could do, tied to the business.
  5. Evidence: logs or screenshots, with secrets redacted.
  6. Remediation: specific steps, in priority order, with a verification method.
  7. References: vendor advisories, CVE identifiers, standards.

Write the remediation first. If you cannot say how to fix it, you do not yet understand the finding.

Report structure

  • Executive summary for non-technical readers: overall risk, top three issues, what to do next.
  • Scope and methodology: what was tested, when, how, and the limits.
  • Findings sorted by severity.
  • Appendices: tool output, detailed steps, the activity log.

The next stand-in turns finding data into a plain-text report skeleton, sorted by severity, with the executive summary counts at the top.

Python Generate a report skeleton

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Cleanup and retest

Remove anything you created: test accounts, uploaded files, persistence, scheduled tasks. List each cleanup step in the report so the client can verify. After the client applies fixes, a retest confirms they worked and updates each finding to "resolved" or "still open".

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which part of a report is for non-technical readers?

    The executive summary explains overall risk and next steps in plain language.
  2. 2. What CVSS score range is 'High'?

    High is 7.0-8.9; 9.0 and above is Critical.
  3. 3. Why record each action with time, tool, target and result?

    An activity log backs up findings and protects the tester.
  4. 4. What is a retest?

    Retests update each finding's status after remediation.

Summary

  • Engagements move from planning through scanning, exploitation, impact, reporting and retest.
  • Agree hours, techniques, contacts, data handling and stop conditions up front.
  • Log everything; redact secrets.
  • Rate severity with CVSS plus business context.
  • Good findings state the problem, impact, evidence and a concrete fix; always clean up.

Next: Project: A Safe Loopback Port Scanner