Proxies, scanners and what they miss

Unit 2 of 5 in Testing web applications.

You will be able to use a proxy and a scanner on an app you own, read what a scanner is and is not telling you, and triage a report alert by alert.

Lesson

A proxy lets you see and repeat the conversation

An intercepting proxy sits between your browser and the application so you can read the exact requests and responses. WSTG-INFO-06 notes that you need a proxy (or the page source) to see parameters sent in the body of a request, and that the proxy keeps a record of every request and response as you explore. That record is your raw evidence, and it is also the thing a defender can compare with their own logs.

The most useful habit with a proxy is the controlled experiment: send a request, change exactly one thing, send it again and read how the response changed. When only one thing changed, the difference has one possible cause. The Burp lab practises this.

Active scanning is an attack

The ZAP user guide says active scanning tries to find potential vulnerabilities by using known attacks against the selected targets, that it is an attack on those targets, and that you should not use it on web applications you do not own. That is the same permission line as before, stated by the tool's own authors.

ZAP also ships a script that adds a header to every request it sends, for example X-ZAP-Initiator, so the traffic can be identified and so web application firewall exceptions can be made. For an authorized test that is a courtesy to the defenders: it lets them tell your traffic from someone else's. Burp's scope page gives the matching safety rule: leave out URLs that hold potentially dangerous functionality, and URLs you do not have permission to test.

What a scanner cannot find

The ZAP guide is direct about limits: active scanning can only find certain types of vulnerabilities, logical vulnerabilities such as broken access control will not be found by any active or automated scanning, and manual penetration testing should always be done in addition. A scanner does not know which record belongs to which customer, so it cannot tell that one user reading another user's order is wrong.

That is why the next unit is about access control. It is also why a clean scan is a weak statement: it means the scanner's rules found nothing, not that the application is sound.

An alert is a claim to check, not a finding

In ZAP an alert is a potential vulnerability tied to a specific request. Each has a risk (Informational, Low, Medium or High) and a confidence (False Positive, Low, Medium, High or Confirmed). ZAP itself never raises an alert as False Positive or Confirmed; a person sets those after checking. The risk is set automatically by ZAP, and the guide says you can change it by hand or with an alert filter.

The ZAP FAQ on false positives says to make sure you understand the potential vulnerability and test it manually before concluding it is not real. The same care applies the other way round: confirm before calling it real. Risk and confidence are two separate questions. How bad would this be if it were real, and how sure is the tool? A medium-risk alert on a login page and a high-risk alert on a static file may deserve the opposite order once you know the context. The triage labs practise recording a false positive with a reason.

Requests are a budget

Tools send many requests quickly. If your rules of engagement set a maximum request rate and a testing window, those two numbers are a hard budget, and tool defaults can break them. Working out the volume of each task before the test, and cutting tasks before the first night rather than during it, is part of the plan. This follows from the rules-of-engagement lesson in the first class, and it is one reason the ZAP header above matters: when the window and rate are agreed with the defenders and your traffic is marked, they can tell your test from an attack. The lab does the arithmetic with numbers you can change.

Key points

Sources

Lecture

The offensive toolkit and what each tool is for: A map of the standard tools, what each is for and what a defender sees when it runs. This unit uses two of them in depth.

Practice in the labs

Use a proxy and a scanner on your own Juice Shop, then practise the judgment: what is real, what is noise and what fits the request budget.

Knowledge check

  1. What does the ZAP guide say about active scanning? Answer: It is an attack on the targets and should not be used on applications you do not own. The Active Scan page states that active scanning is an attack on those targets and you should not use it on web applications you do not own.
  2. A scanner reports nothing serious. What can you fairly conclude about access control? Answer: Nothing yet: ZAP says logical flaws such as broken access control are not found by automated scanning. The guide says manual testing should always be done in addition, because a scanner does not know which object belongs to which user.
  3. In ZAP, who or what sets an alert's confidence to False Positive or Confirmed? Answer: A person, manually or through an alert filter; ZAP does not raise alerts at those levels itself. The Alerts page says ZAP will not raise an alert with a confidence of False Positive or Confirmed, but you can set them by hand or via a filter.
  4. Why is the single-change experiment so useful with a proxy? Answer: When only one thing changed, the difference in the response has one possible cause. Holding everything else constant is what lets you attribute a change in behaviour to the one value you changed.

Back to the syllabus or see all classes.

Related