A two-year malware campaign that abused a widely used payment instrument unique to Brazil may have netted an eye-popping $3.75 billion.

The campaign targeted "boletos", a type of invoice used by merchants that can be paid by people without needing a bank account, according to a report released yesterday by RSA, the security unit of vendor EMC. It's the second most popular method of payment after credit cards.

While the "fraud ring may not be as far-reaching as some larger international cybercrime operations, it does appear to be an extremely lucrative venture for its masterminds," said Eli Marcus of RSA's FraudAction Knowledge Delivery team.

The FBI and Brazil's Federal Police have been contacted, Marcus said.

Boletos can be printed or sent online. The fraudsters initially generated fake boletos and either emailed or sent by post the invoices to people, modifying a bar code and ID number on the invoice to collect the payments.

But RSA said fraudsters have developed a sophisticated attack using man-in-the-browser techniques, where malicious software actively interferes with and modifies online transactions.

In late 2012, RSA detected malware that infected browsers on Windows-based machines. The malware modifies the boleto's account information, directing the money to their own accounts. Those real-time modifications are invisible to a user.

For example, when people pay a boleto online, the ID number of the invoice is typed into a bank's online payment form. If a computer is infected with the malware, that ID number is sent to the attacker's server and replaced, which results in the funds going to the fraudster's account.

Although banks have made significant investments to fight the malware, the "boleto gang has continued to innovate revising their purpose-built malware," Marcus said.

The malware also collects usernames and passwords from Microsoft's email services on infected computers. "It appears that these stolen credentials are being used to support infection campaigns by spreading spam email," according to RSA's report.

The estimated losses from the scheme are astounding. By analysing a command-and-control server used by the cybercriminals, RSA found more than 495,000 transactions may have been tampered with.

The total value of the boletos that were modified is $3.75 billion, although RSA said it was unclear if all of the boletos were actually paid by victims and the money was transferred to fraudsters. To arrive at the $3.75 billion figure, RSA tallied the value of all of the suspicious transactions.

RSA counted more than 192,000 computers infected with boleto malware. Some 34 bank brands in Brazil were affected, Marcus said.

Mobile boleto payments are so far unaffected, as are direct debits from digital wallets. Government-issued boletos, used for paying taxes and municipal fees, also haven't been spoofed.