The Evolution of Magecart Attacks
Where
Common Ground
BSides Las Vegas
Duration
26 min
Shows how Magecart attackers hide skimming code, evade scanners and smuggle card data out of e-commerce checkout pages.
Summary
Magecart, also called web skimming or formjacking, is an attack where malicious JavaScript is injected into a website, usually an e-commerce checkout page, to capture payment details as shoppers type them. The speakers explain why it is hard to spot: the code is served by the site itself, so every session is affected, and the page keeps working normally, so victims notice nothing. Infection typically happens either through a vulnerability or leaked credentials on the site itself, or through a compromised third-party vendor script.
The middle of the talk covers how attackers hide their code. Techniques include obfuscating variable names and control flow, abusing trusted services such as tag managers, loading the real payload from a separate request, or hiding it inside a CSS file or an image, and using anti-debugging checks that wipe traces when developer tools are open. For exfiltration, the talk covers encoding or encrypting stolen data, sending it over WebSockets, embedding it in image or link requests, messaging it through a Telegram channel, staging it in browser storage until the next page, and fake overlay forms that imitate a payment iframe.
The closing section reviews defenses. Content Security Policy and subresource integrity help but are hard to maintain and do not cover malicious code inside a legitimate third-party script. External scanners can miss code that runs only in some sessions, while runtime protections running in the page can watch for suspicious interactions with payment fields. The takeaway is that checkout pages need monitoring of what scripts actually do in real sessions.
Related talks
Cryptocurrency Village·46 min
Philip Werlau · Kennashka De Silva
Surveys how Web3 users, dApp frontends, and smart contracts get compromised, then walks through the forensics of the $1.5 billion Bybit theft.
Main Stage·18 min
Yaniv Menasherov
Maps how e-commerce scalper bots combine fake accounts, exposed catalogue APIs and stock watchers to buy hot releases before real customers can.
Talks·29 min
Explores cloaking techniques used to conceal malicious web content delivery from scanners and other viewers.


