IncidentResponsev2

4.18 Compare Hashes of Suspected Malware

Task

Perform Hash Analysis and Signature check of Suspected Malware to identify malware samples, support incident response investigations, and validate against known-good and known-bad datasets.


Conditions

Given:


Standards


End State

All file hashes of suspected malware have been analyzed, compared, validated, and documented.


Notes


Manual Steps

Gathering Hash of Files

MacOS

openssl md5 README.md
openssl sha1 README.md

Linux

md5 filename
sha1sum filename

Windows

CertUtil
certutil -hashfile C:\Malware\sample.exe SHA256
PowerShell
Get-FileHash -Path "C:\Malware\sample.exe" -Algorithm SHA256
Hashdeep (optional)
hashdeep.exe -c md5,sha1,sha256 -r C:\Malware\sample.exe

Submitting Hashes to VirusTotal using Sysinternals Suite

Process Explorer

SigCheck.exe

sigcheck.exe -vt file.exe
sigcheck.exe -v -c C:\

Signature Checking (Verify File Authenticity)

signtool verify /pa file.exe

Advanced Cloud/Remote Intelligence Check (Expanded)

VirusTotal (API + Web)

https://www.virustotal.com/gui/file/<hash>

Hybrid Analysis

https://www.hybrid-analysis.com/search?query=<hash>

Abuse.ch MalwareBazaar

https://bazaar.abuse.ch/search.php?query=<hash>

Cloud Environment Workflow

AWS GuardDuty

Azure Defender for Endpoint

GCP VirusTotal (native integration)


Running Script

Automated scheduled collection example (Windows):

Get-ChildItem -Path "C:\Malware\" -File | ForEach-Object {
    Get-FileHash -Path $_.FullName -Algorithm SHA256 | Export-Csv "C:\Hashes\collected_hashes.csv" -Append -NoTypeInformation
}

Dependencies


Other Available Tools

Tool Platform Installation Usage
CertUtil Windows Native Single hash calculation
PowerShell Windows Native Single/multi hash calculation
Hashdeep Windows/Linux/macOS Open Source Multi-hash file integrity
Process Explorer Windows Sysinternals Running process hash + VirusTotal
Sigcheck Windows Sysinternals Signature + VirusTotal hash
VirusTotal Cloud Web/API Threat intelligence lookup
Hybrid Analysis Cloud Web Threat intelligence lookup
AWS GuardDuty Cloud Native Automatic hash intel
Azure Defender Cloud Native Automatic hash intel
GCP VirusTotal Cloud Native Hash submission and review

Operator Recommendations and Additional Tools

Operator Checklist

Best Practices


References


Revision History

Date Version Description Author
2025-05-02 1.0 Original retained + expanded with multi-platform hashing, cloud, operator workflow Leo