Tuesday, February 11, 2025
Home Blog Page 3

SHA256 Hash Calculation from Data Chunks

SHA256 Hash

The SHA256 algorithm, a cryptographic hash function, is widely used for securing data integrity and authenticity.

It processes input data in fixed-size chunks of 512 bits (64 bytes) and produces a unique 256-bit (32-byte) hash.

This property allows for incremental hashing, where data is processed in smaller chunks without requiring the entire dataset to be loaded into memory.

Such functionality is particularly beneficial for systems with limited resources, such as embedded devices or when handling large files.

Incremental hashing works by maintaining an internal state that updates with each chunk of data processed.

This state ensures that the final hash value remains consistent regardless of whether the data is hashed all at once or in smaller segments.

The algorithm’s design makes it impossible to combine partial hashes into a complete one, preserving its security against length-extension attacks.

Technical Workflow of SHA256

The input message undergoes preprocessing to ensure its length is a multiple of 512 bits.

Padding is applied, starting with a single ‘1’ bit followed by zeros, and the original message length is appended as a 64-bit value.

This ensures compatibility with the algorithm’s block-based processing.

According to the researchers, each 512-bit chunk is divided into 16 words of 32 bits each.

These words are expanded into 64 using logical operations such as bitwise shifts and XORs.

The algorithm then performs 64 rounds of computations using these words, constants derived from prime numbers, and eight working variables initialized with predefined values.

The operations include:

  • Logical functions like AND, OR, XOR, and NOT.
  • Modular addition to ensure results fit within 32 bits.
  • Right rotations and shifts to introduce non-linearity.

At the end of each round, the working variables are updated based on the results of these operations.

If multiple chunks are processed, the output hash values from one chunk serve as the input for the next.

After all chunks are processed, the eight working variables are concatenated to produce the final 256-bit hash value.

This value serves as a digital fingerprint of the input data and cannot be reversed to reveal the original content.

Applications and Advantages

Incremental hashing is particularly useful in scenarios where memory constraints or large datasets make it impractical to process all data at once.

Examples include:

  • Verifying file integrity during streaming or transmission.
  • Hashing firmware updates in embedded systems.
  • Blockchain applications where transactions are hashed incrementally.

Libraries implementing SHA256 typically provide functions like update for processing chunks and finalize for generating the final hash.

This approach ensures efficiency and consistency across various use cases.

Are you from SOC/DFIR Team? - Join 500,000+ Researchers to Analyze Cyber Threats with ANY.RUN Sandbox - Try for Free

New Report of of 1M+ Malware Samples Show Application Layer Abused for Stealthy C2

Application Layer

A recent analysis of over one million malware samples by Picus Security has revealed a growing trend in the exploitation of application layer protocols for stealthy command-and-control (C2) operations.

These findings, detailed in the Red Report 2025, underscore the increasing sophistication of cyber adversaries who leverage widely used protocols to evade detection and maintain persistence in target environments.

Application Layer Protocols: A Key Enabler for Modern Malware

The application layer, the topmost layer of the OSI model, is critical for enabling communication between software applications across diverse platforms.

Adversaries exploit this layer by embedding malicious commands and data within legitimate traffic, effectively blending their activities into routine network communications.

This tactic is mapped to MITRE ATT&CK Technique T1071 and its sub-techniques, which cover various protocols such as HTTP/S, DNS, FTP, and WebSockets.

The report highlights that adversaries increasingly prefer application layer protocols due to their ubiquity and inherent trust.

For example, HTTPS traffic is encrypted, making it difficult for traditional security tools to inspect malicious payloads.

Similarly, DNS tunneling and WebSockets provide continuous communication channels that are hard to distinguish from legitimate activity.

Case Studies: Malware Leveraging Application Layer Protocols

