A malicious actor compromised the platform of leading web analytics firm StatCounter in a supply chain attack that targeted the cryptocurrency exchange gate.io with a bitcoin-stealing script.
In his report, Faou said that ESET notified both StatCounter and gate.io upon discovering the attack.
However, StatCounter founder Aodhan Cullen gave SC Media a differing account via email, saying it was actually a member who alerted his company to the incident. "We got a report from a member about this issue on Tuesday and fixed it within a few hours," said Cullen, describing the initial compromise as a cache poisoning attack.
In response, Faou held firm, stating that "We notified them on Monday, 5 November at 6:55 pm EST time zone (11:55 pm GMT)," adding that the disclosure was made via Stat Counter’s support contact.
The ESET report explained that upon compromising the web analytics platform, the attackers injected their packed malicious code into the middle of a legitimate StatCounter script. "This is unusual, as attackers generally add malicious code at the beginning, or at the end, of a legitimate file," wrote Faou. "Code injected into the middle of an existing script is typically harder to detect via casual observation."
If the downloaded first-stage script finds the aforementioned gate.io URI, it then executes second-stage code, which is tied to a fake, lookalike StatCounter domain. This code is designed to steal bitcoins by replacing a user’s transaction destination with a Bitcoin address belonging to the attackers.
"This redirection is probably unnoticeable to the victims, since the replacement is performed after they click on the submit button. Thus, it will happen very quickly and would probably not even be displayed," wrote Faou.
The malicious code either sticks with the amount chosen by the victim, or changes the amount to the unsuspecting user’s daily withdrawal limit. And because the malicious script uses a new bitcoin address for each transaction, the researchers have been unable to ascertain how much the attackers may have successfully stolen during their campaign.
This article was originally published on SC Media US.