Wednesday, March 20, 2024

Mobile Operating Systems: Powering Your Pocket-Sized Computers


Our phones, tablets, and even smartwatches rely on special software called mobile operating systems (OS) to function. Unlike the software on traditional laptops, mobile OSes are designed specifically for compact devices that we carry around.

Think of it like this: while laptops can be portable, their operating systems are built for desktops that historically weren't designed to move around. However, the lines are blurring as technology advances. Think of powerful tablets, ultra-light laptops, and 2-in-1 devices that combine both.

Mobile OSes take features from desktop computers and add functionalities perfect for on-the-go use. This often includes built-in wireless connection and a SIM card slot for making calls and accessing data.

These mobile systems are incredibly popular. In 2023, over 1.4 billion smartphones were sold, with Android being the leader (over 50% market share). This surpasses not only desktop OS sales like Microsoft Windows but also total desktop computer usage!

Interestingly, mobile devices often have two operating systems working together. The one you interact with daily is on top, while a hidden system runs essential hardware functions like radios.

Since 2017, mobile OSes have become the dominant force, even surpassing desktops in web usage. This means traditional desktop operating systems are becoming less common, although variations exist by region.

Currently, Android and iOS rule the mobile OS world, holding over 80% of the market share globally. For Android users, there are even custom versions called ROMs available.

Preventing DNS Attacks: The Frax Finance Incident

Key learnings

A DNS assault resulted in the domains of Frax Finance being taken over on Wednesday, November 1. Fortunately, no customer cash were reported lost. Attacks against the domain name system (DNS) happen when bad actors attempt to take over domains and divert visitors from trustworthy websites to their own, harmful websites. In the realm of cryptocurrencies, DNS attacks are becoming increasingly problematic; occurrences similar to this one have happened more regularly in the previous year.




Earlier this week, on November 1, the domains of crypto lending platform Frax Finance were hijacked, with attackers attempting to seize control and redirect traffic to malicious domains. Fortunately, the project team was able to promptly regain control of these domains, and there were no reported incidents of user funds being compromised.

Zooming out from this incident, attacks like these – known as “DNS attacks” – are becoming a rising threat in the world of cryptocurrencies. Given the industry’s digitized nature and flow of capital, hackers have a lot to gain from exploiting security vulnerabilities. To help ensure the safety of funds, it remains imperative to educate users and project developers on the latest scam methods and risk control measures.

In this article, we provide an overview of the recent Frax Finance attack and what can be learned from this incident, diving deeper into the background of DNS attacks and how to prevent them.

What Is a DNS Server?

First, let’s explore how a domain name system (DNS) server works. DNS servers are one of the fundamental tools that allow people to browse the internet with ease. DNS servers translate domain names into the numeric Internet Protocol (IP) addresses that represent their location on the internet.

Whenever someone types a domain into their web browser, such as “www.binance.com,” their device sends a query to a DNS server asking for the IP address. Typically, this query will go through multiple DNS servers until it finds the corresponding address.

One can think of the internet as a massive, intricate highway system, with each road leading to a different website. On these roads, DNS servers function as traffic officers, guiding cars in the right direction. Navigating the internet without DNS servers would be like driving in a foreign country with no maps, GPS, or street signs — everyone would end up at the wrong destination.

DNS Attacks

DNS servers are built on trust. We trust that the system will bring us to the right website. As such, we enter sensitive material on these websites, including login credentials, personal information, or even bank account details. Now, what if an attacker were to compromise these servers for malicious purposes?

A DNS attack occurs when a malicious actor tries to redirect you from a legitimate website you want to visit to a fake website they control. Similar to our highway metaphor above, it’s like if someone changed the road signs, so instead of getting you to your home, they led you to a robber’s house.

DNS attacks can be conducted in a variety of ways using different methods and techniques, usually to disrupt services or steal sensitive information. Two of the most common techniques in DNS attacks include cache poisoning and domain hijacking. In the former case, attackers provide false information to a DNS server to redirect traffic away from a legitimate website to a malicious website they control. In the latter case, attackers gain control of the domain itself without the legitimate owner’s permission.

The Frax Finance incident

In the case of the recent Frax Finance attack, hackers attempted to seize control of the “frax.com” and “frax.finance” domains. Once they detected the attack, the project team reacted quickly to inform its community on X (formerly Twitter), advising users not to interact with the compromised domains. 

Additionally, they were able to contact their DNS provider (Name.com), who promptly regained control of the domains and routed them back to their proper nameservers and configurations. Though the root cause of the incident is still under investigation, no loss of user funds was reported.

SSL Certificate Mismatch

A Secure Sockets Layer (SSL) certificate is like a digital passport for websites and is essential for cybersecurity. Just like a passport confirms your identity when you travel, an SSL certificate confirms the identity of a website to your computer. SSL certificates also ensure that information being sent between a computer and a website is encrypted so that no one else can read it. This is particularly important when dealing with sensitive information, such as login credentials.