Several notable malware campaigns from 2024 illustrate how these techniques are being operationalized:

  1. WezRat Malware: This malware uses HTTPS for encrypted C2 communication. By disguising its traffic as legitimate web requests, WezRat exfiltrates data and fetches commands without triggering alarms.
  2. Glutton Malware: Operating over HTTP, this modular malware polls C2 servers using standard GET/POST requests to download additional payloads. Its reliance on clear-text HTTP allows it to mimic routine web traffic while embedding malicious commands.
  3. RevC2 Backdoor: Leveraging WebSockets, RevC2 establishes a full-duplex communication channel with its C2 server. This persistent connection enables real-time data exchange while evading detection tools that monitor traditional HTTP traffic.
  4. ZLoader: The latest version of this malware employs DNS tunneling for encrypted C2 communications. By encoding data into DNS packets, ZLoader bypasses conventional network defenses while maintaining a covert channel.

Picus Security analysis revealed that 93% of malicious actions observed in 2024 were preventable with existing security measures.

However, the rise in “whispering channels,” such as HTTPS and DNS-over-HTTPS (DoH), highlights the need for advanced detection tools capable of analyzing encrypted traffic without compromising privacy.

These findings emphasize the importance of adopting proactive security strategies.

Organizations must enhance monitoring capabilities for application-layer traffic and implement robust defenses against protocol abuse.

Techniques such as deep-packet inspection (DPI), behavioral analytics, and encrypted traffic analysis are critical to countering these evolving threats.

As adversaries continue to refine their methods, leveraging trusted protocols for stealthy operations will likely remain a cornerstone of sophisticated cyberattacks in the years ahead.

Are you from SOC/DFIR Team? - Join 500,000+ Researchers to Analyze Cyber Threats with ANY.RUN Sandbox - Try for Free

Seven-Year-Old Linux Kernel Bug Opens Door to Remote Code Execution

Linux Kernel Bug

Researchers have uncovered a critical vulnerability in the Linux kernel, dating back seven years, that could allow attackers to execute remote code.

The flaw, identified in the core TCP subsystem, was introduced through a race condition in the inet_twsk_hashdance function.

This issue, now tracked as CVE-2024-36904, was patched last year after being reported by security researchers.

Technical Breakdown of the Vulnerability

The vulnerability stems from a race condition between the tcp_twsk_unique() and inet_twsk_hashdance() functions.

Specifically, the issue arises because a time-wait TCP socket’s reference counter is initialized after being inserted into a hash table and releasing a lock.

If a lookup occurs before this initialization, the object is found with a zeroed reference counter, triggering warnings and potentially leading to use-after-free scenarios.

The flaw was first noticed during routine audits of the Linux kernel source code and fuzzing tests using tools like Syzkaller.

The researchers initially aimed to reproduce another known bug but inadvertently discovered this deeper issue.

They confirmed its presence in several Linux distributions, including Red Hat Enterprise Linux derivatives and Fedora.

Exploitation Potential

While Linux kernels include protections against reference counter issues, this vulnerability bypasses those safeguards under specific conditions.

If operations on the socket follow an exact sequence, the reference counter can become unbalanced, leading to premature object release and genuine use-after-free exploitation.

This could allow attackers to execute arbitrary code within the kernel context.

Proof-of-concept exploits demonstrated that this vulnerability could be triggered under controlled conditions.

However, real-world exploitation would require precise timing and understanding of kernel internals.

The vulnerability was patched upstream in May 2024. Administrators are urged to update their systems to kernel versions containing the fix.

For Red Hat Enterprise Linux derivatives and other affected distributions, applying vendor-provided patches is critical.

Allele Security discovery underscores the importance of proactive kernel auditing and patching practices.

As vulnerabilities can persist unnoticed for years, organizations should prioritize timely updates to mitigate risks associated with legacy flaws.

The CVE-2024-36904 case highlights how even long-standing vulnerabilities can pose significant security threats if left unaddressed.

Are you from SOC/DFIR Team? - Join 500,000+ Researchers to Analyze Cyber Threats with ANY.RUN Sandbox - Try for Free

Ransomware Payments Plunge 35% as More Victims Refuse to Pay

Ransomware

In a significant shift within the ransomware landscape, global ransom payments plummeted by 35% in 2024, falling from $1.25 billion in 2023 to $813.55 million, according to a report by blockchain analytics firm Chainalysis.

This marked the first substantial decline in ransomware payments since 2022, despite a record number of ransomware attacks during the year.

The decrease highlights the growing resilience of victims and the impact of intensified law enforcement actions.

