Skip to content
Tutorials Center
My learning

Topics

Lesson 37 of 37 ยท Projects and Practice

Practice: A Full Assessment Walkthrough

Walk through a complete authorized assessment in a lab: scope, scanning, findings, post-exploitation proof, defence recommendations, plus exercises to test yourself.

This final lesson of the course ties the pieces together. You will follow one imaginary but realistic engagement, start to finish, in a lab you own, then try exercises to practise. All hosts and output are invented and use documentation address ranges; no real system is involved.

The scenario

You are asked to assess "Lab Co", a small fictional company with three servers in a lab network 192.0.2.0/28:

Host Role
192.0.2.3 Web server
192.0.2.4 File server
192.0.2.5 Database server (out of scope, production data)

The signed rules of engagement allow scanning, version detection, credential checks with a short default list, and one proof of access per finding. Denial of service and data copying are forbidden.

flowchart TD
    A["Scope and RoE"] --> B["Scan 192.0.2.3 and .4"]
    B --> C["Identify versions"]
    C --> D["Check default credentials"]
    D --> E["Proof of access (marker file)"]
    E --> F["Report and defences"]

The path of this practice engagement.

Step 1: scope

Start by encoding scope so you cannot slip. Revisit Law, Ethics and Authorization.

Python Enforce scope before anything else

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.

Step 2: scan and identify

In the console you would run db_nmap -sV 192.0.2.3-4 or the port-scan and version modules from Auxiliary Modules. Sample result:

TEXT
services
========
host       port  proto  name   info
192.0.2.3  22    tcp    ssh    OpenSSH 8.2p1
192.0.2.3  80    tcp    http   Apache httpd 2.4.49
192.0.2.4  445   tcp    smb    Samba 4.6
192.0.2.4  21    tcp    ftp    vsftpd 2.3.4

Turn each service into a candidate finding by comparing it with the minimum supported version.

Python Turn services into candidate findings

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.

All four are candidates, not confirmed findings: you must verify each (the vendor may have backported fixes), and only use techniques the RoE allows.

Step 3: credentials and proof

A short default list against the file server succeeds with a weak account. The RoE allows one proof of access: read the harmless marker file the client placed.

TEXT
[+] 192.0.2.4:21 - Success: 'ftp:ftp'  (anonymous-style default)
> get scope-proof.txt
ENGAGEMENT-LAB-PROOF

You stop there. You do not browse other directories or copy data, because the RoE forbids it.

Step 4: findings and fixes

Python Build the final finding list

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.

Step 5: the defender's side

Even in a pure assessment, add detection advice: which log lines would have exposed your scan and the credential checks (Detecting Metasploit Activity), which rule would catch them (Writing Detection Signatures) and which hardening steps remove the findings (Hardening Against Exploitation).

Exercises

  1. In your own lab (see Building a Home Lab Safely), run a port scan with a Metasploit scanner and compare the results with db_nmap. Which found more?
  2. Extend the scope checker so it refuses any address outside private ranges.
  3. Run a version scanner on one lab target and look up the version's release notes. Was the fix backported?
  4. Write a Sigma-style rule for the activity you generated, and test it against your own logs.
  5. Write a one-page executive summary of the walkthrough above, as if for a non-technical manager.
  6. Review Rules of Engagement and Reporting and add retest steps to your plan.

Where to go next

Keep practising on legal platforms, read vendor advisories regularly, study defence as seriously as offence, and consider recognised certifications. Always remember that skills and permission go together.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Why is the database server 192.0.2.5 skipped in the walkthrough?

    The rules of engagement exclude it because it holds production data.
  2. 2. When the file server accepts default FTP credentials, what do you do?

    The RoE allows one proof of access and forbids copying data.
  3. 3. Is an outdated version string a confirmed vulnerability?

    Version comparisons produce leads that need confirmation.
  4. 4. What should every finding include besides the problem?

    Clients need to know exactly how to fix the issue.
  5. 5. Which step would add detection value for the client?

    Defender recommendations turn a test into lasting improvement.

Summary

  • A good engagement flows from signed scope to scanning, identification, limited proof, report and defences.
  • Enforce scope in code, verify candidate findings, and stop at the agreed proof.
  • Pair every offensive finding with a fix and a detection.
  • Keep practising in legal labs, and let authorization guide every action.

Next: back to the Metasploit track overview