Between 14 August and 18 September 2018, the billing page at secure.newegg.com carried a payment skimmer. It ran for roughly 35 days, and it was found by two external research firms — RiskIQ and Volexity — rather than by Newegg.
The attack has been attributed to Magecart Group 6, the same group behind the attacks on British Airways and Ticketmaster. What makes this one worth reading alongside those is that the code had been refined in between.
Volexity's analysis compared the payload directly with the one used against British Airways. It had been cut down to a fraction of the size, and it did the same job.
The mechanics are worth understanding because there is nothing clever about them. The script bound itself to the checkout button and listened for both mouseup and touchend — deliberately covering desktop and mobile, so no customer was missed. On either event it serialised every field on the payment form, converted it to JSON, and posted it to a server the attackers controlled.
That is the whole attack. No exploit chain on the page, no obfuscation worth the name. Eight lines that ran on a checkout for five weeks.
The exfiltration domain, neweggstats.com, was registered on 13 August 2018 — the day before the skimmer went live. On the same day the attackers obtained a TLS certificate for it, so the stolen card data left the browser over a properly encrypted connection to a host with a valid certificate.
It is worth being blunt about what that means. Every automated check of the transport was satisfied. The connection was encrypted, the certificate was valid, and the browser showed nothing unusual. Encrypted says nothing about authorised. The question that mattered was not whether the connection was secure, but whether that destination had any business receiving a customer's card details — and nothing on the page was asking it.
This is the point at which the attack was detectable from the first day rather than the thirty-fifth. A checkout page that had never sent data to neweggstats.com started sending data to neweggstats.com. Nothing else about the page changed in a way a person would notice.
That is exactly the signal Data Watch exists to raise: not "is this connection encrypted", but "is this a destination this page has ever used before". A new host receiving form data from a payment page is a small number of alerts, and it is the alert that matters.
This is also the class of attack a Content Security Policy stops outright. A connect-src directive scoped to the hosts a checkout legitimately talks to would have refused the request, and the skimmer would have collected nothing for five weeks while telling us it was there.
You don't need a mature Content Security Policy to benefit from our tooling. To use Script Watch or Data Watch, you can start auditing the JavaScript running on your pages, and the destinations receiving data from them, with a single line of code or config.
Once that is deployed we establish a baseline for your site, and then alert you to anything that changes. The most damaging feature of a Magecart attack is rarely its sophistication — it is how long it runs before anybody notices. Reach out to sales@report-uri.com if you would like a demo or a trial with no commitment.
One header. No code. Your script inventory starts populating from the first visitor.
30-day free trial · One header · No code · Cancel anytime
Script Watch will monitor all JavaScript dependencies across your entire site and immediately notify you of any changes. A new JavaScript dependency could be the start of a Magecart attack.
Because Script Watch leverages the browser native Content Security Policy, there is no code or agent to deploy and running in the browser means we analyse your site in real-time as your users are browsing. We don't have the same limitations as external scanning services such as authentication or pay walls, geo-sensitive content or an attacker potentially serving safe content to the crawler.
Data Watch will monitor all of the locations that your webpages are sending data to. If your website starts sending data to a new location, it could be the start of a Magecart attack.
With Script Watch and Data Watch combined, you can monitor for clear indicators that your site has been compromised. Attackers will always want to inject their hostile JavaScript, and they'll always want to exfiltrate their stolen data.
We often find that creating a CSP is the first difficult step that organisations face. Having a complete list of all resource dependencies across your entire site like images, scripts or styles, from both 1st-party and 3rd-party locations, is tough to achieve.
The CSP Wizard was created to solve this problem, and in seven days or less, it can give you a complete list of all resources used across your entire site.
With the list of all resources you use on your site, and our easy-to-use tool, creating a viable Content Security Policy is easier than ever with just a few clicks.
All Content Security Policies will need to be tweaked at some point. New resources may be added to the site or old resources removed, and the policy needs to be updated to reflect those changes and kept up to date.
You can import your existing policy into the CSP Builder and use our fully featured tool to make any changes that you require right there in the UI. When you're done, hit Generate, and the CSP Builder will provide you with your new, updated policy.
Script Watch and Data Watch will allow you to rapidly detect and respond to a Magecart attack and combined, that capability puts you ahead of the field. If you want to take it a step further, Content Security Policy can mitigate a Magecart attack and stop it from even happening.
Deploying an effective Content Security Policy can be difficult, but our CSP Reporting allows you to gather feedback and safely test a policy before deployment. Once deployed, an effective Content Security Policy will block a Magecart attack and stop the hostile JavaScript from even running.
We subscribe to various feeds of Threat Intelligence data, along with managing our own internally generated feeds, to keep apprised of the latest threats that exist online.
Using this Threat Intelligence Data, we can better analyse the sources of JavaScript on your website and detect malicious activity sooner.