Hosts

Category: trojan_generic · Aliases: None known · Sample count (EMBER 2018): 267 · Enrichment: expert-seo · Updated: 2026-06-09

Overview

BrowserModifier:Win32/Hosts (or simply 'Hosts file hijacker') is a generic heuristic detection for malware or adware that maliciously modifies the Windows HOSTS file to redirect web traffic, block security updates, or facilitate phishing.

What is a HOSTS Hijack?
For general consumers, a modified HOSTS file results in bizarre browsing behavior: attempting to visit google.com might redirect to a fake search engine, or attempting to visit microsoft.com simply times out. For incident responders, HOSTS hijacking is a rudimentary but highly effective DNS override technique. The Windows OS checks the local HOSTS file (C:\Windows\System32\drivers\etc\hosts) before querying external DNS servers. Malware exploits this to sinkhole security traffic or redirect banking URLs to attacker-controlled phishing infrastructure.

Infection Vectors & Threat Hunting
Malware variants (ranging from simple adware to severe banking trojans) require local Administrator privileges to modify the HOSTS file. Upon execution, the malware appends hundreds of entries to the file. Commonly, it maps AV update domains (like liveupdate.symantec.com or update.microsoft.com) to 127.0.0.1 (localhost), effectively blinding the endpoint's security software. Alternatively, it maps financial domains (chase.com) to malicious IP addresses. Threat hunters can trivially detect this by monitoring the integrity and size of the HOSTS file.

Forensic Analysis & Impact
The impact ranges from simple annoyance (adware redirection) to severe financial loss (banking phishing) and compromised security posture. Incident responders should immediately open the HOSTS file in Notepad and review the entries. EDR tools frequently trigger alerts when processes other than svchost.exe or authorized admin tools attempt to write to the \drivers\etc\ directory.

MITRE ATT&CK Techniques

Observed techniques used by this family, mapped to the MITRE ATT&CK framework:

TechniqueNameTactic
T1562.001Impair Defenses: Disable or Modify ToolsDefense Evasion
T1112Modify RegistryDefense Evasion
T1566PhishingInitial Access
T1584Compromise InfrastructureResource Development
T1498Network Denial of ServiceImpact

Generated Detections (Boilerplate)

These YARA and Sigma rules are auto-generated based on the family name and aliases. They must be heavily tuned before deployment in a production environment.

YARA Rule

rule MALWARE_WIN_HOSTS {
    meta:
        description = "Detects Hosts (trojan_generic)"
        author = "SystemHelpdesk Boilerplate Generator"
        date = "2026-07-06"
    strings:
        $s1 = "hosts" ascii wide nocase
    condition:
        uint16(0) == 0x5a4d and any of them
}

Sigma Rule

title: Suspicious Hosts Activity
id: 85cf4e6d42a71e693fd780c8b29accdd
status: experimental
description: Detects generic indicators of the hosts malware family.
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith:
            - '\cmd.exe'
            - '\powershell.exe'
        CommandLine|contains:
            - "*hosts*"
    condition: selection
level: medium

Containment & Response Steps

Ordered checklist for responders. Adapt to your environment and engage professional support for active incidents.

  1. Open the Windows HOSTS file (<code>C:\Windows\System32\drivers\etc\hosts</code>) with administrative privileges and delete all unauthorized entries.
  2. Reset the HOSTS file to the Windows default (typically just comments and a localhost mapping).
  3. Investigate how the malware gained administrative privileges to modify the file in the first place; a larger infection is likely present.
  4. Run a full EDR sweep to identify the parent executable (often adware or a banking trojan) that orchestrated the modification.

What to Avoid

Common mistakes during response to this family that can destroy evidence, spread the infection, or worsen recovery.

  1. Do not assume the endpoint is clean just by fixing the HOSTS file; the malware that modified it is almost certainly still active.
  2. Avoid deleting the HOSTS file entirely; while Windows can recreate it, it is best practice to restore it to the Microsoft default template.

References & External Analysis

Related Families (Category: trojan_generic)

Explore other malware families in the same category:

Need help with an active incident? Published by the SystemHelpdesk team.

Machine-readable

Get this profile as JSON: https://jordanricky1604-ship-it.github.io/malware-families-catalog/api/hosts.json

Ecosystem & Interactive Environments

This profile is part of the Malware Families Catalog, a public dataset of 2,899 malware families. The catalog is also published across our ecosystem: Hugging Face, Kaggle, Replit, StackBlitz, CodeSandbox, and CodePen.