This issue occurs because Windows Defender may determine incorrectly that the Hosts file was changed by malware, such as adware or spyware. Typically, malware programs change the Hosts file to redirect users to malicious websites. Therefore, Windows Defender may detect the Hosts file as a security threat.
To resolve this issue, exclude the Hosts file from scanning in Windows Defender. To do this, follow these steps:
Open Windows Defender.
On the Settings tab, click Excluded files and locations.
Under File locations, click Browse.
Locate and then click the Hosts file.
Note By default, the Hosts file is located in the %systemroot%\system32\drivers\etc folder.
Click Add, and then click Save changes.
Exit Windows Defender.
For more information about the SettingsModifier:Win32/PossibleHostsFileHijack malware threat, go to the following Microsoft Malware Protection Center encyclopedia entry: