PCI SSC Online Skimming Blog Post

On the 1st August 2019, the PCI Security Standards Council (PCI SSC) released a new blog post called “The Threat of Online Skimming to Payment Security” and a PCI SSC bulletin “THE THREAT OF ONLINE SKIMMING TO PAYMENT SECURITY” discussing the emerging threat of online skimming.

There have been many high-profile e-commerce compromises, especially ones linked to the Magecart “Skimming” attacks discussed within the PCI SSC released blog/bulletin.  Some companies hit by this attack include; British Airways, Ticketmaster, OXO, Feedify and Newegg.

So, what is Magecart?

Magecart is a term being used to describe an attack involving the use of malware within a website that is used to skim cardholder information being submitted by the end-user.  The aim is to use the malware to skim end-users card details and any other personal information that can be used to facilitate online payments.  The malicious code could be added directly to the e-commerce site through a site compromise or can be included as part of a compromised third-party script that is loaded by the e-commerce site.  Often, third-party scripts are added to e-commerce sites to perform functionality such as; advertising, live chat functionality, web tracking functionality, etc.

Although Magecart is being used to describe this specific type of attack, Magecart is also a term given to the cybercriminal group responsible for these types of attacks.  According to the ‘Inside Magecart: Profiling the Groups Behind the Front Page Credit Card Breaches and the Criminal Underworld that Harbors Them’ joint research paper by RiskIQ and Flashpoint, this term is used to encompass at least seven cybercriminal groups using this technique of utilising card skimmers on compromised e-commerce sites.

The RiskIQ / Flashpoint paper identifies the first Magecart group emerging in 2015, however acknowledges that it may have been active since 2014 based on when domain names used by the group were created.

There are some key points for this type of attack;

  1. iframe and redirect payment techniques are less susceptible to this type of attack, if cardholders are using compliant web browsers.  This attack relies on the malicious JavaScript (JS) being able to interact with the payment information to skim this information during the payment journey.  Within an iframe, the ‘Same Origin Policy (SOP)’ ensure the JS cannot interact with the iframe, providing a compliant web browser is used by the cardholder.  For the JS to be able to manipulate iframe/redirect payment functionality, the payment journey would need to be manipulated to allow for the payment to still succeed. There is still a risk of compromise of CHD (Cardholder Data) from iframe and redirect payment functionality and therefore organisations may look to go above and beyond SAQ A as discussed in one of my previous posts “Why the PCI DSS Version 3.2.1 SAQ A update isn’t enough!”.
  2. Where a Direct Post, JavaScript or API payment technique is used to process the payment, entities should not remotely load any scripts into the payment page.  CSP (Content Security Policies) should be used to restrict this to protect from compromised third-party scripts or scripts hosted in less secure environments.  CSP can be used to also white-list trusted sources, however the recommendation would be to keep all scripts on the e-commerce site which can be validated by the entities staff before being uploaded to the site.
  3. FIM should be used to detect changes within the e-commerce source code to help identify the inclusion of malicious code.
  4. The PCI SSC released article suggests that where externally hosted third-party scripts are included within the e-commerce payment flow, these third-parties should be classed as PCI DSS Service Providers.  This does meet the “or can impact upon the cardholder data or CDE” caveat of a Service Provider (See Third-Party Service Providers) therefore this needs to be seriously considered by all organisations running e-commerce websites.  The only possible exception to this could be for iframe/redirect functionality as the use of third-party scripts shouldn’t have access to the contents of the iframe. It is however worth confirming this with the Acquirer or card brand since scripts loaded into the parent page could be feasibly used to alter the payment flow.

My Final Ramblings

A lot of the advice within the PCI SSC blog post should be implement as part of PCI DSS as these attacks would realistically only work (and be sustainable) against Direct Post, JavaScript and API e-commerce payment channels.  These types of channels will align against either SAQ A-EP (Self-Assessment Questionnaire) or SAQ D whose PCI DSS requirements cover the points within the PCI SSC Magecart Bulletin’s Detection and Prevention best practices sections.

Additionally, my previous post; “Hacking E-Commerce Payment Channels” discusses a lot of these points.

It is worth noting that iframe and redirect payment channels are deemed by the PCI SSC and Card Brands as lower risk thank the other e-commerce payment techniques, they still need to be adequately secured.  These e-commerce sites can still be compromised and modified to expose cardholder data.  For me, the main difference is that it is much harder to compromise the site and maintain the payment functionality. In 2016, Foregenix released an alert entitled “Major UK Payment Service Provider iFrame Man-In-The-Middle Breach” that demonstrated an attack which compromised an iframe deployment, whilst still being able to facilitate a payment proving that a determined attacker could feasibly maintain the payment functionality.

It is therefore important to consider security of iframe/redirect deployments as you would any other website within the organisation.  This is something I touch upon within the following blog article; “Why the PCI DSS Version 3.2.1 SAQ A update isn’t enough!”