Doing PCI ASV Properly

This blog post discusses how to carry out ASV (Approved Scanning Vendor) scans properly as we often come across customers that are not fulfilling them in a way that allows them to fulfil the ASV scan requirement(s). This blog will cover the following topics:

  • Who needs an ASV scan?
  • What is PCI ASV?
  • Who can perform these scans?
  • How do you determine the scope of PCI ASV?
  • Sampling
  • Three Months
  • The PCI DSS ASV Requirements
  • Questions to ask the ASV Solution provider
  • Scan Report
  • Doing it properly
  • Ramblings

Who needs an ASV Scan?

Not all entities required to be PCI DSS Compliant are in scope for PCI DSS Requirement 11.3.2, which requires External ASV Scans. It very much depends on how the entity is taking card payments, which in turn determines which Self-Assessment Questionnaire (SAQ) the entity aligns with. Some SAQs require ASV scans, some do not.

What is PCI ASV?

PCI ASV refers to the external vulnerability scanning required to fulfil PCI DSS Requirement 11.3.2 and sub-requirements. ASV stands for “Approved Scanning Vendor” since only PCI SSC (PCI Security Standards Council) approved scanning vendors are permitted to carry out these scans on behalf of entities that require them as part of their PCI DSS (PCI Data Security Standard) compliance activities.

Approved scanning vendors must adhere to the “PCI Approved Scanning Vendor Program Guide” (ASV Program Guide), which at the time of writing, was Version 4.0 Revision 2. Within this guide, the PCI SSC sets out the expectations of the Scan Customer and the Approved Scanning Vendor through topics such as:

  • Roles and Responsibilities,
  • Scan Process
  • ASV Scan Solution – Required Components
  • Scan Reporting
  • Quality Assurance

Approved scanning vendors must renew their ASV Solution annually, this involves paying the necessary ASV Program fees to the PCI SSC along with passing an ASV test rig which is designed to ensure the ASV Scanning Solution is able to detect a myriad of vulnerabilities against different types of system components and that the reporting is up to the necessary standards. The PCI ASV Program Guide specifies three reports (can be included in a single document) as follows:

  • ASV Scan Report Attestation of Scan Compliance
  • ASV Scan Report Summary
  • ASV Scan Report Details

The supplied templates within the PCI ASV Program Guide MUST be followed for the first two reports. The ASV Scanning company can customise the ASV Scan Report Details report format providing all the content detailed in the PCI ASV Program Guide is included.

Who can perform these scans?

As discussed above, only PCI SSC Approved Scanning Vendors (ASV) can fulfil the external scanning requirements for PCI DSS compliance. Scanning customers should check the PCI SSC website to validate an ASV Company is approved by the PCI SSC to carry out external scanning. The ASV Company and the scan solution that was approved is listed here.

Other companies offer ASV scanning through a reseller model with one of the listed ASVs and may or may not provide wrap around services to assist with the scanning; for example, managing scans, providing additional remediation support, etc.

How do you determine the scope of PCI ASV?

PCI ASV Scanning must be carried out against all Internet ingress/egress points to any system components that are in scope for the PCI DSS Assessment activities. This includes the defined Cardholder Data Environment (CDE) and any additional environments that are supporting the CDE or can access the CDE.  Scoping the CDE very much depends on any segmentation (for the purpose of PCI DSS, this means ISOLATION) that is in place to potentially de-scope systems or entire network environments from scope. If in doubt, it is best to engage a QSA (Qualified Security Assessor) to confirm the scope to ensure the ASV scans are fulfilling what is required.

ALL public IP (Internet Protocol) addresses that are routed to the in-scope environment and ALL URLs (Uniform Resource Locator) that point to any of the public IP addresses MUST be included within the scans. If any are not included, then this may result in the ASV Scan not being adequate and could result in a non-compliant report.

Sampling

I’m afraid that as per the PCI ASV Program Guide, ASV scanning MUST include the complete external footprint of the CDE, as well as any externally facing environments/system component that may provide access to the CDE or could impact the security of the CDE. For this reason, sampling of the in-scope external facing system components is NOT PERMITTED.

Three Months

This is worth calling out because this could land you in trouble, depending on if your QSA has twigged.  PCI DSS Version 4.0 introduced a section called “Description of Timeframes Used in PCI DSS Requirements”. This section now describes what is meant by the various timeframes that are within the PCI DSS Requirements. The descriptions also provide examples of what the expectation is, which now defines ‘Every three months’ aka “quarterly” as being ‘At least one ever 90 to 92 days, or on the nth day of each third month’, referred to as the “Scan Window”.

