Attacco Magecart Hacker

Estimated reading time: 6 minutes

Every day we hear about some new technology threats or vulnerabilities. Lately we talk about the data collection attack known as “Magecart”. Let’s try to understand what it is and how we can do to defend ourselves.

Magecart is a large group of hackers as well as a typical attack that mainly targets online shopping carts. This type of attack has become very common in recent years.

What is the Magecart attack?

Gli hacker di Magecart di solito prendono di mira i negozi online sviluppati con Magento CMS e mirano a rubare le informazioni della carta di credito dei clienti. Questo tipo di attacco è anche conosciuto come supply chain attack, web skimming o e-skimming. Il codice JavaScript iniettato nel sorgente durante l’attacco è solitamente chiamato anch’esso Magecart.

The experts of cyber security noticed this activity of the criminal group in 2010, even though Magecart is become very well known recently. For over 10 years of observation, the Magecart attack has been detected about 2 million times. Since 2010, Magecart is responsible for hacking more than 18,000 hosts. By driving the malicious code, the criminals used 573 domains with about 10,000 download links with Magecart malware.

Today, researchers are reporting a new series of Mageсart attacks. Criminals have changed tactics and automated attacks. Now they are looking for badly set targets to infect the websites and JavaScript files they can reach. Since April 2019, cybercriminals have compromised over 17,000 domains by publishing JavaScript code (also called “ skimmer “) on these websites.

According to Computerweekly , Magecart attacks on online retailers increased by 20% during the COVID-19 pandemics.

Magecart Javascript attack

How the Magecart-attack works

data skimming attacks such as Magecart typically follow a well-established pattern. They must achieve three things to be successful.

1. Go to the site

There are typically two ways attackers gain access to the website and place the skimming code. They can break into your infrastructure or server and put the skimmer there. Or, they’ll go to one of your third-party vendors, especially if they’re an easier target, and infect a third-party tag that will execute a malicious script on your site when invoked in the browser.

2. Collect sensitive information

There are many different ways in which groups can capture data, but the skimming code is almost always a JavaScript script that listens to personal information and collects it. We have seen an approach in which they monitor all keystrokes on a sensitive page or even interception of input in specific parts of a webform such as the credit card and CVV fields . Generally, attackers hide malicious code inside other code, which appears benign, to avoid detection.

3. Send the data to a server

This is the simplest part of the whole process. Once the hackers have access to your website and collect the data they want, the game is over. They can send information from end-user browsers to almost any place on the Internet.

Magecart Card attack

The current state

As we have already mentioned, the Magecart attack is mainly distributed via malicious JavaScript code injected into downloadable plugins or add-ons for Magento online stores. Lately, attackers have started using banner ads to distribute skimmers .

In 2019, during a lightning attack, cybercriminals hacked nearly 1000 e-commerce sites in just 24 hours , proving that they didn’t act manually, but instead used automated tools. Most of the resources affected were small e-shops, although they also include several large companies.

The skimming script was used to steal information from online store visitors, specifically, their bank card details, names, phone numbers and addresses. Then the script records all data entered on payment pages and stores them in the browser until the victim refreshes the page or switches to another tab. The stolen data is then sent to a server controlled by the cybercriminals.

How to deal with the situation

The problem with Magecart is that there is a lot of confusion when it comes to actually protecting these web-based card skimming attacks. For example, auditing of a website on a regular basis cannot stop the attacks, as the problem comes from third party tags, which auditing will not detect.

The advice for IT teams is to take a zero-trust approach with JavaScript on their sites, starting with a policy to block default access to any sensitive information placed in web forms and stored cookies. From there, you only allow a select set of controlled scripts (usually your own) to access sensitive data. And as a result, if this type of skimming code enters the site, it simply cannot access any of the sensitive information.

The advice for IT teams is to take a zero-trust approach with JavaScript on their sites, starting with a policy to block default access to any sensitive information placed in web forms and stored cookies. From there, you only allow a select set of controlled scripts (usually your own) to access sensitive data. And as a result, if this type of skimming code enters the site, it simply cannot access any of the sensitive information.

Magecart Hacker Attack

How to actively protect yourself

To protect your company from Magecart attacks, take a complete inventory of your digital assets using our CTI service . Next, find all possible web and mobile applications, set a security score for each of them, and show which apps are to be fixed and secured. The service can also search the Dark Web, cloud archives and code repositories for all possible data leaks.

The approach adopted is proactive and is based on looking for compromises before they have occurred. This approach, which actively manages the attack surface and scans the dark web, allows for a complete view of the security status of the digital system.

After a complete inventory you can proceed with a Penetration Test to verify the situation and protect your company from any security threats. The Magecart attack, as well as other more modern attack methods that cybercriminals are constantly inventing, can only be countered with this kind of proactive approach, keeping your guard up.

If you have any questions or would like to know how our services can secure your business, please do not hesitate to contact us.

Useful links:

Cos'e' il phishing - Cover

Estimated reading time: 7 minutes

Phishing is a type of social engineering attack often used to steal user data, including login credentials and credit card numbers . Occurs when an attacker, disguised as a trusted entity , tricks a victim into opening an email, instant message, or text message.

The recipient is then tricked into clicking on a malicious link, which can lead to malware installation , system freezing as part of an attack ransomware or the disclosure of sensitive information.

An attack can have devastating results . For individuals, this includes unauthorized purchases, fund theft or identity theft.

What is phishing - Concept

What is Phishing for Business?