Evolving Tactics Amid Disruptions

The decline in payments is attributed to several factors, including improved cyber hygiene among organizations and international crackdowns on major ransomware groups.

Notable operations included the takedown of LockBit by U.S. and U.K. authorities, which led to a 79% drop in payments to the group during the second half of 2024.

Similarly, BlackCat’s exit from the ransomware ecosystem disrupted its operations, leaving smaller groups and lone actors to dominate the space.

These newer players have targeted smaller markets with lower ransom demands, further reducing overall payouts.

Despite these disruptions, ransomware actors have adapted their strategies.

New strains emerged from rebranded or leaked code, and negotiations with victims often began within hours of data exfiltration.

However, improved organizational defenses allowed many victims to resist demands, opting for recovery through backups or decryption tools rather than paying ransoms.

Victims Increasingly Resist Ransom Demands

Chainanalysis report revealed that only 30% of victims who entered negotiations with attackers ultimately paid a ransom in 2024.

This reflects a growing distrust in hackers’ promises to delete stolen data upon payment and an increased reliance on alternative recovery methods.

Incident response data showed that final payments were often significantly lower than initial demands, with many organizations refusing to pay altogether.

Organizations are now better prepared to recover from attacks without succumbing to extortion.

For example, restoring data from recent backups has proven faster and more cost-effective than paying ransoms.

The drop in ransomware payments underscores the importance of collaborative efforts between law enforcement agencies and private-sector cybersecurity experts.

Crackdowns on laundering mechanisms, such as crypto mixers, have further limited attackers’ ability to cash out their illicit gains.

However, experts caution that ransomware remains a persistent threat as attackers continue to evolve their tactics.

While the decline in payments is encouraging, the record number of attacks in 2024 serves as a reminder that organizations must remain vigilant.

Proactive measures such as robust cybersecurity protocols, employee training, and collaboration with law enforcement will be essential to sustaining progress against ransomware threats.

Are you from SOC/DFIR Team? - Join 500,000+ Researchers to Analyze Cyber Threats with ANY.RUN Sandbox - Try for Free

NetSupport RAT Grant Attackers Full Access to Victims Systems

NetSupport RAT

The eSentire Threat Response Unit (TRU) has reported a significant rise in incidents involving the NetSupport Remote Access Trojan (RAT) since January 2025.

This malicious software, originally designed as a legitimate IT support tool, has been weaponized by cybercriminals to gain full control over victim systems.

Attackers leveraging NetSupport RAT can monitor screens, control input devices, transfer files, and execute malicious commands remotely.

If undetected, these activities can escalate to ransomware attacks, data breaches, and operational disruptions.

A notable trend in recent campaigns involves the use of the “ClickFix” Initial Access Vector (IAV).

NetSupport RAT
ClickFix Fake Landing Page

This social engineering technique tricks users into executing attacker-provided PowerShell commands via fake CAPTCHA prompts on compromised websites.

Once executed, these commands download and install the NetSupport RAT payload, enabling attackers to establish Command-and-Control (C2) connections with victim systems.

Weaponization of Legitimate Software

NetSupport RAT is a modified version of NetSupport Manager, a remote administration tool available since 1989.

While the original software is used for legitimate purposes like IT support and system management, its features make it an attractive target for abuse.

Threat actors exploit its capabilities for real-time monitoring, data exfiltration, keylogging, and deploying additional malware payloads.

The tool’s legitimate origins also help it evade detection by some security systems.

Recent campaigns have seen attackers hosting NetSupport RAT payloads on URLs disguised with “.png” extensions or other deceptive naming conventions.

Once installed, the malware establishes persistence through registry modifications and scheduled tasks. It also employs obfuscation techniques to evade analysis and detection.

Mitigation

To counter this ongoing threat, organizations are advised to strengthen their cybersecurity defenses:

  • Endpoint Protection: Deploy Endpoint Detection and Response (EDR) solutions across all devices to detect and block malicious activities.
  • User Awareness: Conduct regular training to educate employees about phishing tactics and social engineering methods like ClickFix.
  • Access Control: Limit user permissions to prevent unauthorized software installations.
  • System Hardening: Disable scripting tools such as WScript.exe and Mshta.exe via Group Policy Objects (GPO) or Windows Defender Application Control (WDAC).

