Security Experts:

Connect with us

Hi, what are you looking for?


Malware & Threats

Malware Uses Clever Technique to Hide DNS Changes

Several pieces of malware and adware have been observed using a clever technique to hide the changes they make to the DNS settings of infected devices, ESET reported on Thursday.

Several pieces of malware and adware have been observed using a clever technique to hide the changes they make to the DNS settings of infected devices, ESET reported on Thursday.

One of these threats is DNS Unlocker, a piece of adware that ESET has classified as a potentially unwanted application (PUA). DNS Unlocker changes the settings of an infected computer so that it uses rogue DNS servers that inject malicious JavaScript code. This allows its operators to replace regular ads served by Google with their own ads and make a profit.

DNS Unlocker has been around for some time and there are several articles online on how to get rid of it. For example, one post published on Microsoft’s community forum in August 2015 advises users affected by the adware to manually configure IPv4 properties in the Windows control panel so that the DNS server address is obtained automatically.

However, this piece of advice no longer works with more recent versions of DNS Unlocker. According to ESET, if a newer version is installed, users who access IPv4 properties in the control panel see that their DNS is obtained automatically.

Researchers discovered that the adware hides the changes from users by making modifications in the registry, where each network adapter has an entry called NameServer. The value of this entry contains the DNS server’s IP address when users set a static DNS.

When two static DNS addresses are set by the user via the control panel or the netsh command, they are stored in the registry as a list where each entry is separated by a comma (e.g., Static DNS addresses can be manually added in the registry, but the modification is not shown in the control panel if the comma is replaced by a space (e.g. If the ipconfig /all command is used to check the network settings, the static DNS address is displayed, but users are informed that the address is obtained automatically.

Adding the DNS addresses manually to the registry with a space between them allows attackers to hijack DNS settings without leaving an apparent trace. ESET pointed out that this could be a major problem for regular users and companies that offer remote support.

There is another method that can be used to identify and remove the rogue DNS addresses besides accessing the registry directly. In the IPv4 properties window, in the advanced settings section, the DNS server addresses are listed next to each other separated by a space, just like in the registry, but they should normally be listed one under another. Users can remove the rogue entries from this menu and their DNS server’s address will once again be obtained automatically.

Hidden DNS changes

ESET reported the issue to Microsoft on May 10. The company admitted that it’s a problem and it might consider making some changes in future versions of Windows, but it’s not treating it as a security flaw.

“As modifying the registry requires administrative privileges we do not consider this to meet the bar for security servicing through MSRC,” Microsoft said.

ESET noted that DNS Unlocker has been using this method in the wild since December 2015. The security firm discovered another piece of adware and two Trojans that leverage the same technique.

Researchers said the technique works on all versions of Windows, and it works even if the comma is replaced with a semicolon instead of a space when writing the DNS addresses in the registry.

Related: Malware Changes Router DNS Settings via Mobile Devices

Written By

Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.

Click to comment

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join this webinar to learn best practices that organizations can use to improve both their resilience to new threats and their response times to incidents.


Join this live webinar as we explore the potential security threats that can arise when third parties are granted access to a sensitive data or systems.


Expert Insights

Related Content


The changing nature of what we still generally call ransomware will continue through 2023, driven by three primary conditions.


No one combatting cybercrime knows everything, but everyone in the battle has some intelligence to contribute to the larger knowledge base.


A recently disclosed vBulletin vulnerability, which had a zero-day status for roughly two days last week, was exploited in a hacker attack targeting the...

Malware & Threats

Threat actors are increasingly abusing Microsoft OneNote documents to deliver malware in both targeted and spray-and-pray campaigns.

Malware & Threats

Microsoft plans to improve the protection of Office users by blocking XLL add-ins from the internet.


More than 3,800 servers around the world have been compromised in recent ESXiArgs ransomware attacks, which also include an improved process.

Malware & Threats

Unpatched and unprotected VMware ESXi servers worldwide have been targeted in a ransomware attack exploiting a vulnerability patched in 2021.

Malware & Threats

A vulnerability affecting IBM’s Aspera Faspex file transfer solution, tracked as CVE-2022-47986, has been exploited in attacks.