Why is this important? It is important because the wording within the Requirement (we will do a deep dive of the requirements in a moment) utilises the language of ‘every three months’, therefore the expectation and what needs to be assessed, is that each ASV scan follows that defined scan window, and unfortunately if the scans do not, the PCI DSS Requirements will not be met and will result in a failing assessment, which (see below), cannot be remediated until the quarters ASV scans follow the defined scan window. Depending on which scan has fallen outside of this defined period, will determine how long it would take to get back into compliance.

Compensating Controls

What is a ‘Compensating Control’? This is a mechanism built into the PCI DSS to allow organizations who have a legitimate technical or business constraint whereby a PCI DSS Requirement cannot be met explicitly as stated within the standard. For PCI DSS 4.x, this is referring to the “Defined Approach Requirement”. An entity can leverage the compensating control mechanism to implement other security measures to meet the original intent of the PCI DSS Requirement that cannot be met, thus mitigating the risk associated with not meeting the original PCI DSS Requirement. The implemented measures MUST meet the intent and rigor of the original PCI DSS Requirement.

So what! A lot of QSAs used to resolve issues of missing ASV scans and missing ‘historical’ activities like this (for example, missed daily log reviews) through the use of a compensating control. Unfortunately, these compensating controls cannot now be used for this, therefore there is no current mechanism within the PCI DSS to allow for remediation of past events that have been missed, not until a time machine is invented and entities can go back in time to fix the issues.

This is explicitly called out within Appendix B ‘Compensating Controls’ of the PCI DSS where criteria 6 states:

‘Address the requirement currently and in the future. A compensating control cannot address a requirement that was missed in the past (for example, where performance of a task was required two quarters ago, but that task was not performed).’

The PCI DSS External Scanning Requirements

This section will look at the ASV Requirements within the standard.

Requirement 11.3.2

‘External vulnerability scans are performed as follows:

• At least once every three months.

• By a PCI SSC Approved Scanning Vendor (ASV).

• Vulnerabilities are resolved and ASV Program Guide requirements for a passing scan are met.

• Rescans are performed as needed to confirm that vulnerabilities are resolved per the ASV Program Guide requirements for a passing scan.’

External vulnerability scans must be carried out as per the four bullet points above. The first one we have covered already. Scans must be carried out at least once every three months. Remember, there is a defined timeline now for ‘three months’. What this means, which I find interesting, is that potentially failed scan results may need to be submitted to demonstrate scans have been carried out within the defined timelines.  Often, I find that during an assessment, you only ever receive passing scan results so you may never receive evidence of the final bullet point being met because you are not necessarily aware that rescans have been carried out.

The third bullet point ensures that remediation is carried out and you receive a passing ASV scan. This element is the one that is requiring a passing scan result, which is validated by the issuance of the ASV scan reports, indicating a passing scan.

Requirement 11.3.2.1

‘External vulnerability scans are performed after any significant change as follows:

• Vulnerabilities that are scored 4.0 or higher by the CVSS are resolved.

• Rescans are conducted as needed.

• Scans are performed by qualified personnel and organizational independence of the tester exists (not required to be a QSA or ASV).’

I wonder how many of you have missed that after a significant change, the external vulnerability scanning requirement doesn’t need an ASV Scan to be conducted, just any vulnerability scan. Looking at Requirement 11.3.2.1, the very last bullet point actually calls out that the scan needs to be performed by qualified personnel and have organizational independence of the tester, but does not need to be an ASV. So, based on this, any standard vulnerability scanner can be used as part of the significant change external scanning, as long as all vulnerabilities with a CVSS (Common Vulnerability Scoring System) score of 4.0 or higher are remediated and rescans performed to show a clean scan.

Although this requirement doesn’t appear to require ASV scanning, I would recommend following the ASV Program Guide for CVSS scoring, so it would be important to ensure the tooling being used aligns to the CVSS scoring requirements. The ASV Program Guide requires that the CVSS Base Score be used in this order:

  • If the NVD (National Vulnerability Database) entry for a specific CVE identifier includes a CVSSv3.1 score, the ASV must include the published CVSSv3.1 score in the report.
  • If the NVD entry for the CVE identifier does not include a CVSSv3.1 score, the ASV must include the published CVSSv3.0 score in the report.
  • If the NVD entry for the CVE identifier does not include either a CVSSv3.1 or CVSSv3.0 score, then the ASV must include the published CVSSv2.0 score in the report.
  • Finally, if the NVD entry for the CVE identifier does not include any CVSS score (or there is no NVD entry for the CVE identifier), then the ASV must calculate a base score using CVSSv3.1.’

Questions to ask the ASV Solution provider

In theory the ASV Solution provider has met the requirements of the ASV Program Guide and satisfactorily passed the test rig. That said, we do come across situations where the ASV scan has failed to fulfil the PCI DSS Requirement, which is typically due to the solutions handling of URLs (Uniform Resource Locator). Read the section on FQDNs below.

Scan Report

