Bernard Aybouts - Blog - Miltonmarketing.com

Approx. read time: 3.7 min.

Post: Formjacking: The newest way hackers are stealing credit card information

Formjacking: Advanced Techniques and Prevention for 2024

Formjacking is an increasingly sophisticated cyberattack where malicious JavaScript is injected into e-commerce websites to steal sensitive information, primarily credit card details. The attack mimics physical card skimming, but it occurs online, targeting web forms used during transactions. In many cases, it is hard to detect because it operates entirely in the background—neither the website owner nor the user is aware of the theft until much later.

One of the most common perpetrators of formjacking attacks is Magecart, a consortium of hacker groups that exploit vulnerabilities in e-commerce platforms like Magento and third-party services such as payment processors. Magecart injects malicious JavaScript to steal payment details from compromised websites, often targeting the weakest links in the supply chain, such as third-party plugins or customer service widgets.

Key Challenges and Advanced Threats

Formjacking attacks are evolving with more advanced techniques, such as:

  1. Client-Side and Server-Side Attacks: In some cases, attacks operate purely on the client-side by injecting malicious JavaScript that exfiltrates sensitive information. In other scenarios, attackers inject server-side skimmers, often through compromised PHP files, making the attack invisible to browser-based monitoring solutions. Hybrid attacks combine both methods to avoid detection by traditional security tools​(Reflectiz)(Sucuri).
  2. Obfuscation and Persistence: Magecart groups often employ obfuscation techniques to hide their malicious code. Moreover, once they compromise a website, they create persistent backdoors, such as rogue admin accounts or reinfection mechanisms (e.g., hidden database triggers), making it difficult to fully eliminate the threat. Even if a website is cleaned, many are reinfected within days​(Imperva)(Sucuri).
  3. Supply Chain Vulnerabilities: One of the biggest challenges with formjacking is that many attacks are supply chain-based. Hackers compromise third-party services or software used by websites, allowing the malicious code to be injected indirectly. For example, in the British Airways breach, attackers leveraged vulnerabilities in third-party payment services​(Comparitech)(Imperva).

Advanced Prevention Techniques

To defend against formjacking attacks, especially for advanced users, it’s crucial to adopt both proactive and reactive measures:

  1. Client-Side Monitoring and Script Control: Implement strict controls on the third-party JavaScript used by your website. Use tools such as Content-Security-Policy (CSP) headers to limit the domains from which scripts can be loaded, reducing the risk of cross-site scripting (XSS) and code injection attacks​(Imperva).
  2. Automated Penetration Testing and Vulnerability Scanning: Regularly conduct penetration tests and vulnerability scans. This should not be limited to manual testing but should involve automated solutions that continuously scan for vulnerabilities in both your own code and third-party components. Automated tools can detect changes in your website’s code that could indicate formjacking​(Reflectiz).
  3. Behavioral Analytics and AI: Use AI-driven solutions to monitor web traffic and user behavior. These tools can establish a baseline of normal activity and detect anomalies that may indicate formjacking attempts. Machine learning models can flag abnormal connections or data being sent to unauthorized servers​(Reflectiz).
  4. Supply Chain Auditing: Ensure that all third-party services integrated into your website are regularly audited for security. This includes payment processors, customer service widgets, and analytics services. Many attacks stem from vulnerabilities in these external services​(Comparitech)(Imperva).
  5. File Integrity Monitoring: Use file integrity monitoring (FIM) tools to track any changes in the codebase, especially PHP or JavaScript files. This helps detect unauthorized modifications that may indicate a server-side skimmer has been added​(Sucuri).
  6. Immediate Incident Response: Have an incident response plan in place to deal with formjacking. If an attack is detected, you need to be able to quickly identify the compromised files, block malicious traffic, and patch vulnerabilities. Responding quickly can minimize the damage​(Imperva).

Conclusion

