Hacking E-Commerce Payment Channels

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).

Both Troy Hunt and John Elliott have produced an excellent video on Pluralsight on ‘Defending against JavaScript keylogger attacks on payment card information’ {Note: At the time of writing you could get a 10-day trial, however you do need to submit payment options and cancel}.

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.