What happened
Website supplier
- 1
Unapproved writers change website files
From early April 2019RiskIQ observed changes to existing website scripts in S3 buckets that permitted anyone to write. The unauthorized changes added payment-skimming code.
- 2
Dependent websites deliver the changed files
During the campaignWebsites that depended on the changed scripts delivered the altered code to visitors. RiskIQ found that many of the scripts were used away from payment pages.
Impact
RiskIQ linked modified scripts to more than 17,000 domains. The report gives no count of stolen cards.
Could this have been prevented?
Separate permission to publish a script from permission to read it
A public script can stay readable while its S3 bucket policy limits changes to approved publishers. Website operators can separately review which third-party scripts their checkout pages accept.
Incident control assessments
- 1
- Prevented
- 0
- Contained
- 1
- Not covered
How it could have been prevented
The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.
Website supplier
1 · Unapproved writers change website files
1 Prevented2 · Dependent websites deliver the changed files
1 Not coveredKey facts
- RiskIQ traced the campaign back to early April 2019.
- The affected buckets let unapproved writers change existing files.
- RiskIQ counted more than 17,000 affected domains.
- Many affected scripts did not load on checkout pages.
Sources
Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.
- 1.Magecart Breaches Websites Via Misconfigured Amazon S3 BucketsRiskIQ, Yonathan Klijnsma · Jul 10, 2019 · ResearchFirsthand campaign telemetry, unrestricted write access, modified site assets and limits on checkout exposure.
- 2.Magecart: The State of a Growing ThreatRiskIQ · Oct 4, 2019 · ResearchThe monitored campaign began in early April 2019 and affected more than 17,000 domains.
- 3.Bucket policies for Amazon S3Amazon Web Services · undated · Vendor reportResource policies can control which principals may read or write specified objects.
- 4.Policy evaluation logicAmazon Web Services · undated · Vendor reportAn applicable explicit denial takes precedence over an allow.
The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.