Dataset
Other
Threat Intelligence

hosts

by StevenBlack

29.6Kstars
2.4Kforks
567watchers
Updated about 1 month ago
About

A consolidated and extensible hosts file that blocks ads, malware, and optionally porn and social media domains to enhance DNS security and network monitoring.

🔒 Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories.

Primary Use Case

This tool is primarily used to improve network security by blocking access to malicious, advertising, and optionally adult or social media domains via the hosts file. Security professionals, system administrators, and privacy-conscious users utilize it to automate DNS-based blocking and reduce exposure to threats and unwanted content.

Key Features
  • Consolidates hosts files from multiple well-curated sources
  • Extensible with optional categories like porn and social media blocking
  • Enhances DNS security by blocking malicious and ad domains
  • Supports security automation through easy integration
  • Regularly updated to maintain effectiveness
  • Facilitates network monitoring by filtering unwanted traffic

Installation

  • Download or clone the repository from GitHub: git clone https://github.com/StevenBlack/hosts.git
  • Choose the desired hosts file variant (default, porn, social, etc.)
  • Replace or merge the chosen hosts file with your system's hosts file (e.g., /etc/hosts on Linux/macOS or C:\Windows\System32\drivers\etc\hosts on Windows)
  • Flush DNS cache or restart network services to apply changes

Usage

>_ git clone https://github.com/StevenBlack/hosts.git

Clone the repository to obtain the latest hosts files.

>_ cat hosts/hosts > /etc/hosts

Replace the system hosts file with the consolidated hosts file to block unwanted domains.

>_ cat hosts/hosts-porn > /etc/hosts

Use the hosts file variant that includes blocking of pornographic domains.

>_ cat hosts/hosts-social > /etc/hosts

Use the hosts file variant that includes blocking of social media domains.

Security Frameworks
Defense Evasion
Impact
Reconnaissance
Resource Development
Collection
Usage Insights
  • Integrate the hosts file into endpoint configurations to automate DNS-level blocking of malicious domains.
  • Combine with network monitoring tools to correlate blocked domains with suspicious activity for enhanced threat detection.
  • Use as part of a layered defense strategy to reduce attack surface by preventing access to known malicious or unwanted domains.
  • Automate updates in CI/CD pipelines to ensure the latest threat intelligence is always enforced.
  • Extend blocking categories dynamically based on organizational risk tolerance and policy changes.

Docs Take 2 Hours. AI Takes 10 Seconds.

Ask anything about hosts. Installation? Config? Troubleshooting? Get answers trained on real docs and GitHub issues—not generic ChatGPT fluff.

3 free chats per tool • Instant responses • No credit card

Security Profile
Red Team30%
Blue Team80%
Purple Team60%
Details
LicenseMIT License
LanguagePython
Open Issues2186
Topics
python
unified-hosts
malware
ad-blocker
porn-filter
social-media-filter
hosts
privacy
protection
pornblocker