Currently supported versions of Website Blocker:
| Version | Supported |
|---|---|
| 1.0.x | ✅ |
- Modify the Windows hosts file (
C:\Windows\System32\drivers\etc\hosts) - Run HTTP server on port 80
Security Implications:
- Application has system-level access when running as admin
- Can modify critical system files
- Users should review source code before running
✅ Safety Measures:
- Creates backup before modifications (
hosts.bak) - Validates entries before writing
- Restores backup on errors
- Uses file locking to prevent corruption
- Incorrect modifications could break internet access
- Malicious code could redirect sites to harmful servers
- Recommendation: Review source code in
src/website_blocker.py
- Runs local HTTP server on port 80
- Serves static HTML block page only
- No external network access
- No sensitive data transmitted
Potential Risks:
- Port 80 accessible on local network
- Other devices on network could access block page
- Mitigation: Server only serves static HTML, no code execution
✅ Configuration File (config/blocked_sites.json):
- Stores only website domains
- No sensitive user data
- Plain text JSON format
- User can inspect and edit manually
What's Stored:
{
"blocked_sites": [
"facebook.com",
"youtube.com"
]
}✅ No External Dependencies
- Uses Python standard library only
- No third-party packages
- Reduces supply chain attack risk
- All code is reviewable in repository
Standard Library Modules Used:
tkinter- GUI frameworkhttp.server- HTTP serverthreading- Background serverjson- Configuration storageos,sys,pathlib- File system operationsdatetime,time- Timer functionality
- Block page served over HTTP, not HTTPS
- HTTPS sites will show certificate warnings
- Cannot display block page for HTTPS without browser extension
- Must run with elevated privileges
- Potential for system-wide impact if compromised
- Users should trust the application before running
- Anyone with access to computer can unblock sites
- No authentication mechanism
- Consider adding password protection in future versions
- HTTP server accessible to other devices on local network
- Block page visible to network users
- Recommendation: Use firewall to restrict port 80 access
- Configuration file stored in plain text
- Blocked sites list readable by anyone with file access
- No sensitive data, but lack of privacy
If you discover a security vulnerability, please report it responsibly:
-
DO NOT open a public GitHub issue
-
Email: [Your email for security reports]
- Subject: "Website Blocker Security Vulnerability"
- Include detailed description
- Steps to reproduce
- Potential impact assessment
-
Expected Response Time:
- Initial response: Within 48 hours
- Status update: Within 7 days
- Fix timeline: Depends on severity
- Vulnerability type (e.g., code injection, privilege escalation)
- Affected component (which file/function)
- Steps to reproduce
- Proof of concept (if applicable)
- Potential impact (what could happen)
- Suggested fix (optional)
- Coordinated Disclosure: We will work with you to understand and fix the issue
- Timeline: Aim to release fix within 30 days
- Credit: You will be credited in release notes (unless you prefer anonymity)
- Public Disclosure: After fix is released
- ✅ Review source code before running with admin privileges
- ✅ Download from official repository only
- ✅ Verify file integrity (check file hashes if provided)
- ✅ Run with least privilege when possible (future versions may not require admin)
- ✅ Keep Python updated to latest stable version
- ✅ Monitor hosts file for unexpected changes
- ✅ Use firewall to restrict port 80 access to local machine only
- ✅ Code review all pull requests
- ✅ Run quality checks (
python tests/run_quality_checks.py) - ✅ Validate inputs (URL sanitization already implemented)
- ✅ Use type hints for type safety
- ✅ Avoid
eval(),exec(),__import__() - ✅ Handle exceptions gracefully
- ✅ Document security implications of changes
- ✅ Hosts file corruption/manipulation
- ✅ Code injection vulnerabilities
- ✅ Privilege escalation
- ✅ Path traversal attacks
- ✅ Denial of service (local)
- ❌ Physical access attacks
- ❌ Social engineering
- ❌ Browser vulnerabilities
- ❌ Operating system vulnerabilities
- ❌ Network-level attacks (MITM, etc.)
Before running Website Blocker:
- Downloaded from official repository
- Reviewed source code (at minimum:
src/website_blocker.py,src/proxy_server.py) - Understand admin privilege implications
- Backed up hosts file manually (optional extra safety)
- Configured firewall to restrict port 80 if needed
- Python installation is up-to-date
We appreciate responsible disclosure of security issues. Contributors who report valid vulnerabilities will be acknowledged here:
- No vulnerabilities reported yet
For security-related questions (not vulnerabilities):
- Open a GitHub Discussion
- Tag with
securitylabel
For actual vulnerabilities:
- Email: [Your security contact email]
- Do not open public issues
Last Updated: 2025-11-24 Version: 1.0.0