TExcelTAD
Home › Ethical Hacking & Penetration Testing Methodology › Safe Validation Without Exploitation

Safe Validation Without Exploitation

Between "the scanner says so" and "we broke in" lies the step that makes a penetration test trustworthy: controlled validation. Its job is to establish, with evidence, that a candidate weakness really exists in this environment, using the least intrusive method that answers the question. Very often that method is not an exploit at all. A configuration file, a package version, a single harmless request or a certificate check proves the point with no risk to the system. This lesson builds a ladder of validation methods, applies the lower rungs to real services in your sandbox, and shows how to decide when a rung higher is justified, and when it is not.

The validation ladder

Rung Method Risk to the target Example
1 Corroborate: a second independent source for the same fact none banner and package version and vendor advisory agree
2 Read: configuration or state, with credentials the client provided none sshd -T shows passwordauthentication yes; pg_hba.conf allows trust from a subnet
3 Observe: one ordinary protocol request whose answer shows the weakness negligible a directory listing; an expired certificate; a response header
4 Test the precondition: a harmless request that shows the vulnerable code path is reachable low a request that returns a characteristic error proving the vulnerable module is loaded, with no payload
5 Proof of concept: trigger the vulnerability in the most benign way (read one harmless file, run id) medium to high only with written approval for that finding, in the window, ideally on a non-production copy
6 Full exploitation: use the weakness to gain and use access high rarely needed in a penetration test; never without explicit agreement

Go up only as far as the question requires, and record which rung you stopped at. The report states it: "validated by configuration review (rung 2), not exploited". That is an honest and sufficient basis for a finding.

Rung 3 in practice: two observations

A scanner reported an expired TLS certificate and a directory listing. Both are validated by observing one normal connection each. The session starts an OpenSSL test server with the lab's expired certificate and a Python web server with a listed directory, on 127.0.0.1 inside your sandbox.

bash · try it yourself
openssl s_server -accept 127.0.0.1:8443 -cert $SAMPLES/pki/expired.lab.test.crt -key $SAMPLES/pki/expired.lab.test.key -quiet >/dev/null 2>&1 &
mkdir -p site/exports && printf 'id,email\n' > site/exports/customers-2026-11.csv
(cd site && exec python3 -m http.server 8000 --bind 127.0.0.1 >../http.log 2>&1) &
for i in $(seq 50); do [ "$(ss -Htln | wc -l)" -ge 2 ] && break; sleep 0.1; done
echo "== claim 1: expired certificate on 8443"
openssl s_client -connect 127.0.0.1:8443 -servername expired.lab.test -CAfile $SAMPLES/pki/ca.crt </dev/null 2>/dev/null \
  | openssl x509 -noout -subject -enddate -serial
openssl s_client -connect 127.0.0.1:8443 -servername expired.lab.test -CAfile $SAMPLES/pki/ca.crt </dev/null 2>/dev/null \
  | grep -m 1 'Verify return code'
echo "== claim 2: directory listing under /exports/ (one request, file not downloaded)"
curl -s -o listing.html -w 'HTTP %{http_code}, %{size_download} bytes\n' http://127.0.0.1:8000/exports/
grep -o 'href="[^"]*"' listing.html
kill %1 %2
echo "requests sent to the web server: $(grep -c 'GET' http.log)"
== claim 1: expired certificate on 8443
subject=C = XX, O = ExcelTAD Lab, OU = Web, CN = expired.lab.test
notAfter=Jan  1 00:00:00 2021 GMT
serial=1003
Verify return code: 10 (certificate has expired)
== claim 2: directory listing under /exports/ (one request, file not downloaded)
HTTP 200, 270 bytes
href="customers-2026-11.csv"
requests sent to the web server: 1

Each claim is now a fact with evidence: the certificate's subject, end date, serial and the verification error code; the listing with the HTTP status, size and the file names it shows, from a single request. The CSV file was not downloaded: its name and the listing prove the exposure, and its contents would add personal data to the evidence without adding proof.

Rung 1 and 2 for a dangerous candidate

