Connect with our team of offensive security, AI security and pen testing experts at Black Hat Europe 2023. Learn More

Connect with our team of offensive security, AI security and pen testing experts at Black Hat Europe 2023. Learn More

Managed Detection & Response

Eradicate cyberthreats with world-class intel and expertise

Managed Security Services

Expand your team’s capabilities and strengthen your security posture

Consulting & Professional Services

Tap into our global team of tenured cybersecurity specialists

Penetration Testing

Subscription- or project-based testing, delivered by global experts

Database Security

Get ahead of database risk, protect data and exceed compliance requirements

Email Security & Management

Catch email threats others miss with layered security & maximum control

Co-Managed SOC (SIEM)

Eliminate alert fatigue, focus your SecOps team, stop threats fast, and reduce cyber risk

Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
The Trustwave Approach
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Platform
SpiderLabs Fusion Center
Security Operations Centers
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

Anyone Can Check for Magecart with Just the Browser

In the past, there have been plenty of articles and blog posts recommending the use of Content Security Policy (CSP) and Sub Resource Integrity (SRI) to prevent the insidious skimming malware from taking hold of a website. However, what can a small business owner do if resources are limited and implementing these countermeasures is just not feasible? What can a normal everyday user do to check and see if their favorite shopping site is compromised? In this blog post, I will go over a few steps that don’t require any security training to perform.

Step 1 – Scan with




Put in the URL or hostname that you want to check, then run the Public Scan. Here’s what I got when I put in



The part we want to look at is in the lower left corner where the Domain & IP information is located.



This section shows all the IPs and domains of all the requests performed on this website. We see that most of the requests are from the same domain as the site (ASMALLORANGE) and there are some from Google and Facebook. However, there is one that we don’t recognize. This could simply be an externally loaded ad or resource, but we’ll need to dig deeper to find out.



Step 2 – Checking the scripts

Clicking over to the IP Detail tab shows us that the request is from the domain,, located in France. Let’s take a look at what exactly was getting loaded on the site by click on the HTTP tab on top. To the right of the HTTP tab are filters for various file types. Click on Script to view only Javascript files.



At the bottom, we see that the file loaded is ‘bumperworksonline.js’. In normal circumstances, this script file would be loaded from the same domain as all the other script files.  This is a big red flag. Clicking on Show Response, we see an obfuscated Magecart script.

So, now that we’ve found the skimming script, we’re done here, right? Not so fast. The skimmers can hide in other existing files as well. Take this normal looking credit card validation script for example:



Even though the file is served by the same host as the website itself it can still be compromised. If we view the response and scroll down, we see yet another skimmer script.

Those who have read the Fortinet blog should recognize the skimmer as Inter. It is a common kit that is highly customizable and sold in the underground. Fortunately for us, this version of it is typically not obfuscated at all and provides some useful information. As further evidence that this script is malicious, we can look into the ‘Gate’ field which contains the exfiltration URL.



Step 3 – Lookup the exfiltration URL

Now we just take the IP/domain and do a WHOIS lookup. Any of the online WHOIS sites will do. Here is what I got from



Looks like the credit card numbers are going to a server in Hong Kong. As for the other script, all we need to do is take the decoder function and run it to see the decoded strings. We can use to do this and here is the result:

Screen Shot 2019-11-26 at 5.30.15 PM


On the right, we can see the exfiltration URL as ‘’.



Throughout my research, I’ve seen many skimming domains get taken down. However, it is ultimately a game of whack-a-mole because new domains get created all the time. The only reliable way of preventing Magecart is to detect, fix, and harden the security of websites. There are currently a few tools online that can help with these three steps:





I hope that by providing a simple means of detecting it, more people can take action and do what is necessary to stop Magecart.


Additional Reading

Magecart - An Overview and Defense Mechanisms
Digging Deep Into MageCart Malware
Digging Deep Into MageCart Malware Part II


Latest SpiderLabs Blogs

The 2023 Retail Services Sector Threat Landscape: A Trustwave Threat Intelligence Briefing

The annual holiday shopping season is poised for a surge in spending, a fact well-known to retailers, consumers, and cybercriminals alike. The latter group, however, is poised to exploit any...

Read More

Pwning Electroencephalogram (EEG) Medical Devices by Default

Overall Analysis of Vulnerability Identification – Default Credentials Leading to Remote Code Execution During internal network testing, a document was discovered titled the “XL Security Site...

Read More

Hidden Data Exfiltration Using Time, Literally

I was looking at my watch last week and my attention was moved towards the seconds over at the right of the watch face, incrementing nicely along as you’d expect. Now, I don’t know if I’d just spent...

Read More