eSentire’s Managed Detection and Response (MDR) services have implemented measures to detect and block NetSupport RAT activities.

These include threat hunting for Indicators of Compromise (IOCs), blocking malicious IP addresses via global threat intelligence feeds, and developing detections for ClickFix-based attacks.

NetSupport RAT exemplifies how legitimate tools can be repurposed for malicious activities.

Its widespread availability and versatility make it a preferred choice for both novice attackers and advanced persistent threat (APT) groups.

The ongoing campaigns highlight the importance of proactive security measures to mitigate risks posed by such dual-use technologies.

As cybercriminals continue to innovate with delivery mechanisms like fake browser updates and phishing schemes, vigilance remains critical.

Organizations must adopt a multi-layered security approach to detect, respond to, and prevent threats like NetSupport RAT from compromising their systems.

Are you from SOC/DFIR Team? - Join 500,000+ Researchers to Analyze Cyber Threats with ANY.RUN Sandbox - Try for Free

Quishing via QR Codes Emerging as a Top Attack Vector Used by Hackers

Quishing

QR codes, once a symbol of convenience and security in digital interactions, have become a significant target for cybercriminals.

The Rise of Fake QR Code Scams

A new form of cyberattack, dubbed “quishing,” involves the use of counterfeit QR codes to deceive users into visiting fraudulent websites, downloading malware, or surrendering sensitive information.

This emerging threat has gained traction due to the widespread adoption of QR codes in daily life, particularly during the pandemic when contactless exchanges became the norm.

Quishing attacks exploit the inherent trust many users place in QR codes.

Scammers embed malicious codes in emails, invoices, flyers, or even physical surfaces like restaurant menus and movie tickets.

When scanned, these codes redirect users to phishing websites designed to harvest login credentials or financial data.

In some cases, scanning the code initiates malware downloads that compromise devices and corporate systems.

Techniques and Implications of Quishing

Cybersecurity experts have identified several methods employed by attackers to execute quishing schemes.

One common tactic involves embedding fake QR codes in email attachments or documents that appear legitimate.

These emails often impersonate trusted entities such as banks or service providers to trick recipients into scanning the code.

Another prevalent technique includes replacing genuine QR codes in public spaces with fraudulent ones, luring unsuspecting victims into clicking malicious links.

Financial losses are a primary risk, as fake QR codes can redirect users to counterfeit payment pages that transfer funds directly to scammers.

Additionally, quishing enables data breaches by capturing personal and financial information entered on phishing sites.

Malware infections triggered by these attacks can further compromise sensitive data and disrupt operations, posing significant financial and legal risks for businesses.

According to Tripwire Report, hackers are continuously refining their strategies, leading to the emergence of “quishing 2.0.”

This advanced form of attack combines multiple layers of deception to bypass traditional security measures.

For instance, attackers may use legitimate platforms like SharePoint or trusted QR-scanning services as intermediaries before redirecting victims to malicious sites.

These layered redirects add an air of authenticity to the scam, making it harder for users to detect foul play.

To mitigate the risks posed by quishing, organizations must adopt proactive measures. Regular staff training is essential to raise awareness about identifying suspicious QR codes and verifying their legitimacy.

Implementing multi-factor authentication (MFA) adds an extra layer of security, ensuring that even if credentials are compromised, critical accounts remain protected.

Advanced email security systems equipped with dynamic URL analysis and computer vision technology can detect malicious QR codes embedded in phishing emails.

Businesses should also bolster physical security by inspecting public QR codes for tampering and encouraging manual logins over QR-based transactions when possible.

As quishing continues to evolve as a sophisticated attack vector, fostering a culture of cybersecurity awareness and vigilance is crucial for safeguarding individuals and organizations against this growing threat.

Are you from SOC/DFIR Team? - Join 500,000+ Researchers to Analyze Cyber Threats with ANY.RUN Sandbox - Try for Free

New ‘BYOTB’ Attack Exploits Trusted Binaries to Evade Detection, Researchers Reveal

