A lightweight, SOC-ready malware detection tool using hash-based identification
Built with pure Bash for Linux & macOS environments.
Malware Hash Scanner is a command-line cybersecurity tool designed for SOC analysts, incident responders, and security learners.
It identifies known malware by generating SHA256 hashes of files and comparing them against a threat intelligence hash database.
This tool is ideal for:
- Quick malware triage
- Threat hunting
- First-level SOC automation
- Incident response validation
✅ Scan single files or entire directories
✅ Generate secure SHA256 hashes
✅ Match against a known malware hash database
✅ Clear SOC-style alerting output
✅ Lightweight & fast (pure Bash, no APIs)
✅ Works on Linux & macOS
✅ Easy to extend with threat intelligence feeds
1️⃣ Accepts a file or directory as input
2️⃣ Generates SHA256 hash for each file
3️⃣ Compares the hash with malware_hashes.txt
4️⃣ Flags files as:
[OK] CLEAN[ALERT] MALWARE DETECTED
malware-hash-scanner/
│
├── scanner.sh # Main scanning script
├── malware_hashes.txt # Known malware hash database
├── README.md # Documentation
└── samples/ # Test files (optional)
File: malware_hashes.txt
- VirusTotal
- Abuse.ch
- MISP
- Open-source threat intelligence reports
git clone https://github.com/mantrapatil03/malware-hash-scanner.git
cd malware-hash-scanner
chmod +x scanner.sh
Scan a Single File
./scanner.sh suspicious.exe
Scan an Entire Directory
./scanner.sh /home/user/downloads
🔹 Quick malware validation during incident response
🔹 Hash-based detection in compromised systems
🔹 First-level SOC analyst automation
🔹 Threat hunting on endpoints
🔹 Training tool for cybersecurity learners
✅ Support for MD5 / SHA1 / SHA256
📊 JSON / CSV output for SIEM ingestion
🌐 VirusTotal API integration
📁 Logging & report generation
⏱️ Scheduled scans using cron
This tool is intended strictly for educational and defensive cybersecurity purposes. Do not scan systems or files you do not own or have explicit permission to analyze.
Mantra Patil
Made with ❤️ & Bash by Mantra Patil
🌟 If you found this project helpful, please give it a star! 🌟
Your support motivates further open-source work and new features.