Dialogue with Slow Fog: How Web3ers Safely Explore the On-Chain World
Original Title: 《NFTGo Dialogue with Web3 Builder Episode 2------Conversation with SlowMist Security Team》
Written by: NFTGo Research
As a company focused on blockchain ecosystem security, SlowMist Technology was established in January 2018 by a team with over a decade of frontline cybersecurity experience. SlowMist has independently discovered and disclosed numerous high-risk blockchain security vulnerabilities in the industry, gaining widespread attention and recognition.
Today, blockchain security issues are frequent, and Web3 users have long been troubled by them. Therefore, in this second episode of our dialogue, we are pleased to invite the SlowMist security team to share valuable insights on blockchain security, helping everyone explore the on-chain world with more assurance. Let’s officially begin~
1. First, please introduce SlowMist to everyone.
Answer: Hello everyone, SlowMist is a company focused on blockchain ecosystem security. Our blockchain ecosystem security capabilities consist of three rings: the innermost layer is compliance security, the second layer is technical security, and the outer layer is ecosystem security. Technical security mainly includes two business lines: security auditing and anti-money laundering. Security auditing covers DeFi project smart contract code, centralized exchanges, wallet apps, browser plugin wallets, and underlying public chains. We also offer red team testing services, which is one of our advantages.
Over the past five years since 2018, we have served numerous well-known and leading clients in the industry, with thousands of commercial clients and a high satisfaction rate. In terms of anti-money laundering, we have an on-chain tracking platform called MistTrack. Additionally, we pay great attention to compliance security, as compliance is one of the important cornerstones for the long-term development of this industry. We have strict legal processes for target projects cooperating on security audits or anti-money laundering. We understand that security is a whole, and security assurance requires a complete security system. Therefore, we provide integrated, tailored security solutions from threat detection to threat defense.
In simple terms, it is a military-like circular defense system with layered defenses. The outermost layer is threat detection, which identifies threats through SlowMist's partners and our own threat intelligence system (this is also part of our ecosystem security), and then issues warnings to the entire ecosystem through media channels; threat defense refers to our defense system, from BTI (Blockchain Threat Intelligence System) to deploying tailored and systematic defense solutions, implementing cold, warm, and hot wallet security hardening, etc., selecting quality security solution providers in network security, risk control security, wallet security, etc., allowing clients to choose flexibly and easily address various challenges encountered in business development. We hope to work together with quality partners and communities in the industry to build a collaborative security defense.
2. Web3 security issues are always hard to guard against. Aside from basic rules like writing down mnemonic phrases and verifying website authenticity, what security advice does SlowMist have for Web3 users who frequently interact with the ecosystem?
Answer: Since the question is about interaction security, let’s first outline how attackers generally steal users’ assets.
Attackers typically use two methods to steal user assets:
First, they trick users into signing malicious transaction data that transfers assets to the attacker. Second, they deceive users into entering their wallet mnemonic phrases on malicious websites or apps.
Now that we know how attackers steal wallet assets, we need to take precautions against potential risks:
- Before signing, identify the data being signed, understand what the transaction is for, carefully verify whether the signing target is correct, and whether the authorized amount is excessive;
- Use hardware wallets whenever possible, as hardware wallets generally cannot directly export mnemonic phrases or private keys, which raises the threshold for mnemonic phrase and private key theft;
- Various phishing techniques and incidents are emerging constantly, and users should learn to identify different phishing methods, enhance security awareness, and educate themselves to avoid being scammed. For example, follow media updates from security companies like SlowMist to stay informed about the latest scams or phishing techniques. Of course, we highly recommend reading SlowMist's "Self-Rescue Manual for the Blockchain Dark Forest," which is full of valuable information;
- We suggest users maintain different wallets for various scenarios to keep asset risks manageable. For instance, large assets that are not frequently used should be stored in cold wallets, ensuring that the network and physical environments are secure when accessed. Wallets used for participating in airdrops or similar activities, which are accessed more frequently, should contain smaller amounts of assets. By managing wallets based on different assets and usage frequencies, risks can be kept under control.
3. On August 16, a notable tweet was made by Yuxian, which stated: "Where does your illusion that 'Mac is safer than Windows' come from?" What are SlowMist's views on the advantages and disadvantages of Mac and Windows computers for Web3 users?
Answer: Yes, this tweet sparked quite a discussion. Conversely, we could ask, "Where does the illusion that 'Windows is safer than Mac' come from?" The perspective and answer are similar. From the perspective of single-system intrusion prevention, Mac's closed nature and strict permission controls are indeed better than Windows. Moreover, Mac has a very low share in the global PC market, while Windows has a high share, leading to more attacks occurring on Windows. Since Windows was launched, various attack vectors have matured significantly.
To exaggerate a bit, currently, 99% of security personnel engaged in penetration testing, intrusion, and APT do not target Mac, while 100% target Windows. Setting aside the above points, if we were to use malware that bypasses detection to attack both Mac and Windows, the results would be similar, and both would be compromised. Overall, it’s half about the device and half about the individual. If users lack security awareness, they can easily fall victim to malware, potentially leading to the theft of sensitive data (such as mnemonic phrases) on their computers. Malicious software can behave in many different ways; it may hide in email attachments or use the device's camera for surveillance.
We recommend that everyone enhance their security awareness, such as not easily downloading and running programs provided by strangers, only downloading applications, software, or media files from trusted sites; not opening attachments from unfamiliar emails; regularly updating the operating system to obtain the latest security protections; and installing antivirus software, such as Kaspersky.
4. Many projects have experienced "treasury" thefts. What does SlowMist believe are the common causes of security issues? Is the possibility of insider theft significant?
Answer: According to the SlowMist blockchain hacking incident archive (SlowMist Hacked), as of August 24, 2023, there have been 253 security incidents with losses amounting to $1.45 billion. From the perspective of malicious activities in the blockchain, there are several main types: phishing attacks, trojan attacks, hash power attacks, smart contract attacks, infrastructure attacks, supply chain attacks, and insider threats.
Taking common smart contract attacks as an example, there are several attack methods: flash loan attacks, contract vulnerabilities, compatibility or architecture issues, as well as some techniques like frontend malicious attacks and phishing targeting developers. Additionally, when discussing insider theft, we must mention private key leakage. Private key leakage varies by situation; the differences between personal and exchange private key leaks are significant. Personal private key leaks typically occur when users store their private keys or mnemonic phrases online, such as in WeChat favorites, 163 email, notes, or cloud storage services like Youdao Note. Hackers often collect databases of leaked usernames and passwords from the internet, such as plaintext credentials from CSDN many years ago, and then attempt to access these cloud storage or service websites. In the security community, this is referred to as "credential stuffing," which is probabilistic; if successful, they will look for any crypto-related content.
Exchanges are more complex; typically, only large hacker organizations have the capability to breach the layers of security at exchanges and gradually infiltrate to obtain the hot wallet private keys stored on the exchange's servers. It is important to note that this is illegal behavior, and should not be imitated. We advise project teams to seek security companies to conduct security audits on their project code to enhance the project's security level. They can also launch bug bounty programs to mitigate security issues during the ongoing operation and development of the project. Additionally, we recommend that project teams improve internal management and technical mechanisms, increasing asset protection through mechanisms like multi-signature and zero-trust.
5. Cross-chain bridges have been jokingly referred to as "hacker ATMs." For Web3 users with limited technical knowledge, what points should they pay attention to when using cross-chain bridges?
Answer: When it comes to cross-chain bridges, the first thing to note is that cross-chain bridge operations are complex, and the codebase is large, making it easy to introduce vulnerabilities during coding. Secondly, the security of third-party components referenced in the project is also a significant cause of security vulnerabilities. Lastly, the lack of a larger development community for cross-chain bridges means that the code has not been widely and thoroughly scrutinized for potential bugs.
For users, it is important to understand how their funds are protected when using cross-chain bridges. They can assess the risk level of a cross-chain bridge from several dimensions, such as: Is the project contract open source? Does the project have multiple security audits? What is the private key management solution—MPC multi-party computation, multi-node multi-signature, or is the private key managed centrally by the project team?
When choosing a cross-chain bridge, users should opt for those with strong security capabilities. First, there should be security audits for all versions of the code, and secondly, the team should have dedicated security personnel. We also suggest that cross-chain bridge teams operate more transparently, so they can receive more user inquiries and suggestions, allowing them to address gaps in a timely manner.
6. Aside from common scams and phishing, can SlowMist provide examples of less common but equally insidious cases?
Answer: We previously disclosed an incident where attackers exploited a defect in the WalletConnect feature of Web3 wallets to increase the success rate of phishing attacks. Specifically, some Web3 wallets that support WalletConnect did not restrict the area where the transaction pop-up would appear, allowing it to pop up on any interface of the wallet. Attackers exploited this flaw to guide users to connect WalletConnect with phishing pages through phishing websites, continuously constructing malicious eth_sign signature requests.
If users recognize that ethsign may be unsafe and refuse to sign, the WalletConnect connection uses wss for connection. If users do not close the connection in time, the phishing page will continuously initiate malicious ethsign signature requests. When users are using their wallets, there is a high chance they may mistakenly click the sign button, leading to asset theft. In fact, as long as users leave or close the DApp Browser, the WalletConnect connection should be paused. Otherwise, if a signature request suddenly pops up while using the wallet, it can easily cause confusion and lead to theft risks.
Speaking of this, I want to mention ethsign again. Ethsign is an open signature method that has been frequently used by attackers for phishing in the past two years. It allows signing of any hash, meaning it can sign any transaction or data, posing a dangerous phishing risk. Users should carefully check the application or website they are using when signing or logging in, and avoid entering passwords or signing transactions in unclear situations. Refusing blind signing can help avoid many security risks.
7. I would like to hear about the most profound security incident SlowMist has encountered over the years in blockchain security.
Answer: In the past two to three years, the Poly Network incident that occurred in 2021 left a deep impression. When the attack happened on August 10 at around 8 PM, we maintained a high level of attention, continuously analyzing the attack process, tracking the flow of funds, and estimating the losses. It felt somewhat like being on the front lines. The loss was $610 million, which at the time was considered an exceptionally large loss in an attack incident.
Our team released an analysis of the attack incident and the IP identity information of the attacker shortly after 5 AM on the 11th. By the afternoon of the 11th, under immense pressure, the hacker began to return the assets. The subsequent comments made by the hacker on-chain were also quite "interesting." The entire process was a significant achievement for a security company like ours.
8. Finally, let’s ask an interesting question. With the continuous iteration of new technologies like formal verification and AI auditing, how does SlowMist view the development of new technologies?
Answer: Speaking of new technologies, for example, ChatGPT improves the efficiency of traditional text work, while CodeGPT enhances coding efficiency. Internally, we have previously used historically common vulnerability codes as test cases to verify GPT's detection capabilities for basic vulnerabilities. The test results showed that the GPT model performs well in detecting simple vulnerability code blocks, but it currently cannot detect slightly more complex vulnerability codes. Additionally, during testing, we observed that GPT-4 (Web) has high overall contextual readability and produces clear output formats.
GPT has some detection capability for basic simple vulnerabilities in contract code, and after detecting vulnerabilities, it explains the issues with high readability. This feature is quite suitable for providing quick guidance and simple Q&A for junior contract auditors in their initial training. However, there are some drawbacks: for instance, GPT's output can vary with each conversation, which can be adjusted through API parameters, but it is still not a constant output. While this variability is beneficial for language conversations, it poses a problem for code analysis tasks. To cover the various vulnerability responses that AI might provide, we need to make multiple requests for the same question and compare the results, which inadvertently increases the workload and contradicts the fundamental goal of AI assisting humans in improving efficiency.
Moreover, when detecting slightly more complex vulnerabilities, it becomes apparent that the current training model (as of March 16, 2024) cannot correctly analyze and identify key vulnerability points. Although GPT's ability to analyze and discover contract vulnerabilities is still relatively weak, its capability to analyze small code blocks of ordinary vulnerabilities and generate report texts remains exciting for users. In the foreseeable future, with the training and development of GPT and other AI models, we believe that faster, smarter, and more comprehensive assistance in auditing large and complex contracts will be achieved.
Conclusion
We sincerely thank the SlowMist security team for their responses. Where there is light, there are shadows, and the blockchain industry is no exception; but it is precisely because of the existence of blockchain security companies like SlowMist Technology that light can shine even in the shadows. We believe that with development, the blockchain industry will become more regulated, and we look forward to the future growth of SlowMist Technology~