Vulnerability assessment: finding known weaknesses

7 min 4 sections 5 practice questions 5 sources citedISC2 objective 6.2

A vulnerability assessment is a survey: it lists the known weaknesses in a set of systems and ranks them, without trying to break in. Most of it is done by scanning software that can check hundreds of machines in a night. No background is assumed. A security professional needs to know what the different scans can see, why their output is never taken at face value, and what a clean report does not prove.

By the end of this unit you will be able to:

  • Explain what a vulnerability assessment is and what it leaves undone
  • Tell apart the five discovery scans and the three port states
  • Tell apart network, web application and database scans, and authenticated and unauthenticated scans
  • Explain false positives and false negatives
  • Put in order the steps from a raw scan report to a confirmed fix

A report with 214 lines

An illustrative example

A lettings agency with twelve staff is asked by its insurer for a vulnerability scan. The IT contractor runs one over a weekend and sends the result on Monday: 214 lines, nine of them marked critical.

The owner reads the first page and wants every computer switched off. The contractor says some of the lines will turn out to be wrong, and that the scan could only see the machines from the outside. Neither can say how exposed the agency really is.

What has to happen to the 214 lines before anyone can answer the owner's question?

A survey of known weaknesses

A vulnerability assessment is a systematic search for known weaknesses in systems. It ranks what it finds and does not exploit it. It works like a house survey. The surveyor lists the cracked tile and the window lock that does not catch. The surveyor does not break in to prove the point.

Most of the work is done by a vulnerability scanner: a program that inspects systems and compares what it finds with a database of known weaknesses. A scanner can check hundreds of machines overnight and repeat the work every week. It can only find weaknesses that are already in its database, so the database is updated before each scan.

A scan must be authorised by the owner of the systems, like any other test. It sends a great deal of traffic and can slow or crash a fragile system. To the people watching the network, an unannounced scan looks the same as the start of an attack.

First find what is there: discovery scans

The first step is a discovery scan, which finds the machines on a network and the services each one offers. A service listens on a numbered port, and the scanner tries the ports in turn. The simplest discovery is a , which asks every address to reply and so learns which machines are switched on.

Most services use the , in which a connection opens with three messages. The caller sends SYN, the service answers SYN-ACK, and the caller replies ACK. These names are flags: single switches in the header of a TCP message. Scan types differ in the flags they send.

Five discovery scans
ScanWhat the scanner sendsWhat it is used for
TCP SYN, or half-openSYN only. It reads the reply and never completes the connectionThe usual quick scan for open ports
TCP connectThe full three-message openingUsed when the scanner lacks the rights to send a bare SYN
TCP ACKACK alone, belonging to no connectionShows whether a filters a port. It cannot show that a port is open
UDPA message in the , which has no opening exchangeFinds services that use UDP. Slower and less certain
XmasA message with the FIN, PSH and URG flags all set, which no normal connection sendsAn unusual probe that standard TCP software answers only from closed ports
Three states a port is reported in
StateWhat the scanner sawWhat it means
OpenA service answeredSomething is listening and can be reached from where the scanner sits
ClosedThe machine answered that nothing is listeningThe port can be reached and no service is there
FilteredNo usable answer, because a filter such as a firewall blocked the probeThe scanner cannot tell whether a service is listening

Common misconception

“A filtered port is a safe port, and an open port is a vulnerable one.”

Filtered describes the path from where the scanner sits. A service may be listening behind the filter and open to every machine inside. Open means only that there is a service to assess. Whether it is vulnerable is the next question.

Three kinds of vulnerability scan, with or without an account

Once the scanner knows what is there, it looks for weaknesses.

Three vulnerability scans
ScanWhat it examinesTypical findings
Network vulnerability scanEach service found on each machine: the software, its version and its settingsMissing security updates, out-of-date software, weak settings
Web application scanA website's pages and forms, by visiting each one and submitting test inputFlaws in the site's own code, such as obeying commands typed into a form
Database scanDatabase software and its configurationDefault passwords, excessive permissions, missing updates

A scan can be run with or without an account on the target. In an unauthenticated scan the scanner sees only what any machine on the network could see. It often has to guess the software version from the way a service answers. This is the outside attacker's view.

In an authenticated scan, also called a , the scanner is given an account. It signs in to each machine and reads the installed software and settings directly. It finds far more and guesses far less.

The two views complement each other, as do scans from outside and from inside the network. The lettings agency's scan was unauthenticated and external, so it saw the least.

A scan result is a candidate, not a fact

