After the industry was struggling to grasp the language within the surprising Self-Assessment Questionnaire A (SAQ A) update that came out at the end of January 2025, the PCI Security Standards Council (PCI SSC) has, on 28 February 2025, released a new FAQ entitled ‘How does an e-commerce merchant meet the SAQ A eligibility criteria for scripts?‘. This blog post looks at this updated FAQ.
Introduction
Firstly, in case you missed it, in January 2025, the PCI SSC released an update to SAQ A, which seemingly removed the two Requirements designed to protect against malicious JavaScript added in PCI DSS Version 4.0; Requirement 6.4.3 and Requirement 11.6.1. I covered this in a blog post back in January 2025 entitled ‘Surprising SAQ A Jan 2025 Update‘, which will give some context.
The purpose of FAQ 1588 is to provide some clarity around the new criterion that was added to the updated SAQ A Eligibility Criteria, which reads:
The merchant has confirmed that their site is not susceptible to attacks from scripts that could affect the merchant’s e-commerce system(s).
The introduction of this within the SAQ sent the community into a frenzy, trying to decipher exactly what it meant.
Clarifications
To start with, it is worth immediately calling out that this new FAQ clarifies that the criterion does not apply to websites that are leveraging a web redirect mechanism to a Payment Gateway/TPSP (Third-Party Service Provider) to facilitate payment capture. This is evident by the following paragraph:
The above SAQ A eligibility criteria does not apply to e-commerce merchants with a webpage that redirects customers from the merchant’s webpage to a TPSP/payment processor (for example, including but not limited to, with an HTTP 30x redirect, a meta redirect tag, or a JavaScript redirect) or e-commerce merchants that fully outsource payment functions to a TPSP/payment processor (for example, by providing customers with an email with a link to a TPSP’s website to pay)
This confirms there is no difference to what was originally in place for Merchants who have leveraged a redirect mechanism to support the payment process. The now removed PCI DSS Requirements (Req 6.4.3 & Req 11.6.1) were never in scope for these Merchants.
In addition to this clarification, the FAQ has also clarified how a Merchant can demonstrate that this new Criterion is being met. The blog discusses two mechanisms;
Firstly, by leveraging the original JavaScript specific PCI DSS Requirements that have been taken out; Req 6.4.3 & Req 11.6.1, which is no surprise and is something that I mentioned in my original blog post.
Secondly, by leveraging the Merchant’s PCI DSS compliant Payment Processor/TPSP. The Merchant can obtain confirmation that, when implemented according to their supplied instructions, the solution includes techniques that protect the merchant’s payment page from script attacks.
Well, that last bullet point is going to be interesting. It’s hard enough to get anything from TPSPs to support contractual requirements for Req 12.8.2 and that has specific Service Provider Requirements in the standard, which was supposed to address that issue, we’ll have to see how easy this becomes. It would surely be easier to update the standard to include a PCI DSS Requirement that the TPSP HAS implemented such mechanisms so Merchants and QSAs can simply check the TPSP’s AOC to ensure this is being met by a Requirement being in place? Also, it allows for a QSA review of the mechanisms deployed to ensure they are sufficient.
Additional Clarification
Interestingly, this FAQ also provides confirmation of which entities that provide third-party scripts are considered to be a service provider for PCI DSS purposes. The following paragraph confirms that TPSPs that provide scripts that are not related to payment processing, or cannot impact the security of Account Data are not in scope as a TPSP:
A provider of third-party scripts is not considered a third-party service provider (TPSP) for purposes of SAQ A, if the provider’s only service is providing scripts not related to payment processing and where those scripts cannot impact the security of cardholder data and/or sensitive authentication data.
If I’m honest, I am not 100% sure about this statement, how can you ensure scripts cannot impact the payment journey before you even reach the embedded payment page/form and thus impact the security of Account Data? If a malicious script runs at any point in the customer journey, the script could feasibly alter that journey to impact the payment mechanism and thus impact the payment page, or impact the payment flow (see the ramblings below). Originally, this is where I thought the ‘site’ wording in the eligibility criterion was heading.
Ramblings
No blog is complete without a ramble. The FAQ fell a bit short for me when it comes to the term of ‘site’ and ‘e-commerce system’ within the original criterion that was added. This FAQ has started to re-introduce the terms ‘payment page’ and ‘webpage’ back into the dialog.
After hearing John Elliott talking about some of the different types of attacks against e-commerce payments:
Double Entry Attacks: These types of attacks occur where the payment flow logic is altered through the use of a malicious JavaScript, which changes the payment submission so Account Data is submitted to a malicious actor before presenting a fake payment failure page then passing onto the correct payment page for a legitimate payment process.
Silent Skimming Attacks: These attacks are where Account Data is captured whilst the Account Data is also submitted to the legitimate TPSP/Payment Processor.
I am still somewhat confused as to why the initial PCI DSS Requirements designed to try and mitigate malicious JavaScript code from attacking these types of payments, have been applied only to the payment page. Some attacks can happen early on in the payment flow and therefore before reaching the payment page.
And out of the blue comes an update to the PCI DSS Version 4.0.1 Self-Assessment Questionnaire A (SAQ A), which is discussed in this announcement by the PCI Security Standards Council (PCI SSC) ‘Important Updates Announced for Merchants Validating to Self-Assessment Questionnaire A‘. The first thing to note about this update is that it does not become live until the 31 March 2025, when the current SAQ A expires. The second thing to note is, well, what on earth is going on….. carry on reading!!
The Update
The update reflects two types of changes as discussed in the following sections:
Eligibility Criteria Update
The eligibility criteria has been updated to include a new bullet point as follows:
'The merchant has confirmed that their site is not susceptible to attacks from scripts that could affect the merchant’s e-commerce system(s).'
PCI DSS Requirement Changes
This SAQ A update has dropped the PCI DSS Requirements related to the protection of JavaScript (JS) running within the ‘Payment Page’:
Requirement 6.4.3
All payment page scripts that are loaded and executed in the consumer’s browser are managed as follows: - An inventory of all scripts is maintained with written business or technical justification as to why each is necessary. - A method is implemented to confirm that each script is authorized. - A method is implemented to assure the integrity of each script.
Requirement 11.6.1
A change- and tamper-detection mechanism is deployed as follows: - To alert personnel to unauthorized modification (including indicators of compromise, changes, additions, and deletions) to the security-impacting HTTP headers and the script contents of payment pages as received by the consumer browser. - The mechanism is configured to evaluate the received HTTP headers and payment pages. - The mechanism functions are performed as follows: * At least once weekly, OR * Periodically (at the frequency defined in the entity’s targeted risk analysis, which is performed according to all elements specified in Requirement 12.3.1).
Requirement 12.3.1
For each PCI DSS requirement that specifies completion of a targeted risk analysis, the analysis is documented and includes: - Identification of the assets being protected. - Identification of the threat(s) that the requirement is protecting against. - Identification of factors that contribute to the likelihood and/or impact of a threat being realized. - Resulting analysis that determines, and includes justification for, how the frequency or processes defined by the entity to meet the requirement minimize the likelihood and/or impact of the threat being realized. - Review of each targeted risk analysis at least once every 12 months to determine whether the results are still valid or if an updated risk analysis is needed. - Performance of updated risk analyses when needed, as determined by the annual review.
What does all this mean?
If I’m being honest, I’m still trying to work that one out. Exactly what is meant by ‘not susceptible to attacks from scripts‘ is open to much debate at the moment. My take on what is meant by susceptible is that we cannot simply say that the site is ‘not vulnerable to attacks’. This is because the focus of the eligibility criteria appears to have shifted to scripts that are already running within the context of the site (JavaScript Dependencies), therefore the attack vector we are talking about wouldn’t be due to a vulnerability in the site itself through misconfiguration, lack of patching or coding errors, we are looking 3rd/4th party JavaScript that is loaded into the website to perform a function. If the 3rd/4th party is compromised and the threat actor modifies the JavaScript with malware, then the site will simply be loading the updated malicious JavaScript code, none the wiser. For more info see the following ‘What is a supply chain attack‘.
Surely, the whole intent of the PCI DSS Requirements that have been removed was to meet this newly added eligibility criteria? What is also interesting, is that the statement also now refers to the ‘site’ and not simply the ‘payment page’. Where entities have already implemented solutions to just the ‘payment page’ as required to meet Requirements 6.4.3 and 11.6.1, does this mean the solution needs to now be rolled out to the whole site to ensure this eligibility criteria can be satisfied? Potentially, as a consequence of this change, this now brings into scope payment flows that are leveraging a redirect mechanism, which will also need to meet the updated eligibility criteria and potentially require a technical solution that aligns to these e-commerce skimming protection Requirements to demonstrate they can meet the criteria.
This eligibility criteria change may also bring into question if entities can still align their e-commerce environments/e-commerce payment flows to SAQ A at all, even if an iframe is supporting the payment functionality. The implication of this new eligibility criteria could result in some environments being recategorized into SAQ A-EP, which has considerably more PCI DSS Requirements than that of SAQ A, at around 140 as opposed to less than 30 for SAQ A.
What is confusing with the eligibility criteria and removal of the JS requirements is , if an entity cannot demonstrate adherence to the eligibility criteria and therefore ends up aligning to SAQ A-EP, the JS requirements then come into scope so the very solutions that can potentially be used to meet the SAQ A eligibility criteria need to be implemented anyway. The only significant difference here would be that the solution used to meet the JS requirements for SAQ A-EP only need to be implemented against only the ‘payment page’, yet environments aligning to SAQ A-EP are supposedly at greater risks of compromise.
Site vs Payment Page
Iframes (Inline Frames) provide protection mechanisms to help protect the contents of the iframe against attacks from JS code running within the parent page rendering the iframe. By utilising an iframe, the data cannot be accessed between the iframe and parent page unless explicitly allowed. This provides a level of protection for the payment information being entered and submitted through a payment form that is contained within the iframe, retrieved from the payment provider.
The PCI DSS Requirements designed to protect against JS threats apply to the payment page only, or in the case of an iframe deployment, the parent page since the iframe and all its JS is loaded from the payment provider. So, with the introduction of term ‘site’ now in the eligibility criteria, does this highlight that application of these defences to just the payment page still poses a risk? I have always wondered why the scope of these requirements were limited to just the payment page, since the consumer journey will start before the payment pages, therefore an attacker can compromise the site at any point within that journey to change the payment flow. As can be seen by this blog post by JScrambler, ‘Stealing Seconds: Web Skimmer Compromises Casio UK and Growing Number of Websites‘, it is a very real threat to compromise the journey before the payment page to provide a successful compromise of Account Data.
Clarifications
It would have been extremely useful if guidance had been released at the same time to ensure it is clear to all PCI Stakeholders, exactly what the meaning of this new eligibility criteria is. Some reports are saying that guidance will be coming out in a couple of months, which could be brought into the guidance discussed in a PCI SSC blog post from back in Nov 2024 ‘New Guidance Coming for E-commerce Security Requirements in PCI DSS v4.x‘, where it states the first quarter of 2025. This may not be the forum for discussing the intent of this eligibility criteria update and the PCI SSC may need to release something much sooner to address the confusion that has been caused by this release.
Ramblings
Blimey, where to start! This update has created so much discussion and frustration within the community. QSA/ISA’s trying to work out what this means for their customers, potentially Acquirers unravelling the implications of this change to their many Merchants, potentially Companies who have built their business models around these requirements being in scope for all e-commerce deployments and finally the reporting entities (Merchants/Service Providers) who will potential not know what all this now means until there is much more guidance from the PCI SSC.
A final point is with the timeline. The updated SAQ A is live from 31 March 2025, when the current version expires. This doesn’t give entities a lot of time to understand the ramification of these changes, especially with the lack of clarity and guidance from the Council, and to do something about what these changes mean.
With the help of my work colleagues, Rob Jepson and Tom Kinnaird (thank you both), this blog post will cover the following topics to help the reader understand why additional online skimming requirements have been introduced within PCI DSS Version 4.0 and what entities need to do to meet them.
What is Online Skimming?
Why should I be worried about this particular threat?
Online skimming compromises
How exactly does online skimming work?
But I have implemented an iframe, does this still leave me vulnerable?
What are the new PCI DSS Version 4.0 requirements?
What is meant by “Payment Page”?
SAQ Alignment
Do these two new PCI DSS Version 4.0 Requirements apply to SAQ A?
What options do I have to meet these new requirements?
Wait! If these scripts are in scope, does this make the supplier a service provider?
My Ramblings
What is Online Skimming?
Online skimming is a technique that makes use of malicious code within legitimate e-commerce sites designed to capture card information that consumers enter to make payments for goods and/or services through the compromised e-commerce website. The threat actor responsible for inserting the malicious code will either store the card information until they retrieve it or will exfiltrate the information to a remote location for easy retrieval.
Online skimming isn’t a new concept with early backdoor skimming software first being reported in April 2000 within a piece of software named “cart32”,which was an off the shelf commercial shopping cart. This backdoor skimming code had been reportedly exposing credit card information for more than a year [1].
Magecart has become synonymous to this style of attack, which is traced back to 2014 [1], with Magento becoming a big target of these attacks in 2015 [2] after a serious RCE (Remote Code Execution) vulnerability was identified called Shoplift/SUPEE 5344. Magecart attacks can be linked to 12 cybercrime groups involved in compromising e-commerce sites with the purposes of leveraging online skimming attacks from them.
Magecart attacks can be orchestrated via frontend and backend attacks through browser scripts (e.g. JavaScript) or server-side code (e.g. PHP) respectively. Although Magecart attacks are typically associated with frontend browser-based attacks. In a publication by Sansec [2] there appears to be a shift to server-side attacks quoting around 64% seen by Sansec.
Why should I be worried about this particular threat?
In September 2019, Visa released a blog post entitled “Visa EMV chip cards help reduce counterfeit fraud by 87 percent” [3]. EMV (Europay, Mastercard and Visa), named after the three companies who were responsible for developing the standard, is a technical standard developed in 1994 to create smart payment cards and supporting technologies that can be used by card reader vendors to interact with them. EMV leverages an embedded microchip (EMV Contact Chip) on the debit/credit card used to promote secure payment functionality for card-present payments, transforming the security of card-present payments to combat fraud. EMV technologies have evolved to enhance payment security in other areas of the payment card ecosystem to include technologies for card-not-present (CNP) payment channels, through technologies such as EMV 3-D Secure, EMV QR Codes, EMV Secure Remote Commerce, EMV Mobile and EMV Payment Tokenisation technologies [4].
In addition to this, in 2012 the PCI Security Standards Council (PCI SSC) announced the release of a new standard called the P2PE (Point-to-Point Encryption) standard. This standard is designed to provide assurances that at the point of interaction with a payment card, the data is immediately encrypted in a way that makes it near impossible (in today’s computing) to decrypt the information without the decryption keys, which are secured in a third-parties secured decryption environment. In essence, the idea was to make the data useless if it was captured by threat actors, so it couldn’t be monetised in anyway. A noteworthy point is that EMV does not look at the protection of the transmission of card data, but the expectation is that this will be handled by the devices themselves, especially if they meet other PCI SSC standards, such as PTS (PIN Transaction Security).
The Visa EMV blog [3] states that U.S fraud was slashed by 87% in March 2019 compared to that of September 2015 due to EMV technology.
Why is all this relevant? Since these newer technologies have been released to improve the security of card-present channels, trends have traditionally shifted to online e-commerce compromises. This makes sense since threat actors and criminal organisations will look for the easiest targets, which currently are e-commerce payment channels. As shown from the UK Finance’s “Fraud – The Facts 2022” [5] report, there has been an increased trend in e-commerce fraud losses on UK-issued cards between 2012 (£139.6m) to 2020 (£377.2m), before seeing a 10% drop in 2021 (£339.2), which isn’t too surprising since the overall fraud losses on UK-issued cards dropped by 7% that year. E-commerce still accounts for just under 65% of all fraud losses on UK-issued cards in 2021.
Online skimming compromises
According to a news story by Bleeping Computer in Nov 2021 titled “UK govt warns thousands of SMBs their online stores were hacked” [6], more than 4,000 online retailers were informed of a Magecart compromise by the UKs National Cyber Security Centre (NCSC). The report goes on to say that the NCSC monitored these e-commerce sites since April 2020, issuing warnings to the owners. Interestingly, NCSC identified that most sites were compromised via a known vulnerability in Magento which is an e-commerce platform commonly used by online retailers.
Many large and high-profile organisations have suffered at the hand of Magecart, these companies include:
British Airways
British Airways (BA) made an apology after 380,000 customers’ credit card details were stolen over only a two week period [7] in 2018. As reported in ‘The Register’ [8] bookings between the 21st August 2018 and the 5th September 2018 were affected by a server-side Magecart hack. More alarmingly, this same article, claims that BA was also saving domain administrative credentials and card details in plaintext, which both breach PCI DSS Requirements.
In addition to the Account Data Compromise (ADC) complications that would have resulted in negative PR and fines from the card brands, BA was also reportedly looking at a £183m GDPR (General Data Protection Regulation) fine from the UK’s ICO (Information Commissioners Office). [9] It was later announced that due to the economic impact of Covid-19 to the airline industry, the ICO reduced the fine to £20m, [10] which is still a considerable fine.
The attack is reported [11] to have started through the compromise of a BA network account issued to a third-party cargo-handling firm, Swissport, employee. Once entering BA’s Citrix environment, the attacker was able to breach the wider network and stumble across a cleartext Domain Administrator credential. The attacker not only gained access to service logs containing plaintext payment card details, but also the website source code, which was used to plant a card skimmer into the payment page used within the public facing e-commerce platform.
Ticketmaster
Ticketmaster succumbed to a client-side Magecart attack, which was reported by The Register, potentially impacted 9 million customers details, and cost the company a £1.25m fine by the UKs ICO, not including other potential fines and reputational damages. [12] This attack was carried out by compromising a 3rd party chatbot service called Inbenta. A compromise of this chatbot’s JavaScript code allowed for the Magecart’s digital card-skimming code to appear on Ticketmaster’s payment pages, thereby impacting every payment being made through the e-commerce site. Ticketmaster’s announcement [13] provided a timeline of between September 2017 and the 23rd of June 2018, interestingly a DARKReading article “Ticketmaster Breach Part of Massive Payment Card Hacking Campaign” [14] highlights that the command-and-control server used by Magecart had been operational since late 2016. This same article also highlights that SociaPlus, another third-party supplier to Ticketmaster, was also breached by Magecart.
Newegg
Newegg reportedly became another Magecart stat after a digital card skimmer was identified and removed on the 18th of September 2018, which had been reportedly active since the 13th of August 2018, according to a TechTarget report. [15] With this attack, the threat actors registered a new domain; neweggstats.com and a valid SSL Certification, exfiltrating data via the URL; https://neweggstats.com/GlobalData/. This attack was a server-side attack since the payment page on the webserver was compromised to host the malicious JavaScript code.
Others
There are many other examples of organisations becoming victim to these digital card skimmer attacks such as, PulseTV between November 2019 and August 2021, Tupperware in 2020, Segway in 2022, Emma Sleep Co between the 27th of January 2022 and 22nd of March 2022 and many more.
How exactly does online skimming work?
In essence, online credit card skimming occurs when malicious code is injected into a website to steal credit card information from visitors.
A high-level overview of the skimming process follows similar steps to other (hacking attempts | exploits), with the key exception of the exploitation targeting end users (cardholders) rather than the organisation:
Identification: An attacker identifies one or more target web applications; this could be a site with a vulnerability identified by the threat actor or identifying a target that handles a lot of payments.
The webapp will, of course, need to take card payments.
Exploitation: The attacker then identifies and exploits a vulnerability to inject malicious code into the application (the ‘skimmer’) which is designed to collect and exfiltrate payment card information through hidden mechanisms.
Exfiltration: When a user visits the compromised website and enters their payment card information, the skimmer then collects this data and sends it back to the attacker’s server.
Identification
Skimmers will be looking to perform attacks on web applications that are either low-hanging fruit with easy-to-exploit vulnerabilities, or high-traffic payment domains. Often, targeted applications are both.
Because of the nature of supply chain attacks, compromising a commonly used JavaScript included within a CDN (Content Delivery Network), would allow an attacker to spread their malware across many domains simultaneously.
Exploitation
Exploitation can be client-side or server-side. The distinction between these is important: client-side attacks do not involve touching anything on the server, so it is not possible to detect any changes on the filesystem. These attacks are generally supply-chain in nature, targeting third party sites that host JavaScript files included on a page – e.g. CDN or third-party advertisement.
The HTML on the page would look something like this:
Advertisements are another very common technique for getting skimmers on a site, as reported by The Register [17], around 17-per cent of malware-laden ads examined by the firm also contained Magecart skimmers.
As discussed earlier, server-side attacks involve gaining access to the websites’ code based and making changes to the website itself.
Exfiltration
Depending on the skill of the attacker and the opportunistic nature of the attack, skimmer attacks will generally follow the same process of encoding / encrypting data and sending it to an attacker domain, styled to look like a request to the organisation.
In the British Airways attack, stolen data was exfiltrated through the domain ‘www.baways.com’ [17]. As already discussed, in the Newegg compromise, the ‘neweggstats.com’ domain was used.
But I have implemented an iframe, does this still leave me vulnerable?
A crucial security mechanism in securing web applications is the same-origin policy (SOP) [18], which is designed to restrict JavaScript interactions with data of different origins. Within the context of the same-origin policy, an origin is identified through the protocol, hostname, and port number the resource is using. Therefore, the following URLs are said to be the same origin:
https://pciramblings.com/home.php
https://pciramblings.com/index.php
However, the following URL would not match the same-origin policy due to the protocol (http) not matching:
http://pciramblings.com/contactme.php
Where iframes are concerned, the same-origin policy helps to protect the iframe that is loaded from the payment provider, since the same-origin policy will not allow JavaScript code within the parent page to interact with the resources of the iframe, thereby protecting the data being inputted.
Note: It is worth pointing out that same-origin policy only restricts access to data and doesn’t restrict access to embedded resources between different origins; for example, CSS (Content Style Sheets), images and scripts.
Whilst iframes do increase the complexity of the attack of the payment process, making it harder for an attacker to simply read the input card details due to the discussed same-origin policy, once a skimmer is installed an attacker already has arbitrary code execution on the user’s machine. This vulnerability is commonly referred to as ‘Cross Site Scripting’ and could be exploited to compromise the user in a multitude of ways, including through browser exploits and creating fake payment pages.
This means that iframe-based solutions are not a direct mitigation to skimming attacks, as the injection of a skimmer on a vulnerable web application is the by-product of a deeper vulnerability present in the system. Further to this – if the iframe is served from a compromised domain, or if the attacker can find a way to inject malicious code into the iframe such as through a PostMessage-based exploit, then the payment card information can still be stolen. If an attacker is able to add custom code to a web application, it could even be possible for them to use browser exploits on out-of-date & vulnerable browsers which could be used by a visitor of the application – leading to their machine being infected with malware.
Sometimes the strictness of the SOP implementation can hamper application functionality of modern web apps, therefore there are various mechanisms to ‘relax’ this implementation allowing “defined” domains to share data. These mechanisms include Cross-Origin Resource Sharing (CORS), Cross-Domain Messaging (postMessage), JSON with Padding (JSONP) and through a mechanism of setting document.domain. Incorrectly configuring these options can leave the website open to SOP attacks.
What are the new PCI DSS Version 4.0 requirements?
PCI DSS Version 4.0 introduced two new requirements specifically designed to mitigate the risk of online skimming attacks. Although these new requirements are future dated to the 31st of March 2025, meaning from the 1st April 2025 entities must have these requirements in place, it is recommended to implement these new requirements as soon as possible.
Under “Requirement 6: Develop and Maintain Secure Systems and Software” is the following future dated requirement:
‘6.4.3 All payment page scripts that are loaded and executed in the consumer’s browser are managed as follows:
• A method is implemented to confirm that each script is authorized.
• A method is implemented to assure the integrity of each script.
• An inventory of all scripts is maintained with written justification as to why each is necessary.’
Under “Requirement 11: Test Security of Systems and Networks Regularly” is the following future dated requirement:
‘11.6.1 A change- and tamper-detection mechanism is deployed as follows:
• To alert personnel to unauthorized modification (including indicators of compromise, changes, additions, and deletions) to the HTTP headers and the contents of payment pages as received by the consumer browser.
• The mechanism is configured to evaluate the received HTTP header and payment page.
• The mechanism functions are performed as follows:
– At least once every seven days
OR
– Periodically (at the frequency defined in the entity’s targeted risk analysis, which is performed according to all elements specified in Requirement 12.3.1).’
Let’s look at these two new requirements in more detail:
Requirement 6.4.3
This requirement is looking for entities to provide adequate management of all scripts within the payment page loaded into the cardholder’s browser. This requirement goes hand in hand with Requirement 11.6.1 since an authorisation process for scripts needs to be in place to enable alerting mechanisms to be built to identify where new, unknown, or modified scripts appear within the payment page.
As can be seen from the requirement itself, the expectation is that the entity must:
Have a mechanism of ensuring that each script that the entity is expecting within the payment page, has been authorised.
Have a mechanism of ensuring the integrity of each script that loads within the payment page can be validated to ensure no unauthorised modifications have been made.
Have a mechanism in place to maintain an inventory of all the scripts that are authorised for use within payment pages along with a way of recording the business justification for each script. My view on this requirement is that it will force entities to think if scripts are actually necessary for the payment functionality or not. By reducing the number of scripts being used on payment pages, entities are reducing their attack surface and therefore reducing the risk of a compromises through these scripts.
Requirement 11.6.1
This new requirement has been added to ensure entities are able to monitor payment pages and HTTP headers to detect any signs of changes or tampering. This must be able to be done at least weekly or using a “frequency” determined by a risk assessment. The mechanism to achieve this must be able to alert personnel if unauthorised modifications are detected.
What is meant by “Payment Page”?
You’ll notice within these two new PCI DSS Version 4.0 requirements that both refer to the term “Payment Page”. I thought it would be worthwhile going through what is meant by a payment page.
The PCI DSS Version 4.0 ‘Appendix G – PCI DSS Glossary of Terms, Abbreviations, and Acronyms’ defines a “Payment Page” as:
“A web-based user interface containing one or more form elements intended to capture account data from a consumer or submit captured account data. The payment page can be rendered as any one of:
A single document or instance,
A document or component displayed in an inline frame within a non-payment page,
Multiple documents or components each containing one or more form elements contained in multiple inline frames within a non-payment page.”
Let’s look at each of these rendered options in a little more detail:
A single document or instance
This rendering option displays a web page served from the Merchant website containing a form element allowing the cardholder to input their card information for direct submission to a payment provider (payment gateway) via either a;
‘Direct Post’ (also referred to as ‘browser API’ or ‘silent order post’),
‘JavaScript created form’,
as shown in the diagram below;
or a direct submission to the merchant website itself known as ‘The API’ or ‘merchant gateway’ rendering option, as shown in the diagram below.
A document or component displayed in an inline frame within a non-payment page
This rendering option displays a web page served from the Merchant website that contains an inline frame (iframe) that is loaded with contents entirely from the payment provider. Transaction information is shared with the payment provider to allow the iframe to be built. The cardholder inputs their card information into the form within the iframe, which is then submitted directly to the payment provider, as depicted below;
Multiple documents or components each containing one or more form elements contained in multiple inline frames within a non-payment page
This iframe is the equivalent of a new browser window being opened by the payment provider and ‘embedded’ into the page. To the end user it’s invisible, but to the browser it looks like a completely different web application – this means that the browser’s security system, the Same Origin Policy, kicks in and prevents any information from the iframe window (/context) from being accessed by the merchant’s window (/context)
This provider iframe is populated with details of the requested transaction communicated with by the Merchant. Once the payment transaction has been completed by the cardholder in the provider’s iframe context, the provider then confirms the transaction details server-side to the merchant’s server, confirming that the transaction has been successful.
Because payment details are only placed in the context of an iframe, the browser’s same origin policy prevents the merchant’s code from being able to access any of the user’s payment details. Instead, the impetus of security is on the payment provider’s application as the card details are only sent to the provider, not the merchant.
The main advantage to this rendering option is that it provides much more flexibility into the design of the payment page since each field is an iframe and can therefore be placed anywhere on the page.
A Self-Assessment Questionnaire (SAQ) is a defined subset of PCI DSS Requirements that have been set by the PCI SSC (Payment Card Industry Standards Security Council) and the participating card schemes, based upon the risks posed by that type of payment functionality. Entities that meet the eligibility criteria of how the payment channel is setup and operates, can complete the relevant SAQ as part of the entities reporting requirements of demonstrating compliance to the PCI DSS. The exception is SAQ D, since this is the SAQ that is used when none of the other smaller SAQs can be used. SAQ D contains all the PCI DSS Requirements.
Depending upon which rendering option is used for the e-commerce payment channel, will determine which SAQ it will align to. Three SAQs are linked to e-commerce payment channels; these are SAQ A, SAQ A-EP and SAQ D. The following table shows which rendering option aligns to which SAQ.
SAQ
Rendering Options
SAQ A
This SAQ is used for e-commerce payment channels that leverage iframe technologies as the rending option. It is worth pointing out that SAQ A is also used for redirect technologies, whereby the cardholder is transferred directly to the payment gateways own payment page as part of the payment journey.
SAQ A-EP
This SAQ is used where the e-commerce payment channel utilises the Direct Post or JavaScript rendering options.
SAQ D
This SAQ contains all the PCI DSS Requirements and is used by entities leveraging The API rendering option.
Do these two new PCI DSS Version 4.0 Requirements apply to SAQ A?
The more observant amongst you may notice that the payment page definition on the use of iframes above, don’t quite align to these new PCI DSS Version 4.0 requirements. A payment page is classed as the iframe containing the payment form, which to align to SAQ A, must be built entirely from the payment gateway, as highlighted under the following eligibility criteria statement from SAQ A:
‘All elements of the payment page(s)/form(s) delivered to the customer’s browser originate only and directly from a PCI DSS compliant TPSP/payment processor.’
What does this mean? These two new PCI DSS Requirements only apply to the payment page, which as already highlighted above, applies to the iframe itself. As stated within the eligibility criteria of SAQ A, all elements of the payment page must be built only using code from the payment gateway, therefore the entity itself cannot have any code or scripts running within this iframe.
So, how do these two new requirements apply in SAQ A? SAQ A contains the following statements against both these two new requirements:
‘Note: For SAQ A, Requirement 6.4.3 applies to a merchant’s website(s) that includes a TPSP’s/payment processor’s embedded payment page/form (for example, an inline frame or iFrame).’
‘Note: For SAQ A, Requirement 6.4.3 applies to a merchant’s website(s) that includes a TPSP’s/payment processor’s embedded payment page/form (for example, an inline frame or iFrame).’
My interpretation of this is that these two new requirements apply only to the parent web page containing the iframe payment form.
Note: Interestingly, these two new requirements don’t apply to redirect payment mechanisms that also align to SAQ A.
What options do I have to meet these new PCI DSS requirements?
The following sub sections cover mechanisms that can be leveraged to meet these newly introduced PCI DSS Version 4.0 requirements.
For Requirement 6.4.3
A mechanism is implemented into the HTTP protocol designed to confirm that each script is authorized by preventing undefined scripts from running. These techniques are discussed as follows:
Content Security Policy (CSP): Implement a CSP to specify which sources of content are allowed to load on your web pages, thereby preventing unauthorized scripts from being executed. Additionally, it can be used to define where data is allowed to be sent to through a POST request.
A mechanism is implemented into the HTTP protocol designed to assure the integrity of each script.
Implement Subresource Integrity (SRI): SRI is a security feature that enables browsers to verify the integrity of resources fetched from third-party sources. By including an integrity attribute with a cryptographic hash in your script tags, you can ensure that the script’s contents have not been altered.
Unfortunately, the final bullet point in Requirement 6.4.3 is more of a manual process, an entity will need to create a detailed inventory of all scripts loaded within payment pages, including their sources and purposes. Regularly review this inventory and update it as necessary to ensure that only authorized and necessary scripts are running on your payment pages. A robust process should be implemented to ensure this inventory gets updated when scripts are updated, added, or removed.
For Requirement 11.6.1
As we have discussed above, one of the security techniques built into the HTTP Protocol is CSP, designed to identify what scripts are allowed to run. Although CSP is typically implemented through HTTP Headers, it can also be implemented using a HTML meta element, although you do lose some CSP functionality. One of the reasons PCI DSS Requirement 11.6.1 has been included into the standard is to ensure that any anti-skimming security measures implemented, such as CSP, are being delivered correctly and have not been interfered with. If the HTTP headers, or the page contents are not as expected, this could be an indicator of compromise and therefore needs to be flagged and investigated as part of an incident response process.
Looking at the PCI DSS guidance for Requirement 11.6.1, the intention of this requirement is to detect changes and indicators of malicious activity at the consumer browser (client-side), and not server-side. It is acknowledged in the guidance that active content can be pulled into the page from multiple internet locations, making it much harder to identify malicious activity through third-party JavaScripts. There have been many attacks whereby third-party scripts have been compromised, which quite often is outside of the control of the entity that is consuming them, since the scripts are hosted at third-party locations. One might think it is easy to control by hosting the scripts on the local web server, however some providers require scripts to be consumed from the third parties’ locations.
The guidance highlights several techniques that can be used to help meet the individual points of Requirement 11.6.1. These include:
Utilising the report-to / report-uri CSP directives to report CSP violations;
Identifying changes to CSP itself to detect tampering;
Performing external monitoring of received web pages to detect changes in JavaScript in payment pages and alert personnel;
Embedding tamper-resistant, tamper-detection scripts into payments pages that can alert and block malicious script behaviour; and/or
Reverse proxies and Content Delivery Networks (CDNs) can detect changes in scripts and alert staff.
Looping back on the discussion of intent, i.e being able to detect this activity at the browser, once the page is fully constructed, I’ve been struggling with some of the techniques identified in the guidance. My biggest confusion has been around the reverse proxies and CDNs ability to detect changes in scripts. This seems straight forward in that scripts are retrieved through these technologies; however, would this not fall over where scripts are being hosted on third-party services? I’ve had many a conversation with various colleagues on this point and Cloudflare has a solution whereby CSP is pushed out through the CDN to enable alerting mechanisms to help meet these requirements. Through Cloudflare’s Page Shield service, the ‘Content-Security-Policy-Report-Only’ CSP header is included within the HTTP responses to help provide notification mechanisms. Additionally, the service includes additional security mechanisms to identify known malicious script locations, script changes, etc…
Another technique I’ve been struggling with a little is performing external monitoring. My initial thoughts on this were to run regular scans of the payment pages to monitor for changes in the scripts and headers. My initial concerns were around where payment pages are behind multi-form pages that are part of the customer journey before being presented with the payment page(s). Some vulnerability scanning tools can find this problematic and may struggle to hit the correct pages. The exact wording of the following bullet point within the guidance helps to clarify this a little:
External monitoring by systems that request and analyze the received web pages (also known as synthetic user monitoring) can detect changes to JavaScript in payment pages and alert personnel.
Synthetic user monitoring (aka synthetic monitoring or synthetic transaction monitoring) is something I had never come across before so needed to delve into what this was. In essence, it is a technique used to simulate user interactions with an application to collect various data, for example, response times, errors, availability, etc…. In this case of PCI DSS Requirement 11.6.1, between a user and the e-commerce website. This monitoring is achieved using scripted user interactions with the website. In theory, the scripted requests should be able to walk through multi-form pages to land at the payment page(s) so the fully retrieved page can be analysed.
I’ve had a quick look to see if I can find any synthetic user monitoring products that may be able to help with this requirement and, most of the products I’ve found seem to focus more on performance metrics. The exception being (although there are probably others out there) a product by RapidSpike, which seems to include Magecart style detection.
Note: ASV Scanning is not designed to fulfil PCI DSS Requirement 11.6.1 as it is unable to perform the payment page analysis required to detect script/header changes.
Let’s now discuss the individual elements of PCI DSS Requirement 11.6.1 and how one could meet these individual requirement objectives:
The mechanism is configured to evaluate the received HTTP header and payment page.
The listed techniques included in the guidance highlights several commercial options which will all fully or partially meet this requirement. This includes commercial tooling like the RapidSpike solution discussed earlier along with Cloudflare, and both JScrambler and Report-Uri (doesn’t appear to report on HTTP header modifications) which I’ll discuss later on.
The issues I’m having is around the use of CSP and SRI alone, which configured correctly can be used to evaluate JavaScript discrepancies, I’ve been unable to identify an inbuilt HTTP security feature that can detect CSP tampering and HTTP header evaluation. The only potential way to achieve this is to build a JavaScript component, protected by both CSP and SRI, that is able to evaluate the received header and compare this against what should be received and alert to any discrepancies.
To alert personnel to unauthorized modification to the HTTP headers and the contents of payment pages as received by the consumer browser.
The CSP directives; report-to and report-uri are used to report CSP violations which will flag JavaScript code that isn’t permitted to run, providing CSP is configured correctly. I don’t believe this will help report HTTP header modifications or CSP changes, which as discussed above will require a programmatic technique through some JavaScript. These two directives will trigger reporting each time CSP issues are picked up within the customer browser.
For SRI, reporting of failures need to be programmatically written by capturing the error event.
External monitoring through synthetic user monitoring, embedded tamper resistant/detection scripts and CDNs will provide the ability to notify personnel of unauthorised modifications.
The mechanism functions are performed at least once every seven days or periodically
Although the requirement calls out for “at least once every seven days”, this is another example of where the PCI DSS Version 4.0 includes an option of a target risk analysis by including the “periodically” option. The recommendation would be to carry out this targeted risk analysis to identify what a suitable timeframe is for “periodically”. Based on your targeted risk analysis, adjust the frequency of your change- and tamper-detection mechanisms accordingly, which may be less than every seven days, depending upon various factors, such as the transaction volume of the e-commerce site.
By implementing these measures, you can better ensure that your environment remains secure and compliant with the new PCI DSS Version 4.0 requirements. These hardening techniques greatly improve the client-side security of the application, so I would personally recommend implementing all measures.
Commercial Solutions
Although the above highlights some techniques organisations can leverage to meet these new PCI DSS v4.0 requirements, it will very much depend upon the complexities of the JavaScript dependencies used by the organisation. If an organisation leverages a lot of JavaScript code, and more importantly, many teams can be involved in commissioning new JavaScript functionality, it can be very difficult to manage. These HTTP techniques can also be very easy to misconfigure, thus giving a false sense of security. Third-party commercial (and free) tooling can be a huge help with the management of this. In theory, these new requirements only apply to the “Payment Page”, so organisations can reduce their use of JavaScript functionality within these payment pages to make the management more simplistic, however often you will get push back from other teams, for example Marketing, who will insist that JavaScript is necessary in all pages, including the payment page. In addition to this, why limit this to the payment page when often other potentially sensitive information is available within the website that is also at risk of these threats, therefore tooling will make it much simpler to implement these additional security features against the entire website, providing an additional layer of protection and mitigations.
JScrambler
One such third-party tooling is JScrambler that can quickly assist with JavaScript integrity monitoring, though there are open-source tools available which are potentially more technical to implement, as John Elliot describes in his video “Understanding the New PCI DSS Requirements to Prevent E-commerce Skimming Attacks” (a highly recommended watch). Let us look at John’s explanation of JScrambler in greater detail:
Requirement 6.4.3 (Webpage Integrity) consists of four (4) main elements; Inventory, Authorised, Necessary and Integrity, which JScrambler covers. Since JScrambler is loaded into the webpage, it can build an inventory of all JavaScript code within the page in real time. Since an inventory is being built in real time, an organisation can record authorisation of scripts. If a new script appears, JScrambler can be configured to allow the script to run for a configurable period before authorisation is required, or it can be configured to block the script until authorisation is recorded. Within the inventory, JScrambler includes the ability to record a business justification for each script. Finally, integrity is covered by JScramblers ability to delve into the functionality of the script by analysing the functionality and behaviour of the script to determine if the script is doing anything that is questionable and can block the script if it determines that it is acting in a malicious way.
Requirement 11.6.1 (Detect Changes) again John discusses four (4) main elements; Page Content, HTTP Headers, 7 days or periodically and Alert. The first two elements are covered in JScrambler through the JScramblers ‘Webpage Integrity’, page content changes and HTTP Header changes are detected in real time. JScrambler is working on an update which will collate changes across the customer base to provide recommendations if script changes can be deemed as safe or not. As an example, if JQuery provides an update to the script, which is seen across the customer base and an analysis of the functionality and behaviour doesn’t flag anything, JScrambler will be able to provide feedback on the change to suggest that it is probably safe to authorise. Since JScrambler is running within each webpage, this is ‘Realtime’ and therefore goes above and beyond the 7 days or periodically requirement of Requirement 11.6.1. Finally, Alerting is built into JScrambler that can provide email alerts, shown within the JScrambler dashboard, and can be pushed into a SIEM solution.
JScrambler can also identify and block malicious activity along with malicious access into form fields.
Report-Uri
Report-URI is another tool that provides protections against Magecart style attacks, allowing you to meet these new PCI DSS Version 4.0 requirements. Report-URI’s ScriptWatch, is designed to monitor JavaScript dependencies in real time detecting new dependencies and changes in existing ones, providing alerts and auditing capabilities. What I like about Report-URI is an additional tool called, Data Watch, which tracks client-side communications and can provide alerts if data is sent to new destinations.
Wait! If these scripts are in scope, does this make the supplier a service provider?
This was an interesting question that someone posted on a LinkedIn post. The reason this was posted is because a service provider is not just a 3rd party entity that processes, transmits, or stores cardholder data on behalf of its customer, but is also an entity that can impact upon the security of cardholder data of its customer. As we have discussed within this blog, JavaScripts can pose a security risk to the e-commerce payments, hence why this question was raised.
Although many organisations will utilise commercial JavaScripts within their e-commerce platforms, there are a lot of opensource JavaScripts that are used; for example, JQuery, Bootstrap, Angular, etc… where you would struggle to fulfil the PCI DSS service provider requirements. I don’t believe the intention of the PCI SSC and Card Brands was to include the JavaScript developers into scope, these two PCI DSS Requirements were simply included to provide protection mechanisms to this specific threat vector.
My Ramblings
Overall, I think these additional requirements are a great addition to the PCI DSS, this attack vector has been an ongoing issue for many years, so it is great to see it being addressed. Although there are techniques already built into the HTTP Protocol itself to deal with the technical elements of PCI DSS Requirement 6.4.3, PCI DSS Requirement 11.6.1 seems to still be a challenge. I have struggled to identify a way to leverage security features built into the HTTP Protocol itself to check for issues with both the headers and JavaScripts. My only conclusion is that third-party commercial tooling must be used to allow you to meet the full intent of Requirement 11.6.1.
There are definite benefits in looking at commercial tooling to help manage the volumes of JavaScript code that can exist in large and complex e-commerce deployments. The additional benefit of this is that it can be much easier to manage across the entire website, instead of limiting it to just the payment pages. At the end of the day, this attack vector can also be used to access other data, or to deploy other attacks and therefore organisations should be looking at this across the entire website.
Finally, I would love to see JavaScript functionality stripped back from the payment pages. Reducing your attack surface, greatly reduces the risk of a successful attack against this attack vector.
If you didn’t know, I’m going to start writing a PCI DSS
book so any thoughts on what content would be good to include are very much
welcome. Anyway, back to the blog
content…
Card fraud is big business; which, according to the “UK Finance: Fraud the Facts 2018” totalled £566m in the UK in 2017. Although this was an 8% decrease on the previous year, this is still a significant amount of money lost to fraud which equates to roughly 7p for every £100 spent.
Statistics within the “UK Finance: Fraud Facts 2018” publication show that the annual fraud costs against card-not-present channels is actually shrinking with fraud against remote purchases (card-not-present) decreasing by 5% in 2017 (£409.4m) compared to the fraud costs in 2016 (£432.3m). Still, e-commerce fraud accounts for 76% of this total figure which is still a significant amount. For every £100 spent on e-commerce sales in the UK, 9.3p can be attributed to fraud. Although these statistics show the cost of fraudulent activities against card fraud, this is only showing how compromised cardholder data (CHD) is being monetised and not how the CHD is itself getting compromised.
Organisations of all sizes can suffer a data breach, for
example: BlankMediaGames, British Airways, Facebook, Adidas, Cathay Pacific
Airways, Ticketmaster and Marriot International (not an exhaustive list). Although
data breaches can occur via various attack vectors, this blog will focus
discussions on e-commerce platforms and specific attacks around these types of
platform.
Since the release of PCI DSS Version 3.0 there are three
types of Self-Assessment Questionnaires (SAQs) which are designed to work with
e-commerce payment channels. These are;
SAQ A – This SAQ is designed for use where all payment functions are handled by a third-party, therefore this SAQ isn’t solely used for e-commerce. Where it is used for e-commerce, it is used where the e-commerce site is utilising either a web redirect or iframe for the payment functionality. All payment information is sent directly from the customers browser, directly to the payment gateway.
SAQ A-EP – This was a new SAQ introduced within PCI DSS Version 3.0. This SAQ is used only for e-commerce payment channels. Even though this payment channel sends all payment information directly from the customers browser, to the payment gateway, the difference is that the merchant website is responsible for creating the payment form. Payment functionality aligned to this SAQ is often known as either Direct Post or JavaScript.
SAQ D – Yes, the largest SAQ is also applicable to some e-commerce payment channels. E-commerce sites aligning to this SAQ will be accepting the payment information before routing it to the payment process for authorisation, typically through an API.
For more information on these different types of e-commerce channels see Visa Europe’s guidance document “Processing e-commerce payments”.
This blog post will look further into e-commerce platforms supporting
one of the five payment functionalities identified above. A lot of merchants are now going down the route
of de-scoping the e-commerce channel by implementing a web redirect or iframe
for payment functionality, since SAQ A has the smallest number of applicable
requirements, of the seven Merchant SAQs available. This is the recommended approach for
e-commerce payment channels since it de-scopes an organisation from much of the
burden of PCI DSS by reducing the size of the environment that needs assessing
and the number of applicable requirements. However, where e-commerce is
concerned, I believe this can also give organisations a false sense of
security. The ‘Compliance != Security” debate has been discussed on the Internet
and amongst security professionals across the globe for many years. I believe
this is very true. Although an
environment may be compliant against PCI DSS (or any other security framework),
one needs to understand that PCI DSS is a baseline data security standard and
organisations need to understand their organisations individual risks and
enhance their security practices accordingly, to bolster the organisations
overall security posture. Although
attackers and attacks are getting much more sophisticated, a lot of
organisations are still getting compromised due to basic lapses in security
that a lot of the compliance frameworks already address.
Attack Vectors
I wanted to write this post by first describing some of the possible attack vectors faced by web applications and then discuss some of the ways to mitigate them. For this post, I’ve enlisted the help of the amazing @HollyGraceful (https://www.gracefulsecurity.com/) (A really big thank you Holly for agreeing to provide your expertise on this topic). During my research on this blog post I came across the following Snyk article “Which of the OWASP Top 10 Caused the World’s Biggest Data Breaches?”, which has some interesting statistics of 2016 data breaches. The article analysed the top 50, linking them to the Open Web Application Security Project (OWASP) Top 10 index of web application security vulnerabilities, where possible. What’s interesting in this article is that of the 50 top security breaches reviewed, 30% of them were caused by problems not listed within the OWASP Top 10.
N.B. The OWASP Top 10 is updated roughly every three years as the top 10 moves around over time. The Synk article was a review of data breaches in 2016, therefore the OWASP Top 10 analysis has been carried out from that period and thus used the Top 10 list from 2013 so the latest Top 10 list from 2017 differs, which I will highlight further down within the analysis for the current (2017) list.
The OWASP Foundation appeared in December 2001 with the intention of promoting application security by providing a platform to provide education and various resources to help developers improve coding practices. Being a not-for-profit organisation, this international foundation aims to provide unbiased, practical and cost-effective advice for the development of secure applications.
Within the Akamai “State of the Internet / Security Q3 2017 Report” report, web application attacks showed an increase of 69% in Q3 2017 compared with Q3 2016. The report also shows an increase of 30% between Q2 2017 and Q3 2017.
For this post, I’ve decided to focus on the web applications
and supporting web servers. I appreciate
that in most security programs, additional security controls would be in place
that could increase the security of an e-commerce site; such as, firewalls, anti-malware,
web application firewalls, IDS/IPS, etc…; however, since I’m focusing mainly on
the web application itself, I’m covering only the following categories that can
lead to the successful compromise of e-commerce channels:
Build Issues,
Insecure Coding, and
Third-parties.
Build Issues
E-commerce platforms are susceptible to build issues if not
correctly configured and maintained. Typically,
web servers will be running various software components which will need to be
securely configured and hardened to protect against multiple types of
threats. Software components can include;
The operating system (OS); for example, Windows or Linux (with the explosion of Cloud services, some web services are utilising containerisation such as Docker. Although this will run on an operating system, this will be maintained/managed by the cloud service provider),
A web server application; for example, Microsoft IIS, Apache, etc…,
A scripting language; for example, ASP, PHP, Python, Perl, etc…,
A database; for example, Microsoft SQL, MySQL, PostgreSQL, etc… (N.B. The database is usually installed on a separate server).
These are the core components of a web server; however,
other software components can still exist to support other functionality or
system administrative tasks. A good
example of other software components which are often found on websites and
e-commerce sites are Content Management Systems (CMS); for example, Joomla,
WordPress and Drupal (not an exhaustive
list). Also, other software
components can include e-commerce shopping carts; for example, Magento.
It is good practice to ensure that systems only have one
primary function (i.e. in this case, supporting the web/e-commerce site) which
is a requirement of PCI DSS. The reason
for this is that these additional services/software components can introduce
additional risks and vulnerabilities therefore increasing the attack surface. The web server will only be as secure as the
weakest link; i.e. the weakest software component running.
Web server build issues can be identified as:
unintentional misconfigurations of the operating system or applications/services running on them,
insecure configuration of the operating system or applications/services running on them, and
unpatched operating systems or applications/services running on them.
Build issues can lead to a full compromise of the web server
allowing a threat actor to take control of the web server. This would give the threat actor the ability
to change the logic of the website therefore manipulating the payment
functionality, amongst other possibilities.
In the Synk article, of the top 50 data breaches in 2016,
the author identified that the top two root causes of the analysed breaches
were related to insecure builds.
Ranked 1: 24% of Root Causes
The root cause ranked first was linked to the 2013 OWASP Top 10 classification “2013:A9-Using Components with Known Vulnerabilities”. Arguably, some of the attack vectors of these known vulnerabilities could be linked to other OWASP Top 10 classifications (for example; SQL Injection) but since these issues were known and at the time of the breach a patch was available, these breaches have been classified under A9 for the Synk research.
Examples of root causes under A9 included; unpatched Drupal, outdated version of vBulletin forum software and unpatched Forumrunner plugin (SQL Injection Flaw).
Ranked 2: 20% of Root Causes
The root cause ranked second was linked to the 2013 OWASP Top 10 classification “2013:A5-Security Misconfiguration”. Examples of root causes under A5 included; misconfiguration of AWS security features, database access to the Internet with no authentication and insecure MongoDB databases caused by insecure default configuration from older versions.
Insecure Coding
Insecure coding can introduce a myriad of vulnerabilities to
the web application running on the web server.
Some of the more serious coding issues can provide the threat actor with
full administrative control of the web server, therefore giving them the
ability to change the logic of the website and manipulating the payment
functionality, amongst other possibilities.
Some examples of coding issues can include;
Injection Flaws – Injection flaws are caused by the insecure handling of user input. Generally, where user input is insecurely concatenated into a context, such as a database query or operating system command. These can be addressed either through user input sanitisation or alternatively by altering the way the query is constructed, such as through parameterized queries for SQL. There are many types of injection flaws; for example, SQL Injection (SQLi), Command Injection and XPath Injection (there are other types of injection attacks). However, SQLi is the most commonly exploited injection flaw. This may be in part due to the availability of effective, reliable, automated attack tools.
By incorrectly handling user input, a system may not only unintentionally expose confidential data, but may also allow an attacker access to the underlying operating system itself. N.B. There are several ways this can be achieved, such as through a lack of principle of least privilege, allowing for access to functions such as xp_cmdshell – which allows for the execution of operating system commands on the database server – or through allowing an attacker to modify web application code stored in the database allowing code execution on the web application server instead
Broken Authentication – This vulnerability class covers many issues, such as an application allowing for credentials stuffing, bruteforce attacks, or being configured with default credentials. It also includes issues such as using weak credential recovery features. Credential stuffing, the act of exploiting password reuse, can be a difficult vulnerability to address however in most cases simply enforcing multi-factor authentication will mitigate the business risk of a stolen credential. As for preventing weak credential recovery features a critical step in mitigating risks in this area is to validate the user through a side-channel, that is to say validate the user through a confirmation email containing a limited validity proof (e.g. a short-lived token)
Sensitive Data Exposure – covers any time confidential data is insufficiently protected when stored or transmitted, such as being sent in cleartext (HTTP or FTP) or stored using a weak encryption/hashing algorithm. To mitigate these issues multiple protections are recommended, such as using Transport Layer Security (TLS) when transmitting data over HTTP, but also implementing the HTTP Strict-Transport-Security header, to ensure that the web browser never falls back to HTTP.
Although there are many more examples of coding issues which
could be included above (review PCI DSS
Requirement 6.5 for more, which is still not an exhaustive list), I’ve
chosen these three because they are responsible for the third, and joint fourth
ranked root causes within the Synk article.
Root causes ranked third, and joint fourth were;
Ranked 3: 8% of Root Causes
The root cause ranked third was linked to the 2013 OWASP Top 10 classification “2013:A1- Injection” (Currently 2017:A1-Injection). Out of the top 50 data breaches analysed within the Synk article, all the injection flaws were identified as SQL Injection, which were used to exfiltrate data from the affected system. Data included user account information (some with unencrypted passwords) and patient data.
Ranked Joint 4: 6% (each) of Root Causes
The root causes ranked joint fourth were linked to the 2013 OWASP Top 10 classifications “2013:A2-Weak Authentication and Session Management” (Currently 2017:A2-Broken Authentication) and “2013:A6-Sensitive Data Exposure” (Currently 2017:A3-Sensitive Data Exposure).
The Synk article identified weak passwords, accidental access to decrypted data and easy access to sensitive data via known data, credentials or URLs as attacks for these identified root causes.
Third-parties
I wanted to include third-parties not only because it poses
a real threat to organisations, but also because one of the attacks we’ll be
looking at can be leveraged through a third-party. It is not uncommon for a successful security
incident to occur via a third-party; for example:
The Target breach in 2013 started through the compromise of a third-party; Fazio Mechanical a refrigeration contractor. Further details of the Target breach can be found here (More Details),
The NotPetya malware attack was actually carried via a malicious update in the compromised accounting software package, called M.E.Doc. Which is used by a significant number of companies in Ukraine. This attack utilised the compromised third-party software, M.E.Doc, as one of the initial propagation methods. Another propagation method by the same malware was a watering hole attack, which saw Ukrainian government websites defaced to host the malware.
The compromise of the ICO website (and others) was carried out in 2018 via a website plug-in called Browsealoud by a company called Brit Biz Texthelp. Attackers tampered with the plug-in, introducing the Coinhive’s Monero miner program which is used to mine cryptocurrencies on infected machines,
RiskIQ reported a theory in the British Airways (BA) breach which they linked to a group called Magecart. They suspect that the attack was carried out by somehow altering JavaScript code from BA’s baggage claim information page to include malicious code to steal information, and
The Ticketmaster data breach is reported to be by the same group who compromised BA, Magecart as reported by RiskIQ. Although malicious code was used to steal credit card information, within this attack, the malicious code was contained within compromised third-party scripts; Inbenta and SociaPlus, which the Ticketmaster website was configured to load.
These are just a few examples of attacks where a compromise
of a third-party has led to a security incident of one of their customers. An organisations IT Security is only as
strong as its weakest link, which can sometimes be an external entity that the
organisation engages with.
The PCI DSS has Requirement 12.8 which includes 5
sub-requirements designed to ensure third-party service providers are
adequately managed to maintain the security of the cardholder data environment
(CDE) and the cardholder data (CHD).
Examples of Attacks Against the Various e-Commerce SAQ Types
The previous section discusses some of the attacks that web
servers and web applications can be faced with in today’s threat
landscape. In this post I wanted to
focus on just some of the types of attacks which e-commerce sites with payment
functionality can be faced with.
@HollyGraceful has very kindly written most of this section to
help organisations understand how attacks can work against the various SAQ
types. The next sub-sections will
discuss these.
SAQ A – MEDIUM RISK
SAQ A is used for e-commerce sites utilising web redirects
or iframe payment functionality with the risk being lower than the other two
SAQ types. This is lower since client-side attacks are very limited since it is
not possible (at the time of writing)
to successfully attack the payment flow in a way to compromise the cardholder
data AND successfully carry out the
payment transaction. Merchants should quickly
identify an issue since payments will stop. Whilst it’s not impossible, it
would require a server-side weakness such as cross-site request forgery to also
be present to allow for this.
A more successful attack against this payment type is to compromise the web server controlling the web redirect/iframe mechanism and altering the payment pages in a way to successfully capture the cardholder before sending payment data to the payment gateway. Foregenix wrote a blog post in 2016 discuss an actual attack that successfully managed to compromise an iframe payment deployment whilst still being able to successfully submit the payment. This is often extremely difficult because the payment gateways will have robust security mechanisms and monitoring in place to make it difficult for a threat actor to successfully generate their own data submission to the payment gateway, after capturing the CHD. In this Foregenix post, additional checks by the payment gateway could have protected against this specific attack. Therefore, for this reason, to harvest the CHD, the threat actor would usually just redirect the cardholder to their own website to capture the CHD and not actually complete the payment. This would quickly be picked up by the Merchant as no payments would get through.
An example of an attack in this context, would be
“keyjacking” this is an effective attack where the attacker can control the
content of the framing page (the e-commerce page) but not the framed page (the
payment page). This attack involves the attacker “redressing” the page, such
that an overlay is placed in front of the payment page, allowing the attacker
to capture mouse clicks and key presses such that card details, or typed
credentials, could be stolen. However as stated earlier as the framing page
captures the key presses, whilst it would functionality allow the attacker to
capture details they would not then be sent to the payment system – increasing
the likelihood of this attack being detected.
SAQ A-EP – HIGH RISK
As already described, with this payment mechanism, the
merchant website is responsible for creating the payment form used to submit
cardholder data to the payment gateway.
This is a much greater risk than for SAQ A because it is much easier for
a threat actor to manipulate the payment flow to capture cardholder data and
still successfully complete the payment.
Additionally, there is a greater risk from third-party scripts since
these scripts can interact directly with the payment form to also capture
cardholder data and still allow the payment to complete.
In this context an attacker would be able to perform a
cross-site scripting style attack, which in execution would be similar to the
previously mentioned keyjacking but in this instance the attacker would not
only be able to capture key presses (and thus credentials or payment details)
but would also be able to send these details on to the payment system to allow
the payment to be completed – reducing the likelihood of fast detection, in
comparison to the keyjacking method described above.
SAQ D – HIGH RISK
The threats for SAQ A-EP and SAQ D are pretty much the same,
the most significant difference is that this will mainly be applicable where
the web server is receiving the cardholder data directly before routing this to
the payment gateway. For this reason,
there are potentially more PCI DSS requirements in scope; such as Requirement 3
if cardholder data is being stored.
Where payment information is stored, instead of simply
submitting the details to a payment provider, this opens up additional
vulnerabilities such as those covered earlier; mainly A1-Injection and
A3-Sensitive Data Exposure. Where cardholder data is stored, and an attacker is
able to extract data form the database where that data is insecurely protected
in storage (such as through weak encryption or weak hashing) the attacker could
simply extract and steal the data – mitigating the attacker’s requirement to
ensure the payment is completed.
Mitigations
There are various ways in which PCI DSS mitigates the types
of attacks identified above. These have
been categorised under the three attack vector categories identified earlier;
Build Issues
PCI DSS Requirement 2 includes sub-requirements to ensure
systems are hardened before being deployed within the PCI DSS environment. The types of requirements included within PCI
DSS Requirement 2 includes;
Changing vendor-supplied defaults and removing or disabling unnecessary default accounts,
Changing ALL vendor defaults for wireless environments connected to the cardholder data environment,
Develop configuration standards ensuring they address all known security vulnerabilities, in-line with industry-accepted system hardening standards (from organisations such as; but not limited to, Center for Internet Security (CIS), International Organization for Standardization (ISO), SysAdmin Audit Network Security (SANS) Institute and National Institute of Standards Technology (NIST),
Implement on one primary function per server,
Restricting services, protocols, daemons to that which is necessary for the operation of the system component,
Implement additional security features for services, protocols, daemons that are considered to be insecure,
Configure system security parameters to prevent misuse,
Remove all unnecessary functionality; such as, scripts, drivers, features, subsystems, file systems, and unnecessary web servers,
Encrypt all non-console administrative access using strong cryptography.
Requirement 6 has two requirements focusing on;
Establishing a process to identify vulnerabilities, using reputable outside sources for security vulnerability information and assigning a risk ranking methodology to newly discovered security vulnerabilities,
Ensuring that all systems and software are protected from known vulnerabilities by installed applicable vendor supplied security patches. Critical security patches must be installed within one month of release.
Requirements 7 and 8 cover authentication and can arguably
be included within this section. These
requirements ensure things like;
Limit access to systems and cardholder data to individuals who require access,
Implement the principle of least privileges for privileged accounts,
Unique user accounts are assigned,
Revoke access for any terminated users,
Monitor inactive accounts and remove/disable them within 90days,
Only enable third-party accounts when in use and monitor them when being used,
Strong password policies; i.e. lock out failed logins after more than 6 attempts, configure a lockout duration for a minimum of 30mins, minimum of 7 characters, must contain numeric and alphabetic characters, passwords must be changed at least every 90days, remember the past 4 previously used passwords,
Ensure sessions idle for more than 15 minutes require the user to re-authenticate/re-activate their terminal/session,
Use strong cryptography on credentials that are transmitted or stored,
MFA used for all non-console access and all remote access to the CDE,
Do not use group, shared or generic IDs, passwords, or other authentication methods,
Restrict access to databases containing CHD.
Secure Coding
Requirement 6 covers secure coding practices designed to
limit organisation developing applications which are insecure. Controls covered by Requirement 6 include;
Develop secure coding guidelines based in industry standards for example, the OWASP Software Assurance Maturity Model (OWASP SAMM),
Internal and external software applications need to be developed;
in accordance with PCI DSS; for example, secure authentication requirements (i.e. passwords are a minimum of 7 characters, lockout after 6 invalid logon attempts, etc…) and logging requirements in Requirement 10,
Based on industry standards and/or best practices, and
Incorporate security throughout the software-development lifecycle.
Remove development, test and/or customer application accounts, user IDs and password before release,
Review custom code changes prior to release to identify potential coding vulnerabilities to include at least the following;
Code changes are reviewed by individuals other than the originating code author who are knowledgeable about code-review techniques and secure coding practices,
Code reviews ensure code is developed according to secure coding guidelines,
Implement appropriate connections prior to release,
Code-review results are reviewed and approved by management prior to release,
Address common coding vulnerabilities in software development processes by;
Training developers in up-to-date secure coding techniques at least annually (for example; Injection flaws, buffer overflows, insecure cryptographic storage, XSS, etc…),
Develop applications based on secure coding guidelines,
In addition to these specific PCI DSS requirements for secure software development practices, the PCI Security Standards Council (PCI SSC) have recently released the Software Security Standard (PCI SSC Press Release) which is aimed at software vendors to drive the development of secure solutions. This will replace the Payment Application Data Security Standard (PA-DSS) in 2022.
Third-Parties
Third-parties can present a significant threat. Security is only as strong as the weakest
link, which can be third-parties which can impact upon the security of the
organisations IT environment/systems.
PCI DSS includes requirements covering the handling of third-party
service providers within Requirement 12.8’s 5 sub requirements. These sub requirements include requirements
to;
Document all service providers, including a description of the service provider,
Maintain a written agreement with the service provider that includes an acknowledgement that the service provider will maintain a PCI DSS compliant environment,
Establish a process for engaging service providers including proper due diligence prior to the engagement,
Maintain a program to monitor service providers’ PCI DSS compliance status at least annually,
Maintain information (Roles and Responsibilities Matrix) detail which requirements are the responsibility of the Merchant, Service Provider or Joint responsibilities.
To fulfil PCI DSS Requirement 12.8, most organisations will
develop a procurement process which is focused around PCI DSS, however, my
recommendation is to build in additional due diligence; for example, financial,
IT Security, etc… This will ensure a
robust third-party assurance program is implemented and should include not only
proper due diligence, but also include risk analysis as part of this process.
The PCI SSC released a “Third Party Security Assurance” guidance document intends to provide organisation with guidance on how a third parties should be vetted through a robust due diligence process.
Although not directly a PCI DSS requirement as such, I would
also go as far to say it would be best to stay clear of including third-party
scripts within the payment functionality of the website.
Additional Protections
The sub sections above focused on the three categories being
discussed throughout this post. Within
this section I wanted to just draw the reader’s attention to some additional
protections which can also help bolster what has been discussed.
Anti-Malware: Although
traditional signature-based approaches no longer deem to be sufficient
protection against the evolution of malware over the past decade, anti-malware
protection can help to identify some of the malware that is used whilst
exploiting specific vulnerabilities. Some
anti-malware products also include host-based intrusion prevention which can
further bolster protections against malware infections.
Web Application
Firewalls: Deploying a well-tuned WAF can help to protect e-commerce sites
against vulnerabilities that may existing within the e-commerce site. By detecting common techniques used by threat
actors to exploit coding vulnerabilities such as; Injection, Cross-site
Scripting, XML External Entity Injection, and deserialisation attacks, even if
the e-commerce site is vulnerable, the WAF would stop the attack before
reaching the e-commerce site.
File Integrity
Monitoring: Often, when attacks against e-commerce websites are successful,
the web servers file system is altered by either modification of system or
application files, the deletion of files or the addition of files. By running FIM on the web server, the system administrators
to be alerted to alterations and determine if these changes are the result of a
malicious threat actor or internally.
More Regular
Vulnerability Scanning: By running both infrastructure and web application
vulnerability scans of the e-commerce external footprint, vulnerabilities can
be identified and remediated. By running
these tools more regular, the window of opportunity of a threat actor is
reduced. By reducing the length of time,
the vulnerability exists, the risk of the vulnerability being exploited is
reduced.
Continuous
Penetration Testing: This is something that is relatively new to the market. The idea behind continuous penetration
testing, is to reduce the mean-time-to-detection by having a security tester
conducted continuous vulnerability scanning and penetration testing activities
against the system. The mean-time-to-detection is the amount of time it takes
for an organisation to detect a newly implemented security vulnerability.
Keyjacking and XSS Mitigations
For the specific issues mentioned in the SAQ section we
discussed keyjacking and cross-site scripting, from the context of the framing
page, can be prevented in two ways – the first is rigorous user input filtering
utilising a whitelisting approach.
Whitelisting is a user input filtering method where only
known-good input is allowed, as opposed to relying on being able to create a
maintain a list of all known-bad input as would be required to have effective
blacklisting. This can be achieved by restricting the type of data, length of
input, and expected character-set.
There is an issue here however, with trusting third-party
code, such as including JavaScript within a web application which is sourced
directly from a third-party. A possible alternative would be to review included
code and then store/reference it from within the web application server itself.
My Final Ramblings
In this post I wanted to highlight the dangers with hosting
e-commerce platforms. The PCI SSC and
Card Brands do a fantastic job of taking a risk-based approach to the various
techniques used by organisations to capture and process card payments. This is reflected within the various SAQs and
eligibility criteria within them which considers the risks associated with the
payment channels, translating this into which requirements are needed.
That said, although the SAQ A payment integration for e-commerce platforms is less risky than the other methods, I still believe SAQ A doesn’t go far enough by means of the number of requirements that are included. This is something I’ve spoken about in another article here. Although for PCI DSS Compliance purposes you are required to meet what’s detailed within the appropriate SAQ, there is nothing wrong with going above and beyond what PCI DSS requires for your chosen payment integration.
One of the key messages that I wanted this article to
deliver is that e-commerce platforms are at risk from a myriad of threats. The impact of these threats may depend upon
the payment integration used, however, with creativity on the threat actors’
part, each payment integration option can be fruitful.
My initial driver for this post was the BA, ICO and Ticketmaster
compromises highlighted above. Third-party
scripts running within e-commerce sites, can pose a real danger. The impact is very much dependent upon the
payment integration used, however organisations need to be careful when these
scripts are being used. The
recommendation is to limit the usage of these third-party scripts within the
payment functionality of the websites. Content
Security Policy (CSP) can be used to help achieve this goal. CSP works in this scenario because you can
utilise the CSP directive to control the loading behaviour for a target
resource type. You can instruct the
client browser from which location and/or which type of resources can be loaded. The recommendation would be to limit loading any
third-party scripts from any pages which are involved within the payment functionality,
unless it is directly supporting this function (i.e. from the payment service
provider).
Troy Hunt is an out spoken Australian security expert and advocate for web security. A well-respected researcher and public speaker, Troy works tirelessly promoting the importance of secure web application development and attaining a better web application security posture through public speaking, blogs and training materials. A Pluralsight author, Troy has developed more than 30 courses (at time of writing) covering various topics and technologies. A key project Troy has been involved in is the ‘Have I Been Pwned’ (HIBP) website which is a free service aggregating publicly released data breach data allowing people to identify if they’ve been impacted by such breaches.
John Elliot is a well-respected InfoSec professional within cybersecurity, payments and privacy. A regular public speaker, John demonstrates his passion for cyber security, PCI DSS and GDPR by delivering engaging topics at various conferences and authoring training courses for Pluralsight. Within his previous role of Head of Payment System Security at Visa Europe, John has a vast amount of knowledge and experience of PCI DSS and payment security and was Visa Europe’s representative on the PCI Security Standards Council.
NOTE: Due to the following article (and a few others discussing this issue) highlighting new guidance from the PCI SSC stating that Service Providers cannot align to Merchant SAQs, some of the information in this article is no longer correct.
The PCI Security Standards Council (PCI SSC) released PCI DSS Version 3.0 in November 2013. With the introduction PCI DSS Version 3.0, the accompanying Self-Assessment Questionnaires (SAQ) received updates in February 2014. A new SAQ was introduced specifically for e-commerce payment channels which was called SAQ A-EP (I think of this as SAQ A for E-commerce Payments). Along with this new SAQ, SAQ A was also updated to include its use where payment processing for e-commerce platforms were handling payment functions off to a PCI DSS compliant third-party service provider.
E-Commerce payment channels could align to one of three SAQs depending upon how the payment functionality is implemented. The three variations are detailed below;
SAQ
E-Commerce Use
A
This SAQ was updated to specifically include e-commerce payment deployments where the payment form is either deployed as an iFrame or a redirect to the PCI DSS Compliant third-party service provider.
The contents of the iFrame payment form, must be retrieved from the third-party service provider (TPSP) in its entirety.
A-EP
This SAQ was created to handle e-commerce payment functionality which is partially outsourced to a PCI DSS Compliant third-party service provider. The difference between this SAQ and SAQ A is that the merchant’s e-commerce website is responsible for building the payment form either by creating a form which POSTs directly to the TPSP or the payment form is created using JavaScript from the TPSP which then POSTs the CHD directly to the TPSP.
D
Where the e-commerce payment functionality doesn’t align with one of the other two SAQs, SAQ D has to be used. This would typically be used for API type deployments where cardholder data is received by the e-commerce web server and then forwarded (routed) onto the payment provider.
SAQ A for PCI DSS Versions 3.0 and 3.1 only included a handful of PCI DSS requirements which included some requirements from Requirement 9 and Requirement 12. There were no requirements specifically focusing on the web server responsible for handling the redirect/iFrame mechanism.
Through an analysis of PCI DSS forensic investigations and a change in the attacks against e-commerce sites utilising iFrames and redirect payment functionality, PCI DSS Version 3.2 saw the web server coming into scope for a handful of requirement in Requirement 2 and Requirement 8. The latest version of PCI DSS Version 3.2.1 (at the time of writing) saw a new requirement being added to SAQ A, Requirement 6.2, which introduces the need to ensure web servers are patched with Critical vendor patches within 30 days of release.
Prior to PCI DSS Version 3.2, web servers were not in scope for SAQ A, however since April 2016, web servers became in scope for some PCI DSS requirements. Due to this change, hosting providers and developers who have a responsibility for the web servers operating system and web server software, along with any e-commerce/CMS software, are classed as a Service Provider and will need to be operating in a PCI DSS compliant manner and therefore are in scope for PCI DSS assessment activities.
The term Service Provider in relation to PCI DSS is a third-party entity that stores, processes and/or transmits cardholder data on behalf of a merchant and/or service provider, or can impact upon the cardholder or the cardholder data environment.
Where hosting providers and/or developers are in scope for PCI DSS, they can either choose to become PCI DSS compliant by undergoing a PCI DSS assessment and completing either an SAQ or Report on Compliant (ROC) and an associated Attestation of Compliance (AOC). Alternatively, they can be included within their customers PCI DSS assessment activities and demonstrate that they are fulfilling all applicable PCI DSS requirements.
So, what exactly does this mean for me?
Due to SAQ A Version 3.2.1 only having 9 specific requirements that apply to the web server, the PCI DSS obligations are not too onerous. These 9 requirements, along with a handful of potential other requirements need to be compliant to the PCI DSS. Below I discuss the requirements that are likely in scope for the web server/software, along with what a QSA may require in determining if the requirement is deemed ‘In Place’ or not:
Requirement 2.1.a – Are vendor-supplied defaults always changed before installing a system on the network?
A QSA may want to review such evidence as; vendor manuals to identify vendor-supplied credentials and evidence that default username/password combinations are unsuccessful.
Requirement 2.1.b – Are unnecessary default accounts removed or disabled before installing a system on the network?
A QSA may want to review such evidence as; a list of and account information on system user accounts and/or account in CMS. The QSA will be looking to see if default accounts exist and if they do, are they disabled. The QSA may also want to review build standards, policies and/or procedures to confirm that the introduction of new web servers will be built the same.
N.B. If part of a ROC Assessment, the QSA may want to also interview staff for further assurance that default accounts are being removed or disabled before web servers and software are deployed.
Requirement 6.2.a – Are all system components and software protected from known vulnerabilities by installing applicable vendor-supplied security patches?
A QSA may want to review such evidence as; the organisations supporting patching policies and procedures. This will not only have to include the web server operating system but also supporting applications.
Requirement 6.2.b – Are critical security patches installed within one month of release?
A QSA may want to review such evidence as; details of when security patches were installed. The QSA will look to ensure critical vendor-supplied security patches were installed within the 30-day timeframe and other security related vendor-supplied patches are installed as per define policies/procedures. This will not only have to include the web server operating system but also supporting applications.
Requirement 8.1.1 – Are all users assigned a unique ID before allowing them to access system components or cardholder data?
A QSA may want to review such evidence as; a list of all user accounts that exist on the web server operating system and any supporting applications (e.g. CMS). Additionally, the QSA would want to interview staff to confirm unique user IDs are always used on these system components.
Requirement 8.3 – Is access for any terminated users immediately deactivated or removed?
A QSA may want to review such evidence as; leavers records and interviews with HR. Where users have left the organisation and/or left teams with access to in scope system components, the QSA will cross reference the evidence from Requirement 8.1.1. above to ensure the user accounts have been removed. Where remote access solutions are in use, the QSA will also look to obtain a list of user accounts from the remote access solution to ensure that these accounts have also been removed along with any physical tokens for such remote access.
Requirement 8.2 – In addition to assigning a unique ID, is one or more of the following methods employed to authenticate all users?
Something you know, such as a password or passphrase
Something you have, such as a token device or smart card
Something you are, such as a biometric
A QSA may want to review such evidence as; supporting policies and procedure documents detailing the authentication methods employed by the organisation for in scope system components. Additionally, the QSA will want to look at configuration settings to confirm that the authentication methods are in use as per the documentation supplied.
Requirement 8.2.3.a – Are user password parameters configured to require passwords/passphrases meet the following?
A minimum password length of at least seven characters
Contain both numeric and alphabetic characters
A QSA may want to review such evidence as; the QSA will want to review configuration settings on all in scope system components to confirm that the required password/passphrase settings are set.
Requirement 8.5 – Are group, shared, or generic accounts, passwords, or other authentication methods prohibited as follows:
Generic user IDs and accounts are disabled or removed;
Shared user IDs for system administration activities and other critical functions do not exist; and
Shared and generic user IDs are not used to administer any system components?
A QSA may want to review such evidence as; a list of users on all in scope system components.
[UPDATE: If undergoing a ROC, the QSA will likely want to check that the web server is not storing any cardholder data. This may be done manually, or the QSA may utilise cardholder data discover tools to ensure that no cardholder data is present.]
In addition to these web server/software specific requirements, some additional requirements may also be applicable; for example, Requirement 12.8.x which covers requirements regarding the management and monitoring of any third-party service providers. This may be applicable for example, where the web developers are responsible for the web server and have outsourced this to a hosting provider. Additionally, requirement 12.10.1 which covers incident response handling, would also likely be in scope.
Hosting providers and/or third-party developers are classed as service providers and as such will be required to fulfill Requirement 12.9 which will be to acknowledge in writing to customers that they a responsible for maintaining all applicable PCI DSS requirements.
The PCI Security Standards Council (PCI SSC) Self-Assessment Questionnaire A (SAQ A) Version 3.2.1 update (22nd June 2018) saw a single additional requirement added for e-commerce payment channels meeting its eligibility criteria.
PCI DSS Version 3.0 saw an alteration to SAQ A allowing websites that utilise either an iFrame or a web redirect to the payment provider for cardholder data input to align to the SAQ providing that all the eligibility criteria is met. The industry is continuously seeing more attacks against these types of e-commerce channels and as such SAQ A has evolved through the various PCI DSS 3.x updates, the latest being PCI DSS Version 3.2.1.
This latest update has seen the addition of Requirement 6.2, for entities to ensure that supporting webservers, web frameworks and e-commerce platforms are suitably patched. Any vendor released critical security patches must be installed within one month of release. There is no surprise with this additional requirement since unpatched systems are still a common entry point for external threat actors resulting in account data compromises (ADC).
For me (and many other security professionals) SAQ A is still lacking in many areas. Below I discuss some of the areas that I believe should be bolstered for e-commerce deployments that align to SAQ A:
Segmentation
For SAQ A, the only system components in scope are the merchant webserver as detailed within the following SAQ A note:
Note: For this SAQ, PCI DSS Requirements that address the protection of computer systems (for example, Requirements 2, 6, and 8) apply to e-commerce merchants that redirect customers from their website to a third party for payment processing, and specifically to the merchant web server upon which the redirection mechanism is located. Mail order/telephone order (MOTO) or e-commerce merchants that have completely outsourced all operations (where there is no redirection mechanism from the merchant to the third party) and therefore do not have any systems in scope for this SAQ, would consider these requirements to be “not applicable.” Refer to guidance on the following pages for how to report requirements that are not applicable.
Additionally, there is technically no cardholder data environment (CDE) since the e-commerce platform doesn’t store, transmit or process any cardholder data (CHD). For this reason, my approach is to assess the webserver in line with the applicable requirements within SAQ A, regardless of where they are physically located within the entities environment. As a QSA, it is imperative that the PCI DSS assessment follows what is required of the entity being assessed. QSAs are not supposed to ask entities to go above and beyond what is required of them in order to meet the PCI DSS.
My recommendation would always be to place the e-commerce webservers within a DMZ solely for they e-commerce front end functionality, segmented away from all other systems components within the environment. The Internet facing firewall, if configured correctly, will be limiting the attack surface of system components which are Internet connected. A compromise of other systems within the environment may expose vulnerable services upon the e-commerce webserver(s) if they are not segmented from these other systems.
Firewalling
Deploying an Internet firewall is standard practice for all organisations. That said, sometimes these devices can be misconfigured, introducing unnecessary risks. It is common place to implement strict inbound firewall rules, however it is recommended that outbound firewall rules are also restricted to that which is necessary to support the systems and functionality required. Only necessary outbound ports should be enabled but more importantly, destination addresses should be locked down to only the Internet resources that internal systems need access to. This can make it much more difficult to exfiltrate data out of the network and stop command and control (C&C) functionality being used if a threat actor gains a foothold into the organisation.
Anti-virus
It has long been cited that anti-virus software is no longer effective, with John McAfee saying;
“I don’t use AV, I think it’s dead and based on an ancient tech that is no longer relevant. Hacker kits come out 10x faster. AV is a meaningless system. I use phones, flip phones without GPS. I use my samsung phone if I want internet and buy a new one every 2 weeks.”
Although the use of anti-virus software still has its place in providing a defence-in-depth security strategy, more effective controls are available such as software restrictions; i.e. Application whitelisting. Application whitelisting works by systems administrators listing which applications are permitted to run on the host, any other applications/processes will be stopped from executing. This can take some time to setup, however once this is configured it can help to secure systems against malicious programs being executed.
[UPDATE: I’ve included this update to point out that secure coding is vital to the security of the e-commerce website. If a coding vulnerability is exploited, a threat actor can alter the payment flow to start capturing CHD.]
File Integrity Monitoring (FIM)
Requirement 11.5 includes provision for FIM which should alert staff if critical files change, or if files are written to sensitive areas. This can be used to alert staff of a potential compromise by flagging if critical system files are modified / deleted, software configuration files are modified / deleted or if new files are written to areas where they shouldn’t be. These types of activities can be indicative of a potential compromise and allows the entity the opportunity to investigate the source of the alert, thus limiting their exposure. If cloud CMS solutions are used, consider complimenting the solution with some commercial plugins to support FIM.
Logging
The ability to adequately log, track and alert on security events is an important requirement for an organisations ability to respond to a cyber incident. Adequate logs are necessary to obtain a picture of what has happened, how it happened, when it happened and what data is at risk. The ability to answer these questions are important, especially if an ADC occurs. All this information can be used by the payment brands to determine any ADC fines (see my previous post) so it is important that all the necessary information is available to aid in this investigation. Although SAQ A includes requirement 12.10.1, which is to have an incident response plan (IRP), none of the logging requirements from Requirement 10 are in scope, therefore this post breach investigation will be extremely difficult.
It is also worth noting here that the updated data protection law, the GDPR (General Data Protection Regulation) and the DPA 2018 (Data Protection Act 2018) include requirements for entities to contact their Supervisory Authority (SA) within 72 hours of noticing a breach. This requirement is only needed if the breach involves data subjects’ data, therefore it is important for an organisation to not only have a good IRP, but also to have adequate logging in place to aid the investigation process. A complete understanding of the facts will help the organisation understand what has happened, how long it’s been happening and also what, if any, data is at risk. Armed with this information, the organisation is able to manage the incident more effectively, put in place any necessary data subject protections (i.e. fraud detection checking), handle the press more constructively to minimise the negative impact to the company and finally ensure communication to the SA is productive.
ASV
ASV (Approved Scanning Vendor) refers to an external vulnerability scan. These scans must be conducted by a PCI SSC Approved ASV company providing the external vulnerability scan against a scope which is defined by the merchant/service provider. As most of you will be aware, Requirement 11.2.2 which cover the ASV requirements are missing from SAQ A. Bearing in mind that SAQ A isn’t just for e-commerce payment channels, it makes sense that Requirement 11.2.2 isn’t applicable where all payment functions are outsourced to a third-party; for example, a third-party contact centre.
The purpose of the ASV is to identify weaknesses from an external attack vector. Due to the nature of their functionality, e-commerce environments are exposed to the Internet. It is therefore imperative that these environments are scanned regularly for software issues, configuration issues, default/weak credentials and outdated software. Since ASV isn’t a requirement, general external infrastructure and web application scanning products could be used, some of which can offer a continual scanning service to help identify issues.
My Ramblings
I can see how one can get carried away when looking at security measures to help protect an environment from the myriad of threats faced by many organisations. The SAQs are developed based on an analysis of the threat landscape and an analysis of post forensic investigations conducted by PFI Investigations. The SAQs (apart from D) are developed with small businesses in mind with specific types of environments for taking card payments. These SAQs are there to simplify PCI DSS for these entities whilst still providing a level of security which should mitigate the majority of threats faced by these organisations.
For me, this latest update could have gone a little further to help further secure this type of payment channel. My discussions above touch on some additional security controls that I believe would make this channel more secure, as well as helping organisations deal with post compromise activities. As discussed, ADC fines are based upon the number of cards deemed at risk, without adequate logging capabilities it will be extremely difficult to provide assurances as to when the compromise occurred and exactly what data is at risk. Additionally, there are now GDPR obligations which will require adequate logging, monitoring and alerting capabilities. One of the six data protection principles within Article 5 of the GDPR is the ‘integrity and confidentiality’ principle which states:
Personal data shall be processed in a manner that ensures appropriate security of the personal data, including protection against unauthorised or unlawful processing and against accidental loss, destruction or damage, using appropriate technical or organisational measures (‘integrity and confidentiality’).
Organisations are responsible for, and able to demonstrate compliance with the six data protection principles defined within Article 5(1) and is detailed under ‘accountability’ within Article 5(2).
If aligning against SAQ A, consider the discussion above and look to bolster the security controls applied to this environment. Although you will not be assessed against these additional controls, it will further secure the environment and thus reduce the risk of a compromise.
On a final note, I purposely didn’t include Penetration Testing within the main body of this post. My reasoning for this is because Penetration Testing should be part of an organisations overall security program which should be carried out at least annually. This should be done against the entire organisation, regardless of PCI DSS obligations or not.