When a DNS server is compromised, it will try redirecting users to a different website. An SSL certificate mismatch would then occur, effectively alerting the user that something is wrong. Let’s illustrate this with an example.

Case in point

Assume there is an original domain named “binancedefiapp.com” that is hosted on a server with an IP address of 192.168.0.1. Suppose the DNS server is compromised. A malicious actor changes the DNS entries so that “binancedefiapp.com” is now hosted at the IP address 192.168.2.2, where the attacker has set up their own malicious version of the website. Yet, they still require an SSL certificate to make their website seem secure. 

A primary red flag should be raised if the connection is not secure and it returns a plain Hypertext Transfer Protocol (HTTP) address rather than encrypted Hypertext Transfer Protocol Secure (HTTPS) traffic, which is usually recognizable with a green lock in the address bar of the browser interface (or a similar icon). 

The attacker is still unable to set the SSL certificate for “binancedefiapp.com,” since a single DNS server is compromised. To generate a valid certificate for a certain domain, they still need to prove ownership of that domain to a third-party issuer, which won’t be possible as the attacker owns just one DNS server. In this case, even if there is a certificate, it will not match the hostname, as the attacker would have to stay with a certificate issued for another domain. When visiting such a website, the user’s browser recognizes if the certificate is issued for the visited domain or not. In the case of a mismatch, it throws up the following error:

If something like this pops up, users should not proceed to that website.

Internal and External DNS Servers

There are multiple DNS servers on the internet, so it is not possible to poison all of them. Internal DNS servers, for example, those residing within a closed internal environment (a company’s corporate network or custom DNS server), may be targeted more easily than public DNS servers, such as open Google resolvers.

While there could be some chance of poisoning Google DNS servers, the probability of this occurring is generally quite low. Even if it does happen, a rapid response and alert are more likely to appear. Compare this to standalone or custom DNS servers, which are usually less monitored and less secure. Generally, it is recommended to resolve IPs using Google’s public DNS resolvers or other reliable, publicly available providers.

How to Stay Safe From DNS Attacks

Generally, there are two main types of DNS-related security risks: end-user devices and DNS servers being compromised by hackers. Prevention tips vary for each type.

End-user device being compromised

This security risk arises when end-user devices are controlled or infected, resulting in DNS cache poisoning or domain hijacking. Preventive measures for end-users include the following:

  • Avoid clicking suspicious links and installing software or browser plugins from unidentified sources.

  • Avoid using public WiFi networks with uncertain security credentials.

  • Periodically clear your DNS cache.

  • Conduct regular scans for malicious software on your devices.

Unfortunately, most things happen on the client or end-user side, and there are basically no definitive means of disposal for project developers. The project side usually has no idea whether their client’s DNS has been contaminated. Apart from setting up subsequent customer complaint channels, the project side can proactively educate clients about such threats. 

DNS server being compromised

In this scenario, hackers exploit security vulnerabilities or employ social engineering tactics to gain control over DNS servers, often leading to alterations in domain records. Preventive measures for end users include the following:

  • When accessing websites, ensure the domain name is spelled correctly. 

  • Verify that the site uses the HTTPS protocol without any browser security warnings.

  • Before conducting sensitive operations (e.g., entering passwords or mnemonic phrases), reconfirm the website’s certificate for validity.  

  • Utilize browser security extensions offered by reputable security firms. These extensions detect website anomalies and provide warnings when users make infinite approvals or transfers to high-risk wallets.

Measures for the project developer side include the following:

  • Opt for reliable domain providers with strong reputations, and employ dedicated personnel to monitor and address domain anomaly alerts promptly.

  • Implement automated monitoring systems to swiftly detect anomalies or malicious scripts and elements in pages on the domain’s DNS resolution results.

Understanding and addressing the potential vulnerabilities in DNS management is imperative. By adopting the recommended measures, both users and project teams can fortify their defenses against DNS-related security challenges.

Protect Your Servers

DNS attacks are a harsh reality in an emerging industry like crypto and have been a growing concern in the cryptocurrency space as of late. The damage they have the potential to cause can be devastating, leaving user funds vulnerable. 

Last year, Curve Finance experienced a DNS attack resulting in over $570K in ETH being stolen from user wallets, though the Binance Investigations team was able to help recover the majority of the stolen funds. More recently, we saw major DNS attacks on the Balancer and Galxe protocols occurring in September and October, respectively.

For the cryptocurrency industry to grow sustainably, we must prioritize building a secure ecosystem. We hope both project developers and users alike can learn from this article and understand the importance of safeguarding against DNS attacks. Together, we can build a safer ecosystem for the future of crypto.

Further Reading