Formjacking remains a persistent and stealthy threat, with attackers increasingly leveraging supply chain vulnerabilities and advanced obfuscation techniques to steal sensitive information. Businesses, especially those in e-commerce, must adopt a multi-layered approach to security, including real-time monitoring, strict third-party code controls, and rapid incident response mechanisms to mitigate the risk of this growing cyberthreat.

By staying ahead of these tactics and employing advanced detection and prevention strategies, organizations can protect their customers’ data from the ongoing threat of formjacking in 2024 and beyond.

The Longevity Blueprint: AI-Powered Health Optimization

Current step:1AI-Human Medical Analyzer: Smarter, Personalized Health
2AI-Human Medical Analyzer: Smarter, Personalized Health

> SYS.HEALTH: AI-Human Medical Analyzer_

// Revolutionize Your Diagnostics

Experience the perfect blend of cutting-edge AI precision and expert human care. Our revolutionary analyzer turns your raw health data into personalized, actionable insights tailored just for you.

> INITIALIZING_BIOMETRIC_SCAN...

[+] DATA_INPUT

Securely upload complex health parameters, including lab bloodwork and comprehensive medical history.

[+] PROCESSING

Advanced algorithmic parsing combined with human-level oversight ensures hyper-accurate data interpretation.

[+] OUTPUT_MATRIX

Receive smarter, faster, and truly personalized care strategies to take immediate charge of your health journey.

A name/nickname is required to continue.

> TRANSLATION_MATRIX_ACTIVE...
[ LANG_EN ]
Knowledge Heals, Prevention Protects
[ LANG_HI ]
ज्ञान ठीक करता है, रोकथाम सुरक्षा करती है
[ LANG_ZH ]
知识治愈,预防保护
[ LANG_JA ]
知識は癒し、予防は守る
[ LANG_HE ]
הידע מרפא, המניעה מגנה
[ LANG_AR ]
المعرفة تُشفي، والوقاية تحمي
[ LANG_FR ]
La connaissance guérit, la prévention protège

> SYS.AUTH: Data Processing Consent_

[ AWAITING_AUTHORIZATION ] By providing consent, you allow us to process your uploaded data through our proprietary AI-Human analysis system.

  • [+] SECURE_REVIEW: This ensures your information is carefully reviewed using advanced AI technology and certified professional oversight to deliver personalized health insights.
  • [+] PRIVACY_LOCK: Your privacy is our strict priority. Your data will only be used for this specific diagnostic purpose.

> SYS.UPLOAD: Share Medical Records [OPTIONAL]_

[ USER_CONTROL_ACTIVE ] Uploading your medical records during registration is entirely optional. You can choose to bypass this step and provide data later if it suits your timeline.

You dictate the data flow: share as much or as little as you’re comfortable with, and let us guide you toward better health.

[+] FORMAT_SUPPORT

We accept all file formats, including photos, PDFs, text documents, and raw official medical data.

[+] DATA_YIELD

Increased inputs correlate with higher precision. The more info you share, the better we tailor your personalized insights.

> NEXT_STEPS: Post-Registration Protocol_

Once your registration is complete, a human specialist from our team will personally reach out to you within 3-10 business days. We will discuss your health journey and map out exactly how we can support you.

About the Author: Bernard Aybout (Virii8)

Avatar Of Bernard Aybout (Virii8)
I am a dedicated technology enthusiast with over 45 years of life experience, passionate about computers, AI, emerging technologies, and their real-world impact. As the founder of my personal blog, MiltonMarketing.com, I explore how AI, health tech, engineering, finance, and other advanced fields leverage innovation—not as a replacement for human expertise, but as a tool to enhance it. My focus is on bridging the gap between cutting-edge technology and practical applications, ensuring ethical, responsible, and transformative use across industries. MiltonMarketing.com is more than just a tech blog—it's a growing platform for expert insights. We welcome qualified writers and industry professionals from IT, AI, healthcare, engineering, HVAC, automotive, finance, and beyond to contribute their knowledge. If you have expertise to share in how AI and technology shape industries while complementing human skills, join us in driving meaningful conversations about the future of innovation. 🚀