Ensure the scan reports obtained as part of the supplied ASV scanning service aligns to the report templates contained within within the PCI ASV Program Guide appendices. The ASV scanning solution MUST be providing reports in line with the ASV Program Guide. A QSA will typically require the first two reports: the Attestation report & the Summary report. This is because the attestation report alone does not provide details of the scan components that were included within scope, i.e. the IP addresses and URLs. The QSA will need this information to ensure the ASV Scans cover the complete external footprint of the CDE as well as any externally facing system component that may provide access to the CDE and are therefore also in scope for the PCI DSS assessment.

Occasionally the detailed report is needed, where there are noted exceptions, compensating controls or other information that has been submitted as part of the scan.  Sometimes a single report is supplied, which includes all three reports in one.

Doing it properly

FQDNs

Unfortunately, even using a listed ASV Company, does not necessarily mean that the scans will be done correctly. I have come across ASV Solutions that do not handle URLs correctly, simply using it to do a DNS lookup and then scan against the IP address only. This is a huge issue because often web traffic to the IP address will direct to a landing page, whereby using the proper FQDN will direct traffic to the correct website by its host header. Host headers will be used by the web service if multiple websites are hosted on the same service or will be used by WAFs/Proxy Servers/Load Balancers (Web Application Firewalls) to direct incoming web requests to the correct internal website resources. If the ASV Solution cannot handle FQDNs correctly, then the traffic will just hit a landing page and not properly scan the website.

Section 5.5 ‘ASV Scan Scope Definition’ of the ASV Program Guide makes reference to ensuring the scans include any unique entryways into system components for the entire in-scope infrastructure.

Scan Window

Additionally, based on the defined Scan Window within the PCI DSS Version 4.x, entities must ensure scans are carried out within this defined timeframe, highlighted earlier in this blog. Failure to do so will result in a failing assessment (or should result in a failing assessment, depending on if your QSAs are aware of this). Unfortunately, as discussed, there will be no way to remediate this and entities will need to wait until the scans are properly in place, which could be nine (9) months depending on which scan wasn’t correct.

Reports

The final point I would like to raise is around the report. The QSA will need to see the correct reports, which must include the full external footprint (IPs AND URLs) in scope for the assessment.

Section 5.5 ‘ASV Scan Scope Definition’ of the ASV Program Guide

As discussed above, section 5.5 of the ASV Program Guide discusses the scope of the ASV scan. The idea of the scan is to ensure the full public footprint of in-scope environments are included in the scan. This includes, but is not limited to:

  • Domains for web servers
  • Domains for mail servers
  • Domains used in name-based virtual hosting
  • Web server URLs to “hidden” directories that cannot be reached by crawling the website from the home page
  • Any other public-facing hosts, virtual hosts, domains or domain aliases

It is the scan customers (the entity) responsibility for ensuring the scope is accurate, not the ASV Company. If the scan scope is not clear, a QSA should be consulted to ensure the scope can be validated and confirmed.

Ramblings

FQDN

This IP vs FQDN issue has annoyed me for almost as long as I have been a QSA. I remember many conversations with the PCI SSC on this subject, which prompted a change to the ASV Program Guide and to the ASV Test Rig which should be picking this up.  I’m surprised that I come across issues where this still isn’t done properly.  I’ve also had conversations with QSAs, whereby they don’t ensure FQDNs are being properly scanned either.

Some ASV Solutions don’t scan using the FQDN properly out of the box and sometimes require the use of additional addons to achieve this scanning. You should ensure that you are scanning with the correct solution to ensure the scans are being carried out correctly.

Scan Window

I find this quite perplexing which is why I have an outstanding question to the PCI SSC regarding the enforcement of this. If the expectation where scans fall outside the defined period of 90-92 days, or on the nth day, then this will and should be a failed assessment (I absolutely have no issues with this), then how are QSACs (QSA Companies) who are following this going to be protected? It is no secret that entities who fail an assessment, will simply shop around until they find a QSAC that will issue a pass. There needs to be something to protect QSACs who are doing their jobs correctly from being penalized. There are other PCI DSS Requirements that have very defined time frames now, therefore without a route to remediated, this could crop up against other requirements, for example Daily log reviews. If a daily log review was missed and a failing assessment issued on the back of it, unless the next QSAC selects the same sampled days, then this issue may not get flagged, at no fault of the QSAC that potentially will then issue a passing assessment.  This needs further thought into how protections can be put in place, if the PCI SSC and the Card Brands do want to be this stringent with these types of PCI DSS Requirements.

Sampling

Currently sampling cannot be done for ASV Scanning, rightly or wrongly, this is something that I know happens for some large companies. If this is to be accepted, then it needs to be acceptable to all entities, not just larger companies that have the size and influence to get away with it. I’m all for being pragmatic, but lets put some guard rails in place on how this is going to work within the whole industry, even if it has pre-requisites and one of them is if you are hosting more than x number of websites.