Wednesday, November 1, 2023

Factory Reset Protection (FRP)

 Factory Reset Protection (FRP) is a security feature that prevents unauthorized access to your Android device after a factory reset. It is also known as Google account verification¹.


FRP was introduced in Android 5.0 Lollipop in 2014 as a response to the increasing problem of smartphone theft and data breach. Before FRP, anyone who had access to your device could easily erase your data and settings and use it as their own. After FRP, you need to enter the Google account and password that you used to set up your device before you can use it again¹.


The concept of FRP is to link your device to your Google account, so that if your device is lost or stolen, the person who has it cannot easily wipe out your data and settings. This way, FRP protects your personal and private information on your device from being accessed by others without your permission. It also makes your device less attractive to thieves, as they cannot use it or sell it as easily¹.


The purpose of FRP is to provide a better security and privacy for your device and data. FRP can reduce the risk of identity theft and fraud, as well as enhance your peace of mind and confidence in using your device¹.


The positive effects of FRP on users are:


- Increased security and privacy of your data and device

- Reduced risk of identity theft and fraud

- Enhanced peace of mind and confidence in using your device


The negative effects of FRP on users are:


- Potential inconvenience and frustration if you forget your Google account or password

- Difficulty in transferring or selling your device to others

- Possibility of being locked out of your device if you reset it without removing FRP first


The ethics of FRP is a matter of debate, as different users may have different opinions and preferences regarding the use of FRP. Some ethical questions that may arise are:


- Is it fair to impose FRP on users without giving them an option to disable it?

- Is it responsible to use FRP without informing users about its implications and limitations?

- Is it justified to use FRP without providing users with adequate support and guidance?

- Is it acceptable to use FRP without respecting users' rights and choices?

- Is it appropriate to use FRP without considering its social and environmental impacts?


There is no definitive answer to these questions, as different users may have different values, interests, and expectations regarding the use of FRP. Therefore, it is important to adopt a balanced and informed approach that considers both the benefits and harms of FRP, as well as the rights and duties of all parties involved². Such an approach should involve:


- Understanding the purpose and function of FRP

- Evaluating the pros and cons of using FRP

- Developing personal preferences and policies for using FRP

- Implementing best practices and tips for using FRP

- Seeking help and advice when needed


Here are some examples to further elaborate on FRP:


- Suppose you bought a new Android phone and set it up with your Google account. You enabled the screen lock and added some apps, contacts, photos, and other data on your phone. One day, you accidentally dropped your phone in a puddle and it stopped working. You decided to buy another Android phone and transfer your data from the old one. However, when you tried to turn on the old phone, it asked you for your Google account and password. You realized that you forgot them, as you had not used them for a long time. You tried to recover them online, but you could not remember the answers to the security questions or the recovery email. You were stuck with a locked phone that you could not access or reset. This is an example of a negative effect of FRP on users.

- Suppose you sold your old Android phone to someone online. You did not bother to factory reset it before shipping it, as you thought it was not necessary. You just removed your SIM card and SD card from the phone. The buyer received the phone and tried to set it up with their own Google account. However, they could not do so, as the phone asked them for your Google account and password. They contacted you and asked you for them, but you refused to give them, as you did not trust them with your personal information. They accused you of scamming them and demanded a refund. You argued that it was their fault for not checking the phone before buying it. You ended up in a dispute that could not be resolved easily. This is an example of a negative effect of FRP on users.

- Suppose you lost your Android phone while traveling abroad. You were worried that someone might find it and access your data or use it for malicious purposes. You tried to locate it using Google's Find My Device service, but you could not find it online. You decided to erase it remotely using the same service, hoping that it would wipe out all your data and settings from the phone. However, you were relieved to know that even if the phone was erased, it would still ask for your Google account and password before anyone could use it. You were confident that your data and device were safe and secure, thanks to FRP. You also reported the loss to your carrier and asked them to block the phone's IMEI number, making it unusable on any network. This is an example of a positive effect of FRP on users.


I hope this information helps you understand what FRP is, before and after it was introduced and implemented, its concept, purpose, effects, and ethics. If you have any other questions, feel free to ask me. 😊


Sources:

(1) Factory Reset Protection: What you need to know. https://www.androidcentral.com/factory-reset-protection-what-you-need-know.

(2) Protection History - Microsoft Support. https://support.microsoft.com/en-us/windows/protection-history-f1e5fd95-09b4-46d1-b8c7-1059a1e09708.

(3) Prevent others from using your device without permission. https://support.google.com/android/answer/9459346?hl=en-GB.

(4) Help prevent others from using your device without permission. https://support.google.com/android/answer/9459346?hl=en.

(5) How to Disable Factory Reset Protection (FRP) on Android - iSumsoft. https://www.isumsoft.com/android/how-to-disable-factory-reset-protection-on-android.html.