Gate.io Crypto-Stealing JavaScript
Notice: This page is a freshly imported case study from the original repository. The original content was in a different format, and may not have relevant information for all sections. Please help restructure the content by moving information from the 'About' and 'General Prevention' sections to other sections, and add any missing information or sources you can find. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.
Notice: This page contains sources which are not attributed to any text. The unattributed sources follow the initial description. Please assist by visiting each source, reviewing the content, and placing that reference next to any text it can be used to support. Feel free to add any information that you come across which isn't present already. Sources which don't contain any relevant information can be removed. Broken links can be replaced with versions from the Internet Archive. See General Tutorial on Wikis, Anatomy of a Case Study, and/or Citing Your Sources Guide for additional information. Thanks for your help!
Gate.io operated a cryptocurrency exchange service, and thought that they'd use a third party to track visitor statistics. This third party was compromised, and code was injected which allegedly modified the withdrawal addresses of customers and/or submitted withdrawal requests on their behalf.
Gate.io appears to have acted to remove the JavaScript code, and appears to suggest that no user funds were lost. There is no indication that could be found of users reporting losing funds.
This exchange or platform is based in Marshall Islands, or the incident targeted people primarily in Marshall Islands.[1][2][3][4][5][6][7][8][9][10][11]
About Gate.io
Gate.io is a cryptocurrency exchange. "[A]ccording to coinmarketcap.com, several million dollars, including USD 1.6 million in just bitcoin transactions, transit this platform every day." It "is a very popular site, especially in China, where it boasts an Alexa ranking of 8,308. Globally the site ranks 26,251." "Gate.io is operated by Gate Technology Corp. [They] are dedicated to security and your experience, offering you not only a secure, simple and fair Bitcoin exchange but also promising to safeguard your asset and trading information." They "have Super secured SSL Link, Offline Bitcoin Wallet Technology, Instant deposit and withdrawal for Cryptocurrencies, Two factor authentication, Low Fee. No fee for deposit. Low trading fee. Low withdrawal fee with optional withdrawal service."
The StatCounter "service is used by many webmasters to gather statistics on their visitors – a service very similar to Google Analytics. To do so, webmasters usually add an external JavaScript tag incorporating a piece of code from StatCounter – www.statcounter[.]com/counter/counter.js – into each webpage." "StatCounter has more than 2 million member sites and it computes stats on more than 10 billion page views per month."
Both services were allegedly "compromised in another supply-chain attack, which resulted in an unknown number of gate.io customers getting their money stolen, according to ESET." "The ESET team today said that the crooks injected malicious code within statcounter.com/counter/counter.js, a piece of JavaScript that StatCounter's two million or so customers embed in their websites to measure their visitor traffic." "Faou says that the Statcounter breach happened on November 3. They discovered it on Tuesday (November 6) and immediately notified both StatCounter and gate.io."
"Faou works for ESET, a security firm on the order of MalwareBytes or Norton, which provides consumer and enterprise security products and necessarily conducts research and penetration tests. He says the compromise was designed to replace bitcoin withdrawal addresses on the Gate.io platform with addresses belonging to the attacker." "Researchers at ESET have found that the JavaScript used by StatCounter's analytics platform has been modified by miscreants so that when embedded into the pages of Gate.io, a cryptocurrency exchange, it can siphon off alt-coins."
"Hackers successfully sandwiched crypto-stealing code into the middle of a popular web traffic-measuring plugin from StatCounter, which is now used on more than two million websites, including government sites. They have determined, however, that the rather wide swath of infections may have been designed to eventually infect cryptocurrency trading sites, and that the scheme did, in fact, infect popular crypto-trading site Gate.io. By situating the code in the middle of StatCounter’s downloadable javascript web traffic analysis tool, hackers made it harder to detect."
"It turns out that among the different cryptocurrency exchanges live at time of writing, only gate.io has a valid page with this URI," explained ESET malware researcher Matthieu Faou. "Thus, this exchange seems to be the main target of this attack." "The URL targeted by the malicious code is part of a user's account dashboard, and more specifically it's the URL for the page on which users make Bitcoin withdrawals and transfers." "Outside of gate.io, none of the other two million-plus websites using StatCounter's metrics services appear to have been affected by the malicious JavaScript, even if they downloaded it."
“[T]he malicious script submits the [withdrawal] form, which executes the transfer from the victim’s account to the attackers’ wallet. 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.”
"[T]he attackers registered a domain very similar to the legitimate StatCounter one, statcounter[.]com. They just switched two letters, which can be hard to notice while scanning logs for unusual activity. Interestingly, by checking the passive DNS of the domain, we noticed that this domain had already been suspended in 2010 for abuse."
"Statcounter, which boasts of over 2 million members/customers, has yet to publicly comment on the incident. Hopefully they are working on securing their compromised assets and removing the malicious code from the script. Statcounter customers would do well to demand some answers from the company, even if they weren’t affected this time."
"Gate.io has reacted by removing the Statcounter script from their website." “After that, we didn’t find any other suspicious behaviors,” they said, and added that “users’ funds are safe.” They did not say whether they will reimburse those users who have performed transfers between November 3 and 6 and have had their money stolen.
"Because the thieves used multiple wallets to receive the hijacked funds, the researchers do not know precisely how much was stolen. They believe, however, that the loss could be significant." "Even if we do not know how many Bitcoins have been stolen during this attack, it shows how far attackers go to target one specific website, in particular a cryptocurrency exchange," said Faou.
Gate.io later issued a further clarification statement. “On Nov. 6, 2018, we got the notice from ESET researcher’s report and the “ESET Internet Security” product that there’s a suspicious behavior in Statcounter’s traffic stats service. We immediately scanned it on Virustotal in 56 antivirus products. No one reported any suspicious behavior at that time [ …] However, we still immediately removed the Statcounter’s service. After that, we didn’t find any other suspicious behaviors. The users’ funds are safe. To have the maximum security, please make sure you have two-factor authentication (Google OTP or SMS) and two-step login protected.”
This exchange or platform is based in Marshall Islands, or the incident targeted people primarily in Marshall Islands.
The background of the exchange platform, service, or individuals involved, as it would have been seen or understood at the time of the events.
Include:
- Known history of when and how the service was started.
- What problems does the company or service claim to solve?
- What marketing materials were used by the firm or business?
- Audits performed, and excerpts that may have been included.
- Business registration documents shown (fake or legitimate).
- How were people recruited to participate?
- Public warnings and announcements prior to the event.
Don't Include:
- Any wording which directly states or implies that the business is/was illegitimate, or that a vulnerability existed.
- Anything that wasn't reasonably knowable at the time of the event.
There could be more than one section here. If the same platform is involved with multiple incidents, then it can be linked to a main article page.
The Reality
This sections is included if a case involved deception or information that was unknown at the time. Examples include:
- When the service was actually started (if different than the "official story").
- Who actually ran a service and their own personal history.
- How the service was structured behind the scenes. (For example, there was no "trading bot".)
- Details of what audits reported and how vulnerabilities were missed during auditing.
What Happened
The specific events of the loss and how it came about. What actually happened to cause the loss and some of the events leading up to it.
Date | Event | Description |
---|---|---|
November 3rd, 2018 | Main Event | Expand this into a brief description of what happened and the impact. If multiple lines are necessary, add them here. |
Technical Details
This section includes specific detailed technical analysis of any security breaches which happened. What specific software vulnerabilities contributed to the problem and how were they exploited?
Total Amount Lost
The total amount lost is unknown.
How much was lost and how was it calculated? If there are conflicting reports, which are accurate and where does the discrepancy lie?
Immediate Reactions
How did the various parties involved (firm, platform, management, and/or affected individual(s)) deal with the events? Were services shut down? Were announcements made? Were groups formed?
Ultimate Outcome
What was the end result? Was any investigation done? Were any individuals prosecuted? Was there a lawsuit? Was any tracing done?
Total Amount Recovered
There do not appear to have been any funds recovered in this case.
What funds were recovered? What funds were reimbursed for those affected users?
Ongoing Developments
What parts of this case are still remaining to be concluded?
General Prevention Policies
In this case, no funds were lost.
In general, exchange platforms must exercise caution with all parts of their service, and minimize any dependence on third parties. The use of a multi-signature wallet for processing withdrawals increases the level of scrutiny on outbound withdrawals, and it makes sense to use this as a standard process for all large withdrawals.
This type of situation is extremely rare and unusual, and likely can be dealt with by the platform reimbursing customers and improving security.
Individual Prevention Policies
No specific policies for individual prevention have yet been identified in this case.
For the full list of how to protect your funds as an individual, check our Prevention Policies for Individuals guide.
Platform Prevention Policies
Policies for platforms to take to prevent this situation have not yet been selected in this case.
For the full list of how to protect your funds as a financial service, check our Prevention Policies for Platforms guide.
Regulatory Prevention Policies
No specific regulatory policies have yet been identified in this case.
For the full list of regulatory policies that can prevent loss, check our Prevention Policies for Regulators guide.
References
- ↑ SlowMist Hacked - SlowMist Zone (Jun 26, 2021)
- ↑ Attackers breached Statcounter to steal cryptocurrency from gate.io users - Help Net Security (Aug 8, 2021)
- ↑ Hackers seed StatCounter with nasty JavaScript in elaborate Bitcoin cyber-heist caper • The Register (Aug 8, 2021)
- ↑ Supply‑chain attack on cryptocurrency exchange gate.io | WeLiveSecurity (Aug 8, 2021)
- ↑ Hackers breach StatCounter to hijack Bitcoin transactions on Gate.io exchange | ZDNet (Aug 8, 2021)
- ↑ Hackers Spread Crypto-Stealing Code Through StatCounter at Gate.io Exchange (Aug 8, 2021)
- ↑ Altcoins News | Bitcoin News Today – Blockchainreporter (Aug 8, 2021)
- ↑ SC Media | StatCounter platform compromised to infect gate.io exchange with bitcoin-stealing code (Aug 8, 2021)
- ↑ Gate.io | Official Website of Gate.io | Bitcoin Exchange | Bitcoin Price | Crypto Exchange | Cryptocurrency Exchange (Aug 9, 2021)
- ↑ Contact us-Gate.io (Aug 9, 2021)
- ↑ Hackers Exploit Tracking Service to Infiltrate Bitcoin Exchange Gate.io (Aug 9, 2021)