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
โ๏ธ techmantrapatil@gmail.com
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.