Faulty Codes for Flash Lending Attacks: Here’s How Cybercriminals Attack DeFi Platforms
Cybercriminals are off to a great start in 2022 by stealing $1.3 billion from crypto firms, exchanges, and especially decentralized finance or DeFi entities. Nearly 97 percent of all stolen cryptocurrencies in the first three months of 2022 were taken from DeFi protocols, up from 72 percent in 2021 and 30 percent in 2020, a new report from data analytics firm reveals. Chainalysis.
DeFi platforms facilitate the borrowing and borrowing of cryptocurrencies through the blockchain network. It uses smart contracts through which crypto lending or borrowing is automated. Smart contracts are pieces of algorithms that are executed when a specific condition is met on the Blockchain.
For DeFi companies, in particular, the largest thefts are usually done through flawed code and quick lending attacks, a type of code exploitation that involves cryptocurrency price manipulation.
Bad code or code vulnerabilities occur for various reasons. It should be noted that DeFi is an open source protocol, which means that any user can access the underlying code on which the platform is based. “This is an important and generally positive trend, as DeFi protocols move funds without human intervention, users should be able to audit the underlying code to trust the protocol,” the company said in its report.
However, this also benefits cybercriminals, who can scan the scripts for vulnerabilities and plan attacks well in advance.
Chainalysis in its report revealed that from 2020 to the first quarter of 2022, 35 percent of all cryptocurrency value was stolen through a security breach. The Ronin Network leak in March 2022, which enabled the theft of $615 million in cryptocurrency, has demonstrated the continued effectiveness of this technique.
The second most used technique by hackers is: flash loan attacks. It refers to a smart contract exploit when an attacker takes a quick loan (unsecured loan) from a DeFi platform, uses the capital he borrowed, and pays it back in the same transaction, causing the price of the crypto asset to rise and then quickly. withdraw your investments.
According to the Chainalysis report, when a DeFi platform relies on unstable price oracles, attackers are likely to exploit the platform. Oracles are programs in charge of maintaining accurate price data for all cryptocurrencies on one platform, which is not easy due to the volatility of cryptocurrency prices.
“Secure but slow oracles are vulnerable to arbitration; fast but insecure oracles are vulnerable to price gouging. The latter type often leads to flash lending attacks, which siphoned a whopping $364 million from DeFi platforms in 2021,” the report highlights.
The data analytics firm believes regular audits can help reduce quick lending attacks, but code audits aren’t foolproof. Almost 30 percent of code vulnerabilities occurred on audited platforms in the last year, as well as a whopping 73 percent of flash lending attacks. “So while code audits can certainly help, DeFi protocols that manage millions of users and billions of dollars need to take a more robust approach to platform security,” Chainalysis added.
Laundering of stolen cryptocurrencies
DeFi platforms have also become a hub for cybercriminals laundering stolen crypto assets. In 2021, more stolen funds flowed into DeFi platforms (51%) and centralized exchanges received less than 15% of total stolen funds. “This is likely due to exchanges’ acceptance of AML and KYC processes, which threaten the anonymity of cybercriminals,” the report noted.
“The decentralized nature of DeFi platforms makes them even more vulnerable to attack as hackers target specific bugs in the software suites, which are very transparent as the applications are open source. While this quirk requires even more time and resources to spend on code audits and stress tests, many of today’s DeFi projects are launched in a hurry and don’t pay much to build a strong security team. It can be seen that for current security vulnerabilities in Defi projects, smart contract auditing, senior and experienced teams will be helpful in preventing hacker attacks,” advised Johnny Lyu, CEO of KuCoin.