The lab VM legacy01 greets with 220 (vsFTPd 2.3.4). That version string is associated with CVE-2011-2523: in 2011 the official source archive was replaced for a few days by one containing a backdoor. Is this server backdoored? The ladder answers without triggering anything:

  1. Corroborate: the service scan showed that the banner alone proves nothing (a one-line fake printed the same). Does an authenticated package query show vsftpd 2.3.4 installed, and from where?
  2. Read: with the client's administrator, compare the installed binary's hash with the distribution's package (debsums, rpm -V) or with known-good builds, and check whether the build came from the compromised archive. On the lab VM the answer is known: Metasploitable 2 ships the backdoored build on purpose.

That is enough for a critical finding: "vsftpd 2.3.4 on legacy01 is the backdoored build (verified by package and binary check with the administrator); rung 2, not exploited." Triggering the backdoor would prove nothing more, and it would open an unauthenticated root shell on a network listener for anyone who happened to connect during the test, which is exactly the kind of harm the RoE exists to prevent.

When a higher rung is justified

Go to rung 4 or 5 only when all of these hold:

  • the lower rungs can't settle the question (no credentials, no configuration access, an unusual build);
  • the finding's severity depends on the answer (a theoretical versus a practical critical);
  • the RoE allows it for this class of finding, and the client lead approves this instance in writing;
  • the method is the most benign available (read a harmless file, not write; display the account name, not create one), and its effects are reversible;
  • it happens in the window, with the technical contact informed, ideally on a staging copy.

Record the exact action, the time and the result, and stop at the first proof.

How validation activity is detected

Rungs 1 and 2 happen with the client's knowledge (authenticated sessions, an administrator present). Rung 3 is ordinary traffic. Rungs 4 and 5 are what intrusion detection exists for: exploit signatures, unusual child processes, unexpected outbound connections. An announced blue team should see them and record whether they would have caught a real attacker, which turns the validation into a detection test as well.

How the validated weaknesses are fixed

  • Expired certificate: renew it, automate renewal (ACME), monitor expiry dates (alert 30 days before).
  • Directory listing: disable listing (autoindex off;, Options -Indexes), remove exports from the web root, and serve files only through an authenticated, logged endpoint.
  • Backdoored binary: take the host off the network, rebuild from a trusted source, rotate any credentials that touched it, and investigate how long it ran: a backdoor is an incident, not a patch.

Pitfalls

  • Exploiting because it is quicker. It is also riskier and rarely more convincing than a configuration read.
  • Over-collecting while validating. Prove access with names, counts and timestamps; don't download data.
  • Validating on production what could be validated on staging.
  • Not recording the rung. A reader must know whether "confirmed" means "read in the config" or "ran code".

Practice

  1. A scanner says "SMB signing not required" on files01. Which rung validates it, and how?
  2. For "Jenkins script console reachable without authentication", what is the lowest rung that proves the finding, and what must you not do?
Answers
  1. Rung 3: the SMB negotiation itself reports the server's signing requirement, which nmap --script smb2-security-mode reads in one connection ("Message signing enabled but not required"). With credentials, rung 2: the Group Policy setting or Get-SmbServerConfiguration shows RequireSecuritySignature False.
  2. Rung 3: one request to the console's page showing it loads without a login (status, page title, timestamp). Don't run any script in it: the console executes arbitrary code with the server's rights. The page loading is the proof.

Test yourself

What is the goal of controlled validation?

  1. To gain as much access as possible
  2. To establish with evidence that a weakness exists here, using the least intrusive method that answers the question
  3. To run every exploit available
  4. To confirm the scanner is working

Why not simply trigger the vsftpd 2.3.4 backdoor to confirm it?

  1. It is too slow
  2. A package and binary check already proves it, and triggering it opens an unauthenticated root shell that anyone could reach during the test
  3. Backdoors can't be tested
  4. The banner is enough

You validate a directory listing that shows customers-2026-11.csv. What do you keep as evidence?

  1. The CSV file
  2. The listing: status, size, file names, time; the file itself not downloaded
  3. A screenshot of the file's contents
  4. Nothing

Which condition is NOT required before going to a proof-of-concept rung?

  1. Lower rungs can't settle the question
  2. Written approval for this instance
  3. The most benign method available
  4. That the tester has spare time in the window