A scanner makes two kinds of mistake. A false positive is a weakness reported that is not there, often because the scanner judged by a version number and the fix had already been applied. A false negative is a real weakness the scanner missed, because it is too new for the database or lies where the scanner could not see.

  1. Validate. Check each important finding on the system itself, and remove the false positives.
  2. Rate. Judge each confirmed weakness by the harm it could do to this organisation. The scanner's severity rating is only a starting point, because the scanner does not know what the machine is used for.
  3. Report to the owners of the systems, who decide what is fixed and when.
  4. Remediate, starting with the highest .
  5. Scan again to confirm that each fix worked.

A has three limits. It finds only known weaknesses. It describes one moment, and new weaknesses are published every day. It also lists weaknesses without showing what an attacker could do with them. Showing that is the job of a .

A question, worked through

A retailer scans its 60 servers every month from outside its network, without accounts on the servers. The reports have shown fewer than ten findings for a year. An internal audit then signs in to five servers chosen at random and finds that four are missing security updates released months ago. The chief information security officer asks what should change.

Which change would BEST improve what the monthly scans find?

  1. Add authenticated scans run from inside the network
  2. Replace the SYN scans with full TCP connect scans
  3. Commission a yearly penetration test of the servers
  4. Raise the scanner's reporting threshold to critical
Decide on your answer, then open the reasoning
  1. The scans report little, yet the servers are missing updates. The question is why the scanner cannot see what an auditor found by signing in.
  2. Rule out d: showing only critical findings hides more and finds nothing new.
  3. Rule out b: SYN and connect scans both discover open ports. Neither reads what is installed on a server.
  4. Between a and c: a penetration test would probably find the missing updates, but once a year and on a sample. The fault lies in the monthly control. An authenticated scan signs in to every server and reads its installed software, which is what the audit did by hand.

Answer: A. Add authenticated scans run from inside the network

Choosing between good answers

A question contrasts scan results with what is really on the systems
look for credentials. An authenticated scan reads the system from inside. An unauthenticated scan guesses from outside.
A question asks what to do with scanner output before reporting it
validate it first. Unconfirmed findings include false positives.
A question asks which activity lists known weaknesses without exploiting them
choose vulnerability assessment. Exploiting them belongs to a penetration test.
A port is reported as filtered
treat it as unknown, not as safe. A filter blocked the probe from where the scanner sat.

Try it

Read a port scan of one server line by line, then move the scanner inside the network and see which answers change.

Loading the preview.

Check your understanding

5 questions on this unit, easiest first. Confirm an answer to see the reasoning for it, then the right answer, the other options and the rule to reuse. Your answers are kept in this browser and feed readiness and review.

These questions are drafts that no named reviewer has approved yet.

Question 1 of 5

Which discovery scan shows whether a firewall filters a port, but cannot show that the port is open?

What to remember

  • A vulnerability assessment finds and ranks known weaknesses without exploiting them, mostly with an automated scanner, and only with the owner's authority.
  • Discovery scans find machines and ports. SYN is the quick half-open scan, connect completes the connection, ACK maps a firewall, UDP finds UDP services, and Xmas sets FIN, PSH and URG.
  • A port is reported as open, closed or filtered. Filtered means a filter blocked the probe, so the state is unknown.
  • Network, web application and database scans look for weaknesses. An authenticated scan signs in and sees far more than an unauthenticated one.
  • A false positive is reported and not there. A false negative is there and not reported. Findings are validated and rated by risk before they are reported.

Say it from memory

  1. What is a vulnerability assessment, and what must be done with a scanner's results before they are reported?

    A systematic, mostly automated search for known weaknesses, which ranks them and does not exploit them. Discovery scans find machines and open ports. Network, web application or database scans then look for weaknesses, with or without credentials. Results are validated to remove false positives and rated by risk to the organisation before they go to the system owners.

    Read this part again

  2. What do a TCP SYN scan and a TCP ACK scan each show, and what do open, closed and filtered mean?

    A SYN, or half-open, scan sends SYN only and is the usual quick scan for open ports. An ACK scan shows whether a firewall filters a port, not whether it is open. Open: a service answered. Closed: the machine answered that nothing is listening. Filtered: a filter blocked the probe, so the scanner cannot tell.

    Read this part again

  3. Name the three kinds of vulnerability scan, what each examines and a typical finding of each.

    A network vulnerability scan examines each service on each machine, finding missing security updates and weak settings. A web application scan visits a site's pages and forms with test input, finding flaws in the site's own code. A database scan examines database software and configuration, finding default passwords and excessive permissions.

    Read this part again

  4. What is the difference between a false positive and a false negative in a scan, and what are the three limits of a vulnerability assessment?

    A false positive is a reported weakness that is not there. A false negative is a real weakness the scanner missed. A vulnerability assessment finds only known weaknesses, describes one moment, and does not show what an attacker could do with what it lists.

    Read this part again

Sources