Even more damaging, phishing is also used to gain an entry point into corporate or government networks as part of a larger attack , such as a persistent advanced threat event (APT – Advanced Persistent Threat). In the latter scenario, employees are compromised in order to bypass security perimeters , distribute malware within a closed environment, or gain privileged access to protected data.

An organization that succumbs to such an attack typically suffers severe financial losses, as well as a decline in market share, reputation and consumer confidence. Depending on the scope, a phishing attempt could escalate into a security incident that a company will have difficulty recovering from .

What a phishing attack looks like

Knowing what phishing is often isn’t enough to protect yourself . The best thing to do is work on resilience to attacks and understand how to spot them before falling victim to them.

As we mentioned earlier, the consequences can be enormous. But, if it seems simple to do when it comes to a single individual, what if there is an entire company to protect? SOD offers a service geared towards just that : train entire companies to recognize and mitigate the risk of phishing attacks.

Through a first controlled attack, we are able to understand which are the points to work on . Subsequently, training proposals for employees are organized. They are taught how to recognize threats before they become problematic. To find out more, visit the service page .

But let’s see what a generic attack looks like.

Attack example

1. A bogus email ostensibly from myuniversita.edu is being distributed en masse to as many faculty members as possible.

2. The email claims that the user’s password is about to expire . Instructions are given to go to the myuniversita.edu/rinnovo link to renew their password within 24 hours.

Various things can happen by clicking on the proposed link.

The user is redirected to myuniversita.edurinnovo.com , a fake page that looks exactly like the real renewal page, where both the new password are requested than the existing one. The attacker, monitoring the page, hijacks the original password to – gain access to secure areas of the university network.

– The user is sent to the real password renewal page. However, while being redirected, a malicious script runs in the background to hijack the user’s session cookie. This results in a Cross Site Scripting attack, giving the author privileged access to the university network.

What is phishing - Concept

Logic of an attack

Email phishing is a big game . An attacker who sends thousands of fraudulent messages can obtain significant information and sums of money, even if only a small percentage of recipients fall into the scam .

Hackers go to great lengths to design messages for a phishing attack by mimicking real emails from a disguised organization. Using the same phrasing, the same typefaces, the same logos and the same signatures, the messages appear legitimate .

Also, another thing to watch out for is that attackers usually try to push users into action by creating a sense of urgency. For example, as shown above, an email could threaten account expiration and put the recipient in urgency . Applying this pressure leads the user to be less diligent and more prone to error.

Finally, the links within the messages resemble their legitimate counterparts, but typically have a misspelled domain name or extra subdomains. In the above example, the URL myuniverist.edu/rinnovo has been changed to myuniversita.edurinnovo.com . The similarities between the two addresses give the impression of a secure connection , making the recipient less aware that an attack is in progress.

What is spear phishing

What is phishing - Spear phishing

Spear phishing targets a specific person or company , as opposed to casual users. It’s a more in-depth version of phishing that requires special knowledge of an organization, including its power structure.

An attack could take place like this:

– A hacker searches for employee names within an organization’s marketing department and gains access to the latest project invoices.
Posing as the director of marketing , The attacker sends an email to a project manager in the department using a subject that says: Updated invoice for Q3 campaigns . The included text, style, and logo duplicate the organization’s standard email template.
– A link in the email redirects to a password-protected internal document, which is actually a forged version of a stolen invoice .
– The marketing director is required to login to view the document. The attacker steals his credentials , gaining full access to sensitive areas within the organization’s network.

By providing the attacker with valid login credentials, spear phishing is an effective way to carry out the first phase of a ransomware attack.

What is whale phishing

whale phishing , or whaling , is a form of spear phishing that targets very big fish: CEOs or other high-value targets . Many of these scams target members of a company’s board of directors, who are considered particularly vulnerable. Indeed, they have great authority within the company, but because they are not full-time employees, they often use personal email addresses for business-related correspondence , which does not have the protections offered by email business.

whale phishing , or whaling , is a form of spear phishing that targets very big fish: CEOs or other high-value targets . Many of these scams target members of a company’s board of directors, who are considered particularly vulnerable. Indeed, they have great authority within the company, but because they are not full-time employees, they often use personal email addresses for business-related correspondence , which does not have the protections offered by email business.

How to defend yourself

Protecting against a phishing attack requires action by both users and businesses.

For users, vigilance is the key . A forged message often contains subtle errors that expose its true nature. These can include misspellings or changes to domain names , as seen in the example of the preceding URL. Users should be wondering why they are receiving a certain email .

What is phishing - Defense

For businesses, a number of measures can be taken to mitigate both phishing and spear phishing attacks:

Two-factor authentication (2FA) is the most effective method of thwarting phishing attacks, as adds an extra layer of verification when accessing sensitive applications . 2FA is based on users having two things: something they know , like a password and username, and something they have with them , like their smartphone . Even when employees are compromised, 2FA prevents the use of their compromised credentials, as these alone are not enough to get in .

In addition to the use of 2FA, companies should apply strict password management policies . For example, employees should be required to change their passwords frequently and not be allowed to reuse a password for multiple applications .

Finally, educational campaigns can also help decrease the threat of phishing attacks by enforcing safe practices , such as not clicking on external links to emails. In this regard, I would like to mention the ethical phishing service of SOD , which has the very intent of testing the company and organizing targeted training to mitigate the risks .

It’s not enough to know what phishing is, you also need to know how to recognize it.

Useful links:

Phising

Mitre Att&ck

Double extortion ransomware

Customers

Newsletter

{subscription_form_1}