Confirm, rate, report and retest

Unit 5 of 5 in Testing web applications.

You will be able to keep a findings log with sealed evidence, rate a finding two ways, build a report from the log, read your own test as a defender sees it and retest a fix with a control and an attack.

Lesson

A finding is a claim with evidence

The WSTG reporting chapter says the quality of the technical testing is irrelevant if the client cannot understand the findings. For each finding it asks for a reference id, a title, the likelihood or exploitability, the impact, the risk, a description of what it is and the damage that may result, steps to remediate and additional resources. It also says any possibly sensitive data in the evidence, such as passwords or personal information, should be masked.

That is the reason the labs keep a findings log as a file with a status for every entry, redact secrets before evidence is stored, and seal each evidence file with a hash. A hash shows that a file has not changed since you sealed it; it does not show that the finding is true. Truth comes from the false-positive check you record next to a confirmed status.

Rate it two ways

FIRST's CVSS 3.1 specification describes three metric groups. The Base score reflects the intrinsic characteristics of a vulnerability, constant over time, and assumes the reasonable worst-case impact across different deployed environments. Temporal metrics adjust for things that change, such as exploit code becoming available, and Environmental metrics adjust the severity to a specific computing environment. The specification says a score is also written as a vector string that shows how the score was derived, and that anyone publishing a score should provide both.

The OWASP Risk Rating Methodology starts from a different place: identify the risk, estimate likelihood (how likely the flaw is to be uncovered and exploited), estimate impact (both the technical impact and the business impact), combine them into a severity, and then decide what to fix. It says the most severe risks should be fixed first, and that not every risk is worth fixing, since some loss is justifiable against the cost of the fix, while reminding you that reputation damage can raise the cost.

Read side by side, the two answer different questions. CVSS base asks how severe is this flaw in general. A business method asks how much does it matter here. A cross-account read of public-looking data and of medical records can share a base vector and still deserve opposite priorities. A good report shows the CVSS vector and also the business reasoning, and defines each rating level in an appendix, as the WSTG report chapter asks.

Build the report from the log

The WSTG chapter's structure is a useful skeleton: a scope and limitations section (it lists out-of-bounds areas, broken functionality, lack of cooperation, lack of time and lack of access as examples of limitations), an executive summary written for business readers with the objective, key findings in business terms and strategic recommendations, and a technical findings section with a summary table and a detail entry per finding. It also says to use a defined set of risk values and, where a client requires one, a CVSS score.

Generating the report from the findings log means it cannot drift from the evidence. A report builder that refuses to run while a finding is half-finished, and keeps candidates and false positives out of the report but on record, is a simple way to apply that. The WSTG chapter also adds a point-in-time disclaimer, and reminds you to consult a legal professional for any binding wording. This class is education, not legal advice.

What your test looks like to a defender

Your proxy history is one side of the engagement. The other side is the application's own access log, which records the same requests from the server's point of view. Reading your own test there teaches what a defender can and cannot see: an object walk shows as a run of requests with changing ids, a tool shows through its client string, and an access log carries no request bodies and often no user names.

The Top 10 advises logging access control failures and alerting administrators when appropriate, such as on repeated failures. The point of the lab is the same for both sides: tell the defenders when you start and stop, and what they should log next time, so your test does not look like an attack and a real attack does not look like your test.

Retest with a control and an attack

The WSTG reporting chapter says a retest report can summarize the earlier findings with the updated status of each. API1's prevention advice is to write tests for the authorization mechanism and not deploy changes that make them fail. Put together: every confirmed finding becomes a repeatable check, and each check has two parts. The control request must succeed, or the check means nothing. The attack request shows whether the weakness is still there.

That pair is the whole trick. A retest without a control can report fixed when the test itself is broken, for example because a token expired. The right verdicts therefore include inconclusive, and a finding can move from confirmed to fixed to regressed on evidence. Keep the retest read-only, in scope and one request at a time, and put the check where the fix lives so it runs every time the code changes.

Key points

Sources

Lecture

Vulnerability management as a loop: How findings are ranked and fixed on the client's side, which is where your report lands.

Practice in the labs

Finish the Juice Shop engagement: log, defender's view, rated report and retest.

Knowledge check

  1. What does a SHA-256 hash of an evidence file prove? Answer: That the file has not changed since it was sealed, not that the finding is true. A hash detects change. Whether the finding is true depends on the evidence and the false-positive check recorded with it.
  2. Why can the same flaw deserve a different priority than its CVSS base score suggests? Answer: The base score assumes a worst case across environments; the environment and the business impact can differ. The specification says the Base score assumes the reasonable worst case across deployed environments and that Environmental metrics adjust it to a specific one.
  3. A retest request comes back with an expired-token error. What should the check report? Answer: Inconclusive, because the control request failed so the result means nothing. The control must succeed for the attack result to count. Without it a broken test looks like a fix.
  4. Which of these does WSTG list as a limitation to record in a report? Answer: Lack of access or credentials, lack of time or broken functionality. The reporting chapter lists out-of-bounds areas, broken functionality, lack of cooperation, lack of time and lack of access as examples.

Back to the syllabus or see all classes.

Related