Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
A man-in-the-browser attack uses malware inside the browser to read and rewrite pages after decryption, so a banking transfer can be altered while the victim sees the figures they entered.

What Is a Man-in-the-Browser Attack?
A man-in-the-browser attack places malicious code inside the victim’s browser so that it can read and modify web pages after the encrypted connection has been decrypted. The user sees a genuine site with a valid certificate, types their credentials into the real login form, and completes a legitimate authentication. Meanwhile the malware quietly changes what is sent to the server and edits the response before it is displayed. Online banking fraud has been built on this technique for close to two decades.
A man-in-the-middle attack sits on the network and must defeat TLS to read anything. A man-in-the-browser sidesteps the problem by operating at the endpoint, inside the application that holds the decrypted data. Certificate pinning, HSTS, and perfect forward secrecy are all irrelevant to an attacker already inside the trust boundary.
The usual implementation hooks browser API functions. On Windows, trojans intercept HttpSendRequestW and InternetReadFile in wininet.dll so that outbound form data is captured before encryption and inbound HTML is altered after decryption; Firefox is handled by hooking the NSS library functions instead. Modern variants use a malicious browser extension or a debugger connection to the browser process, which requires no code injection at all.
Form grabbing captures every field submitted, including the ones a keylogger would miss because they are pasted from a password manager or selected from a dropdown. It is more reliable than keystroke logging and produces clean, structured output.
Web injects are the dangerous half. The malware carries a configuration file listing target URLs and HTML fragments to insert. Visit your bank and the page gains an extra field asking for your card PIN “for verification”, rendered in the bank’s own stylesheet on the bank’s own domain. Criminal marketplaces sell inject configurations for specific institutions, which is why campaigns are so often tailored to a particular country’s banks.
Automatic transfer systems take this further. Rather than stealing credentials for later use, an ATS script modifies a payment while the customer is making it: the account number and amount sent to the bank are the attacker’s, while the confirmation page and the subsequent statement are rewritten to show the payment the customer intended. Detection is delayed until a reconciliation exposes the gap.
Zeus, first seen in 2007, established the model and leaked its source code in 2011, seeding a generation of descendants. SpyEye, Carberp, and Tinba followed. Gozi and its Ursnif lineage, Dridex, IcedID, and Ramnit have all carried man-in-the-browser functionality, and several continue to operate, having shifted from pure banking fraud to acting as a loader for ransomware. On mobile, overlay attacks achieve a similar result by drawing a fake input screen over a legitimate banking app.
Because the compromise is on the user’s device, server-side controls must assume the browser is hostile.
Business banking is the higher-value target. A practical control is to restrict payment initiation to a small number of hardened, dedicated workstations that do not browse the wider web or read email, combined with dual authorisation where the second approver uses a different device. That arrangement breaks the attack even when one machine is compromised.
At Privia Security, our Investigation and Incident Response Services include tracing fraudulent transactions back to the compromised endpoint and establishing which other sessions were affected.
Not on its own. The malware operates inside an already authenticated session, so any factor the user supplies is simply passed through to the real site and the fraudulent action happens afterwards. Only authentication that binds the approval to specific transaction details—confirming the payee and the amount on a separate device—breaks the attack, which is why dynamic linking is mandated for electronic payments.
Usually they would not, which is the point. The URL is correct, the certificate is valid, and the page looks right. The strongest clue is a request for information the organisation would never ask for, such as a card PIN, a full memorable word, or a one-time code described as a “cancellation” step. Unexplained delays, or an unexpected second approval prompt, are also worth treating as suspicious.
Yes, functionally. An extension with permission to read and change data on all sites has exactly the access the classic trojans worked hard to obtain, without needing to inject into a process. This is why extension allow-listing through enterprise browser policy is a worthwhile control, and why permission review matters when staff install productivity add-ons on managed devices.
Considerably, if the separation is genuine. A dedicated machine used only for payment initiation, with no email client and no general web browsing, is far less likely to be infected in the first place. The benefit disappears if the same device is also used for everyday work, and it is strongest when combined with dual authorisation performed from a second, independent device.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.