Web attacks used to steal payment data and sessions are techniques that exploit websites, browsers or the link between them in order to obtain card details, login credentials or control of a session that has already been authenticated. Their targets include online banking services, merchant checkout pages, payment gateway administration panels and the databases behind them. They form one branch of cybercrime and a common source of card-not-present losses.
The members of the family strike at different points. Cross-site scripting and clickjacking abuse the page a visitor sees, SQL injection attacks the server's database, session hijacking takes over an established login, and man-in-the-browser malware operates inside the customer's own device. Banks, merchants and processors defend against them with secure software development, testing, monitoring and layered authentication. Standards such as the Payment Card Industry Data Security Standard set requirements for organisations that handle card data.
Cross-Site Scripting (XSS)
Cross-site scripting (XSS) is a flaw that lets an attacker's script run in a visitor's browser as though it came from a trusted website. It arises when a site places untrusted input into a page without properly encoding or filtering it. The script may be stored on the server, reflected back from a crafted link, or created entirely by code running in the browser.
Because the browser treats the script as part of the genuine site, it can read page content, alter forms, capture what is typed into payment fields or act within the logged-in session. Warning signs include unexpected scripts on checkout pages and unexplained outbound connections. Defences include output encoding, input validation, cookies marked so that scripts cannot read them, a Content Security Policy that restricts which code may run, inventory and integrity checks for third-party scripts, and a web application firewall as an additional layer.
SQL Injection
SQL injection is an attack in which input supplied to an application is interpreted as part of a database command instead of as plain data. SQL (Structured Query Language) is the language used to read and change records in relational databases. Where an application builds commands by joining text together, a malicious entry can change what the command does.
The consequences can include disclosure of customer records, password hashes or stored card data, alteration of balances and orders, or deletion of information. It has been behind a number of large data breaches. The principal defence is to use parameterised queries, which keep commands and data separate. Other protections include giving each application only the database rights it needs, validating input, hiding detailed error messages, encrypting sensitive fields, not retaining card data that is not needed, and regular penetration testing of public-facing systems.
Session Hijacking
Session hijacking is the takeover of a session between a user and a website after the user has signed in. Websites usually remember a login through a session identifier, often held in a cookie. Anyone who obtains or fixes that identifier may be treated as the legitimate user without needing the password or a second factor.
Identifiers can be exposed through malicious scripts, infected devices, insecure network connections or a man-in-the-middle attack that sits between the two parties. The result may be account takeover, changed payee details or unauthorised payments. Signs include logins appearing from unfamiliar devices or locations in the middle of a session. Protections include encrypted connections throughout, secure cookie settings, new identifiers issued at login, short timeouts, re-authentication before sensitive actions and device fingerprinting to spot a change of device.
Man-in-the-Browser
A man-in-the-browser attack uses malware, typically a banking Trojan, that has infected a user's computer or phone and tampers with what the browser sends and displays. The connection to the bank remains genuine and encrypted, but the malicious code operates before data is encrypted and after it is decrypted.
It can add extra form fields that ask for security codes, or change the recipient and amount of a transfer while showing the customer the details originally entered. Ordinary one-time codes may not help, because the customer is approving what appears to be a normal payment. Stronger protections show the actual payee and amount on a separate trusted channel and tie the approval code to those details, known as dynamic linking. Banks also monitor behaviour for anomalies, and users reduce exposure by updating software and avoiding untrusted downloads.
Clickjacking
Clickjacking, also called a user interface redress attack, tricks a person into clicking something other than what they believe they are clicking. A common form loads a genuine page inside an invisible or disguised frame and places it over harmless-looking content, so that a click meant for a game, video or button actually lands on the hidden page.
If the person is already signed in to the hidden site, that click may confirm an action, change a setting, grant a permission or approve a payment. The genuine server sees a request from the real user's browser. Website operators defend against it mainly by forbidding other sites from framing their pages, using the frame-ancestors directive of a Content Security Policy or the older X-Frame-Options header. Requiring a separate confirmation step for money movements and restricting cross-site cookies reduce the potential harm.
How the attacks compare
| Attack | Where it acts | Main defence |
|---|---|---|
| Cross-site scripting | Pages shown by a trusted site | Output encoding and script restrictions |
| SQL injection | Server database | Parameterised queries |
| Session hijacking | Logged-in session | Protected, short-lived session identifiers |
| Man-in-the-browser | Customer device | Out-of-band confirmation of payment details |
| Clickjacking | Visible screen layer | Blocking framing of pages |
External links
Ref 1140000292