BYOTB Attack

A recent cybersecurity presentation at BSides London 2024 has unveiled a sophisticated attack technique known as Bring Your Own Trusted Binary (BYOTB).

This method leverages legitimate, trusted binaries to evade detection by advanced security measures such as Endpoint Detection and Response (EDR) systems and firewalls.

The findings, presented by cybersecurity researcher David Kennedy of Jumpsec Labs, shed light on how attackers are increasingly exploiting trusted tools to conduct covert operations.

Exploiting Trusted Tools for Malicious Purposes

The BYOTB technique capitalizes on the inherent trust placed in legitimate binaries, such as Cloudflare’s cloudflared and OpenSSH utilities.

These binaries, often digitally signed and widely used for legitimate purposes, are repurposed by attackers to bypass security controls.

BYOTB Attack
Windows Machine

For instance, Kennedy demonstrated how the cloudflared binary can be used to tunnel SSH traffic over HTTPS (port 443), effectively bypassing network restrictions and evading detection by security tools like CrowdStrike EDR.

By employing commands such as cloudflared tunnel run --token YourTokenHere, attackers can establish encrypted tunnels that appear benign.

These tunnels can then be used for reverse port forwarding or SOCKS proxying, enabling attackers to exfiltrate data or maintain persistent access to compromised systems.

OpenSSH binaries were also highlighted as a means to establish remote access by deploying them alongside necessary dependencies like libcrypto.dll.

Advanced Techniques and OPSEC Considerations

Kennedy further elaborated on advanced techniques, including the use of Cloudflare’s WARP client as an alternative to traditional SSH tunneling.

This approach acts like a VPN, allowing attackers to access target networks without relying on SSH or Proxychains.

BYOTB Attack
Proxychains connections

Additionally, a “double tunnel” method was described, where attackers reroute traffic through multiple layers of tunnels to evade firewall rules that block specific ports.

Despite the effectiveness of these methods, Kennedy emphasized the importance of operational security (OPSEC) for attackers.

According to the Jumpsec Labs, overloading trusted binaries with excessive traffic or failing to conceal their presence could trigger alerts, compromising the attack.

To mitigate the risks posed by BYOTB attacks, organizations must adopt proactive monitoring and detection strategies:

  • Process Telemetry: Monitor command-line arguments for suspicious keywords like “tunnel” or “access,” which may indicate misuse of binaries like cloudflared.
  • DNS Logging: Track queries to domains associated with tunneling tools (e.g., argotunnel.com) to identify potential abuse.
  • Firewall Rules: Restrict outbound traffic on non-essential ports and monitor for anomalies in port usage.
  • File Monitoring: Detect unauthorized downloads of trusted binaries from platforms like GitHub by verifying file hashes against approved lists.

These measures, combined with regular updates to endpoint security solutions and employee awareness training, can help organizations defend against BYOTB tactics.

The rise of BYOTB attacks underscores the evolving tactics of threat actors who exploit trusted tools for malicious purposes.

By leveraging legitimate binaries, attackers can blend into normal network activity, making detection significantly more challenging.

As these techniques gain traction among cybercriminals, it is imperative for organizations to enhance their defensive capabilities and remain vigilant against emerging threats.

Are you from SOC/DFIR Team? - Join 500,000+ Researchers to Analyze Cyber Threats with ANY.RUN Sandbox - Try for Free

SAML Bypass Authentication on GitHub Enterprise Servers to Login as Other User Account

SAML Bypass

A severe security vulnerability, tracked as CVE-2025-23369, has been identified in GitHub Enterprise Server (GHES), allowing attackers to bypass SAML authentication and impersonate other user accounts.

This flaw exploits quirks in the libxml2 library used during SAML response validation, enabling unauthorized access to accounts, including those with administrative privileges.

The vulnerability arises from improper handling of XML entities within SAML responses.

By crafting a malicious SAML response that manipulates XML entity references, attackers can bypass signature verification mechanisms and inject arbitrary assertions.

The issue specifically affects the way GHES processes cryptographic signatures in SAML responses, leading to a failure in validating the integrity of the signed content.

Technical Details of the Exploit

