ShieldX-Defender is a Python-based antivirus scanner that integrates real-time file monitoring with YARA rule-based scanning and known malware hash detection. Designed for both security enthusiasts and developers, it provides robust protection against malicious files while offering a user-friendly web dashboard for monitoring.
- π΅οΈ Real-Time Monitoring: Auto-scans files in specified directories
- βοΈ YARA Rule Engine: Custom malware detection using YARA rules
- π Hash-Based Detection: SHA256 comparison against known malware database
- π Web Dashboard: Real-time scan results via Flask interface
- π¨ Suspicious File Alerts: Flags executables/ZIPs/risky file types
- π₯οΈ Cross-Platform: Works on Linux, Windows, and macOS
- Python 3.8+
- libmagic (for file type detection):
# Linux (Debian/Ubuntu) sudo apt-get install libmagic1 # macOS brew install libmagic # Windows (via Chocolatey) choco install libmagic
Clone the repository:
git clone https://github.com/Directedchari0t/ShieldX-Defender.git
cd ShieldX-Defender
Basic Command:
```bash
# Monitor the default directory (Downloads)
python3 antivirus.py
Custom Monitoring:
# Monitor a custom directory and change the dashboard port
python3 antivirus.py --monitor /path/to/directory --port 8080
Web Dashboard:
"After starting the tool, access the dashboard at http://localhost:6969 to view real-time scan results."
Flag Description Default
--monitor<PATH> Directory to monitor ~/Downloads
--port <NUM> Web dashboard port 6969
--verbose Enable detailed logging False
ShieldX-Defender/
βββ core/ # Core logic (scanning, monitoring)
βββ web/ # Flask-based dashboard
βββ data/ # YARA rules and malware hashes
βββ tests/ # Unit/integration tests
βββ requirements.txt # Python dependencies
- `core/scanner.py`: Implements file scanning using YARA and hash checks.
- `web/dashboard.py`: Runs the Flask server for the web interface.
- `data/yara_rules/`: Store custom YARA rules here (e.g., `ransomware.yar`).
### "Magic Library Not Found"
Install `libmagic` for your OS:
```bash
# Ubuntu/Debian
sudo apt-get install libmagic1
chmod 644 data/yara_rules/*.yar
Ensure YARA files are in data/yara_rules/ and have .yar extensions.
Validate rule syntax:
yara data/yara_rules/exploits.yar test_file.exe
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-feature
Commit changes:
git commit -m "Add amazing feature"
Push to branch:
git push origin feature/amazing-feature
Open a Pull Request
Distributed under the MIT License - see the LICENSE file for details.
If you have any questions, feel free to reach out:
- Email: the0ffs3c@gmail.com
- GitHub: https://github.com/the0ffsc
- LinkedIn: https://www.linkedin.com/in/Akshay Mahant
You can also open an issue or pull request if you encounter any bugs or would like to contribute.

