Formjacking happens when cybercriminals hijack your web forms. Typical targets are payment forms and shopping carts. Cybercriminals can inject malicious scripts into vulnerable JavaScript code in your forms to alter their behavior. The malicious JavaScript loads into the consumer’s web browser, collects the form data and transmits it to the criminal’s command and control (C and C) server, even as the form data continues to flow to your systems. This allows the cybercriminal to capture information whenever your users submit a form.
Formjacking is a type of man-in-the-middle (MITM) attack, one in which cybercriminals intercept communications between two parties without their knowledge or consent. In the case of formjacking, the cybercriminal simply retrieves a copy of the form data even while the transmission passes through unaltered. Formjacking is the digital equivalent of someone tapping your phone. It is stealthy and inconspicuous because it happens on the client side, outside of the purview of systems such as code scanners and web application firewalls (WAFs). Thus, it is not uncommon for these attacks to remain undetected for long periods of time.
Cybercriminals generally direct formjacking attacks at the most popular third-party web forms and web form plug-ins used by many e-commerce sites. Because of this, 4,800 sites fall victim to formjacking each month. Formjacking can be a goldmine of credit card numbers, expiration dates and security codes, paired with the cardholder’s name, email and address, which cybercriminals can use to make fraudulent purchases and retrieve credentials.