Security Assertion Markup Language (SAML) is a widely used protocol for Single Sign-On (SSO) authentication.

It relies on an Identity Provider (IdP) to issue signed authentication responses that are verified by the Service Provider (SP).

In this case, GitHub Enterprise Server acts as the SP. The vulnerability exploits a flaw in how GHES validates these SAML responses.

The problem lies in the has_root_sig_and_matching_ref? function within GHES’s SAML validation logic.

This function checks whether the root element of a SAML response is properly signed. However, due to quirks in libxml2, attackers can manipulate XML entity references to trick the system into validating a different element as the root signature.

According to the report, this bypasses critical checks for assertion integrity and allows attackers to inject malicious assertions.

For example, by using an XML entity like <!ENTITY idViaEntity "_129"> and referencing it in the root element’s ID attribute, attackers can cause inconsistencies between schema validation and XPath queries.

These inconsistencies enable the injection of unauthorized assertions while maintaining a valid document structure.

Impact

The vulnerability affects all versions of GitHub Enterprise Server prior to version 3.13.0. Exploitation could allow attackers to:

  1. Gain unauthorized access to user accounts.
  2. Escalate privileges to administrator levels.
  3. Compromise sensitive repositories and data.

GitHub has released patches addressing this issue in versions 3.9.15, 3.10.12, 3.11.10, and 3.12.4. Administrators are urged to update their instances immediately to mitigate risks.

Additionally, organizations should consider disabling encrypted assertions if not required and enabling robust monitoring for unusual authentication activities.

This vulnerability underscores the importance of rigorous testing and validation in security-critical systems like SAML authentication frameworks.

While GitHub has addressed this issue through patches, organizations must remain vigilant against evolving attack vectors targeting authentication mechanisms.

Are you from SOC/DFIR Team? - Join 500,000+ Researchers to Analyze Cyber Threats with ANY.RUN Sandbox - Try for Free

NanoCore RAT Attack Windows Using Task Scheduler to Captures keystrokes, screenshots

NanoCore RAT

NanoCore, a notorious Remote Access Trojan (RAT), continues to pose a significant threat to Windows systems.

This malware, known for its espionage capabilities and modular design, is being leveraged by cybercriminals to exfiltrate sensitive data, control infected systems, and maintain persistence using advanced techniques.

A recent analysis of a NanoCore sample (MD5 hash: 18B476D37244CB0B435D7B06912E9193) sheds light on its sophisticated behavior and attack mechanisms.

Behavioral Analysis

NanoCore RAT employs multiple methods to ensure its persistence on compromised systems.

Upon execution, it copies itself into hidden directories and modifies the Windows registry.

Specifically, it creates an entry under HKCU\Software\Microsoft\Windows\CurrentVersion\Run to execute its payload (saasmon.exe) during startup.

Additionally, it uses the Windows Task Scheduler (schtasks.exe) to create scheduled tasks, further solidifying its foothold on the system.

NanoCore RAT
Static Analysis

The malware also establishes directories in locations such as C:\Program Files (x86)\SAAS Monitor and C:\Users\User\AppData\Roaming\81E42A3A-6BA0-4784-B7EC-E653E9E1A8ED.

According to the Malware Analysis, these directories store its components, including keylog files and other exfiltrated data.

Data Exfiltration

NanoCore’s primary objective is data theft and espionage.

It captures keystrokes, screenshots, and clipboard content, storing them locally before sending them to a Command-and-Control (C2) server.

During dynamic analysis, the malware was observed communicating with simpletest.ddns.net over port 9632.

NanoCore RAT
Wireshark Analysis

It also uses Google DNS (8.8.8.8) for connectivity checks. The RAT’s modular plugin system enhances its spying capabilities.

For instance, the “SurveillanceEx” plugin enables attackers to monitor victims more effectively by recording user activity in real time.

To evade detection and hinder analysis, NanoCore employs obfuscation techniques such as Eazfuscator.

Analysts used tools like de4dot to deobfuscate the malware, revealing its internal logic and class structures.

String analysis uncovered commands related to task scheduling and C2 communication, further confirming its malicious intent.

