https://github.com/simeononsecurity/system-wide-windows-ad-blocker
Block Ads, Tracking, and Telemetry System Wide
https://github.com/simeononsecurity/system-wide-windows-ad-blocker
adblock adblocker powershell-script windows windows-firewall
Last synced: 3 months ago
JSON representation
Block Ads, Tracking, and Telemetry System Wide
- Host: GitHub
- URL: https://github.com/simeononsecurity/system-wide-windows-ad-blocker
- Owner: simeononsecurity
- License: mit
- Created: 2021-04-02T06:46:31.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-26T22:55:34.000Z (10 months ago)
- Last Synced: 2025-02-01T19:43:46.293Z (4 months ago)
- Topics: adblock, adblocker, powershell-script, windows, windows-firewall
- Language: PowerShell
- Homepage: https://simeononsecurity.com/github/System-Wide-Windows-Ad-Blocker
- Size: 2.06 MB
- Stars: 39
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# System-Wide-Windows-Ad-Blocker
[](https://github.com/sponsors/simeononsecurity) [](https://github.com/simeononsecurity/System-Wide-Windows-Ad-Blocker/actions/workflows/virustotal.yml)
This script is a Windows PowerShell script that downloads and applies the "StevenBlack/hosts" file to the system's "hosts" file, which can be used to block certain domains/websites by mapping them to an IP address of your choice (usually the IP address of the local machine). The script checks the internet connection and proxy settings, and tries downloading the latest version of the "hosts" file from two different sources: "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts" and "http://sbc.io/hosts/hosts". If the download fails, the script continues with a local copy of the "hosts" file. The script requires elevated privileges to run and modifies the ".NETFramework" registry key to use only the latest version of the .NET framework.
*We are seeking all comments and concerns for this repo. Please submit an [issue](https://github.com/simeononsecurity/System-Wide-Windows-Ad-Blocker/issues) with any information you might have.*
## Known Issues
We've so far been unable to replicate the issue, but on some systems a issue occurs from the hosts file being too large. This causes windows to be unable to resolve any domain at all.
We suspect this is caused by low spec system performance. If this is you, please revert the changes with the guide below and submit an issue.### Lists Used:
- [StevenBlack/hosts - adware + malware](https://github.com/StevenBlack/hosts)### Example:
#### Manual install:
**The script may be launched from the extracted GitHub download like this:**
```powershell
.\sos-system-wide-windows-ad-block.ps1
```
#### Automated install:
Run the latest version of the script automatically:
```powershell
iwr -useb 'https://simeononsecurity.ch/scripts/soswindowsadblocker.ps1' | iex
```
#### Removal
https://github.com/simeononsecurity/System-Wide-Windows-Ad-Blocker/issues/1## Learn more about [Blocking Windows Ads and Trackers](https://simeononsecurity.ch/github/System-Wide-Windows-Ad-Blocker)
Explore the World of Cybersecurity
![]()
### Links:
- #### [github.com/simeononsecurity](https://github.com/simeononsecurity)
- #### [simeononsecurity.com](https://simeononsecurity.com)