Indicators of Compromise (IOCs)

  • File Hash: 18B476D37244CB0B435D7B06912E9193
  • Registry Key: HKCU\Software\Microsoft\Windows\CurrentVersion\Run\saasmon.exe
  • File System Changes:
  • C:\Program Files (x86)\SAAS Monitor\saasmon.exe
  • C:\Users\User\AppData\Roaming\81E42A3A-6BA0-4784-B7EC-E653E9E1A8ED
  • Network Indicators:
  • C2 Domain: simpletest.ddns.net
  • Port: 9632

NanoCore RAT remains a potent threat due to its adaptability and extensive feature set.

Its use of Windows Task Scheduler for persistence, combined with advanced espionage capabilities, makes it a preferred tool for cybercriminals targeting sensitive data.

Organizations are advised to monitor network traffic for unusual activity, apply robust endpoint protection solutions, and educate users about phishing risks the primary delivery vector for NanoCore.

By staying vigilant and leveraging proactive security measures, defenders can mitigate the risks posed by this persistent malware family.

Are you from SOC/DFIR Team? - Join 500,000+ Researchers to Analyze Cyber Threats with ANY.RUN Sandbox - Try for Free

Hackers Exploiting Google Tag Managers to Steal Credit Card from eCommerce Sites

Google Tag Managers

In a concerning development, cybercriminals are leveraging Google Tag Manager (GTM), a legitimate tool widely used by eCommerce websites, to deploy malicious scripts designed to steal credit card information.

This attack vector, often referred to as Magecart or e-skimming, has been observed targeting platforms like Magento, WordPress, and OpenCart, among others.

The abuse of GTM containers allows hackers to bypass traditional security measures by embedding malicious JavaScript within trusted website elements.

How the Attack Works

Google Tag Manager is a tag management system that enables website administrators to manage and deploy marketing tags without altering the site’s code directly.

Google Tag Managers
source-code

However, its flexibility and integration with trusted domains like googletagmanager.com make it an attractive target for exploitation.

Threat actors create GTM containers containing custom HTML tags or obfuscated JavaScript payloads that act as credit card skimmers.

These scripts are injected into the checkout pages of compromised eCommerce sites, where they capture sensitive payment details entered by customers and transmit them to remote servers controlled by the attackers.

Recent investigations revealed that some attackers use advanced obfuscation techniques, such as Base64 encoding and dynamic script loading, to conceal their activities.

In some cases, the skimmer code mimics legitimate GTM or Google Analytics scripts, making detection even more challenging for website administrators.

Impact on eCommerce Sites

Sucuri reports indicate that hundreds of eCommerce domains have been compromised globally, with over 165,000 payment card records exposed and sold on dark web marketplaces.

Victim sites often remain unaware of the breach for months due to the stealthy nature of these attacks.

The consequences for affected businesses include financial losses, reputational damage, and loss of customer trust.

For example, a recent case involving a Magento-based eCommerce site uncovered malware embedded in the site’s database through GTM exploitation.

The malicious script exfiltrated credit card data during checkout and sent it to an external server.

Similar incidents have been reported across other platforms like WooCommerce and Shopify.

To combat this growing threat, cybersecurity experts recommend several measures:

  • Audit GTM Containers: Regularly review all tags within GTM containers for suspicious or unauthorized scripts.
  • Apply Security Patches: Ensure all CMS platforms and plugins are up-to-date with the latest security updates.
  • Monitor Website Traffic: Use tools to detect unusual activity or unauthorized data exfiltration.
  • Implement Web Application Firewalls (WAFs): Deploy WAFs to block malicious scripts and unauthorized access.
  • Educate Administrators: Train website managers to recognize signs of compromise and maintain strong security hygiene.

The abuse of Google Tag Manager highlights the evolving sophistication of cyberattacks targeting eCommerce platforms.

By exploiting trusted tools like GTM, hackers can infiltrate websites undetected and harvest sensitive financial data.

It is imperative for businesses to adopt proactive security measures to safeguard their customers’ information and maintain trust in online transactions.

Are you from SOC/DFIR Team? - Join 500,000+ Researchers to Analyze Cyber Threats with ANY.RUN Sandbox - Try for Free